Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@candulabs/models

Package Overview
Dependencies
Maintainers
5
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@candulabs/models - npm Package Compare versions

Comparing version 0.6.14-alpha.6 to 0.6.14-alpha.7

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## 0.6.14-alpha.7 (2021-03-03)
**Note:** Version bump only for package @candulabs/models
## 0.6.14-alpha.6 (2021-03-03)

@@ -8,0 +16,0 @@

2

dist/index.cjs.js

@@ -16,3 +16,3 @@ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var DEFAULT_SEGMENT_ID="Everyone",commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},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=_root.Symbol,_Symbol=Symbol,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 o=!0}catch(e){}var n=nativeObjectToString.call(e);return o&&(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,isArray=Array.isArray,isArray_1=isArray;function isObjectLike(e){return null!=e&&"object"==typeof e}var isObjectLike_1=isObjectLike,stringTag="[object String]";function isString(e){return"string"==typeof e||!isArray_1(e)&&isObjectLike_1(e)&&_baseGetTag(e)==stringTag}var isString_1=isString,numberTag="[object Number]";function isNumber(e){return"number"==typeof e||isObjectLike_1(e)&&_baseGetTag(e)==numberTag}var isNumber_1=isNumber,identifierRegex=/^([a-zA-Z0-9]|_|-)+$/,isIdentifier=function(e){return isString_1(e)&&e.length>=3&&e.length<100&&identifierRegex.test(e)},IsNumericId=function(e){return isNumber_1(e)&&e>=0},isClientToken=function(e){return isString_1(e)&&!!e.match(/^[0-9a-zA-Z]*$/)&&e.length>=10},isUserId=function(e){return IsNumericId(e)||isString_1(e)&&e.trim().length>0};!function(e){e.SDK="SDK",e.PREVIEW="PREVIEW"}(exports.ACTORS||(exports.ACTORS={}));

***************************************************************************** */
var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function __spreadArrays(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var o=Array(e),n=0;for(t=0;t<r;t++)for(var s=arguments[t],i=0,a=s.length;i<a;i++,n++)o[n]=s[i];return o}!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"}(exports.MESSAGES||(exports.MESSAGES={}));var message=function(e,t){return void 0===t&&(t={}),__assign({type:e},t)},messages={bootstrap:function(e,t,r,o){return message(exports.MESSAGES.BOOTSTRAP,{clientToken:e,userId:t,version:r,preview:o})},changePosition:function(e,t){return message(exports.MESSAGES.CHANGE_POSITION,{mouseEvent:e,top:t})},closePreview:function(){return message(exports.MESSAGES.CLOSE_PREVIEW)},previewLoaded:function(){return message(exports.MESSAGES.PREVIEW_LOADED)},setAvaliablePortals:function(e){return message(exports.MESSAGES.SET_AVALIABLE_PORTALS,{avaliablePortals:e})},addElement:function(e){return message(exports.MESSAGES.ADD_ELEMENT,{element:e})},removeElement:function(e){return message(exports.MESSAGES.REMOVE_ELEMENT,{id:e})},updateElement:function(e){return message(exports.MESSAGES.UPDATE_ELEMENT,{element:e})},setContent:function(e){return message(exports.MESSAGES.SET_CONTENT,{content:e})},setViewMode:function(e){return message(exports.MESSAGES.SET_VIEW_MODE,{viewMode:e})},setSelectedElement:function(e){return message(exports.MESSAGES.SET_SELECTED_ELEMENT,{element:e})}},messageFactory=function(e){var t=e.source,r=e.destination;return{read:function(e){var t=e.actor,o=e.message;return t===r?o:null},write:function(e){return{actor:t,message:e}}}},windowStream=function(e){var t=e.source,r=e.destination,o=e.targetOrigin,n=e.targetWindow,s=e.originWindow,i=e.onRecieveMessage,a=messageFactory({source:t,destination:r}),u=a.read,c=a.write,E=function(e){var t=u(e.data);t&&i(t)};return s.addEventListener("message",E,!1),{close:function(){s.removeEventListener("message",E)},send:function(e){n.postMessage(c(e),o)}}};(exports.TRIGGERS||(exports.TRIGGERS={})).ON_CLICK="OnClick",function(e){e.NATIVE="Native",e.PENDO="Pendo"}(exports.CATEGORIES||(exports.CATEGORIES={})),function(e){e.NAVIGATE="Navigate",e.CHANGE_TUTORIAL="ChangeTutorial",e.OPEN_GUIDE="OpenGuide",e.DISMISSED_CARD="DismissedCard"}(exports.HANDLER_TYPES||(exports.HANDLER_TYPES={})),function(e){e.PRIMARY="primary",e.SECONDARY="primary",e.WARNING="warning",e.DANGER="danger",e.NEUTRAL="neutral",e.ACTIVE="active",e.INFO="info"}(exports.COLORS||(exports.COLORS={}));var DEFAULT_COLOR=exports.COLORS.PRIMARY;!function(e){e.U="U",e.B="B",e.Em="Em",e.InlineCode="InlineCode"}(exports.Mark||(exports.Mark={}));var isContentHashId=function(e){return isString_1(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/)},isPortalId=function(e){return IsNumericId(e)},isPortalSlug=function(e){return isIdentifier(e)},isTutorialId=function(e){return IsNumericId(e)},isTutorialSlug=function(e){return isIdentifier(e)};!function(e){e.NotStared="NotStarted",e.InProgress="InProgress",e.Done="Done"}(exports.CheckListItemStatus||(exports.CheckListItemStatus={})),function(e){e.User="User",e.Account="Account"}(exports.CheckListScope||(exports.CheckListScope={}));var CANDU_PORTAL_CLASS="candu_portal",canduPortalId=function(e){return"candu_portal_"+e};const PREVIEW_SCRIPT_URL="https://app.candu.ai/preview.html";var PREVIEW_COOKIE_NAME="candu.preview",PREVIEW_URL_PARAM="candu_preview",PREVIEW_FRAME_ID="canduPreview";!function(e){e.COLLAPSED="Collapsed",e.EXPANDED="Expanded",e.MINIMIZED="Minimized"}(exports.FRAME_SIZES||(exports.FRAME_SIZES={})),function(e){e.TUTORIAL="Tutorial",e.PORTAL="Portal"}(exports.PREVIEW_MODES||(exports.PREVIEW_MODES={}));var PREVIEW_SCRIPT_URL$1=PREVIEW_SCRIPT_URL;!function(e){e.Global="Global",e.Organization="Organization"}(exports.StyleguideScope||(exports.StyleguideScope={})),function(e){e.Root="root",e.Rule="rule",e.Atrule="atrule",e.Decl="decl",e.Any="any"}(exports.CSSNodeTypes||(exports.CSSNodeTypes={}));var stylguideClassNameMap={button:{childClassNames:{icon:"button-icon"},variants:{color:function(e){return"color-"+e},outline:function(e){return"outline-"+e}}},typography:{variants:{typography:function(e){return"typography-"+e}}}},toCssSelector=function(e,t){var r=__assign({className:"root",variant:void 0,selector:"",output:"css"},t||{}),o=r.className,n=r.variant,s=r.selector,i=r.output,a="candu-"+e;if("global"===o)return"html"===i?"":":root";var u=null,c=[],E=stylguideClassNameMap[e]||{};if(n&&E.variants){var l=E.variants;c=Object.keys(n).reduce((function(e,t){var r=n[t],o=l[t];return e.push(o?o(r):t+"-"+r),e}),[])}return"root"!==o&&E.childClassNames&&E.childClassNames[o]&&(u="candu-"+e+"--"+E.childClassNames[o]),"css"===i?[a,u,s].reduce((function(e,t,r){return t&&""!==t?0===r?"."+a+c.map((function(e){return"."+e})).join(""):1===r?e+" ."+t:""+e+t:e}),"")||"":"root"===o?__spreadArrays([a],c).filter((function(e){return!!e})).join(" ")||"":u||""},cssInputObjToString=function(e){return Object.keys(e).reduce((function(t,r){return""+t+r+": "+e[r]+";"}),"")},cssInputStringToObj=function(e){return e.split(";").reduce((function(e,t){var r,o=t.split(":"),n=o[0],s=o[1];return n&&s?__assign(__assign({},e),((r={})[n.trim()]=s.trim(),r)):e}),{})},toStyleguideDecl=function(e){return Object.keys(e).reduce((function(t,r){return __spreadArrays(t,[{type:exports.CSSNodeTypes.Decl,prop:r,value:e[r]}])}),[])};!function(e){e.Global="Global",e.Carried="Carried"}(exports.StateScope||(exports.StateScope={})),function(e){e.CanduCdn="CanduCdn",e.CheckListApi="CheckListApi",e.CardApi="CardApi"}(exports.StateResolverType||(exports.StateResolverType={}));var isStatePath=function(e){return isString_1(e)&&!!e.match(/^@(\w|\d|_|-|\.){3,20}\$/)};exports.CANDU_PORTAL_CLASS=CANDU_PORTAL_CLASS,exports.DEFAULT_COLOR=DEFAULT_COLOR,exports.DEFAULT_SEGMENT_ID=DEFAULT_SEGMENT_ID,exports.IsNumericId=IsNumericId,exports.PREVIEW_COOKIE_NAME=PREVIEW_COOKIE_NAME,exports.PREVIEW_FRAME_ID=PREVIEW_FRAME_ID,exports.PREVIEW_SCRIPT_URL=PREVIEW_SCRIPT_URL$1,exports.PREVIEW_URL_PARAM=PREVIEW_URL_PARAM,exports.canduPortalId=canduPortalId,exports.cssInputObjToString=cssInputObjToString,exports.cssInputStringToObj=cssInputStringToObj,exports.isClientToken=isClientToken,exports.isContentHashId=isContentHashId,exports.isIdentifier=isIdentifier,exports.isPortalId=isPortalId,exports.isPortalSlug=isPortalSlug,exports.isStatePath=isStatePath,exports.isTutorialId=isTutorialId,exports.isTutorialSlug=isTutorialSlug,exports.isUserId=isUserId,exports.messageFactory=messageFactory,exports.messages=messages,exports.stylguideClassNameMap=stylguideClassNameMap,exports.toCssSelector=toCssSelector,exports.toStyleguideDecl=toStyleguideDecl,exports.windowStream=windowStream;
var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function __spreadArrays(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var o=Array(e),n=0;for(t=0;t<r;t++)for(var s=arguments[t],i=0,a=s.length;i<a;i++,n++)o[n]=s[i];return o}!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"}(exports.MESSAGES||(exports.MESSAGES={}));var message=function(e,t){return void 0===t&&(t={}),__assign({type:e},t)},messages={bootstrap:function(e,t,r,o){return message(exports.MESSAGES.BOOTSTRAP,{clientToken:e,userId:t,version:r,preview:o})},changePosition:function(e,t){return message(exports.MESSAGES.CHANGE_POSITION,{mouseEvent:e,top:t})},closePreview:function(){return message(exports.MESSAGES.CLOSE_PREVIEW)},previewLoaded:function(){return message(exports.MESSAGES.PREVIEW_LOADED)},setAvaliablePortals:function(e){return message(exports.MESSAGES.SET_AVALIABLE_PORTALS,{avaliablePortals:e})},addElement:function(e){return message(exports.MESSAGES.ADD_ELEMENT,{element:e})},removeElement:function(e){return message(exports.MESSAGES.REMOVE_ELEMENT,{id:e})},updateElement:function(e){return message(exports.MESSAGES.UPDATE_ELEMENT,{element:e})},setContent:function(e){return message(exports.MESSAGES.SET_CONTENT,{content:e})},setViewMode:function(e){return message(exports.MESSAGES.SET_VIEW_MODE,{viewMode:e})},setSelectedElement:function(e){return message(exports.MESSAGES.SET_SELECTED_ELEMENT,{element:e})}},messageFactory=function(e){var t=e.source,r=e.destination;return{read:function(e){var t=e.actor,o=e.message;return t===r?o:null},write:function(e){return{actor:t,message:e}}}},windowStream=function(e){var t=e.source,r=e.destination,o=e.targetOrigin,n=e.targetWindow,s=e.originWindow,i=e.onRecieveMessage,a=messageFactory({source:t,destination:r}),u=a.read,c=a.write,l=function(e){var t=u(e.data);t&&i(t)};return s.addEventListener("message",l,!1),{close:function(){s.removeEventListener("message",l)},send:function(e){n.postMessage(c(e),o)}}};(exports.TRIGGERS||(exports.TRIGGERS={})).ON_CLICK="OnClick",function(e){e.NATIVE="Native",e.PENDO="Pendo"}(exports.CATEGORIES||(exports.CATEGORIES={})),function(e){e.NAVIGATE="Navigate",e.CHANGE_TUTORIAL="ChangeTutorial",e.OPEN_GUIDE="OpenGuide",e.DISMISSED_CARD="DismissedCard"}(exports.HANDLER_TYPES||(exports.HANDLER_TYPES={})),function(e){e.PRIMARY="primary",e.SECONDARY="primary",e.WARNING="warning",e.DANGER="danger",e.NEUTRAL="neutral",e.ACTIVE="active",e.INFO="info"}(exports.COLORS||(exports.COLORS={}));var DEFAULT_COLOR=exports.COLORS.PRIMARY;!function(e){e.U="U",e.B="B",e.Em="Em",e.InlineCode="InlineCode"}(exports.Mark||(exports.Mark={}));var isContentHashId=function(e){return isString_1(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/)},isPortalId=function(e){return IsNumericId(e)},isPortalSlug=function(e){return isIdentifier(e)},isTutorialId=function(e){return IsNumericId(e)},isTutorialSlug=function(e){return isIdentifier(e)};!function(e){e.NotStared="NotStarted",e.InProgress="InProgress",e.Done="Done"}(exports.CheckListItemStatus||(exports.CheckListItemStatus={})),function(e){e.User="User",e.Account="Account"}(exports.CheckListScope||(exports.CheckListScope={}));var CANDU_PORTAL_CLASS="candu_portal",canduPortalId=function(e){return"candu_portal_"+e};const PREVIEW_SCRIPT_URL="https://app.candu.ai/preview.html";var PREVIEW_COOKIE_NAME="candu.preview",PREVIEW_URL_PARAM="candu_preview",PREVIEW_FRAME_ID="canduPreview";!function(e){e.COLLAPSED="Collapsed",e.EXPANDED="Expanded",e.MINIMIZED="Minimized"}(exports.FRAME_SIZES||(exports.FRAME_SIZES={})),function(e){e.TUTORIAL="Tutorial",e.PORTAL="Portal"}(exports.PREVIEW_MODES||(exports.PREVIEW_MODES={}));var PREVIEW_SCRIPT_URL$1=PREVIEW_SCRIPT_URL;!function(e){e.Global="Global",e.Organization="Organization"}(exports.StyleguideScope||(exports.StyleguideScope={})),function(e){e.Root="root",e.Rule="rule",e.Atrule="atrule",e.Decl="decl",e.Any="any"}(exports.CSSNodeTypes||(exports.CSSNodeTypes={}));var stylguideClassNameMap={button:{childClassNames:{icon:"button-icon"},variants:{color:function(e){return"color-"+e},outline:function(e){return"outline-"+e}}},badge:{variants:{color:function(e){return"color-"+e},outline:function(e){return"outline-"+e}}},typography:{variants:{typography:function(e){return"typography-"+e}}}},toCssSelector=function(e,t){var r=__assign({className:"root",variant:void 0,selector:"",output:"css"},t||{}),o=r.className,n=r.variant,s=r.selector,i=r.output,a="candu-"+e;if("global"===o)return"html"===i?"":":root";var u=null,c=[],l=stylguideClassNameMap[e]||{};if(n&&l.variants){var E=l.variants;c=Object.keys(n).reduce((function(e,t){var r=n[t],o=E[t];return e.push(o?o(r):t+"-"+r),e}),[])}return"root"!==o&&l.childClassNames&&l.childClassNames[o]&&(u="candu-"+e+"--"+l.childClassNames[o]),"css"===i?[a,u,s].reduce((function(e,t,r){return t&&""!==t?0===r?"."+a+c.map((function(e){return"."+e})).join(""):1===r?e+" ."+t:""+e+t:e}),"")||"":"root"===o?__spreadArrays([a],c).filter((function(e){return!!e})).join(" ")||"":u||""},cssInputObjToString=function(e){return Object.keys(e).reduce((function(t,r){return""+t+r+": "+e[r]+";"}),"")},cssInputStringToObj=function(e){return e.split(";").reduce((function(e,t){var r,o=t.split(":"),n=o[0],s=o[1];return n&&s?__assign(__assign({},e),((r={})[n.trim()]=s.trim(),r)):e}),{})},toStyleguideDecl=function(e){return Object.keys(e).reduce((function(t,r){return __spreadArrays(t,[{type:exports.CSSNodeTypes.Decl,prop:r,value:e[r]}])}),[])};!function(e){e.Global="Global",e.Carried="Carried"}(exports.StateScope||(exports.StateScope={})),function(e){e.CanduCdn="CanduCdn",e.CheckListApi="CheckListApi",e.CardApi="CardApi"}(exports.StateResolverType||(exports.StateResolverType={}));var isStatePath=function(e){return isString_1(e)&&!!e.match(/^@(\w|\d|_|-|\.){3,20}\$/)};exports.CANDU_PORTAL_CLASS=CANDU_PORTAL_CLASS,exports.DEFAULT_COLOR=DEFAULT_COLOR,exports.DEFAULT_SEGMENT_ID=DEFAULT_SEGMENT_ID,exports.IsNumericId=IsNumericId,exports.PREVIEW_COOKIE_NAME=PREVIEW_COOKIE_NAME,exports.PREVIEW_FRAME_ID=PREVIEW_FRAME_ID,exports.PREVIEW_SCRIPT_URL=PREVIEW_SCRIPT_URL$1,exports.PREVIEW_URL_PARAM=PREVIEW_URL_PARAM,exports.canduPortalId=canduPortalId,exports.cssInputObjToString=cssInputObjToString,exports.cssInputStringToObj=cssInputStringToObj,exports.isClientToken=isClientToken,exports.isContentHashId=isContentHashId,exports.isIdentifier=isIdentifier,exports.isPortalId=isPortalId,exports.isPortalSlug=isPortalSlug,exports.isStatePath=isStatePath,exports.isTutorialId=isTutorialId,exports.isTutorialSlug=isTutorialSlug,exports.isUserId=isUserId,exports.messageFactory=messageFactory,exports.messages=messages,exports.stylguideClassNameMap=stylguideClassNameMap,exports.toCssSelector=toCssSelector,exports.toStyleguideDecl=toStyleguideDecl,exports.windowStream=windowStream;
//# sourceMappingURL=index.cjs.js.map

@@ -1,2 +0,2 @@

var 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;var l=function(n){var e=u.call(n,c),t=n[c];try{n[c]=void 0;var r=!0}catch(n){}var o=a.call(n);return r&&(e?n[c]=t:delete n[c]),o},E=Object.prototype.toString;var s=function(n){return E.call(n)},f="[object Null]",d="[object Undefined]",v=o?o.toStringTag:void 0;var p=function(n){return null==n?void 0===n?d:f:v&&v in Object(n)?l(n):s(n)},A=Array.isArray;var T=function(n){return null!=n&&"object"==typeof n},O="[object String]";var g=function(n){return"string"==typeof n||!A(n)&&T(n)&&p(n)==O},m="[object Number]";var N,S=function(n){return"number"==typeof n||T(n)&&p(n)==m},C=/^([a-zA-Z0-9]|_|-)+$/,_=function(n){return g(n)&&n.length>=3&&n.length<100&&C.test(n)},P=function(n){return S(n)&&n>=0},b=function(n){return g(n)&&!!n.match(/^[0-9a-zA-Z]*$/)&&n.length>=10},I=function(n){return P(n)||g(n)&&n.trim().length>0};!function(n){n.SDK="SDK",n.PREVIEW="PREVIEW"}(N||(N={}));
var n="Everyone",t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,o=(e||r||Function("return this")()).Symbol,i=Object.prototype,u=i.hasOwnProperty,a=i.toString,c=o?o.toStringTag:void 0;var l=function(n){var t=u.call(n,c),e=n[c];try{n[c]=void 0;var r=!0}catch(n){}var o=a.call(n);return r&&(t?n[c]=e:delete n[c]),o},E=Object.prototype.toString;var s=function(n){return E.call(n)},f="[object Null]",d="[object Undefined]",v=o?o.toStringTag:void 0;var p=function(n){return null==n?void 0===n?d:f:v&&v in Object(n)?l(n):s(n)},A=Array.isArray;var T=function(n){return null!=n&&"object"==typeof n},O="[object String]";var g=function(n){return"string"==typeof n||!A(n)&&T(n)&&p(n)==O},m="[object Number]";var N,S=function(n){return"number"==typeof n||T(n)&&p(n)==m},C=/^([a-zA-Z0-9]|_|-)+$/,_=function(n){return g(n)&&n.length>=3&&n.length<100&&C.test(n)},b=function(n){return S(n)&&n>=0},P=function(n){return g(n)&&!!n.match(/^[0-9a-zA-Z]*$/)&&n.length>=10},I=function(n){return b(n)||g(n)&&n.trim().length>0};!function(n){n.SDK="SDK",n.PREVIEW="PREVIEW"}(N||(N={}));
/*! *****************************************************************************

@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation. All rights reserved.

***************************************************************************** */
var y,L=function(){return(L=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}).apply(this,arguments)};function h(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;var r=Array(n),o=0;for(e=0;e<t;e++)for(var i=arguments[e],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r}!function(n){n.BOOTSTRAP="Bootstrap",n.CHANGE_POSITION="ChangePosition",n.CLOSE_PREVIEW="ClosePreview",n.PREVIEW_LOADED="PreviewLoaded",n.SET_AVALIABLE_PORTALS="SetAvaliablePortals",n.SET_CONTENT="SetContent",n.SET_SELECTED_ELEMENT="SetSelectedElement",n.SET_VIEW_MODE="SetViewMode",n.ADD_ELEMENT="AddElement",n.REMOVE_ELEMENT="RemoveElement",n.UPDATE_ELEMENT="UpdateElement",n.SET_ELEMENT="SetElement"}(y||(y={}));var D,R,w,M,j=function(n,e){return void 0===e&&(e={}),L({type:n},e)},V={bootstrap:function(n,e,t,r){return j(y.BOOTSTRAP,{clientToken:n,userId:e,version:t,preview:r})},changePosition:function(n,e){return j(y.CHANGE_POSITION,{mouseEvent:n,top:e})},closePreview:function(){return j(y.CLOSE_PREVIEW)},previewLoaded:function(){return j(y.PREVIEW_LOADED)},setAvaliablePortals:function(n){return j(y.SET_AVALIABLE_PORTALS,{avaliablePortals:n})},addElement:function(n){return j(y.ADD_ELEMENT,{element:n})},removeElement:function(n){return j(y.REMOVE_ELEMENT,{id:n})},updateElement:function(n){return j(y.UPDATE_ELEMENT,{element:n})},setContent:function(n){return j(y.SET_CONTENT,{content:n})},setViewMode:function(n){return j(y.SET_VIEW_MODE,{viewMode:n})},setSelectedElement:function(n){return j(y.SET_SELECTED_ELEMENT,{element:n})}},U=function(n){var e=n.source,t=n.destination;return{read:function(n){var e=n.actor,r=n.message;return e===t?r:null},write:function(n){return{actor:e,message:n}}}},G=function(n){var e=n.source,t=n.destination,r=n.targetOrigin,o=n.targetWindow,i=n.originWindow,u=n.onRecieveMessage,a=U({source:e,destination:t}),c=a.read,l=a.write,E=function(n){var e=c(n.data);e&&u(e)};return i.addEventListener("message",E,!1),{close:function(){i.removeEventListener("message",E)},send:function(n){o.postMessage(l(n),r)}}};!function(n){n.ON_CLICK="OnClick"}(D||(D={})),function(n){n.NATIVE="Native",n.PENDO="Pendo"}(R||(R={})),function(n){n.NAVIGATE="Navigate",n.CHANGE_TUTORIAL="ChangeTutorial",n.OPEN_GUIDE="OpenGuide",n.DISMISSED_CARD="DismissedCard"}(w||(w={})),function(n){n.PRIMARY="primary",n.SECONDARY="primary",n.WARNING="warning",n.DANGER="danger",n.NEUTRAL="neutral",n.ACTIVE="active",n.INFO="info"}(M||(M={}));var W,k=M.PRIMARY;!function(n){n.U="U",n.B="B",n.Em="Em",n.InlineCode="InlineCode"}(W||(W={}));var B,z,Z=function(n){return g(n)&&!!n.match(/^[0-9a-zA-Z]{40}$/)},$=function(n){return P(n)},H=function(n){return _(n)},K=function(n){return P(n)},Y=function(n){return _(n)};!function(n){n.NotStared="NotStarted",n.InProgress="InProgress",n.Done="Done"}(B||(B={})),function(n){n.User="User",n.Account="Account"}(z||(z={}));var x="candu_portal",F=function(n){return"candu_portal_"+n};var X,q,J="candu.preview",Q="candu_preview",nn="canduPreview";!function(n){n.COLLAPSED="Collapsed",n.EXPANDED="Expanded",n.MINIMIZED="Minimized"}(X||(X={})),function(n){n.TUTORIAL="Tutorial",n.PORTAL="Portal"}(q||(q={}));var en,tn,rn="https://app.candu.ai/preview.html";!function(n){n.Global="Global",n.Organization="Organization"}(en||(en={})),function(n){n.Root="root",n.Rule="rule",n.Atrule="atrule",n.Decl="decl",n.Any="any"}(tn||(tn={}));var on,un,an={button:{childClassNames:{icon:"button-icon"},variants:{color:function(n){return"color-"+n},outline:function(n){return"outline-"+n}}},typography:{variants:{typography:function(n){return"typography-"+n}}}},cn=function(n,e){var t=L({className:"root",variant:void 0,selector:"",output:"css"},e||{}),r=t.className,o=t.variant,i=t.selector,u=t.output,a="candu-"+n;if("global"===r)return"html"===u?"":":root";var c=null,l=[],E=an[n]||{};if(o&&E.variants){var s=E.variants;l=Object.keys(o).reduce((function(n,e){var t=o[e],r=s[e];return n.push(r?r(t):e+"-"+t),n}),[])}return"root"!==r&&E.childClassNames&&E.childClassNames[r]&&(c="candu-"+n+"--"+E.childClassNames[r]),"css"===u?[a,c,i].reduce((function(n,e,t){return e&&""!==e?0===t?"."+a+l.map((function(n){return"."+n})).join(""):1===t?n+" ."+e:""+n+e:n}),"")||"":"root"===r?h([a],l).filter((function(n){return!!n})).join(" ")||"":c||""},ln=function(n){return Object.keys(n).reduce((function(e,t){return""+e+t+": "+n[t]+";"}),"")},En=function(n){return n.split(";").reduce((function(n,e){var t,r=e.split(":"),o=r[0],i=r[1];return o&&i?L(L({},n),((t={})[o.trim()]=i.trim(),t)):n}),{})},sn=function(n){return Object.keys(n).reduce((function(e,t){return h(e,[{type:tn.Decl,prop:t,value:n[t]}])}),[])};!function(n){n.Global="Global",n.Carried="Carried"}(on||(on={})),function(n){n.CanduCdn="CanduCdn",n.CheckListApi="CheckListApi",n.CardApi="CardApi"}(un||(un={}));var fn=function(n){return g(n)&&!!n.match(/^@(\w|\d|_|-|\.){3,20}\$/)};export{N as ACTORS,x as CANDU_PORTAL_CLASS,R as CATEGORIES,M as COLORS,tn as CSSNodeTypes,B as CheckListItemStatus,z as CheckListScope,k as DEFAULT_COLOR,n as DEFAULT_SEGMENT_ID,X as FRAME_SIZES,w as HANDLER_TYPES,P as IsNumericId,y as MESSAGES,W as Mark,J as PREVIEW_COOKIE_NAME,nn as PREVIEW_FRAME_ID,q as PREVIEW_MODES,rn as PREVIEW_SCRIPT_URL,Q as PREVIEW_URL_PARAM,un as StateResolverType,on as StateScope,en as StyleguideScope,D as TRIGGERS,F as canduPortalId,ln as cssInputObjToString,En as cssInputStringToObj,b as isClientToken,Z as isContentHashId,_ as isIdentifier,$ as isPortalId,H as isPortalSlug,fn as isStatePath,K as isTutorialId,Y as isTutorialSlug,I as isUserId,U as messageFactory,V as messages,an as stylguideClassNameMap,cn as toCssSelector,sn as toStyleguideDecl,G as windowStream};
var y,L=function(){return(L=Object.assign||function(n){for(var t,e=1,r=arguments.length;e<r;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}).apply(this,arguments)};function h(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;var r=Array(n),o=0;for(t=0;t<e;t++)for(var i=arguments[t],u=0,a=i.length;u<a;u++,o++)r[o]=i[u];return r}!function(n){n.BOOTSTRAP="Bootstrap",n.CHANGE_POSITION="ChangePosition",n.CLOSE_PREVIEW="ClosePreview",n.PREVIEW_LOADED="PreviewLoaded",n.SET_AVALIABLE_PORTALS="SetAvaliablePortals",n.SET_CONTENT="SetContent",n.SET_SELECTED_ELEMENT="SetSelectedElement",n.SET_VIEW_MODE="SetViewMode",n.ADD_ELEMENT="AddElement",n.REMOVE_ELEMENT="RemoveElement",n.UPDATE_ELEMENT="UpdateElement",n.SET_ELEMENT="SetElement"}(y||(y={}));var D,R,w,M,j=function(n,t){return void 0===t&&(t={}),L({type:n},t)},V={bootstrap:function(n,t,e,r){return j(y.BOOTSTRAP,{clientToken:n,userId:t,version:e,preview:r})},changePosition:function(n,t){return j(y.CHANGE_POSITION,{mouseEvent:n,top:t})},closePreview:function(){return j(y.CLOSE_PREVIEW)},previewLoaded:function(){return j(y.PREVIEW_LOADED)},setAvaliablePortals:function(n){return j(y.SET_AVALIABLE_PORTALS,{avaliablePortals:n})},addElement:function(n){return j(y.ADD_ELEMENT,{element:n})},removeElement:function(n){return j(y.REMOVE_ELEMENT,{id:n})},updateElement:function(n){return j(y.UPDATE_ELEMENT,{element:n})},setContent:function(n){return j(y.SET_CONTENT,{content:n})},setViewMode:function(n){return j(y.SET_VIEW_MODE,{viewMode:n})},setSelectedElement:function(n){return j(y.SET_SELECTED_ELEMENT,{element:n})}},U=function(n){var t=n.source,e=n.destination;return{read:function(n){var t=n.actor,r=n.message;return t===e?r:null},write:function(n){return{actor:t,message:n}}}},G=function(n){var t=n.source,e=n.destination,r=n.targetOrigin,o=n.targetWindow,i=n.originWindow,u=n.onRecieveMessage,a=U({source:t,destination:e}),c=a.read,l=a.write,E=function(n){var t=c(n.data);t&&u(t)};return i.addEventListener("message",E,!1),{close:function(){i.removeEventListener("message",E)},send:function(n){o.postMessage(l(n),r)}}};!function(n){n.ON_CLICK="OnClick"}(D||(D={})),function(n){n.NATIVE="Native",n.PENDO="Pendo"}(R||(R={})),function(n){n.NAVIGATE="Navigate",n.CHANGE_TUTORIAL="ChangeTutorial",n.OPEN_GUIDE="OpenGuide",n.DISMISSED_CARD="DismissedCard"}(w||(w={})),function(n){n.PRIMARY="primary",n.SECONDARY="primary",n.WARNING="warning",n.DANGER="danger",n.NEUTRAL="neutral",n.ACTIVE="active",n.INFO="info"}(M||(M={}));var W,k=M.PRIMARY;!function(n){n.U="U",n.B="B",n.Em="Em",n.InlineCode="InlineCode"}(W||(W={}));var B,z,Z=function(n){return g(n)&&!!n.match(/^[0-9a-zA-Z]{40}$/)},$=function(n){return b(n)},H=function(n){return _(n)},K=function(n){return b(n)},Y=function(n){return _(n)};!function(n){n.NotStared="NotStarted",n.InProgress="InProgress",n.Done="Done"}(B||(B={})),function(n){n.User="User",n.Account="Account"}(z||(z={}));var x="candu_portal",F=function(n){return"candu_portal_"+n};var X,q,J="candu.preview",Q="candu_preview",nn="canduPreview";!function(n){n.COLLAPSED="Collapsed",n.EXPANDED="Expanded",n.MINIMIZED="Minimized"}(X||(X={})),function(n){n.TUTORIAL="Tutorial",n.PORTAL="Portal"}(q||(q={}));var tn,en,rn="https://app.candu.ai/preview.html";!function(n){n.Global="Global",n.Organization="Organization"}(tn||(tn={})),function(n){n.Root="root",n.Rule="rule",n.Atrule="atrule",n.Decl="decl",n.Any="any"}(en||(en={}));var on,un,an={button:{childClassNames:{icon:"button-icon"},variants:{color:function(n){return"color-"+n},outline:function(n){return"outline-"+n}}},badge:{variants:{color:function(n){return"color-"+n},outline:function(n){return"outline-"+n}}},typography:{variants:{typography:function(n){return"typography-"+n}}}},cn=function(n,t){var e=L({className:"root",variant:void 0,selector:"",output:"css"},t||{}),r=e.className,o=e.variant,i=e.selector,u=e.output,a="candu-"+n;if("global"===r)return"html"===u?"":":root";var c=null,l=[],E=an[n]||{};if(o&&E.variants){var s=E.variants;l=Object.keys(o).reduce((function(n,t){var e=o[t],r=s[t];return n.push(r?r(e):t+"-"+e),n}),[])}return"root"!==r&&E.childClassNames&&E.childClassNames[r]&&(c="candu-"+n+"--"+E.childClassNames[r]),"css"===u?[a,c,i].reduce((function(n,t,e){return t&&""!==t?0===e?"."+a+l.map((function(n){return"."+n})).join(""):1===e?n+" ."+t:""+n+t:n}),"")||"":"root"===r?h([a],l).filter((function(n){return!!n})).join(" ")||"":c||""},ln=function(n){return Object.keys(n).reduce((function(t,e){return""+t+e+": "+n[e]+";"}),"")},En=function(n){return n.split(";").reduce((function(n,t){var e,r=t.split(":"),o=r[0],i=r[1];return o&&i?L(L({},n),((e={})[o.trim()]=i.trim(),e)):n}),{})},sn=function(n){return Object.keys(n).reduce((function(t,e){return h(t,[{type:en.Decl,prop:e,value:n[e]}])}),[])};!function(n){n.Global="Global",n.Carried="Carried"}(on||(on={})),function(n){n.CanduCdn="CanduCdn",n.CheckListApi="CheckListApi",n.CardApi="CardApi"}(un||(un={}));var fn=function(n){return g(n)&&!!n.match(/^@(\w|\d|_|-|\.){3,20}\$/)};export{N as ACTORS,x as CANDU_PORTAL_CLASS,R as CATEGORIES,M as COLORS,en as CSSNodeTypes,B as CheckListItemStatus,z as CheckListScope,k as DEFAULT_COLOR,n as DEFAULT_SEGMENT_ID,X as FRAME_SIZES,w as HANDLER_TYPES,b as IsNumericId,y as MESSAGES,W as Mark,J as PREVIEW_COOKIE_NAME,nn as PREVIEW_FRAME_ID,q as PREVIEW_MODES,rn as PREVIEW_SCRIPT_URL,Q as PREVIEW_URL_PARAM,un as StateResolverType,on as StateScope,tn as StyleguideScope,D as TRIGGERS,F as canduPortalId,ln as cssInputObjToString,En as cssInputStringToObj,P as isClientToken,Z as isContentHashId,_ as isIdentifier,$ as isPortalId,H as isPortalSlug,fn as isStatePath,K as isTutorialId,Y as isTutorialSlug,I as isUserId,U as messageFactory,V as messages,an as stylguideClassNameMap,cn as toCssSelector,sn as toStyleguideDecl,G as windowStream};
//# sourceMappingURL=index.es.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self)["@candulabs/models"]={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,o=(n||r||Function("return this")()).Symbol,i=Object.prototype,a=i.hasOwnProperty,u=i.toString,E=o?o.toStringTag:void 0;var c=function(e){var t=a.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var o=u.call(e);return r&&(t?e[E]=n:delete e[E]),o},s=Object.prototype.toString;var l=function(e){return s.call(e)},S="[object Null]",d="[object Undefined]",f=o?o.toStringTag:void 0;var A=function(e){return null==e?void 0===e?d:S:f&&f in Object(e)?c(e):l(e)},p=Array.isArray;var T=function(e){return null!=e&&"object"==typeof e},v="[object String]";var O=function(e){return"string"==typeof e||!p(e)&&T(e)&&A(e)==v},I="[object Number]";var C,R=function(e){return"number"==typeof e||T(e)&&A(e)==I},_=/^([a-zA-Z0-9]|_|-)+$/,g=function(e){return O(e)&&e.length>=3&&e.length<100&&_.test(e)},m=function(e){return R(e)&&e>=0};(C=e.ACTORS||(e.ACTORS={})).SDK="SDK",C.PREVIEW="PREVIEW";
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self)["@candulabs/models"]={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n="object"==typeof t&&t&&t.Object===Object&&t,r="object"==typeof self&&self&&self.Object===Object&&self,o=(n||r||Function("return this")()).Symbol,i=Object.prototype,a=i.hasOwnProperty,u=i.toString,E=o?o.toStringTag:void 0;var c=function(e){var t=a.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var o=u.call(e);return r&&(t?e[E]=n:delete e[E]),o},s=Object.prototype.toString;var l=function(e){return s.call(e)},S="[object Null]",d="[object Undefined]",f=o?o.toStringTag:void 0;var A=function(e){return null==e?void 0===e?d:S:f&&f in Object(e)?c(e):l(e)},p=Array.isArray;var v=function(e){return null!=e&&"object"==typeof e},T="[object String]";var O=function(e){return"string"==typeof e||!p(e)&&v(e)&&A(e)==T},I="[object Number]";var C,R=function(e){return"number"==typeof e||v(e)&&A(e)==I},_=/^([a-zA-Z0-9]|_|-)+$/,g=function(e){return O(e)&&e.length>=3&&e.length<100&&_.test(e)},m=function(e){return R(e)&&e>=0};(C=e.ACTORS||(e.ACTORS={})).SDK="SDK",C.PREVIEW="PREVIEW";
/*! *****************************************************************************

@@ -16,3 +16,3 @@ Copyright (c) Microsoft Corporation. All rights reserved.

***************************************************************************** */
var N,P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}(N=e.MESSAGES||(e.MESSAGES={})).BOOTSTRAP="Bootstrap",N.CHANGE_POSITION="ChangePosition",N.CLOSE_PREVIEW="ClosePreview",N.PREVIEW_LOADED="PreviewLoaded",N.SET_AVALIABLE_PORTALS="SetAvaliablePortals",N.SET_CONTENT="SetContent",N.SET_SELECTED_ELEMENT="SetSelectedElement",N.SET_VIEW_MODE="SetViewMode",N.ADD_ELEMENT="AddElement",N.REMOVE_ELEMENT="RemoveElement",N.UPDATE_ELEMENT="UpdateElement",N.SET_ELEMENT="SetElement";var L,M,b,D=function(e,t){return void 0===t&&(t={}),P({type:e},t)},h={bootstrap:function(t,n,r,o){return D(e.MESSAGES.BOOTSTRAP,{clientToken:t,userId:n,version:r,preview:o})},changePosition:function(t,n){return D(e.MESSAGES.CHANGE_POSITION,{mouseEvent:t,top:n})},closePreview:function(){return D(e.MESSAGES.CLOSE_PREVIEW)},previewLoaded:function(){return D(e.MESSAGES.PREVIEW_LOADED)},setAvaliablePortals:function(t){return D(e.MESSAGES.SET_AVALIABLE_PORTALS,{avaliablePortals:t})},addElement:function(t){return D(e.MESSAGES.ADD_ELEMENT,{element:t})},removeElement:function(t){return D(e.MESSAGES.REMOVE_ELEMENT,{id:t})},updateElement:function(t){return D(e.MESSAGES.UPDATE_ELEMENT,{element:t})},setContent:function(t){return D(e.MESSAGES.SET_CONTENT,{content:t})},setViewMode:function(t){return D(e.MESSAGES.SET_VIEW_MODE,{viewMode:t})},setSelectedElement:function(t){return D(e.MESSAGES.SET_SELECTED_ELEMENT,{element:t})}},G=function(e){var t=e.source,n=e.destination;return{read:function(e){var t=e.actor,r=e.message;return t===n?r:null},write:function(e){return{actor:t,message:e}}}};(e.TRIGGERS||(e.TRIGGERS={})).ON_CLICK="OnClick",(L=e.CATEGORIES||(e.CATEGORIES={})).NATIVE="Native",L.PENDO="Pendo",(M=e.HANDLER_TYPES||(e.HANDLER_TYPES={})).NAVIGATE="Navigate",M.CHANGE_TUTORIAL="ChangeTutorial",M.OPEN_GUIDE="OpenGuide",M.DISMISSED_CARD="DismissedCard",(b=e.COLORS||(e.COLORS={})).PRIMARY="primary",b.SECONDARY="primary",b.WARNING="warning",b.DANGER="danger",b.NEUTRAL="neutral",b.ACTIVE="active",b.INFO="info";var w,j=e.COLORS.PRIMARY;(w=e.Mark||(e.Mark={})).U="U",w.B="B",w.Em="Em",w.InlineCode="InlineCode";var V,U;(V=e.CheckListItemStatus||(e.CheckListItemStatus={})).NotStared="NotStarted",V.InProgress="InProgress",V.Done="Done",(U=e.CheckListScope||(e.CheckListScope={})).User="User",U.Account="Account";var W,k;(W=e.FRAME_SIZES||(e.FRAME_SIZES={})).COLLAPSED="Collapsed",W.EXPANDED="Expanded",W.MINIMIZED="Minimized",(k=e.PREVIEW_MODES||(e.PREVIEW_MODES={})).TUTORIAL="Tutorial",k.PORTAL="Portal";var F,B;(F=e.StyleguideScope||(e.StyleguideScope={})).Global="Global",F.Organization="Organization",(B=e.CSSNodeTypes||(e.CSSNodeTypes={})).Root="root",B.Rule="rule",B.Atrule="atrule",B.Decl="decl",B.Any="any";var z,H,Z={button:{childClassNames:{icon:"button-icon"},variants:{color:function(e){return"color-"+e},outline:function(e){return"outline-"+e}}},typography:{variants:{typography:function(e){return"typography-"+e}}}};(z=e.StateScope||(e.StateScope={})).Global="Global",z.Carried="Carried",(H=e.StateResolverType||(e.StateResolverType={})).CanduCdn="CanduCdn",H.CheckListApi="CheckListApi",H.CardApi="CardApi";e.CANDU_PORTAL_CLASS="candu_portal",e.DEFAULT_COLOR=j,e.DEFAULT_SEGMENT_ID="Everyone",e.IsNumericId=m,e.PREVIEW_COOKIE_NAME="candu.preview",e.PREVIEW_FRAME_ID="canduPreview",e.PREVIEW_SCRIPT_URL="https://app.candu.ai/preview.html",e.PREVIEW_URL_PARAM="candu_preview",e.canduPortalId=function(e){return"candu_portal_"+e},e.cssInputObjToString=function(e){return Object.keys(e).reduce((function(t,n){return""+t+n+": "+e[n]+";"}),"")},e.cssInputStringToObj=function(e){return e.split(";").reduce((function(e,t){var n,r=t.split(":"),o=r[0],i=r[1];return o&&i?P(P({},e),((n={})[o.trim()]=i.trim(),n)):e}),{})},e.isClientToken=function(e){return O(e)&&!!e.match(/^[0-9a-zA-Z]*$/)&&e.length>=10},e.isContentHashId=function(e){return O(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/)},e.isIdentifier=g,e.isPortalId=function(e){return m(e)},e.isPortalSlug=function(e){return g(e)},e.isStatePath=function(e){return O(e)&&!!e.match(/^@(\w|\d|_|-|\.){3,20}\$/)},e.isTutorialId=function(e){return m(e)},e.isTutorialSlug=function(e){return g(e)},e.isUserId=function(e){return m(e)||O(e)&&e.trim().length>0},e.messageFactory=G,e.messages=h,e.stylguideClassNameMap=Z,e.toCssSelector=function(e,t){var n=P({className:"root",variant:void 0,selector:"",output:"css"},t||{}),r=n.className,o=n.variant,i=n.selector,a=n.output,u="candu-"+e;if("global"===r)return"html"===a?"":":root";var E=null,c=[],s=Z[e]||{};if(o&&s.variants){var l=s.variants;c=Object.keys(o).reduce((function(e,t){var n=o[t],r=l[t];return e.push(r?r(n):t+"-"+n),e}),[])}return"root"!==r&&s.childClassNames&&s.childClassNames[r]&&(E="candu-"+e+"--"+s.childClassNames[r]),"css"===a?[u,E,i].reduce((function(e,t,n){return t&&""!==t?0===n?"."+u+c.map((function(e){return"."+e})).join(""):1===n?e+" ."+t:""+e+t:e}),"")||"":"root"===r?y([u],c).filter((function(e){return!!e})).join(" ")||"":E||""},e.toStyleguideDecl=function(t){return Object.keys(t).reduce((function(n,r){return y(n,[{type:e.CSSNodeTypes.Decl,prop:r,value:t[r]}])}),[])},e.windowStream=function(e){var t=e.source,n=e.destination,r=e.targetOrigin,o=e.targetWindow,i=e.originWindow,a=e.onRecieveMessage,u=G({source:t,destination:n}),E=u.read,c=u.write,s=function(e){var t=E(e.data);t&&a(t)};return i.addEventListener("message",s,!1),{close:function(){i.removeEventListener("message",s)},send:function(e){o.postMessage(c(e),r)}}},Object.defineProperty(e,"__esModule",{value:!0})}));
var N,P=function(){return(P=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r}(N=e.MESSAGES||(e.MESSAGES={})).BOOTSTRAP="Bootstrap",N.CHANGE_POSITION="ChangePosition",N.CLOSE_PREVIEW="ClosePreview",N.PREVIEW_LOADED="PreviewLoaded",N.SET_AVALIABLE_PORTALS="SetAvaliablePortals",N.SET_CONTENT="SetContent",N.SET_SELECTED_ELEMENT="SetSelectedElement",N.SET_VIEW_MODE="SetViewMode",N.ADD_ELEMENT="AddElement",N.REMOVE_ELEMENT="RemoveElement",N.UPDATE_ELEMENT="UpdateElement",N.SET_ELEMENT="SetElement";var L,M,b,D=function(e,t){return void 0===t&&(t={}),P({type:e},t)},h={bootstrap:function(t,n,r,o){return D(e.MESSAGES.BOOTSTRAP,{clientToken:t,userId:n,version:r,preview:o})},changePosition:function(t,n){return D(e.MESSAGES.CHANGE_POSITION,{mouseEvent:t,top:n})},closePreview:function(){return D(e.MESSAGES.CLOSE_PREVIEW)},previewLoaded:function(){return D(e.MESSAGES.PREVIEW_LOADED)},setAvaliablePortals:function(t){return D(e.MESSAGES.SET_AVALIABLE_PORTALS,{avaliablePortals:t})},addElement:function(t){return D(e.MESSAGES.ADD_ELEMENT,{element:t})},removeElement:function(t){return D(e.MESSAGES.REMOVE_ELEMENT,{id:t})},updateElement:function(t){return D(e.MESSAGES.UPDATE_ELEMENT,{element:t})},setContent:function(t){return D(e.MESSAGES.SET_CONTENT,{content:t})},setViewMode:function(t){return D(e.MESSAGES.SET_VIEW_MODE,{viewMode:t})},setSelectedElement:function(t){return D(e.MESSAGES.SET_SELECTED_ELEMENT,{element:t})}},G=function(e){var t=e.source,n=e.destination;return{read:function(e){var t=e.actor,r=e.message;return t===n?r:null},write:function(e){return{actor:t,message:e}}}};(e.TRIGGERS||(e.TRIGGERS={})).ON_CLICK="OnClick",(L=e.CATEGORIES||(e.CATEGORIES={})).NATIVE="Native",L.PENDO="Pendo",(M=e.HANDLER_TYPES||(e.HANDLER_TYPES={})).NAVIGATE="Navigate",M.CHANGE_TUTORIAL="ChangeTutorial",M.OPEN_GUIDE="OpenGuide",M.DISMISSED_CARD="DismissedCard",(b=e.COLORS||(e.COLORS={})).PRIMARY="primary",b.SECONDARY="primary",b.WARNING="warning",b.DANGER="danger",b.NEUTRAL="neutral",b.ACTIVE="active",b.INFO="info";var w,j=e.COLORS.PRIMARY;(w=e.Mark||(e.Mark={})).U="U",w.B="B",w.Em="Em",w.InlineCode="InlineCode";var V,U;(V=e.CheckListItemStatus||(e.CheckListItemStatus={})).NotStared="NotStarted",V.InProgress="InProgress",V.Done="Done",(U=e.CheckListScope||(e.CheckListScope={})).User="User",U.Account="Account";var W,k;(W=e.FRAME_SIZES||(e.FRAME_SIZES={})).COLLAPSED="Collapsed",W.EXPANDED="Expanded",W.MINIMIZED="Minimized",(k=e.PREVIEW_MODES||(e.PREVIEW_MODES={})).TUTORIAL="Tutorial",k.PORTAL="Portal";var F,B;(F=e.StyleguideScope||(e.StyleguideScope={})).Global="Global",F.Organization="Organization",(B=e.CSSNodeTypes||(e.CSSNodeTypes={})).Root="root",B.Rule="rule",B.Atrule="atrule",B.Decl="decl",B.Any="any";var z,H,Z={button:{childClassNames:{icon:"button-icon"},variants:{color:function(e){return"color-"+e},outline:function(e){return"outline-"+e}}},badge:{variants:{color:function(e){return"color-"+e},outline:function(e){return"outline-"+e}}},typography:{variants:{typography:function(e){return"typography-"+e}}}};(z=e.StateScope||(e.StateScope={})).Global="Global",z.Carried="Carried",(H=e.StateResolverType||(e.StateResolverType={})).CanduCdn="CanduCdn",H.CheckListApi="CheckListApi",H.CardApi="CardApi";e.CANDU_PORTAL_CLASS="candu_portal",e.DEFAULT_COLOR=j,e.DEFAULT_SEGMENT_ID="Everyone",e.IsNumericId=m,e.PREVIEW_COOKIE_NAME="candu.preview",e.PREVIEW_FRAME_ID="canduPreview",e.PREVIEW_SCRIPT_URL="https://app.candu.ai/preview.html",e.PREVIEW_URL_PARAM="candu_preview",e.canduPortalId=function(e){return"candu_portal_"+e},e.cssInputObjToString=function(e){return Object.keys(e).reduce((function(t,n){return""+t+n+": "+e[n]+";"}),"")},e.cssInputStringToObj=function(e){return e.split(";").reduce((function(e,t){var n,r=t.split(":"),o=r[0],i=r[1];return o&&i?P(P({},e),((n={})[o.trim()]=i.trim(),n)):e}),{})},e.isClientToken=function(e){return O(e)&&!!e.match(/^[0-9a-zA-Z]*$/)&&e.length>=10},e.isContentHashId=function(e){return O(e)&&!!e.match(/^[0-9a-zA-Z]{40}$/)},e.isIdentifier=g,e.isPortalId=function(e){return m(e)},e.isPortalSlug=function(e){return g(e)},e.isStatePath=function(e){return O(e)&&!!e.match(/^@(\w|\d|_|-|\.){3,20}\$/)},e.isTutorialId=function(e){return m(e)},e.isTutorialSlug=function(e){return g(e)},e.isUserId=function(e){return m(e)||O(e)&&e.trim().length>0},e.messageFactory=G,e.messages=h,e.stylguideClassNameMap=Z,e.toCssSelector=function(e,t){var n=P({className:"root",variant:void 0,selector:"",output:"css"},t||{}),r=n.className,o=n.variant,i=n.selector,a=n.output,u="candu-"+e;if("global"===r)return"html"===a?"":":root";var E=null,c=[],s=Z[e]||{};if(o&&s.variants){var l=s.variants;c=Object.keys(o).reduce((function(e,t){var n=o[t],r=l[t];return e.push(r?r(n):t+"-"+n),e}),[])}return"root"!==r&&s.childClassNames&&s.childClassNames[r]&&(E="candu-"+e+"--"+s.childClassNames[r]),"css"===a?[u,E,i].reduce((function(e,t,n){return t&&""!==t?0===n?"."+u+c.map((function(e){return"."+e})).join(""):1===n?e+" ."+t:""+e+t:e}),"")||"":"root"===r?y([u],c).filter((function(e){return!!e})).join(" ")||"":E||""},e.toStyleguideDecl=function(t){return Object.keys(t).reduce((function(n,r){return y(n,[{type:e.CSSNodeTypes.Decl,prop:r,value:t[r]}])}),[])},e.windowStream=function(e){var t=e.source,n=e.destination,r=e.targetOrigin,o=e.targetWindow,i=e.originWindow,a=e.onRecieveMessage,u=G({source:t,destination:n}),E=u.read,c=u.write,s=function(e){var t=E(e.data);t&&a(t)};return i.addEventListener("message",s,!1),{close:function(){i.removeEventListener("message",s)},send:function(e){o.postMessage(c(e),r)}}},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.js.map

@@ -12,3 +12,3 @@ {

},
"version": "0.6.14-alpha.6",
"version": "0.6.14-alpha.7",
"main": "dist/index.js",

@@ -30,3 +30,3 @@ "module": "dist/index.es.js",

},
"gitHead": "6a08ece9ac6e382b9f95f1bded16bb79b9705c71"
"gitHead": "6ab3722daea5d11371132e9c4be12ccf5759e286"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc