@meltingspot/core 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -15,6 +15,15 @@ Date: YYYY-MM-DD
15
15
 
16
16
  -->
17
17
 
18
+ ## v1.7.0
19
+
20
+ Date: 2026-08-10
21
+
22
+ ### Minor Changes
23
+
24
+ - Expose grouped accessible-intents types so a single hotspot can carry several
25
+ ordered content candidates. The previous single-candidate types are unchanged.
26
+
18
27
  ## v1.6.0
19
28
 
20
29
  Date: 2026-07-31
package/index.mjs CHANGED
@@ -4948,7 +4948,7 @@ class a0 {
4948
4948
  this.listener !== null && typeof document < "u" && document.removeEventListener(Da, this.listener), this.listener = null, this.lastOptions = null;
4949
4949
  }
4950
4950
  }
4951
- const Xm = "1.6.0";
4951
+ const Xm = "1.7.0";
4952
4952
  class Vm {
4953
4953
  constructor(s) {
4954
4954
  this.debug = !1, this.debug = s?.debug ?? !1, this.appName = s?.appName, this.appVersion = s?.appVersion;
package/index.umd.js CHANGED
@@ -30,4 +30,4 @@ __p += '`),tn&&(A+=`' +
30
30
  function print() { __p += __j.call(arguments, '') }
31
31
  `:`;
32
32
  `)+A+`return __p
33
- }`;var J=Hf(function(){return sn(f,U+"return "+A).apply(i,l)});if(J.source=A,Du(J))throw J;return J}function Gv(n){return fn(n).toLowerCase()}function zv(n){return fn(n).toUpperCase()}function qv(n,e,t){if(n=fn(n),n&&(t||e===i))return Qs(n);if(!n||!(e=ne(e)))return n;var u=Te(n),s=Te(e),f=Zs(u,s),l=Js(u,s)+1;return Ze(u,f,l).join("")}function Kv(n,e,t){if(n=fn(n),n&&(t||e===i))return n.slice(0,Xs(n)+1);if(!n||!(e=ne(e)))return n;var u=Te(n),s=Js(u,Te(e))+1;return Ze(u,0,s).join("")}function Qv(n,e,t){if(n=fn(n),n&&(t||e===i))return n.replace(Di,"");if(!n||!(e=ne(e)))return n;var u=Te(n),s=Zs(u,Te(e));return Ze(u,s).join("")}function Zv(n,e){var t=ln,u=rn;if(Tn(e)){var s="separator"in e?e.separator:s;t="length"in e?Q(e.length):t,u="omission"in e?ne(e.omission):u}n=fn(n);var f=n.length;if(It(n)){var l=Te(n);f=l.length}if(t>=f)return n;var h=t-Lt(u);if(h<1)return u;var g=l?Ze(l,0,h).join(""):n.slice(0,h);if(s===i)return g+u;if(l&&(h+=g.length-h),bu(s)){if(n.slice(h).search(s)){var T,w=g;for(s.global||(s=Ki(s.source,fn(gs.exec(s))+"g")),s.lastIndex=0;T=s.exec(w);)var A=T.index;g=g.slice(0,A===i?h:A)}}else if(n.indexOf(ne(s),h)!=h){var R=g.lastIndexOf(s);R>-1&&(g=g.slice(0,R))}return g+u}function Jv(n){return n=fn(n),n&&sh.test(n)?n.replace(ds,Ld):n}var Vv=xt(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Nu=Ha("toUpperCase");function Ff(n,e,t){return n=fn(n),e=t?i:e,e===i?Td(n)?Od(n):ld(n):n.match(e)||[]}var Hf=V(function(n,e){try{return Xn(n,i,e)}catch(t){return Du(t)?t:new k(t)}}),Xv=Ce(function(n,e){return ae(e,function(t){t=Oe(t),$e(n,t,Ou(n[t],n))}),n});function jv(n){var e=n==null?0:n.length,t=N();return n=e?gn(n,function(u){if(typeof u[1]!="function")throw new fe(_);return[t(u[0]),u[1]]}):[],V(function(u){for(var s=-1;++s<e;){var f=n[s];if(Xn(f[0],this,u))return Xn(f[1],this,u)}})}function n0(n){return Lp(le(n,H))}function $u(n){return function(){return n}}function e0(n,e){return n==null||n!==n?e:n}var t0=Wa(),r0=Wa(!0);function Qn(n){return n}function Pu(n){return va(typeof n=="function"?n:le(n,H))}function i0(n){return Ta(le(n,H))}function u0(n,e){return wa(n,le(e,H))}var o0=V(function(n,e){return function(t){return Vt(t,n,e)}}),s0=V(function(n,e){return function(t){return Vt(n,t,e)}});function Cu(n,e,t){var u=Un(e),s=qr(e,u);t==null&&!(Tn(e)&&(s.length||!u.length))&&(t=e,e=n,n=this,s=qr(e,Un(e)));var f=!(Tn(t)&&"chain"in t)||!!t.chain,l=Fe(n);return ae(s,function(h){var g=e[h];n[h]=g,l&&(n.prototype[h]=function(){var T=this.__chain__;if(f||T){var w=n(this.__wrapped__),A=w.__actions__=zn(this.__actions__);return A.push({func:g,args:arguments,thisArg:n}),w.__chain__=T,w}return g.apply(n,ke([this.value()],arguments))})}),n}function a0(){return Pn._===this&&(Pn._=Nd),this}function Yu(){}function f0(n){return n=Q(n),V(function(e){return Aa(e,n)})}var c0=_u(gn),l0=_u(ks),h0=_u(Hi);function Bf(n){return Au(n)?Bi(Oe(n)):Wp(n)}function d0(n){return function(e){return n==null?i:lt(n,e)}}var p0=Ga(),_0=Ga(!0);function Fu(){return[]}function Hu(){return!1}function g0(){return{}}function m0(){return""}function v0(){return!0}function E0(n,e){if(n=Q(n),n<1||n>L)return[];var t=X,u=Fn(n,X);e=N(e),n-=X;for(var s=Gi(u,e);++t<n;)e(t);return s}function T0(n){return z(n)?gn(n,Oe):ee(n)?[n]:zn(sf(fn(n)))}function w0(n){var e=++xd;return fn(n)+e}var A0=Xr(function(n,e){return n+e},0),y0=gu("ceil"),I0=Xr(function(n,e){return n/e},1),L0=gu("floor");function R0(n){return n&&n.length?zr(n,Qn,eu):i}function M0(n,e){return n&&n.length?zr(n,N(e,2),eu):i}function O0(n){return qs(n,Qn)}function S0(n,e){return qs(n,N(e,2))}function D0(n){return n&&n.length?zr(n,Qn,uu):i}function b0(n,e){return n&&n.length?zr(n,N(e,2),uu):i}var x0=Xr(function(n,e){return n*e},1),U0=gu("round"),N0=Xr(function(n,e){return n-e},0);function $0(n){return n&&n.length?ki(n,Qn):0}function P0(n,e){return n&&n.length?ki(n,N(e,2)):0}return a.after=im,a.ary=vf,a.assign=zm,a.assignIn=xf,a.assignInWith=li,a.assignWith=qm,a.at=Km,a.before=Ef,a.bind=Ou,a.bindAll=Xv,a.bindKey=Tf,a.castArray=gm,a.chain=_f,a.chunk=L_,a.compact=R_,a.concat=M_,a.cond=jv,a.conforms=n0,a.constant=$u,a.countBy=$g,a.create=Qm,a.curry=wf,a.curryRight=Af,a.debounce=yf,a.defaults=Zm,a.defaultsDeep=Jm,a.defer=um,a.delay=om,a.difference=O_,a.differenceBy=S_,a.differenceWith=D_,a.drop=b_,a.dropRight=x_,a.dropRightWhile=U_,a.dropWhile=N_,a.fill=$_,a.filter=Cg,a.flatMap=Hg,a.flatMapDeep=Bg,a.flatMapDepth=Wg,a.flatten=lf,a.flattenDeep=P_,a.flattenDepth=C_,a.flip=sm,a.flow=t0,a.flowRight=r0,a.fromPairs=Y_,a.functions=rv,a.functionsIn=iv,a.groupBy=kg,a.initial=H_,a.intersection=B_,a.intersectionBy=W_,a.intersectionWith=k_,a.invert=ov,a.invertBy=sv,a.invokeMap=zg,a.iteratee=Pu,a.keyBy=qg,a.keys=Un,a.keysIn=Kn,a.map=ui,a.mapKeys=fv,a.mapValues=cv,a.matches=i0,a.matchesProperty=u0,a.memoize=si,a.merge=lv,a.mergeWith=Uf,a.method=o0,a.methodOf=s0,a.mixin=Cu,a.negate=ai,a.nthArg=f0,a.omit=hv,a.omitBy=dv,a.once=am,a.orderBy=Kg,a.over=c0,a.overArgs=fm,a.overEvery=l0,a.overSome=h0,a.partial=Su,a.partialRight=If,a.partition=Qg,a.pick=pv,a.pickBy=Nf,a.property=Bf,a.propertyOf=d0,a.pull=K_,a.pullAll=df,a.pullAllBy=Q_,a.pullAllWith=Z_,a.pullAt=J_,a.range=p0,a.rangeRight=_0,a.rearg=cm,a.reject=Vg,a.remove=V_,a.rest=lm,a.reverse=Ru,a.sampleSize=jg,a.set=gv,a.setWith=mv,a.shuffle=nm,a.slice=X_,a.sortBy=rm,a.sortedUniq=ug,a.sortedUniqBy=og,a.split=Hv,a.spread=hm,a.tail=sg,a.take=ag,a.takeRight=fg,a.takeRightWhile=cg,a.takeWhile=lg,a.tap=Rg,a.throttle=dm,a.thru=ii,a.toArray=Sf,a.toPairs=$f,a.toPairsIn=Pf,a.toPath=T0,a.toPlainObject=bf,a.transform=vv,a.unary=pm,a.union=hg,a.unionBy=dg,a.unionWith=pg,a.uniq=_g,a.uniqBy=gg,a.uniqWith=mg,a.unset=Ev,a.unzip=Mu,a.unzipWith=pf,a.update=Tv,a.updateWith=wv,a.values=$t,a.valuesIn=Av,a.without=vg,a.words=Ff,a.wrap=_m,a.xor=Eg,a.xorBy=Tg,a.xorWith=wg,a.zip=Ag,a.zipObject=yg,a.zipObjectDeep=Ig,a.zipWith=Lg,a.entries=$f,a.entriesIn=Pf,a.extend=xf,a.extendWith=li,Cu(a,a),a.add=A0,a.attempt=Hf,a.camelCase=Rv,a.capitalize=Cf,a.ceil=y0,a.clamp=yv,a.clone=mm,a.cloneDeep=Em,a.cloneDeepWith=Tm,a.cloneWith=vm,a.conformsTo=wm,a.deburr=Yf,a.defaultTo=e0,a.divide=I0,a.endsWith=Mv,a.eq=Ae,a.escape=Ov,a.escapeRegExp=Sv,a.every=Pg,a.find=Yg,a.findIndex=ff,a.findKey=Vm,a.findLast=Fg,a.findLastIndex=cf,a.findLastKey=Xm,a.floor=L0,a.forEach=gf,a.forEachRight=mf,a.forIn=jm,a.forInRight=nv,a.forOwn=ev,a.forOwnRight=tv,a.get=xu,a.gt=Am,a.gte=ym,a.has=uv,a.hasIn=Uu,a.head=hf,a.identity=Qn,a.includes=Gg,a.indexOf=F_,a.inRange=Iv,a.invoke=av,a.isArguments=pt,a.isArray=z,a.isArrayBuffer=Im,a.isArrayLike=qn,a.isArrayLikeObject=In,a.isBoolean=Lm,a.isBuffer=Je,a.isDate=Rm,a.isElement=Mm,a.isEmpty=Om,a.isEqual=Sm,a.isEqualWith=Dm,a.isError=Du,a.isFinite=bm,a.isFunction=Fe,a.isInteger=Lf,a.isLength=fi,a.isMap=Rf,a.isMatch=xm,a.isMatchWith=Um,a.isNaN=Nm,a.isNative=$m,a.isNil=Cm,a.isNull=Pm,a.isNumber=Mf,a.isObject=Tn,a.isObjectLike=An,a.isPlainObject=rr,a.isRegExp=bu,a.isSafeInteger=Ym,a.isSet=Of,a.isString=ci,a.isSymbol=ee,a.isTypedArray=Nt,a.isUndefined=Fm,a.isWeakMap=Hm,a.isWeakSet=Bm,a.join=G_,a.kebabCase=Dv,a.last=de,a.lastIndexOf=z_,a.lowerCase=bv,a.lowerFirst=xv,a.lt=Wm,a.lte=km,a.max=R0,a.maxBy=M0,a.mean=O0,a.meanBy=S0,a.min=D0,a.minBy=b0,a.stubArray=Fu,a.stubFalse=Hu,a.stubObject=g0,a.stubString=m0,a.stubTrue=v0,a.multiply=x0,a.nth=q_,a.noConflict=a0,a.noop=Yu,a.now=oi,a.pad=Uv,a.padEnd=Nv,a.padStart=$v,a.parseInt=Pv,a.random=Lv,a.reduce=Zg,a.reduceRight=Jg,a.repeat=Cv,a.replace=Yv,a.result=_v,a.round=U0,a.runInContext=p,a.sample=Xg,a.size=em,a.snakeCase=Fv,a.some=tm,a.sortedIndex=j_,a.sortedIndexBy=ng,a.sortedIndexOf=eg,a.sortedLastIndex=tg,a.sortedLastIndexBy=rg,a.sortedLastIndexOf=ig,a.startCase=Bv,a.startsWith=Wv,a.subtract=N0,a.sum=$0,a.sumBy=P0,a.template=kv,a.times=E0,a.toFinite=He,a.toInteger=Q,a.toLength=Df,a.toLower=Gv,a.toNumber=pe,a.toSafeInteger=Gm,a.toString=fn,a.toUpper=zv,a.trim=qv,a.trimEnd=Kv,a.trimStart=Qv,a.truncate=Zv,a.unescape=Jv,a.uniqueId=w0,a.upperCase=Vv,a.upperFirst=Nu,a.each=gf,a.eachRight=mf,a.first=hf,Cu(a,(function(){var n={};return Re(a,function(e,t){cn.call(a.prototype,t)||(n[t]=e)}),n})(),{chain:!1}),a.VERSION=c,ae(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){a[n].placeholder=a}),ae(["drop","take"],function(n,e){nn.prototype[n]=function(t){t=t===i?1:bn(Q(t),0);var u=this.__filtered__&&!e?new nn(this):this.clone();return u.__filtered__?u.__takeCount__=Fn(t,u.__takeCount__):u.__views__.push({size:Fn(t,X),type:n+(u.__dir__<0?"Right":"")}),u},nn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),ae(["filter","map","takeWhile"],function(n,e){var t=e+1,u=t==Y||t==O;nn.prototype[n]=function(s){var f=this.clone();return f.__iteratees__.push({iteratee:N(s,3),type:t}),f.__filtered__=f.__filtered__||u,f}}),ae(["head","last"],function(n,e){var t="take"+(e?"Right":"");nn.prototype[n]=function(){return this[t](1).value()[0]}}),ae(["initial","tail"],function(n,e){var t="drop"+(e?"":"Right");nn.prototype[n]=function(){return this.__filtered__?new nn(this):this[t](1)}}),nn.prototype.compact=function(){return this.filter(Qn)},nn.prototype.find=function(n){return this.filter(n).head()},nn.prototype.findLast=function(n){return this.reverse().find(n)},nn.prototype.invokeMap=V(function(n,e){return typeof n=="function"?new nn(this):this.map(function(t){return Vt(t,n,e)})}),nn.prototype.reject=function(n){return this.filter(ai(N(n)))},nn.prototype.slice=function(n,e){n=Q(n);var t=this;return t.__filtered__&&(n>0||e<0)?new nn(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==i&&(e=Q(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},nn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},nn.prototype.toArray=function(){return this.take(X)},Re(nn.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),u=/^(?:head|last)$/.test(e),s=a[u?"take"+(e=="last"?"Right":""):e],f=u||/^find/.test(e);s&&(a.prototype[e]=function(){var l=this.__wrapped__,h=u?[1]:arguments,g=l instanceof nn,T=h[0],w=g||z(l),A=function(j){var tn=s.apply(a,ke([j],h));return u&&R?tn[0]:tn};w&&t&&typeof T=="function"&&T.length!=1&&(g=w=!1);var R=this.__chain__,U=!!this.__actions__.length,$=f&&!R,J=g&&!U;if(!f&&w){l=J?l:new nn(this);var P=n.apply(l,h);return P.__actions__.push({func:ii,args:[A],thisArg:i}),new ce(P,R)}return $&&J?n.apply(this,h):(P=this.thru(A),$?u?P.value()[0]:P.value():P)})}),ae(["pop","push","shift","sort","splice","unshift"],function(n){var e=Dr[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",u=/^(?:pop|shift)$/.test(n);a.prototype[n]=function(){var s=arguments;if(u&&!this.__chain__){var f=this.value();return e.apply(z(f)?f:[],s)}return this[t](function(l){return e.apply(z(l)?l:[],s)})}}),Re(nn.prototype,function(n,e){var t=a[e];if(t){var u=t.name+"";cn.call(St,u)||(St[u]=[]),St[u].push({name:e,func:t})}}),St[Vr(i,dn).name]=[{name:"wrapper",func:i}],nn.prototype.clone=Jd,nn.prototype.reverse=Vd,nn.prototype.value=Xd,a.prototype.at=Mg,a.prototype.chain=Og,a.prototype.commit=Sg,a.prototype.next=Dg,a.prototype.plant=xg,a.prototype.reverse=Ug,a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=Ng,a.prototype.first=a.prototype.head,Gt&&(a.prototype[Gt]=bg),a}),Rt=Sd();ot?((ot.exports=Rt)._=Rt,Pi._=Rt):Pn._=Rt}).call(Fc)})(Ct,Ct.exports)),Ct.exports}var Bc=Hc();const ao=_t(Bc),fo=(r,o)=>{switch(o){case"fr":case"it":return ao.capitalize(r.format("dddd D MMMM"));case"es":return ao.capitalize(r.format("dddd D [de] MMMM"));case"de":return r.format("dddd, D. MMMM");default:return r.format("dddd, MMMM Do")}},co=r=>r.format("LT"),Wc=(r,o)=>{const i=fo(r,o),c=co(r);switch(o){case"fr":return`${i} à ${c}`;case"it":return`${i} alle ${c}`;case"es":return`${i} a las ${c}`;case"de":return`${i} um ${c}`;default:return`${i} at ${c}`}},kc=r=>r.format("ll"),Gc=(r,o)=>{switch(o){case"fr":case"de":case"it":return r.format("HH:mm");case"es":return r.format("H:mm");default:return r.format("h:mm")}},zc=r=>r.format("L"),qc=r=>r.format("L LT");var lo=(r=>(r.SimpleDate="SimpleDate",r.SimpleDateTime="SimpleDateTime",r.ExtraShortDate="ExtraShortDate",r.InlineExtraShortDate="InlineExtraShortDate",r.ShortDate="ShortDate",r.InlineShortDate="InlineShortDate",r.Date="Date",r.LongDate="LongDate",r.LongDateTime="LongDateTime",r.ShortTime="ShortTime",r.Time="Time",r.DateTime="DateTime",r))(lo||{});const Kc=(r,o,i,c)=>{let d=gt(r);c&&(d=d.tz(c)),i&&(d=d.locale(i));const v=d.locale();switch(o){case"SimpleDate":return zc(d);case"SimpleDateTime":return qc(d);case"ExtraShortDate":return Pc(d,v);case"InlineExtraShortDate":return Cc(d,v);case"ShortDate":return kc(d);case"InlineShortDate":return Yc(d,v);case"Date":return Nc(d);case"LongDate":return fo(d,v);case"LongDateTime":return Wc(d,v);case"ShortTime":return Gc(d,v);case"Time":return co(d);case"DateTime":return $c(d)}};var _e=(r=>(r.Contains="Contains",r.DoesntContain="DoesntContain",r.DoesntEndWith="DoesntEndWith",r.DoesntEqual="DoesntEqual",r.DoesntStartWith="DoesntStartWith",r.EndsWith="EndsWith",r.Equals="Equals",r.MatchesRegex="MatchesRegex",r.StartsWith="StartsWith",r))(_e||{});const Qc="http://_meltingspot.local",Zc=200,Jc=/(\([^()]*[+*][^()]*\))[+*]/,Vc=r=>r.length<=Zc&&!Jc.test(r),Xc=r=>{try{const o=new URL(r,Qc);return`${o.pathname}${o.search}${o.hash}`}catch{return r}},Er=r=>r.startsWith("/")?r:`/${r}`,jc=(r,o)=>{switch(o.operator){case _e.MatchesRegex:if(!Vc(o.value))return!1;try{return new RegExp(o.value).test(r)}catch{return!1}case _e.StartsWith:return r.startsWith(Er(o.value));case _e.DoesntStartWith:return!r.startsWith(Er(o.value));case _e.EndsWith:return r.endsWith(o.value);case _e.DoesntEndWith:return!r.endsWith(o.value);case _e.Contains:return r.includes(o.value);case _e.DoesntContain:return!r.includes(o.value);case _e.Equals:return r===Er(o.value);case _e.DoesntEqual:return r!==Er(o.value)}},nl=(r,o)=>{const i=o.rules.map(c=>jc(r,c));return o.ruleOperator==="AND"?i.every(Boolean):i.some(Boolean)},el=(r,o)=>{const i=Xc(r),c=o.blocks.map(d=>nl(i,d));return o.blockOperator==="AND"?c.every(Boolean):c.some(Boolean)},tl=r=>r.replace(/^https?:\/\//,""),rl=(r,o)=>{const i=tl(o);try{const c=new URL(r);return c.hostname===i||c.hostname.endsWith(`.${i}`)}catch{return!1}},il="data-meltingspot-playbook-editor-active",di="meltingspot:playbook-editor:active-changed",ul=()=>typeof document<"u"&&typeof document.dispatchEvent=="function",ho=()=>ul()?document.documentElement.getAttribute(il)==="true":!1;let ol=!1;const sl=()=>ol;class al{constructor(){this.listener=null,this.lastOptions=null,this.chain=Promise.resolve()}enqueue(o){const i=this.chain.then(o);return this.chain=i.catch(()=>{}),i}get isBound(){return this.listener!==null}bind(o){if(this.listener!==null||typeof document>"u")return;const i=()=>{if(ho()){Promise.resolve().then(()=>o.onEditorActive()).catch(d=>{console.warn("[playbook-editor] onEditorActive callback failed",d)});return}const c=this.lastOptions;c!==null&&Promise.resolve().then(()=>o.onEditorInactive(c)).catch(d=>{console.warn("[playbook-editor] onEditorInactive callback failed",d)})};document.addEventListener(di,i),this.listener=i}cacheOptions(o){this.lastOptions=o}clearOptions(){this.lastOptions=null}unbind(){this.listener!==null&&typeof document<"u"&&document.removeEventListener(di,this.listener),this.listener=null,this.lastOptions=null}}const fl="1.6.0";class po{constructor(o){this.debug=!1,this.debug=o?.debug??!1,this.appName=o?.appName,this.appVersion=o?.appVersion}log(o,...i){this.debug&&this.print(o,"info",i)}warn(o,...i){this.print(o,"warn",i)}error(o,...i){this.print(o,"error",i)}print(o,i,c){const _=[`[${["MeltingSpot",this.appName,this.appVersion].filter(Boolean).join(" - ")}] ${o}`];c.length&&_.push(...c),console[i](..._)}}const _o=new po({appName:"Core SDK",appVersion:fl}),cl=r=>{_o.debug=r},ll=r=>r.toLowerCase().replace(/[^a-z0-9-]/g,""),hl=["/user"],dl=({deeplink:r,spotId:o})=>{try{const i=new URL(r,"https://unused.com");let c=i.pathname;return i.search&&(c+=i.search),i.hash&&(c+=i.hash),hl.some(d=>c.startsWith(d))||(c=`/spot/${o}/${qu(c)}`),c}catch(i){return _o.warn("Failed to parse deeplink URL",i),null}},pl=[/(^|\.)meltingspot\.io$/i],_l=r=>{let o;try{const v=Ku(r);o=new URL(v)}catch{throw new Error(`Invalid baseURL: ${r}`)}const i=o.hostname==="localhost"||o.hostname==="127.0.0.1",c=o.protocol==="https:",d=pl.some(v=>v.test(o.hostname));if(!i&&(!c||!d))throw new Error(`Untrusted baseURL origin: ${o.origin}`);return o.origin},gl={msApiBaseUrl:"https://openapi.meltingspot.io/",msCommunityWebBaseUrl:"https://go.meltingspot.io/",ssoToken:void 0,spotId:"",autoJoin:!1,rootDocument:globalThis.document};class ue{constructor(){this.configuration=gl}static getInstance(){return ue.instance||(ue.instance=new ue),ue.instance}setConfiguration(o){this.configuration={...this.configuration,...o}}static getConfiguration(o={}){return{...ue.getInstance().configuration,...o}}}const go="%[a-f0-9]{2}",mo=new RegExp("("+go+")|([^%]+?)","gi"),vo=new RegExp("("+go+")+","gi");function pi(r,o){try{return[decodeURIComponent(r.join(""))]}catch{}if(r.length===1)return r;o=o||1;const i=r.slice(0,o),c=r.slice(o);return Array.prototype.concat.call([],pi(i),pi(c))}function ml(r){try{return decodeURIComponent(r)}catch{let o=r.match(mo)||[];for(let i=1;i<o.length;i++)r=pi(o,i).join(""),o=r.match(mo)||[];return r}}function vl(r){const o={"%FE%FF":"��","%FF%FE":"��"};let i=vo.exec(r);for(;i;){try{o[i[0]]=decodeURIComponent(i[0])}catch{const d=ml(i[0]);d!==i[0]&&(o[i[0]]=d)}i=vo.exec(r)}o["%C2"]="�";const c=Object.keys(o);for(const d of c)r=r.replace(new RegExp(d,"g"),o[d]);return r}function El(r){if(typeof r!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof r+"`");try{return decodeURIComponent(r)}catch{return vl(r)}}function Tl(r,o){const i={};if(Array.isArray(o))for(const c of o){const d=Object.getOwnPropertyDescriptor(r,c);d?.enumerable&&Object.defineProperty(i,c,d)}else for(const c of Reflect.ownKeys(r)){const d=Object.getOwnPropertyDescriptor(r,c);if(d.enumerable){const v=r[c];o(c,v,r)&&Object.defineProperty(i,c,d)}}return i}function Eo(r,o){if(!(typeof r=="string"&&typeof o=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r===""||o==="")return[];const i=r.indexOf(o);return i===-1?[]:[r.slice(0,i),r.slice(i+o.length)]}const wl=r=>r==null,Al=r=>encodeURIComponent(r).replaceAll(/[!'()*]/g,o=>`%${o.charCodeAt(0).toString(16).toUpperCase()}`),_i=Symbol("encodeFragmentIdentifier");function yl(r){switch(r.arrayFormat){case"index":return o=>(i,c)=>{const d=i.length;return c===void 0||r.skipNull&&c===null||r.skipEmptyString&&c===""?i:c===null?[...i,[Rn(o,r),"[",d,"]"].join("")]:[...i,[Rn(o,r),"[",Rn(d,r),"]=",Rn(c,r)].join("")]};case"bracket":return o=>(i,c)=>c===void 0||r.skipNull&&c===null||r.skipEmptyString&&c===""?i:c===null?[...i,[Rn(o,r),"[]"].join("")]:[...i,[Rn(o,r),"[]=",Rn(c,r)].join("")];case"colon-list-separator":return o=>(i,c)=>c===void 0||r.skipNull&&c===null||r.skipEmptyString&&c===""?i:c===null?[...i,[Rn(o,r),":list="].join("")]:[...i,[Rn(o,r),":list=",Rn(c,r)].join("")];case"comma":case"separator":case"bracket-separator":{const o=r.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(c,d)=>d===void 0||r.skipNull&&d===null||r.skipEmptyString&&d===""?c:(d=d===null?"":d,c.length===0?[[Rn(i,r),o,Rn(d,r)].join("")]:[[c,Rn(d,r)].join(r.arrayFormatSeparator)])}default:return o=>(i,c)=>c===void 0||r.skipNull&&c===null||r.skipEmptyString&&c===""?i:c===null?[...i,Rn(o,r)]:[...i,[Rn(o,r),"=",Rn(c,r)].join("")]}}function Il(r){let o;switch(r.arrayFormat){case"index":return(i,c,d)=>{if(o=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!o){d[i]=c;return}d[i]===void 0&&(d[i]={}),d[i][o[1]]=c};case"bracket":return(i,c,d)=>{if(o=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!o){d[i]=c;return}if(d[i]===void 0){d[i]=[c];return}d[i]=[...d[i],c]};case"colon-list-separator":return(i,c,d)=>{if(o=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!o){d[i]=c;return}if(d[i]===void 0){d[i]=[c];return}d[i]=[...d[i],c]};case"comma":case"separator":return(i,c,d)=>{const v=typeof c=="string"&&c.includes(r.arrayFormatSeparator),_=typeof c=="string"&&!v&&Se(c,r).includes(r.arrayFormatSeparator);c=_?Se(c,r):c;const I=v||_?c.split(r.arrayFormatSeparator).map(M=>Se(M,r)):c===null?c:Se(c,r);d[i]=I};case"bracket-separator":return(i,c,d)=>{const v=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!v){d[i]=c&&Se(c,r);return}const _=c===null?[]:Se(c,r).split(r.arrayFormatSeparator);if(d[i]===void 0){d[i]=_;return}d[i]=[...d[i],..._]};default:return(i,c,d)=>{if(d[i]===void 0){d[i]=c;return}d[i]=[...[d[i]].flat(),c]}}}function To(r){if(typeof r!="string"||r.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Rn(r,o){return o.encode?o.strict?Al(r):encodeURIComponent(r):r}function Se(r,o){return o.decode?El(r):r}function wo(r){return Array.isArray(r)?r.sort():typeof r=="object"?wo(Object.keys(r)).sort((o,i)=>Number(o)-Number(i)).map(o=>r[o]):r}function Ao(r){const o=r.indexOf("#");return o!==-1&&(r=r.slice(0,o)),r}function Ll(r){let o="";const i=r.indexOf("#");return i!==-1&&(o=r.slice(i)),o}function yo(r,o,i){return i==="string"&&typeof r=="string"?r:typeof i=="function"&&typeof r=="string"?i(r):i==="boolean"&&r===null?!0:i==="boolean"&&r!==null&&(r.toLowerCase()==="true"||r.toLowerCase()==="false")?r.toLowerCase()==="true":i==="boolean"&&r!==null&&(r.toLowerCase()==="1"||r.toLowerCase()==="0")?r.toLowerCase()==="1":i==="string[]"&&o.arrayFormat!=="none"&&typeof r=="string"?[r]:i==="number[]"&&o.arrayFormat!=="none"&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?[Number(r)]:i==="number"&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?Number(r):o.parseBooleans&&r!==null&&(r.toLowerCase()==="true"||r.toLowerCase()==="false")?r.toLowerCase()==="true":o.parseNumbers&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?Number(r):r}function gi(r){r=Ao(r);const o=r.indexOf("?");return o===-1?"":r.slice(o+1)}function mi(r,o){o={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...o},To(o.arrayFormatSeparator);const i=Il(o),c=Object.create(null);if(typeof r!="string"||(r=r.trim().replace(/^[?#&]/,""),!r))return c;for(const d of r.split("&")){if(d==="")continue;const v=o.decode?d.replaceAll("+"," "):d;let[_,I]=Eo(v,"=");_===void 0&&(_=v),I=I===void 0?null:["comma","separator","bracket-separator"].includes(o.arrayFormat)?I:Se(I,o),i(Se(_,o),I,c)}for(const[d,v]of Object.entries(c))if(typeof v=="object"&&v!==null&&o.types[d]!=="string")for(const[_,I]of Object.entries(v)){const M=o.types[d]?o.types[d].replace("[]",""):void 0;v[_]=yo(I,o,M)}else typeof v=="object"&&v!==null&&o.types[d]==="string"?c[d]=Object.values(v).join(o.arrayFormatSeparator):c[d]=yo(v,o,o.types[d]);return o.sort===!1?c:(o.sort===!0?Object.keys(c).sort():Object.keys(c).sort(o.sort)).reduce((d,v)=>{const _=c[v];return d[v]=_&&typeof _=="object"&&!Array.isArray(_)?wo(_):_,d},Object.create(null))}function Io(r,o){if(!r)return"";o={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...o},To(o.arrayFormatSeparator);const i=_=>o.skipNull&&wl(r[_])||o.skipEmptyString&&r[_]==="",c=yl(o),d={};for(const[_,I]of Object.entries(r))i(_)||(d[_]=I);const v=Object.keys(d);return o.sort!==!1&&v.sort(o.sort),v.map(_=>{const I=r[_];return I===void 0?"":I===null?Rn(_,o):Array.isArray(I)?I.length===0&&o.arrayFormat==="bracket-separator"?Rn(_,o)+"[]":I.reduce(c(_),[]).join("&"):Rn(_,o)+"="+Rn(I,o)}).filter(_=>_.length>0).join("&")}function Lo(r,o){o={decode:!0,...o};let[i,c]=Eo(r,"#");return i===void 0&&(i=r),{url:i?.split("?")?.[0]??"",query:mi(gi(r),o),...o&&o.parseFragmentIdentifier&&c?{fragmentIdentifier:Se(c,o)}:{}}}function Ro(r,o){o={encode:!0,strict:!0,[_i]:!0,...o};const i=Ao(r.url).split("?")[0]||"",c=gi(r.url),d={...mi(c,{sort:!1,...o}),...r.query};let v=Io(d,o);v&&=`?${v}`;let _=Ll(r.url);if(typeof r.fragmentIdentifier=="string"){const I=new URL(i);I.hash=r.fragmentIdentifier,_=o[_i]?I.hash:`#${r.fragmentIdentifier}`}return`${i}${v}${_}`}function Mo(r,o,i){i={parseFragmentIdentifier:!0,[_i]:!1,...i};const{url:c,query:d,fragmentIdentifier:v}=Lo(r,i);return Ro({url:c,query:Tl(d,o),fragmentIdentifier:v},i)}function Rl(r,o,i){const c=Array.isArray(o)?d=>!o.includes(d):(d,v)=>!o(d,v);return Mo(r,c,i)}const Ml=Object.freeze(Object.defineProperty({__proto__:null,exclude:Rl,extract:gi,parse:mi,parseUrl:Lo,pick:Mo,stringify:Io,stringifyUrl:Ro},Symbol.toStringTag,{value:"Module"}));class Gn extends Error{constructor(o,i){super(`HTTP Error ${o}${i?`: ${i}`:""}`),this.code=o,this.name="HttpError",Object.setPrototypeOf(this,Gn.prototype)}}var wn=(r=>(r.GET="GET",r.PATCH="PATCH",r.POST="POST",r))(wn||{});class Oo{constructor(){this.headers={}}setHeaders(o){this.headers=o}async get(o){try{const i=o.query?`${o.url}?${this.serializeQuery(o.query)}`:o.url,c=await fetch(i,{headers:{...this.headers,...o.headers,"Content-Type":"application/json"},...o.signal?{signal:o.signal}:{}});return c.ok?un(await c.json()):W(new Gn(c.status,await c.text()))}catch(i){const c=i instanceof Error?i.message:"Unknown error";return W(new Gn(ie.INTERNAL_SERVER_ERROR,c))}}async post(o){try{const i=await fetch(o.url,{method:"POST",headers:{...this.headers,...o.headers,"Content-Type":"application/json"},body:JSON.stringify(o.payload),...o.signal?{signal:o.signal}:{}});return i.ok?un(await i.json()):W(new Gn(i.status,await i.text()))}catch(i){const c=i instanceof Error?i.message:"Unknown error";return W(new Gn(ie.INTERNAL_SERVER_ERROR,c))}}async patch(o){try{const i=await fetch(o.url,{method:"PATCH",headers:{...this.headers,...o.headers,"Content-Type":"application/json"},body:JSON.stringify(o.payload),...o.signal?{signal:o.signal}:{}});return i.ok?un(await i.json()):W(new Gn(i.status,await i.text()))}catch(i){const c=i instanceof Error?i.message:"Unknown error";return W(new Gn(ie.INTERNAL_SERVER_ERROR,c))}}serializeQuery(o){if(typeof o=="string")return o;if(typeof o=="object")for(const i in o)o[i]===void 0&&delete o[i];return o=Ml.stringify(o,{arrayFormat:"none"}),o}}const Tr={accessToken:{email:"/v1/auth/accessToken/email",sso:{jwt:"/v1/auth/accessToken/sso/jwt"}},refreshAccessToken:"/v1/auth/accessToken~refresh",password:{reset:"/v1/auth/password~reset"}};var So=(r=>(r.TokensUpdated="auth:tokens-updated",r))(So||{});class De extends EventTarget{constructor(){super(),this.accessToken=null,this.refreshToken=null}static getInstance(){return De.instance||(De.instance=new De),De.instance}async loginWithPassword(o,i){const c=await this.callApi({endpoint:Tr.accessToken.email,method:"POST",body:{email:o,password:i},withSpotId:!0});if(c.isErr())return W(c.error);const{accessToken:d,refreshToken:v}=c.value;return this.setTokens(d.token,v.token),un({accessToken:d.token,refreshToken:v.token})}async loginWithSsoToken(o){const i=await this.callApi({endpoint:Tr.accessToken.sso.jwt,method:"POST",body:{token:o},withSpotId:!0});if(i.isErr())return W(i.error);const{accessToken:c,refreshToken:d}=i.value;return this.setTokens(c.token,d.token),un({accessToken:c.token,refreshToken:d.token})}loginWithAuthTokens(o,i){return this.setTokens(o,i),{accessToken:o,refreshToken:i}}resetPassword(o){return this.callApi({endpoint:Tr.password.reset,method:"POST",body:{email:o}})}async refresh(){const o=await this.callApi({endpoint:Tr.refreshAccessToken,method:"POST",body:{refreshToken:this.refreshToken}});if(o.isErr())return W(o.error);const{accessToken:i,refreshToken:c}=o.value;return this.setTokens(i.token,c.token),un({accessToken:i.token,refreshToken:c.token})}async logout(){this.setTokens(null,null)}getAccessToken(){return this.accessToken}getRefreshToken(){return this.refreshToken}setTokens(o,i){if(this.accessToken!==o||this.refreshToken!==i){this.accessToken=o,this.refreshToken=i;const c=new CustomEvent("auth:tokens-updated",{detail:{accessToken:o,refreshToken:i}});this.dispatchEvent(c)}}async callApi(o){try{const{spotId:i,msApiBaseUrl:c}=ue.getConfiguration(),d=ur(o.endpoint,c),v={"Content-Type":"application/json",...o.headers};o.withSpotId&&i&&(v[Do.SpotId]=i);const _=await fetch(d,{method:o.method,body:o.body?JSON.stringify(o.body):void 0,headers:v});if(!_.ok)return W(new Gn(_.status,_.statusText));if(_.status===ie.NO_CONTENT)return un(void 0);const I=await _.json();return un(I)}catch(i){return W(new Gn(ie.INTERNAL_SERVER_ERROR,i instanceof Error?i.message:String(i)))}}}var Do=(r=>(r.Authorization="Authorization",r.SpotId="x-spotid",r))(Do||{});class oe{constructor(){this.queue=[],this.isProcessing=!1,this.isPaused=!1,this.authService=De.getInstance(),this.httpService=new Oo}static getInstance(){return oe.instance||(oe.instance=new oe),oe.instance}static buildAuthenticatedRequest(o){const{msApiBaseUrl:i,spotId:c}=ue.getConfiguration(),d=ur(o,i),v=De.getInstance().getAccessToken();if(!v)return W(new Error("Not authenticated"));const _={"Content-Type":"application/json",Authorization:`Bearer ${v}`};return c&&(_["x-spotid"]=c),un({url:d,headers:_})}static async stream(o,i,c){const{streamTransport:d}=ue.getConfiguration();if(d)return d({endpoint:o,body:i,signal:c});const v=oe.buildAuthenticatedRequest(o);if(v.isErr())return W(v.error);const{url:_,headers:I}=v.value;try{const M=await fetch(_,{method:"POST",headers:I,...i!==void 0?{body:JSON.stringify(i)}:{},...c?{signal:c}:{}});if(!M.ok){const K=await M.text();return W(new Error(`HTTP ${M.status}: ${K}`))}return M.body?un(M.body):W(new Error("Response body is empty"))}catch(M){const K=M instanceof Error?M.message:"Unknown error";return W(M instanceof Error?M:new Error(K))}}get pendingCount(){return this.queue.length}enqueue(o){return new Promise(i=>{const c=async()=>{try{const d=await o();i(d)}catch(d){i(W(new Gn(ie.INTERNAL_SERVER_ERROR,d instanceof Error?d.message:"Unknown error")))}};this.queue.push(c),this.processQueue()})}async processQueue(){if(!this.isProcessing){this.isProcessing=!0;try{for(;!this.isPaused&&this.queue.length>0;){const o=this.queue.shift();if(!o)break;await o()}}finally{this.isProcessing=!1,!this.isPaused&&this.queue.length>0&&Promise.resolve().then(()=>this.processQueue())}}}pauseQueue(){this.isPaused=!0}resumeQueue(){const o=this.isPaused;this.isPaused=!1,o&&this.processQueue()}async call(o){return this.enqueue(async()=>{const i=async()=>{const{spotId:d,msApiBaseUrl:v}=ue.getConfiguration(),_={...o.options?.headers??{}};d&&(_["x-spotid"]=d);const I=this.authService.getAccessToken(),{requiresAuth:M=!0}=o;if(!I&&M)return W(new Gn(ie.UNAUTHORIZED));I&&(_.Authorization=`Bearer ${I}`);const K=ur(o.endpoint,v);switch(o.method){case wn.GET:return this.httpService.get({...o.options??{},headers:_,url:K});case wn.PATCH:return this.httpService.patch({...o.options??{},headers:_,url:K});case wn.POST:return this.httpService.post({...o.options??{},headers:_,url:K});default:return W(new Gn(ie.METHOD_NOT_ALLOWED,"Method not allowed"))}};let c=await i();if(c.isErr()&&c.error.code===ie.UNAUTHORIZED){const d=await this.authService.refresh();if(d.isErr())return W(new Gn(ie.UNAUTHORIZED,d.error.message));c=await i()}return c})}}const Ie={playbooks:"/v1/playbooks",pages:r=>`/v1/playbooks/${r}/pages`,hotspots:(r,o)=>`/v1/playbooks/${r}/pages/${o}/hotspots`,hotspot:(r,o,i)=>`/v1/playbooks/${r}/pages/${o}/hotspots/${i}`,accessibleIntents:(r,o)=>`/v1/playbooks/${r}/pages/${o}/accessibleIntents`,intents:(r,o,i)=>`/v1/playbooks/${r}/pages/${o}/hotspots/${i}/intents`,intent:(r,o,i,c)=>`/v1/playbooks/${r}/pages/${o}/hotspots/${i}/intents/${c}`},wr=50;class et{static getInstance(){return et.instance||(et.instance=new et),et.instance}constructor(){this.meltingSpotApi=oe.getInstance()}async listPlaybooks(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ie.playbooks,options:{query:{page:o?.page??1,limit:o?.limit??wr,...o?.domain?{"domain[eq]":o.domain}:{}}}});return i.isErr()?W(i.error):un(i.value)}async listPlaybookPages(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ie.pages(o.playbookId),options:{query:{page:o.page??1,limit:o.limit??wr,...o.url?{"url[eq]":o.url}:{}}}});return i.isErr()?W(i.error):un(i.value)}async createPlaybookPage(o,i){const c=await this.meltingSpotApi.call({method:wn.POST,endpoint:Ie.pages(o.playbookId),options:{payload:i}});return c.isErr()?W(c.error):un(c.value)}async listAccessiblePlaybookIntents(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ie.accessibleIntents(o.playbookId,o.pageId),options:{query:{...o.domain?{domain:o.domain}:{}}}});return i.isErr()?W(i.error):un(i.value)}async listPlaybookHotspots(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ie.hotspots(o.playbookId,o.pageId),options:{query:{page:o.page??1,limit:o.limit??wr,...o.intentStatus?{"intentStatus[eq]":o.intentStatus}:{},...o.widgetType?{"widgetType[eq]":o.widgetType}:{}}}});return i.isErr()?W(i.error):un(i.value)}async createPlaybookHotspot(o,i){const c=await this.meltingSpotApi.call({method:wn.POST,endpoint:Ie.hotspots(o.playbookId,o.pageId),options:{payload:i}});return c.isErr()?W(c.error):un(c.value)}async updatePlaybookHotspot(o,i){const c=await this.meltingSpotApi.call({method:wn.PATCH,endpoint:Ie.hotspot(o.playbookId,o.pageId,o.hotspotId),options:{payload:i}});return c.isErr()?W(c.error):un(c.value)}async listPlaybookIntents(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ie.intents(o.playbookId,o.pageId,o.hotspotId),options:{query:{page:o.page??1,limit:o.limit??wr,...o.status?{"status[eq]":o.status}:{}}}});return i.isErr()?W(i.error):un(i.value)}async createPlaybookIntent(o,i){const c=await this.meltingSpotApi.call({method:wn.POST,endpoint:Ie.intents(o.playbookId,o.pageId,o.hotspotId),options:{payload:i}});return c.isErr()?W(c.error):un(c.value)}async updatePlaybookIntent(o,i){const c=await this.meltingSpotApi.call({method:wn.PATCH,endpoint:Ie.intent(o.playbookId,o.pageId,o.hotspotId,o.intentId),options:{payload:i}});return c.isErr()?W(c.error):un(c.value)}}const Ol={me:"/v1/spots/me"},Sl=50;class mt{static getInstance(){return mt.instance||(mt.instance=new mt),mt.instance}constructor(){this.meltingSpotApi=oe.getInstance()}async listSpotsForMe(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ol.me,options:{query:{page:1,limit:Sl,...o?.spotMemberRole?{"spotMemberRole[eq]":o.spotMemberRole}:{}}}});return i.isErr()?W(i.error):un(i.value)}}const vi={spotMember:{me:"/v1/spotMembers/me",joinFromSso:"/v1/spotMembers~joinFromSso",search:"/v1/spotMembers~search"}};class tt{static getInstance(){return tt.instance||(tt.instance=new tt),tt.instance}constructor(){this.meltingSpotApi=oe.getInstance()}async getSpotMemberForMe(){const o=await this.meltingSpotApi.call({method:wn.GET,endpoint:vi.spotMember.me});return o.isErr()?W(o.error):un(o.value)}async searchSpotMembers(o){const i={page:o.page,limit:o.limit};o.search&&(i.search=o.search);const c=await this.meltingSpotApi.call({method:wn.GET,endpoint:vi.spotMember.search,options:{query:i}});return c.isErr()?W(c.error):un(c.value)}async joinFromSso(o){const i=await this.meltingSpotApi.call({method:wn.POST,endpoint:vi.spotMember.joinFromSso,options:{payload:{token:o}}});return i.isErr()?W(i.error):un(i.value)}}const bo={spotMemberSsoToken:"/v1/spotMembers/auth/sso/jwt",previewAccessKey:"/v1/spotMembers/auth/preview/accessKey"};class rt{static getInstance(){return rt.instance||(rt.instance=new rt),rt.instance}constructor(){this.meltingSpotApi=oe.getInstance()}async generateSsoToken(){const o=await this.meltingSpotApi.call({method:wn.POST,endpoint:bo.spotMemberSsoToken,options:{payload:{}}});return o.isErr()?W(o.error):un(o.value.token)}async generatePreviewAccessKey(o){const i=await this.meltingSpotApi.call({method:wn.POST,endpoint:bo.previewAccessKey,options:{payload:{targetSpotMemberId:o.targetSpotMemberId}}});return i.isErr()?W(i.error):un(i.value)}}class it{static getInstance(){return it.instance||(it.instance=new it),it.instance}constructor(){this.spotMemberAuthApiService=rt.getInstance()}async generateSsoToken(){return this.spotMemberAuthApiService.generateSsoToken()}}class Dl{constructor(o){this.active=!1,this.lastObservedUrl=null,this.options={onRouteChange:o.onRouteChange,debounceMs:o.debounceMs??0,enableDeduplication:o.enableDeduplication??!0,enableDomMutationDetection:o.enableDomMutationDetection??!1,enableHistoryChange:o.enableHistoryChange??!0,enablePopState:o.enablePopState??!0,enableHashChange:o.enableHashChange??!0,enableLoad:o.enableLoad??!0,rootDocument:o.rootDocument}}start(){this.active||(this.active=!0,this.lastObservedUrl=null,this.options.enablePopState&&(this.popStateListener=()=>this.handleNavigationEvent("popstate"),window.addEventListener("popstate",this.popStateListener)),this.options.enableHashChange&&(this.hashChangeListener=()=>this.handleNavigationEvent("hashchange"),window.addEventListener("hashchange",this.hashChangeListener)),this.options.enableLoad&&(this.loadListener=()=>this.handleNavigationEvent("load"),window.addEventListener("load",this.loadListener)),this.options.enableDomMutationDetection&&(this.mutationObserver=new MutationObserver(()=>{this.handleNavigationEvent("locationchange")}),this.mutationObserver.observe(this.options.rootDocument??document,{childList:!0,subtree:!0})),this.options.enableHistoryChange&&this.patchHistoryListeners())}stop(){this.active&&(this.active=!1,this.debounceTimer!==void 0&&(clearTimeout(this.debounceTimer),this.debounceTimer=void 0),this.popStateListener&&(window.removeEventListener("popstate",this.popStateListener),this.popStateListener=void 0),this.hashChangeListener&&(window.removeEventListener("hashchange",this.hashChangeListener),this.hashChangeListener=void 0),this.loadListener&&(window.removeEventListener("load",this.loadListener),this.loadListener=void 0),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=void 0),(this.originalPushState||this.originalReplaceState)&&this.restoreHistoryListeners(),this.lastObservedUrl=null)}handleNavigationEvent(o){if(!this.active)return;const i=window.location.href;this.options.enableDeduplication&&this.lastObservedUrl===i||(this.lastObservedUrl=i,this.options.debounceMs>0?(this.debounceTimer!==void 0&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.debounceTimer=void 0,this.options.onRouteChange(i,o)},this.options.debounceMs)):this.options.onRouteChange(i,o))}patchHistoryListeners(){this.originalPushState=window.history.pushState,this.originalReplaceState=window.history.replaceState,window.history.pushState=(...o)=>{const i=this.originalPushState?.apply(window.history,o);return this.handleNavigationEvent("history.pushState"),i},window.history.replaceState=(...o)=>{const i=this.originalReplaceState?.apply(window.history,o);return this.handleNavigationEvent("history.replaceState"),i}}restoreHistoryListeners(){this.originalPushState&&(window.history.pushState=this.originalPushState,this.originalPushState=void 0),this.originalReplaceState&&(window.history.replaceState=this.originalReplaceState,this.originalReplaceState=void 0)}}const bl={events:"/v1/analytics/events"};class vt{static getInstance(){return vt.instance||(vt.instance=new vt),vt.instance}constructor(){this.meltingSpotApi=oe.getInstance()}async appendEvent(o){const i=await this.meltingSpotApi.call({method:wn.POST,endpoint:bl.events,options:{payload:o}});return i.isErr()?W(i.error):un(i.value)}}const xl=r=>{const o=r.get("utm_source");if(o)return{source:o,medium:r.get("utm_medium")??void 0,campaign:r.get("utm_campaign")??void 0,term:r.get("utm_term")??void 0,content:r.get("utm_content")??void 0}},Ul=r=>r?Object.entries(r).reduce((o,[i,c])=>(c!=null&&(o[`utm_${i}`]=c),o),{}):{};var xo=(r=>(r.Active="Active",r.Closed="Closed",r.Expired="Expired",r))(xo||{}),Uo=(r=>(r.User="User",r.Assistant="Assistant",r))(Uo||{}),No=(r=>(r.Metadata="metadata",r.Token="token",r.Action="action",r.Bubble="bubble",r.Handoff="handoff",r.Done="done",r.Error="error",r))(No||{}),$o=(r=>(r.NoSource="NoSource",r.LowConfidence="LowConfidence",r.HumanRequest="HumanRequest",r.OutOfScope="OutOfScope",r))($o||{}),Po=(r=>(r.PoorExplanation="poor_explanation",r.FalseInformation="false_information",r.NotFollowingRequest="not_following_request",r.IncompleteResponse="incomplete_response",r.ChatHistoryIssue="chat_history_issue",r.PersonalizationIssue="personalization_issue",r.Other="other",r))(Po||{}),Co=(r=>(r.Up="up",r.Down="down",r))(Co||{}),Yo=(r=>(r.PlaybookIntent="PlaybookIntent",r.UserInitiated="UserInitiated",r.Welcome="Welcome",r.Resume="Resume",r.Discover="Discover",r.Recommend="Recommend",r))(Yo||{}),Fo=(r=>(r.ExtraExtraSmall="ExtraExtraSmall",r.ExtraSmall="ExtraSmall",r.Small="Small",r.Medium="Medium",r.Large="Large",r))(Fo||{}),Ho=(r=>(r.Dropdown="Dropdown",r.Inline="Inline",r.Overlay="Overlay",r))(Ho||{}),Bo=(r=>(r.Left="Left",r.Right="Right",r))(Bo||{}),Wo=(r=>(r.Top="Top",r.Bottom="Bottom",r))(Wo||{}),ko=(r=>(r.TopLeft="TopLeft",r.TopRight="TopRight",r.BottomLeft="BottomLeft",r.BottomRight="BottomRight",r))(ko||{}),Go=(r=>(r.Button="Button",r.Card="Card",r.CardInline="CardInline",r.Carousel="Carousel",r.Helper="Helper",r.ListOfContent="ListOfContent",r.ListOfContentInline="ListOfContentInline",r))(Go||{}),zo=(r=>(r.Inline="Inline",r.Modal="Modal",r.Drawer="Drawer",r))(zo||{}),qo=(r=>(r.Self="Self",r.Parent="Parent",r.Top="Top",r))(qo||{}),Ko=(r=>(r.Left="Left",r.Right="Right",r))(Ko||{}),Qo=(r=>(r.Body="Body",r.DOMSelector="DOMSelector",r))(Qo||{}),Zo=(r=>(r.After="After",r.AppendChild="AppendChild",r.Before="Before",r.PrependChild="PrependChild",r))(Zo||{}),Jo=(r=>(r.CSSSelector="CSSSelector",r.Slot="Slot",r))(Jo||{}),Vo=(r=>(r.Element="Element",r.WebComponent="WebComponent",r))(Vo||{}),Xo=(r=>(r.Inline="Inline",r.Flex="Flex",r))(Xo||{}),jo=(r=>(r.Horizontal="Horizontal",r.Vertical="Vertical",r))(jo||{}),ns=(r=>(r.Start="Start",r.Center="Center",r.End="End",r.Stretch="Stretch",r.Baseline="Baseline",r))(ns||{}),es=(r=>(r.Course="Course",r.Live="Live",r.Link="Link",r.Page="Page",r))(es||{}),ts=(r=>(r.Workshop="Workshop",r.Conference="Conference",r))(ts||{}),rs=(r=>(r.Ended="Ended",r.Planned="Planned",r.Live="Live",r))(rs||{}),is=(r=>(r.CloseA="CloseA",r.CloseB="CloseB",r.Later="Later",r))(is||{});const Nl="a",$l="mention_input",Pl="mention",Cl="var",Yl="p",Fl="h1",Hl="h2",Bl="h3",Wl="blockquote",kl="layout",Gl="layout-column",zl="ul",ql="ol",Kl="lic",Ql="li",Zl="img",Jl="iframely",Vl="code_block",Xl="code_line";var us=(r=>(r.Element="Element",r.FullPage="FullPage",r))(us||{}),os=(r=>(r.Draft="Draft",r.Pending="Pending",r.Published="Published",r))(os||{}),ss=(r=>(r.Beacon="Beacon",r.List="List",r))(ss||{}),Ei=(r=>(r.Channel="Channel",r.Collection="Collection",r.Course="Course",r.Discussion="Discussion",r.Forum="Forum",r.Link="Link",r.Live="Live",r.LearningPath="LearningPath",r.Page="Page",r.RichText="RichText",r.Topic="Topic",r))(Ei||{});function jl(r){return Object.values(Ei).includes(r)}const as=ue.getInstance(),fs=De.getInstance(),cs=it.getInstance(),ls={Playbook:et.getInstance(),Spot:mt.getInstance(),SpotMember:tt.getInstance()},Et=globalThis;Et.MeltingSpot||(Et.MeltingSpot={}),Et.MeltingSpot.Configuration=as,Et.MeltingSpot.Auth=fs,Et.MeltingSpot.Sso=cs,Et.MeltingSpot.Api=ls,y.ATTRIBUTE_BLOCKQUOTE=Wl,y.ATTRIBUTE_CODE_BLOCK=Vl,y.ATTRIBUTE_CODE_LINE=Xl,y.ATTRIBUTE_H1=Fl,y.ATTRIBUTE_H2=Hl,y.ATTRIBUTE_H3=Bl,y.ATTRIBUTE_IFRAMELY=Jl,y.ATTRIBUTE_IMAGE=Zl,y.ATTRIBUTE_LAYOUT=kl,y.ATTRIBUTE_LAYOUT_COLUMN=Gl,y.ATTRIBUTE_LI=Ql,y.ATTRIBUTE_LIC=Kl,y.ATTRIBUTE_LINK=Nl,y.ATTRIBUTE_MENTION=Pl,y.ATTRIBUTE_MENTION_INPUT=$l,y.ATTRIBUTE_OL=ql,y.ATTRIBUTE_PARAGRAPH=Yl,y.ATTRIBUTE_UL=zl,y.ATTRIBUTE_VARIABLE=Cl,y.AnalyticsApiService=vt,y.Api=ls,y.Auth=fs,y.AuthService=De,y.AuthServiceEvents=So,y.BeaconIntegrationType=Ho,y.BeaconRenderType=Go,y.ButtonBeaconSize=Fo,y.Configuration=as,y.ConfigurationService=ue,y.ConversationMessageRole=Uo,y.ConversationSseEventType=No,y.ConversationStatus=xo,y.DEFAULT_PERMISSION_POLICIES=Qu,y.DateFormat=lo,y.DrawerWidgetPosition=Ko,y.DropdownBeaconHorizontalPosition=Bo,y.DropdownBeaconVerticalPosition=Wo,y.HttpMethods=wn,y.HttpService=Oo,y.LastActionState=is,y.LearningPathContentType=es,y.LiveBuiltInType=ts,y.LiveStatus=rs,y.Logger=po,y.MeltingSpotApi=oe,y.MeltyHandoffReason=$o,y.MeltyMessageFeedbackReason=Po,y.MeltyMessageFeedbackSignal=Co,y.OverlayBeaconPosition=ko,y.PLAYBOOK_EDITOR_ACTIVE_EVENT=di,y.PlaybookApiService=et,y.PlaybookEditorAwareLifecycle=al,y.PlaybookHotspotLocation=us,y.PlaybookIntentStatus=os,y.PlaybookIntentWidgetMode=ss,y.PlaybookPageMatchingOperator=_e,y.RouteChangeDetector=Dl,y.SpotMemberApiService=tt,y.SpotMemberAuthApiService=rt,y.SpotWidgetContentType=Ei,y.Sso=cs,y.SsoService=it,y.TouchPointAnchorType=Qo,y.TouchPointDOMInjectionPosition=Zo,y.TouchPointDOMSelectorCssStepMode=Vo,y.TouchPointDOMSelectorPathStepType=Jo,y.TouchPointFlexAlign=ns,y.TouchPointFlexDirection=jo,y.TouchPointLayoutType=Xo,y.TriggerType=Yo,y.WidgetInjectionTarget=qo,y.WidgetInjectionType=zo,y.createDialog=Vf,y.createIframe=Xf,y.createIsolatedShadowHost=jf,y.dayjs=gt,y.flattenUtmParameters=Ul,y.formatBaseUrl=_l,y.formatDate=Kc,y.formatDeeplink=dl,y.formatUUID=ll,y.getHTMLElement=Jf,y.getTimeInfoWithStartAndEndDate=Uc,y.isEditorPauseExempt=sl,y.isPlaybookEditorActive=ho,y.isSpotWidgetContentType=jl,y.isTouchDevice=nc,y.matchesDomain=rl,y.parseUtmParameters=xl,y.sanitizeUrl=ur,y.setLoggerDebugMode=cl,y.testUrlMatching=el,y.trimSlashLeft=qu,y.trimSlashRight=Ku,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
33
+ }`;var J=Hf(function(){return sn(f,U+"return "+A).apply(i,l)});if(J.source=A,Du(J))throw J;return J}function Gv(n){return fn(n).toLowerCase()}function zv(n){return fn(n).toUpperCase()}function qv(n,e,t){if(n=fn(n),n&&(t||e===i))return Qs(n);if(!n||!(e=ne(e)))return n;var u=Te(n),s=Te(e),f=Zs(u,s),l=Js(u,s)+1;return Ze(u,f,l).join("")}function Kv(n,e,t){if(n=fn(n),n&&(t||e===i))return n.slice(0,Xs(n)+1);if(!n||!(e=ne(e)))return n;var u=Te(n),s=Js(u,Te(e))+1;return Ze(u,0,s).join("")}function Qv(n,e,t){if(n=fn(n),n&&(t||e===i))return n.replace(Di,"");if(!n||!(e=ne(e)))return n;var u=Te(n),s=Zs(u,Te(e));return Ze(u,s).join("")}function Zv(n,e){var t=ln,u=rn;if(Tn(e)){var s="separator"in e?e.separator:s;t="length"in e?Q(e.length):t,u="omission"in e?ne(e.omission):u}n=fn(n);var f=n.length;if(It(n)){var l=Te(n);f=l.length}if(t>=f)return n;var h=t-Lt(u);if(h<1)return u;var g=l?Ze(l,0,h).join(""):n.slice(0,h);if(s===i)return g+u;if(l&&(h+=g.length-h),bu(s)){if(n.slice(h).search(s)){var T,w=g;for(s.global||(s=Ki(s.source,fn(gs.exec(s))+"g")),s.lastIndex=0;T=s.exec(w);)var A=T.index;g=g.slice(0,A===i?h:A)}}else if(n.indexOf(ne(s),h)!=h){var R=g.lastIndexOf(s);R>-1&&(g=g.slice(0,R))}return g+u}function Jv(n){return n=fn(n),n&&sh.test(n)?n.replace(ds,Ld):n}var Vv=xt(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Nu=Ha("toUpperCase");function Ff(n,e,t){return n=fn(n),e=t?i:e,e===i?Td(n)?Od(n):ld(n):n.match(e)||[]}var Hf=V(function(n,e){try{return Xn(n,i,e)}catch(t){return Du(t)?t:new k(t)}}),Xv=Ce(function(n,e){return ae(e,function(t){t=Oe(t),$e(n,t,Ou(n[t],n))}),n});function jv(n){var e=n==null?0:n.length,t=N();return n=e?gn(n,function(u){if(typeof u[1]!="function")throw new fe(_);return[t(u[0]),u[1]]}):[],V(function(u){for(var s=-1;++s<e;){var f=n[s];if(Xn(f[0],this,u))return Xn(f[1],this,u)}})}function n0(n){return Lp(le(n,H))}function $u(n){return function(){return n}}function e0(n,e){return n==null||n!==n?e:n}var t0=Wa(),r0=Wa(!0);function Qn(n){return n}function Pu(n){return va(typeof n=="function"?n:le(n,H))}function i0(n){return Ta(le(n,H))}function u0(n,e){return wa(n,le(e,H))}var o0=V(function(n,e){return function(t){return Vt(t,n,e)}}),s0=V(function(n,e){return function(t){return Vt(n,t,e)}});function Cu(n,e,t){var u=Un(e),s=qr(e,u);t==null&&!(Tn(e)&&(s.length||!u.length))&&(t=e,e=n,n=this,s=qr(e,Un(e)));var f=!(Tn(t)&&"chain"in t)||!!t.chain,l=Fe(n);return ae(s,function(h){var g=e[h];n[h]=g,l&&(n.prototype[h]=function(){var T=this.__chain__;if(f||T){var w=n(this.__wrapped__),A=w.__actions__=zn(this.__actions__);return A.push({func:g,args:arguments,thisArg:n}),w.__chain__=T,w}return g.apply(n,ke([this.value()],arguments))})}),n}function a0(){return Pn._===this&&(Pn._=Nd),this}function Yu(){}function f0(n){return n=Q(n),V(function(e){return Aa(e,n)})}var c0=_u(gn),l0=_u(ks),h0=_u(Hi);function Bf(n){return Au(n)?Bi(Oe(n)):Wp(n)}function d0(n){return function(e){return n==null?i:lt(n,e)}}var p0=Ga(),_0=Ga(!0);function Fu(){return[]}function Hu(){return!1}function g0(){return{}}function m0(){return""}function v0(){return!0}function E0(n,e){if(n=Q(n),n<1||n>L)return[];var t=X,u=Fn(n,X);e=N(e),n-=X;for(var s=Gi(u,e);++t<n;)e(t);return s}function T0(n){return z(n)?gn(n,Oe):ee(n)?[n]:zn(sf(fn(n)))}function w0(n){var e=++xd;return fn(n)+e}var A0=Xr(function(n,e){return n+e},0),y0=gu("ceil"),I0=Xr(function(n,e){return n/e},1),L0=gu("floor");function R0(n){return n&&n.length?zr(n,Qn,eu):i}function M0(n,e){return n&&n.length?zr(n,N(e,2),eu):i}function O0(n){return qs(n,Qn)}function S0(n,e){return qs(n,N(e,2))}function D0(n){return n&&n.length?zr(n,Qn,uu):i}function b0(n,e){return n&&n.length?zr(n,N(e,2),uu):i}var x0=Xr(function(n,e){return n*e},1),U0=gu("round"),N0=Xr(function(n,e){return n-e},0);function $0(n){return n&&n.length?ki(n,Qn):0}function P0(n,e){return n&&n.length?ki(n,N(e,2)):0}return a.after=im,a.ary=vf,a.assign=zm,a.assignIn=xf,a.assignInWith=li,a.assignWith=qm,a.at=Km,a.before=Ef,a.bind=Ou,a.bindAll=Xv,a.bindKey=Tf,a.castArray=gm,a.chain=_f,a.chunk=L_,a.compact=R_,a.concat=M_,a.cond=jv,a.conforms=n0,a.constant=$u,a.countBy=$g,a.create=Qm,a.curry=wf,a.curryRight=Af,a.debounce=yf,a.defaults=Zm,a.defaultsDeep=Jm,a.defer=um,a.delay=om,a.difference=O_,a.differenceBy=S_,a.differenceWith=D_,a.drop=b_,a.dropRight=x_,a.dropRightWhile=U_,a.dropWhile=N_,a.fill=$_,a.filter=Cg,a.flatMap=Hg,a.flatMapDeep=Bg,a.flatMapDepth=Wg,a.flatten=lf,a.flattenDeep=P_,a.flattenDepth=C_,a.flip=sm,a.flow=t0,a.flowRight=r0,a.fromPairs=Y_,a.functions=rv,a.functionsIn=iv,a.groupBy=kg,a.initial=H_,a.intersection=B_,a.intersectionBy=W_,a.intersectionWith=k_,a.invert=ov,a.invertBy=sv,a.invokeMap=zg,a.iteratee=Pu,a.keyBy=qg,a.keys=Un,a.keysIn=Kn,a.map=ui,a.mapKeys=fv,a.mapValues=cv,a.matches=i0,a.matchesProperty=u0,a.memoize=si,a.merge=lv,a.mergeWith=Uf,a.method=o0,a.methodOf=s0,a.mixin=Cu,a.negate=ai,a.nthArg=f0,a.omit=hv,a.omitBy=dv,a.once=am,a.orderBy=Kg,a.over=c0,a.overArgs=fm,a.overEvery=l0,a.overSome=h0,a.partial=Su,a.partialRight=If,a.partition=Qg,a.pick=pv,a.pickBy=Nf,a.property=Bf,a.propertyOf=d0,a.pull=K_,a.pullAll=df,a.pullAllBy=Q_,a.pullAllWith=Z_,a.pullAt=J_,a.range=p0,a.rangeRight=_0,a.rearg=cm,a.reject=Vg,a.remove=V_,a.rest=lm,a.reverse=Ru,a.sampleSize=jg,a.set=gv,a.setWith=mv,a.shuffle=nm,a.slice=X_,a.sortBy=rm,a.sortedUniq=ug,a.sortedUniqBy=og,a.split=Hv,a.spread=hm,a.tail=sg,a.take=ag,a.takeRight=fg,a.takeRightWhile=cg,a.takeWhile=lg,a.tap=Rg,a.throttle=dm,a.thru=ii,a.toArray=Sf,a.toPairs=$f,a.toPairsIn=Pf,a.toPath=T0,a.toPlainObject=bf,a.transform=vv,a.unary=pm,a.union=hg,a.unionBy=dg,a.unionWith=pg,a.uniq=_g,a.uniqBy=gg,a.uniqWith=mg,a.unset=Ev,a.unzip=Mu,a.unzipWith=pf,a.update=Tv,a.updateWith=wv,a.values=$t,a.valuesIn=Av,a.without=vg,a.words=Ff,a.wrap=_m,a.xor=Eg,a.xorBy=Tg,a.xorWith=wg,a.zip=Ag,a.zipObject=yg,a.zipObjectDeep=Ig,a.zipWith=Lg,a.entries=$f,a.entriesIn=Pf,a.extend=xf,a.extendWith=li,Cu(a,a),a.add=A0,a.attempt=Hf,a.camelCase=Rv,a.capitalize=Cf,a.ceil=y0,a.clamp=yv,a.clone=mm,a.cloneDeep=Em,a.cloneDeepWith=Tm,a.cloneWith=vm,a.conformsTo=wm,a.deburr=Yf,a.defaultTo=e0,a.divide=I0,a.endsWith=Mv,a.eq=Ae,a.escape=Ov,a.escapeRegExp=Sv,a.every=Pg,a.find=Yg,a.findIndex=ff,a.findKey=Vm,a.findLast=Fg,a.findLastIndex=cf,a.findLastKey=Xm,a.floor=L0,a.forEach=gf,a.forEachRight=mf,a.forIn=jm,a.forInRight=nv,a.forOwn=ev,a.forOwnRight=tv,a.get=xu,a.gt=Am,a.gte=ym,a.has=uv,a.hasIn=Uu,a.head=hf,a.identity=Qn,a.includes=Gg,a.indexOf=F_,a.inRange=Iv,a.invoke=av,a.isArguments=pt,a.isArray=z,a.isArrayBuffer=Im,a.isArrayLike=qn,a.isArrayLikeObject=In,a.isBoolean=Lm,a.isBuffer=Je,a.isDate=Rm,a.isElement=Mm,a.isEmpty=Om,a.isEqual=Sm,a.isEqualWith=Dm,a.isError=Du,a.isFinite=bm,a.isFunction=Fe,a.isInteger=Lf,a.isLength=fi,a.isMap=Rf,a.isMatch=xm,a.isMatchWith=Um,a.isNaN=Nm,a.isNative=$m,a.isNil=Cm,a.isNull=Pm,a.isNumber=Mf,a.isObject=Tn,a.isObjectLike=An,a.isPlainObject=rr,a.isRegExp=bu,a.isSafeInteger=Ym,a.isSet=Of,a.isString=ci,a.isSymbol=ee,a.isTypedArray=Nt,a.isUndefined=Fm,a.isWeakMap=Hm,a.isWeakSet=Bm,a.join=G_,a.kebabCase=Dv,a.last=de,a.lastIndexOf=z_,a.lowerCase=bv,a.lowerFirst=xv,a.lt=Wm,a.lte=km,a.max=R0,a.maxBy=M0,a.mean=O0,a.meanBy=S0,a.min=D0,a.minBy=b0,a.stubArray=Fu,a.stubFalse=Hu,a.stubObject=g0,a.stubString=m0,a.stubTrue=v0,a.multiply=x0,a.nth=q_,a.noConflict=a0,a.noop=Yu,a.now=oi,a.pad=Uv,a.padEnd=Nv,a.padStart=$v,a.parseInt=Pv,a.random=Lv,a.reduce=Zg,a.reduceRight=Jg,a.repeat=Cv,a.replace=Yv,a.result=_v,a.round=U0,a.runInContext=p,a.sample=Xg,a.size=em,a.snakeCase=Fv,a.some=tm,a.sortedIndex=j_,a.sortedIndexBy=ng,a.sortedIndexOf=eg,a.sortedLastIndex=tg,a.sortedLastIndexBy=rg,a.sortedLastIndexOf=ig,a.startCase=Bv,a.startsWith=Wv,a.subtract=N0,a.sum=$0,a.sumBy=P0,a.template=kv,a.times=E0,a.toFinite=He,a.toInteger=Q,a.toLength=Df,a.toLower=Gv,a.toNumber=pe,a.toSafeInteger=Gm,a.toString=fn,a.toUpper=zv,a.trim=qv,a.trimEnd=Kv,a.trimStart=Qv,a.truncate=Zv,a.unescape=Jv,a.uniqueId=w0,a.upperCase=Vv,a.upperFirst=Nu,a.each=gf,a.eachRight=mf,a.first=hf,Cu(a,(function(){var n={};return Re(a,function(e,t){cn.call(a.prototype,t)||(n[t]=e)}),n})(),{chain:!1}),a.VERSION=c,ae(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){a[n].placeholder=a}),ae(["drop","take"],function(n,e){nn.prototype[n]=function(t){t=t===i?1:bn(Q(t),0);var u=this.__filtered__&&!e?new nn(this):this.clone();return u.__filtered__?u.__takeCount__=Fn(t,u.__takeCount__):u.__views__.push({size:Fn(t,X),type:n+(u.__dir__<0?"Right":"")}),u},nn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),ae(["filter","map","takeWhile"],function(n,e){var t=e+1,u=t==Y||t==O;nn.prototype[n]=function(s){var f=this.clone();return f.__iteratees__.push({iteratee:N(s,3),type:t}),f.__filtered__=f.__filtered__||u,f}}),ae(["head","last"],function(n,e){var t="take"+(e?"Right":"");nn.prototype[n]=function(){return this[t](1).value()[0]}}),ae(["initial","tail"],function(n,e){var t="drop"+(e?"":"Right");nn.prototype[n]=function(){return this.__filtered__?new nn(this):this[t](1)}}),nn.prototype.compact=function(){return this.filter(Qn)},nn.prototype.find=function(n){return this.filter(n).head()},nn.prototype.findLast=function(n){return this.reverse().find(n)},nn.prototype.invokeMap=V(function(n,e){return typeof n=="function"?new nn(this):this.map(function(t){return Vt(t,n,e)})}),nn.prototype.reject=function(n){return this.filter(ai(N(n)))},nn.prototype.slice=function(n,e){n=Q(n);var t=this;return t.__filtered__&&(n>0||e<0)?new nn(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==i&&(e=Q(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},nn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},nn.prototype.toArray=function(){return this.take(X)},Re(nn.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),u=/^(?:head|last)$/.test(e),s=a[u?"take"+(e=="last"?"Right":""):e],f=u||/^find/.test(e);s&&(a.prototype[e]=function(){var l=this.__wrapped__,h=u?[1]:arguments,g=l instanceof nn,T=h[0],w=g||z(l),A=function(j){var tn=s.apply(a,ke([j],h));return u&&R?tn[0]:tn};w&&t&&typeof T=="function"&&T.length!=1&&(g=w=!1);var R=this.__chain__,U=!!this.__actions__.length,$=f&&!R,J=g&&!U;if(!f&&w){l=J?l:new nn(this);var P=n.apply(l,h);return P.__actions__.push({func:ii,args:[A],thisArg:i}),new ce(P,R)}return $&&J?n.apply(this,h):(P=this.thru(A),$?u?P.value()[0]:P.value():P)})}),ae(["pop","push","shift","sort","splice","unshift"],function(n){var e=Dr[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",u=/^(?:pop|shift)$/.test(n);a.prototype[n]=function(){var s=arguments;if(u&&!this.__chain__){var f=this.value();return e.apply(z(f)?f:[],s)}return this[t](function(l){return e.apply(z(l)?l:[],s)})}}),Re(nn.prototype,function(n,e){var t=a[e];if(t){var u=t.name+"";cn.call(St,u)||(St[u]=[]),St[u].push({name:e,func:t})}}),St[Vr(i,dn).name]=[{name:"wrapper",func:i}],nn.prototype.clone=Jd,nn.prototype.reverse=Vd,nn.prototype.value=Xd,a.prototype.at=Mg,a.prototype.chain=Og,a.prototype.commit=Sg,a.prototype.next=Dg,a.prototype.plant=xg,a.prototype.reverse=Ug,a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=Ng,a.prototype.first=a.prototype.head,Gt&&(a.prototype[Gt]=bg),a}),Rt=Sd();ot?((ot.exports=Rt)._=Rt,Pi._=Rt):Pn._=Rt}).call(Fc)})(Ct,Ct.exports)),Ct.exports}var Bc=Hc();const ao=_t(Bc),fo=(r,o)=>{switch(o){case"fr":case"it":return ao.capitalize(r.format("dddd D MMMM"));case"es":return ao.capitalize(r.format("dddd D [de] MMMM"));case"de":return r.format("dddd, D. MMMM");default:return r.format("dddd, MMMM Do")}},co=r=>r.format("LT"),Wc=(r,o)=>{const i=fo(r,o),c=co(r);switch(o){case"fr":return`${i} à ${c}`;case"it":return`${i} alle ${c}`;case"es":return`${i} a las ${c}`;case"de":return`${i} um ${c}`;default:return`${i} at ${c}`}},kc=r=>r.format("ll"),Gc=(r,o)=>{switch(o){case"fr":case"de":case"it":return r.format("HH:mm");case"es":return r.format("H:mm");default:return r.format("h:mm")}},zc=r=>r.format("L"),qc=r=>r.format("L LT");var lo=(r=>(r.SimpleDate="SimpleDate",r.SimpleDateTime="SimpleDateTime",r.ExtraShortDate="ExtraShortDate",r.InlineExtraShortDate="InlineExtraShortDate",r.ShortDate="ShortDate",r.InlineShortDate="InlineShortDate",r.Date="Date",r.LongDate="LongDate",r.LongDateTime="LongDateTime",r.ShortTime="ShortTime",r.Time="Time",r.DateTime="DateTime",r))(lo||{});const Kc=(r,o,i,c)=>{let d=gt(r);c&&(d=d.tz(c)),i&&(d=d.locale(i));const v=d.locale();switch(o){case"SimpleDate":return zc(d);case"SimpleDateTime":return qc(d);case"ExtraShortDate":return Pc(d,v);case"InlineExtraShortDate":return Cc(d,v);case"ShortDate":return kc(d);case"InlineShortDate":return Yc(d,v);case"Date":return Nc(d);case"LongDate":return fo(d,v);case"LongDateTime":return Wc(d,v);case"ShortTime":return Gc(d,v);case"Time":return co(d);case"DateTime":return $c(d)}};var _e=(r=>(r.Contains="Contains",r.DoesntContain="DoesntContain",r.DoesntEndWith="DoesntEndWith",r.DoesntEqual="DoesntEqual",r.DoesntStartWith="DoesntStartWith",r.EndsWith="EndsWith",r.Equals="Equals",r.MatchesRegex="MatchesRegex",r.StartsWith="StartsWith",r))(_e||{});const Qc="http://_meltingspot.local",Zc=200,Jc=/(\([^()]*[+*][^()]*\))[+*]/,Vc=r=>r.length<=Zc&&!Jc.test(r),Xc=r=>{try{const o=new URL(r,Qc);return`${o.pathname}${o.search}${o.hash}`}catch{return r}},Er=r=>r.startsWith("/")?r:`/${r}`,jc=(r,o)=>{switch(o.operator){case _e.MatchesRegex:if(!Vc(o.value))return!1;try{return new RegExp(o.value).test(r)}catch{return!1}case _e.StartsWith:return r.startsWith(Er(o.value));case _e.DoesntStartWith:return!r.startsWith(Er(o.value));case _e.EndsWith:return r.endsWith(o.value);case _e.DoesntEndWith:return!r.endsWith(o.value);case _e.Contains:return r.includes(o.value);case _e.DoesntContain:return!r.includes(o.value);case _e.Equals:return r===Er(o.value);case _e.DoesntEqual:return r!==Er(o.value)}},nl=(r,o)=>{const i=o.rules.map(c=>jc(r,c));return o.ruleOperator==="AND"?i.every(Boolean):i.some(Boolean)},el=(r,o)=>{const i=Xc(r),c=o.blocks.map(d=>nl(i,d));return o.blockOperator==="AND"?c.every(Boolean):c.some(Boolean)},tl=r=>r.replace(/^https?:\/\//,""),rl=(r,o)=>{const i=tl(o);try{const c=new URL(r);return c.hostname===i||c.hostname.endsWith(`.${i}`)}catch{return!1}},il="data-meltingspot-playbook-editor-active",di="meltingspot:playbook-editor:active-changed",ul=()=>typeof document<"u"&&typeof document.dispatchEvent=="function",ho=()=>ul()?document.documentElement.getAttribute(il)==="true":!1;let ol=!1;const sl=()=>ol;class al{constructor(){this.listener=null,this.lastOptions=null,this.chain=Promise.resolve()}enqueue(o){const i=this.chain.then(o);return this.chain=i.catch(()=>{}),i}get isBound(){return this.listener!==null}bind(o){if(this.listener!==null||typeof document>"u")return;const i=()=>{if(ho()){Promise.resolve().then(()=>o.onEditorActive()).catch(d=>{console.warn("[playbook-editor] onEditorActive callback failed",d)});return}const c=this.lastOptions;c!==null&&Promise.resolve().then(()=>o.onEditorInactive(c)).catch(d=>{console.warn("[playbook-editor] onEditorInactive callback failed",d)})};document.addEventListener(di,i),this.listener=i}cacheOptions(o){this.lastOptions=o}clearOptions(){this.lastOptions=null}unbind(){this.listener!==null&&typeof document<"u"&&document.removeEventListener(di,this.listener),this.listener=null,this.lastOptions=null}}const fl="1.7.0";class po{constructor(o){this.debug=!1,this.debug=o?.debug??!1,this.appName=o?.appName,this.appVersion=o?.appVersion}log(o,...i){this.debug&&this.print(o,"info",i)}warn(o,...i){this.print(o,"warn",i)}error(o,...i){this.print(o,"error",i)}print(o,i,c){const _=[`[${["MeltingSpot",this.appName,this.appVersion].filter(Boolean).join(" - ")}] ${o}`];c.length&&_.push(...c),console[i](..._)}}const _o=new po({appName:"Core SDK",appVersion:fl}),cl=r=>{_o.debug=r},ll=r=>r.toLowerCase().replace(/[^a-z0-9-]/g,""),hl=["/user"],dl=({deeplink:r,spotId:o})=>{try{const i=new URL(r,"https://unused.com");let c=i.pathname;return i.search&&(c+=i.search),i.hash&&(c+=i.hash),hl.some(d=>c.startsWith(d))||(c=`/spot/${o}/${qu(c)}`),c}catch(i){return _o.warn("Failed to parse deeplink URL",i),null}},pl=[/(^|\.)meltingspot\.io$/i],_l=r=>{let o;try{const v=Ku(r);o=new URL(v)}catch{throw new Error(`Invalid baseURL: ${r}`)}const i=o.hostname==="localhost"||o.hostname==="127.0.0.1",c=o.protocol==="https:",d=pl.some(v=>v.test(o.hostname));if(!i&&(!c||!d))throw new Error(`Untrusted baseURL origin: ${o.origin}`);return o.origin},gl={msApiBaseUrl:"https://openapi.meltingspot.io/",msCommunityWebBaseUrl:"https://go.meltingspot.io/",ssoToken:void 0,spotId:"",autoJoin:!1,rootDocument:globalThis.document};class ue{constructor(){this.configuration=gl}static getInstance(){return ue.instance||(ue.instance=new ue),ue.instance}setConfiguration(o){this.configuration={...this.configuration,...o}}static getConfiguration(o={}){return{...ue.getInstance().configuration,...o}}}const go="%[a-f0-9]{2}",mo=new RegExp("("+go+")|([^%]+?)","gi"),vo=new RegExp("("+go+")+","gi");function pi(r,o){try{return[decodeURIComponent(r.join(""))]}catch{}if(r.length===1)return r;o=o||1;const i=r.slice(0,o),c=r.slice(o);return Array.prototype.concat.call([],pi(i),pi(c))}function ml(r){try{return decodeURIComponent(r)}catch{let o=r.match(mo)||[];for(let i=1;i<o.length;i++)r=pi(o,i).join(""),o=r.match(mo)||[];return r}}function vl(r){const o={"%FE%FF":"��","%FF%FE":"��"};let i=vo.exec(r);for(;i;){try{o[i[0]]=decodeURIComponent(i[0])}catch{const d=ml(i[0]);d!==i[0]&&(o[i[0]]=d)}i=vo.exec(r)}o["%C2"]="�";const c=Object.keys(o);for(const d of c)r=r.replace(new RegExp(d,"g"),o[d]);return r}function El(r){if(typeof r!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof r+"`");try{return decodeURIComponent(r)}catch{return vl(r)}}function Tl(r,o){const i={};if(Array.isArray(o))for(const c of o){const d=Object.getOwnPropertyDescriptor(r,c);d?.enumerable&&Object.defineProperty(i,c,d)}else for(const c of Reflect.ownKeys(r)){const d=Object.getOwnPropertyDescriptor(r,c);if(d.enumerable){const v=r[c];o(c,v,r)&&Object.defineProperty(i,c,d)}}return i}function Eo(r,o){if(!(typeof r=="string"&&typeof o=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r===""||o==="")return[];const i=r.indexOf(o);return i===-1?[]:[r.slice(0,i),r.slice(i+o.length)]}const wl=r=>r==null,Al=r=>encodeURIComponent(r).replaceAll(/[!'()*]/g,o=>`%${o.charCodeAt(0).toString(16).toUpperCase()}`),_i=Symbol("encodeFragmentIdentifier");function yl(r){switch(r.arrayFormat){case"index":return o=>(i,c)=>{const d=i.length;return c===void 0||r.skipNull&&c===null||r.skipEmptyString&&c===""?i:c===null?[...i,[Rn(o,r),"[",d,"]"].join("")]:[...i,[Rn(o,r),"[",Rn(d,r),"]=",Rn(c,r)].join("")]};case"bracket":return o=>(i,c)=>c===void 0||r.skipNull&&c===null||r.skipEmptyString&&c===""?i:c===null?[...i,[Rn(o,r),"[]"].join("")]:[...i,[Rn(o,r),"[]=",Rn(c,r)].join("")];case"colon-list-separator":return o=>(i,c)=>c===void 0||r.skipNull&&c===null||r.skipEmptyString&&c===""?i:c===null?[...i,[Rn(o,r),":list="].join("")]:[...i,[Rn(o,r),":list=",Rn(c,r)].join("")];case"comma":case"separator":case"bracket-separator":{const o=r.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(c,d)=>d===void 0||r.skipNull&&d===null||r.skipEmptyString&&d===""?c:(d=d===null?"":d,c.length===0?[[Rn(i,r),o,Rn(d,r)].join("")]:[[c,Rn(d,r)].join(r.arrayFormatSeparator)])}default:return o=>(i,c)=>c===void 0||r.skipNull&&c===null||r.skipEmptyString&&c===""?i:c===null?[...i,Rn(o,r)]:[...i,[Rn(o,r),"=",Rn(c,r)].join("")]}}function Il(r){let o;switch(r.arrayFormat){case"index":return(i,c,d)=>{if(o=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!o){d[i]=c;return}d[i]===void 0&&(d[i]={}),d[i][o[1]]=c};case"bracket":return(i,c,d)=>{if(o=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!o){d[i]=c;return}if(d[i]===void 0){d[i]=[c];return}d[i]=[...d[i],c]};case"colon-list-separator":return(i,c,d)=>{if(o=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!o){d[i]=c;return}if(d[i]===void 0){d[i]=[c];return}d[i]=[...d[i],c]};case"comma":case"separator":return(i,c,d)=>{const v=typeof c=="string"&&c.includes(r.arrayFormatSeparator),_=typeof c=="string"&&!v&&Se(c,r).includes(r.arrayFormatSeparator);c=_?Se(c,r):c;const I=v||_?c.split(r.arrayFormatSeparator).map(M=>Se(M,r)):c===null?c:Se(c,r);d[i]=I};case"bracket-separator":return(i,c,d)=>{const v=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!v){d[i]=c&&Se(c,r);return}const _=c===null?[]:Se(c,r).split(r.arrayFormatSeparator);if(d[i]===void 0){d[i]=_;return}d[i]=[...d[i],..._]};default:return(i,c,d)=>{if(d[i]===void 0){d[i]=c;return}d[i]=[...[d[i]].flat(),c]}}}function To(r){if(typeof r!="string"||r.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Rn(r,o){return o.encode?o.strict?Al(r):encodeURIComponent(r):r}function Se(r,o){return o.decode?El(r):r}function wo(r){return Array.isArray(r)?r.sort():typeof r=="object"?wo(Object.keys(r)).sort((o,i)=>Number(o)-Number(i)).map(o=>r[o]):r}function Ao(r){const o=r.indexOf("#");return o!==-1&&(r=r.slice(0,o)),r}function Ll(r){let o="";const i=r.indexOf("#");return i!==-1&&(o=r.slice(i)),o}function yo(r,o,i){return i==="string"&&typeof r=="string"?r:typeof i=="function"&&typeof r=="string"?i(r):i==="boolean"&&r===null?!0:i==="boolean"&&r!==null&&(r.toLowerCase()==="true"||r.toLowerCase()==="false")?r.toLowerCase()==="true":i==="boolean"&&r!==null&&(r.toLowerCase()==="1"||r.toLowerCase()==="0")?r.toLowerCase()==="1":i==="string[]"&&o.arrayFormat!=="none"&&typeof r=="string"?[r]:i==="number[]"&&o.arrayFormat!=="none"&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?[Number(r)]:i==="number"&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?Number(r):o.parseBooleans&&r!==null&&(r.toLowerCase()==="true"||r.toLowerCase()==="false")?r.toLowerCase()==="true":o.parseNumbers&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?Number(r):r}function gi(r){r=Ao(r);const o=r.indexOf("?");return o===-1?"":r.slice(o+1)}function mi(r,o){o={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...o},To(o.arrayFormatSeparator);const i=Il(o),c=Object.create(null);if(typeof r!="string"||(r=r.trim().replace(/^[?#&]/,""),!r))return c;for(const d of r.split("&")){if(d==="")continue;const v=o.decode?d.replaceAll("+"," "):d;let[_,I]=Eo(v,"=");_===void 0&&(_=v),I=I===void 0?null:["comma","separator","bracket-separator"].includes(o.arrayFormat)?I:Se(I,o),i(Se(_,o),I,c)}for(const[d,v]of Object.entries(c))if(typeof v=="object"&&v!==null&&o.types[d]!=="string")for(const[_,I]of Object.entries(v)){const M=o.types[d]?o.types[d].replace("[]",""):void 0;v[_]=yo(I,o,M)}else typeof v=="object"&&v!==null&&o.types[d]==="string"?c[d]=Object.values(v).join(o.arrayFormatSeparator):c[d]=yo(v,o,o.types[d]);return o.sort===!1?c:(o.sort===!0?Object.keys(c).sort():Object.keys(c).sort(o.sort)).reduce((d,v)=>{const _=c[v];return d[v]=_&&typeof _=="object"&&!Array.isArray(_)?wo(_):_,d},Object.create(null))}function Io(r,o){if(!r)return"";o={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...o},To(o.arrayFormatSeparator);const i=_=>o.skipNull&&wl(r[_])||o.skipEmptyString&&r[_]==="",c=yl(o),d={};for(const[_,I]of Object.entries(r))i(_)||(d[_]=I);const v=Object.keys(d);return o.sort!==!1&&v.sort(o.sort),v.map(_=>{const I=r[_];return I===void 0?"":I===null?Rn(_,o):Array.isArray(I)?I.length===0&&o.arrayFormat==="bracket-separator"?Rn(_,o)+"[]":I.reduce(c(_),[]).join("&"):Rn(_,o)+"="+Rn(I,o)}).filter(_=>_.length>0).join("&")}function Lo(r,o){o={decode:!0,...o};let[i,c]=Eo(r,"#");return i===void 0&&(i=r),{url:i?.split("?")?.[0]??"",query:mi(gi(r),o),...o&&o.parseFragmentIdentifier&&c?{fragmentIdentifier:Se(c,o)}:{}}}function Ro(r,o){o={encode:!0,strict:!0,[_i]:!0,...o};const i=Ao(r.url).split("?")[0]||"",c=gi(r.url),d={...mi(c,{sort:!1,...o}),...r.query};let v=Io(d,o);v&&=`?${v}`;let _=Ll(r.url);if(typeof r.fragmentIdentifier=="string"){const I=new URL(i);I.hash=r.fragmentIdentifier,_=o[_i]?I.hash:`#${r.fragmentIdentifier}`}return`${i}${v}${_}`}function Mo(r,o,i){i={parseFragmentIdentifier:!0,[_i]:!1,...i};const{url:c,query:d,fragmentIdentifier:v}=Lo(r,i);return Ro({url:c,query:Tl(d,o),fragmentIdentifier:v},i)}function Rl(r,o,i){const c=Array.isArray(o)?d=>!o.includes(d):(d,v)=>!o(d,v);return Mo(r,c,i)}const Ml=Object.freeze(Object.defineProperty({__proto__:null,exclude:Rl,extract:gi,parse:mi,parseUrl:Lo,pick:Mo,stringify:Io,stringifyUrl:Ro},Symbol.toStringTag,{value:"Module"}));class Gn extends Error{constructor(o,i){super(`HTTP Error ${o}${i?`: ${i}`:""}`),this.code=o,this.name="HttpError",Object.setPrototypeOf(this,Gn.prototype)}}var wn=(r=>(r.GET="GET",r.PATCH="PATCH",r.POST="POST",r))(wn||{});class Oo{constructor(){this.headers={}}setHeaders(o){this.headers=o}async get(o){try{const i=o.query?`${o.url}?${this.serializeQuery(o.query)}`:o.url,c=await fetch(i,{headers:{...this.headers,...o.headers,"Content-Type":"application/json"},...o.signal?{signal:o.signal}:{}});return c.ok?un(await c.json()):W(new Gn(c.status,await c.text()))}catch(i){const c=i instanceof Error?i.message:"Unknown error";return W(new Gn(ie.INTERNAL_SERVER_ERROR,c))}}async post(o){try{const i=await fetch(o.url,{method:"POST",headers:{...this.headers,...o.headers,"Content-Type":"application/json"},body:JSON.stringify(o.payload),...o.signal?{signal:o.signal}:{}});return i.ok?un(await i.json()):W(new Gn(i.status,await i.text()))}catch(i){const c=i instanceof Error?i.message:"Unknown error";return W(new Gn(ie.INTERNAL_SERVER_ERROR,c))}}async patch(o){try{const i=await fetch(o.url,{method:"PATCH",headers:{...this.headers,...o.headers,"Content-Type":"application/json"},body:JSON.stringify(o.payload),...o.signal?{signal:o.signal}:{}});return i.ok?un(await i.json()):W(new Gn(i.status,await i.text()))}catch(i){const c=i instanceof Error?i.message:"Unknown error";return W(new Gn(ie.INTERNAL_SERVER_ERROR,c))}}serializeQuery(o){if(typeof o=="string")return o;if(typeof o=="object")for(const i in o)o[i]===void 0&&delete o[i];return o=Ml.stringify(o,{arrayFormat:"none"}),o}}const Tr={accessToken:{email:"/v1/auth/accessToken/email",sso:{jwt:"/v1/auth/accessToken/sso/jwt"}},refreshAccessToken:"/v1/auth/accessToken~refresh",password:{reset:"/v1/auth/password~reset"}};var So=(r=>(r.TokensUpdated="auth:tokens-updated",r))(So||{});class De extends EventTarget{constructor(){super(),this.accessToken=null,this.refreshToken=null}static getInstance(){return De.instance||(De.instance=new De),De.instance}async loginWithPassword(o,i){const c=await this.callApi({endpoint:Tr.accessToken.email,method:"POST",body:{email:o,password:i},withSpotId:!0});if(c.isErr())return W(c.error);const{accessToken:d,refreshToken:v}=c.value;return this.setTokens(d.token,v.token),un({accessToken:d.token,refreshToken:v.token})}async loginWithSsoToken(o){const i=await this.callApi({endpoint:Tr.accessToken.sso.jwt,method:"POST",body:{token:o},withSpotId:!0});if(i.isErr())return W(i.error);const{accessToken:c,refreshToken:d}=i.value;return this.setTokens(c.token,d.token),un({accessToken:c.token,refreshToken:d.token})}loginWithAuthTokens(o,i){return this.setTokens(o,i),{accessToken:o,refreshToken:i}}resetPassword(o){return this.callApi({endpoint:Tr.password.reset,method:"POST",body:{email:o}})}async refresh(){const o=await this.callApi({endpoint:Tr.refreshAccessToken,method:"POST",body:{refreshToken:this.refreshToken}});if(o.isErr())return W(o.error);const{accessToken:i,refreshToken:c}=o.value;return this.setTokens(i.token,c.token),un({accessToken:i.token,refreshToken:c.token})}async logout(){this.setTokens(null,null)}getAccessToken(){return this.accessToken}getRefreshToken(){return this.refreshToken}setTokens(o,i){if(this.accessToken!==o||this.refreshToken!==i){this.accessToken=o,this.refreshToken=i;const c=new CustomEvent("auth:tokens-updated",{detail:{accessToken:o,refreshToken:i}});this.dispatchEvent(c)}}async callApi(o){try{const{spotId:i,msApiBaseUrl:c}=ue.getConfiguration(),d=ur(o.endpoint,c),v={"Content-Type":"application/json",...o.headers};o.withSpotId&&i&&(v[Do.SpotId]=i);const _=await fetch(d,{method:o.method,body:o.body?JSON.stringify(o.body):void 0,headers:v});if(!_.ok)return W(new Gn(_.status,_.statusText));if(_.status===ie.NO_CONTENT)return un(void 0);const I=await _.json();return un(I)}catch(i){return W(new Gn(ie.INTERNAL_SERVER_ERROR,i instanceof Error?i.message:String(i)))}}}var Do=(r=>(r.Authorization="Authorization",r.SpotId="x-spotid",r))(Do||{});class oe{constructor(){this.queue=[],this.isProcessing=!1,this.isPaused=!1,this.authService=De.getInstance(),this.httpService=new Oo}static getInstance(){return oe.instance||(oe.instance=new oe),oe.instance}static buildAuthenticatedRequest(o){const{msApiBaseUrl:i,spotId:c}=ue.getConfiguration(),d=ur(o,i),v=De.getInstance().getAccessToken();if(!v)return W(new Error("Not authenticated"));const _={"Content-Type":"application/json",Authorization:`Bearer ${v}`};return c&&(_["x-spotid"]=c),un({url:d,headers:_})}static async stream(o,i,c){const{streamTransport:d}=ue.getConfiguration();if(d)return d({endpoint:o,body:i,signal:c});const v=oe.buildAuthenticatedRequest(o);if(v.isErr())return W(v.error);const{url:_,headers:I}=v.value;try{const M=await fetch(_,{method:"POST",headers:I,...i!==void 0?{body:JSON.stringify(i)}:{},...c?{signal:c}:{}});if(!M.ok){const K=await M.text();return W(new Error(`HTTP ${M.status}: ${K}`))}return M.body?un(M.body):W(new Error("Response body is empty"))}catch(M){const K=M instanceof Error?M.message:"Unknown error";return W(M instanceof Error?M:new Error(K))}}get pendingCount(){return this.queue.length}enqueue(o){return new Promise(i=>{const c=async()=>{try{const d=await o();i(d)}catch(d){i(W(new Gn(ie.INTERNAL_SERVER_ERROR,d instanceof Error?d.message:"Unknown error")))}};this.queue.push(c),this.processQueue()})}async processQueue(){if(!this.isProcessing){this.isProcessing=!0;try{for(;!this.isPaused&&this.queue.length>0;){const o=this.queue.shift();if(!o)break;await o()}}finally{this.isProcessing=!1,!this.isPaused&&this.queue.length>0&&Promise.resolve().then(()=>this.processQueue())}}}pauseQueue(){this.isPaused=!0}resumeQueue(){const o=this.isPaused;this.isPaused=!1,o&&this.processQueue()}async call(o){return this.enqueue(async()=>{const i=async()=>{const{spotId:d,msApiBaseUrl:v}=ue.getConfiguration(),_={...o.options?.headers??{}};d&&(_["x-spotid"]=d);const I=this.authService.getAccessToken(),{requiresAuth:M=!0}=o;if(!I&&M)return W(new Gn(ie.UNAUTHORIZED));I&&(_.Authorization=`Bearer ${I}`);const K=ur(o.endpoint,v);switch(o.method){case wn.GET:return this.httpService.get({...o.options??{},headers:_,url:K});case wn.PATCH:return this.httpService.patch({...o.options??{},headers:_,url:K});case wn.POST:return this.httpService.post({...o.options??{},headers:_,url:K});default:return W(new Gn(ie.METHOD_NOT_ALLOWED,"Method not allowed"))}};let c=await i();if(c.isErr()&&c.error.code===ie.UNAUTHORIZED){const d=await this.authService.refresh();if(d.isErr())return W(new Gn(ie.UNAUTHORIZED,d.error.message));c=await i()}return c})}}const Ie={playbooks:"/v1/playbooks",pages:r=>`/v1/playbooks/${r}/pages`,hotspots:(r,o)=>`/v1/playbooks/${r}/pages/${o}/hotspots`,hotspot:(r,o,i)=>`/v1/playbooks/${r}/pages/${o}/hotspots/${i}`,accessibleIntents:(r,o)=>`/v1/playbooks/${r}/pages/${o}/accessibleIntents`,intents:(r,o,i)=>`/v1/playbooks/${r}/pages/${o}/hotspots/${i}/intents`,intent:(r,o,i,c)=>`/v1/playbooks/${r}/pages/${o}/hotspots/${i}/intents/${c}`},wr=50;class et{static getInstance(){return et.instance||(et.instance=new et),et.instance}constructor(){this.meltingSpotApi=oe.getInstance()}async listPlaybooks(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ie.playbooks,options:{query:{page:o?.page??1,limit:o?.limit??wr,...o?.domain?{"domain[eq]":o.domain}:{}}}});return i.isErr()?W(i.error):un(i.value)}async listPlaybookPages(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ie.pages(o.playbookId),options:{query:{page:o.page??1,limit:o.limit??wr,...o.url?{"url[eq]":o.url}:{}}}});return i.isErr()?W(i.error):un(i.value)}async createPlaybookPage(o,i){const c=await this.meltingSpotApi.call({method:wn.POST,endpoint:Ie.pages(o.playbookId),options:{payload:i}});return c.isErr()?W(c.error):un(c.value)}async listAccessiblePlaybookIntents(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ie.accessibleIntents(o.playbookId,o.pageId),options:{query:{...o.domain?{domain:o.domain}:{}}}});return i.isErr()?W(i.error):un(i.value)}async listPlaybookHotspots(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ie.hotspots(o.playbookId,o.pageId),options:{query:{page:o.page??1,limit:o.limit??wr,...o.intentStatus?{"intentStatus[eq]":o.intentStatus}:{},...o.widgetType?{"widgetType[eq]":o.widgetType}:{}}}});return i.isErr()?W(i.error):un(i.value)}async createPlaybookHotspot(o,i){const c=await this.meltingSpotApi.call({method:wn.POST,endpoint:Ie.hotspots(o.playbookId,o.pageId),options:{payload:i}});return c.isErr()?W(c.error):un(c.value)}async updatePlaybookHotspot(o,i){const c=await this.meltingSpotApi.call({method:wn.PATCH,endpoint:Ie.hotspot(o.playbookId,o.pageId,o.hotspotId),options:{payload:i}});return c.isErr()?W(c.error):un(c.value)}async listPlaybookIntents(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ie.intents(o.playbookId,o.pageId,o.hotspotId),options:{query:{page:o.page??1,limit:o.limit??wr,...o.status?{"status[eq]":o.status}:{}}}});return i.isErr()?W(i.error):un(i.value)}async createPlaybookIntent(o,i){const c=await this.meltingSpotApi.call({method:wn.POST,endpoint:Ie.intents(o.playbookId,o.pageId,o.hotspotId),options:{payload:i}});return c.isErr()?W(c.error):un(c.value)}async updatePlaybookIntent(o,i){const c=await this.meltingSpotApi.call({method:wn.PATCH,endpoint:Ie.intent(o.playbookId,o.pageId,o.hotspotId,o.intentId),options:{payload:i}});return c.isErr()?W(c.error):un(c.value)}}const Ol={me:"/v1/spots/me"},Sl=50;class mt{static getInstance(){return mt.instance||(mt.instance=new mt),mt.instance}constructor(){this.meltingSpotApi=oe.getInstance()}async listSpotsForMe(o){const i=await this.meltingSpotApi.call({method:wn.GET,endpoint:Ol.me,options:{query:{page:1,limit:Sl,...o?.spotMemberRole?{"spotMemberRole[eq]":o.spotMemberRole}:{}}}});return i.isErr()?W(i.error):un(i.value)}}const vi={spotMember:{me:"/v1/spotMembers/me",joinFromSso:"/v1/spotMembers~joinFromSso",search:"/v1/spotMembers~search"}};class tt{static getInstance(){return tt.instance||(tt.instance=new tt),tt.instance}constructor(){this.meltingSpotApi=oe.getInstance()}async getSpotMemberForMe(){const o=await this.meltingSpotApi.call({method:wn.GET,endpoint:vi.spotMember.me});return o.isErr()?W(o.error):un(o.value)}async searchSpotMembers(o){const i={page:o.page,limit:o.limit};o.search&&(i.search=o.search);const c=await this.meltingSpotApi.call({method:wn.GET,endpoint:vi.spotMember.search,options:{query:i}});return c.isErr()?W(c.error):un(c.value)}async joinFromSso(o){const i=await this.meltingSpotApi.call({method:wn.POST,endpoint:vi.spotMember.joinFromSso,options:{payload:{token:o}}});return i.isErr()?W(i.error):un(i.value)}}const bo={spotMemberSsoToken:"/v1/spotMembers/auth/sso/jwt",previewAccessKey:"/v1/spotMembers/auth/preview/accessKey"};class rt{static getInstance(){return rt.instance||(rt.instance=new rt),rt.instance}constructor(){this.meltingSpotApi=oe.getInstance()}async generateSsoToken(){const o=await this.meltingSpotApi.call({method:wn.POST,endpoint:bo.spotMemberSsoToken,options:{payload:{}}});return o.isErr()?W(o.error):un(o.value.token)}async generatePreviewAccessKey(o){const i=await this.meltingSpotApi.call({method:wn.POST,endpoint:bo.previewAccessKey,options:{payload:{targetSpotMemberId:o.targetSpotMemberId}}});return i.isErr()?W(i.error):un(i.value)}}class it{static getInstance(){return it.instance||(it.instance=new it),it.instance}constructor(){this.spotMemberAuthApiService=rt.getInstance()}async generateSsoToken(){return this.spotMemberAuthApiService.generateSsoToken()}}class Dl{constructor(o){this.active=!1,this.lastObservedUrl=null,this.options={onRouteChange:o.onRouteChange,debounceMs:o.debounceMs??0,enableDeduplication:o.enableDeduplication??!0,enableDomMutationDetection:o.enableDomMutationDetection??!1,enableHistoryChange:o.enableHistoryChange??!0,enablePopState:o.enablePopState??!0,enableHashChange:o.enableHashChange??!0,enableLoad:o.enableLoad??!0,rootDocument:o.rootDocument}}start(){this.active||(this.active=!0,this.lastObservedUrl=null,this.options.enablePopState&&(this.popStateListener=()=>this.handleNavigationEvent("popstate"),window.addEventListener("popstate",this.popStateListener)),this.options.enableHashChange&&(this.hashChangeListener=()=>this.handleNavigationEvent("hashchange"),window.addEventListener("hashchange",this.hashChangeListener)),this.options.enableLoad&&(this.loadListener=()=>this.handleNavigationEvent("load"),window.addEventListener("load",this.loadListener)),this.options.enableDomMutationDetection&&(this.mutationObserver=new MutationObserver(()=>{this.handleNavigationEvent("locationchange")}),this.mutationObserver.observe(this.options.rootDocument??document,{childList:!0,subtree:!0})),this.options.enableHistoryChange&&this.patchHistoryListeners())}stop(){this.active&&(this.active=!1,this.debounceTimer!==void 0&&(clearTimeout(this.debounceTimer),this.debounceTimer=void 0),this.popStateListener&&(window.removeEventListener("popstate",this.popStateListener),this.popStateListener=void 0),this.hashChangeListener&&(window.removeEventListener("hashchange",this.hashChangeListener),this.hashChangeListener=void 0),this.loadListener&&(window.removeEventListener("load",this.loadListener),this.loadListener=void 0),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=void 0),(this.originalPushState||this.originalReplaceState)&&this.restoreHistoryListeners(),this.lastObservedUrl=null)}handleNavigationEvent(o){if(!this.active)return;const i=window.location.href;this.options.enableDeduplication&&this.lastObservedUrl===i||(this.lastObservedUrl=i,this.options.debounceMs>0?(this.debounceTimer!==void 0&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.debounceTimer=void 0,this.options.onRouteChange(i,o)},this.options.debounceMs)):this.options.onRouteChange(i,o))}patchHistoryListeners(){this.originalPushState=window.history.pushState,this.originalReplaceState=window.history.replaceState,window.history.pushState=(...o)=>{const i=this.originalPushState?.apply(window.history,o);return this.handleNavigationEvent("history.pushState"),i},window.history.replaceState=(...o)=>{const i=this.originalReplaceState?.apply(window.history,o);return this.handleNavigationEvent("history.replaceState"),i}}restoreHistoryListeners(){this.originalPushState&&(window.history.pushState=this.originalPushState,this.originalPushState=void 0),this.originalReplaceState&&(window.history.replaceState=this.originalReplaceState,this.originalReplaceState=void 0)}}const bl={events:"/v1/analytics/events"};class vt{static getInstance(){return vt.instance||(vt.instance=new vt),vt.instance}constructor(){this.meltingSpotApi=oe.getInstance()}async appendEvent(o){const i=await this.meltingSpotApi.call({method:wn.POST,endpoint:bl.events,options:{payload:o}});return i.isErr()?W(i.error):un(i.value)}}const xl=r=>{const o=r.get("utm_source");if(o)return{source:o,medium:r.get("utm_medium")??void 0,campaign:r.get("utm_campaign")??void 0,term:r.get("utm_term")??void 0,content:r.get("utm_content")??void 0}},Ul=r=>r?Object.entries(r).reduce((o,[i,c])=>(c!=null&&(o[`utm_${i}`]=c),o),{}):{};var xo=(r=>(r.Active="Active",r.Closed="Closed",r.Expired="Expired",r))(xo||{}),Uo=(r=>(r.User="User",r.Assistant="Assistant",r))(Uo||{}),No=(r=>(r.Metadata="metadata",r.Token="token",r.Action="action",r.Bubble="bubble",r.Handoff="handoff",r.Done="done",r.Error="error",r))(No||{}),$o=(r=>(r.NoSource="NoSource",r.LowConfidence="LowConfidence",r.HumanRequest="HumanRequest",r.OutOfScope="OutOfScope",r))($o||{}),Po=(r=>(r.PoorExplanation="poor_explanation",r.FalseInformation="false_information",r.NotFollowingRequest="not_following_request",r.IncompleteResponse="incomplete_response",r.ChatHistoryIssue="chat_history_issue",r.PersonalizationIssue="personalization_issue",r.Other="other",r))(Po||{}),Co=(r=>(r.Up="up",r.Down="down",r))(Co||{}),Yo=(r=>(r.PlaybookIntent="PlaybookIntent",r.UserInitiated="UserInitiated",r.Welcome="Welcome",r.Resume="Resume",r.Discover="Discover",r.Recommend="Recommend",r))(Yo||{}),Fo=(r=>(r.ExtraExtraSmall="ExtraExtraSmall",r.ExtraSmall="ExtraSmall",r.Small="Small",r.Medium="Medium",r.Large="Large",r))(Fo||{}),Ho=(r=>(r.Dropdown="Dropdown",r.Inline="Inline",r.Overlay="Overlay",r))(Ho||{}),Bo=(r=>(r.Left="Left",r.Right="Right",r))(Bo||{}),Wo=(r=>(r.Top="Top",r.Bottom="Bottom",r))(Wo||{}),ko=(r=>(r.TopLeft="TopLeft",r.TopRight="TopRight",r.BottomLeft="BottomLeft",r.BottomRight="BottomRight",r))(ko||{}),Go=(r=>(r.Button="Button",r.Card="Card",r.CardInline="CardInline",r.Carousel="Carousel",r.Helper="Helper",r.ListOfContent="ListOfContent",r.ListOfContentInline="ListOfContentInline",r))(Go||{}),zo=(r=>(r.Inline="Inline",r.Modal="Modal",r.Drawer="Drawer",r))(zo||{}),qo=(r=>(r.Self="Self",r.Parent="Parent",r.Top="Top",r))(qo||{}),Ko=(r=>(r.Left="Left",r.Right="Right",r))(Ko||{}),Qo=(r=>(r.Body="Body",r.DOMSelector="DOMSelector",r))(Qo||{}),Zo=(r=>(r.After="After",r.AppendChild="AppendChild",r.Before="Before",r.PrependChild="PrependChild",r))(Zo||{}),Jo=(r=>(r.CSSSelector="CSSSelector",r.Slot="Slot",r))(Jo||{}),Vo=(r=>(r.Element="Element",r.WebComponent="WebComponent",r))(Vo||{}),Xo=(r=>(r.Inline="Inline",r.Flex="Flex",r))(Xo||{}),jo=(r=>(r.Horizontal="Horizontal",r.Vertical="Vertical",r))(jo||{}),ns=(r=>(r.Start="Start",r.Center="Center",r.End="End",r.Stretch="Stretch",r.Baseline="Baseline",r))(ns||{}),es=(r=>(r.Course="Course",r.Live="Live",r.Link="Link",r.Page="Page",r))(es||{}),ts=(r=>(r.Workshop="Workshop",r.Conference="Conference",r))(ts||{}),rs=(r=>(r.Ended="Ended",r.Planned="Planned",r.Live="Live",r))(rs||{}),is=(r=>(r.CloseA="CloseA",r.CloseB="CloseB",r.Later="Later",r))(is||{});const Nl="a",$l="mention_input",Pl="mention",Cl="var",Yl="p",Fl="h1",Hl="h2",Bl="h3",Wl="blockquote",kl="layout",Gl="layout-column",zl="ul",ql="ol",Kl="lic",Ql="li",Zl="img",Jl="iframely",Vl="code_block",Xl="code_line";var us=(r=>(r.Element="Element",r.FullPage="FullPage",r))(us||{}),os=(r=>(r.Draft="Draft",r.Pending="Pending",r.Published="Published",r))(os||{}),ss=(r=>(r.Beacon="Beacon",r.List="List",r))(ss||{}),Ei=(r=>(r.Channel="Channel",r.Collection="Collection",r.Course="Course",r.Discussion="Discussion",r.Forum="Forum",r.Link="Link",r.Live="Live",r.LearningPath="LearningPath",r.Page="Page",r.RichText="RichText",r.Topic="Topic",r))(Ei||{});function jl(r){return Object.values(Ei).includes(r)}const as=ue.getInstance(),fs=De.getInstance(),cs=it.getInstance(),ls={Playbook:et.getInstance(),Spot:mt.getInstance(),SpotMember:tt.getInstance()},Et=globalThis;Et.MeltingSpot||(Et.MeltingSpot={}),Et.MeltingSpot.Configuration=as,Et.MeltingSpot.Auth=fs,Et.MeltingSpot.Sso=cs,Et.MeltingSpot.Api=ls,y.ATTRIBUTE_BLOCKQUOTE=Wl,y.ATTRIBUTE_CODE_BLOCK=Vl,y.ATTRIBUTE_CODE_LINE=Xl,y.ATTRIBUTE_H1=Fl,y.ATTRIBUTE_H2=Hl,y.ATTRIBUTE_H3=Bl,y.ATTRIBUTE_IFRAMELY=Jl,y.ATTRIBUTE_IMAGE=Zl,y.ATTRIBUTE_LAYOUT=kl,y.ATTRIBUTE_LAYOUT_COLUMN=Gl,y.ATTRIBUTE_LI=Ql,y.ATTRIBUTE_LIC=Kl,y.ATTRIBUTE_LINK=Nl,y.ATTRIBUTE_MENTION=Pl,y.ATTRIBUTE_MENTION_INPUT=$l,y.ATTRIBUTE_OL=ql,y.ATTRIBUTE_PARAGRAPH=Yl,y.ATTRIBUTE_UL=zl,y.ATTRIBUTE_VARIABLE=Cl,y.AnalyticsApiService=vt,y.Api=ls,y.Auth=fs,y.AuthService=De,y.AuthServiceEvents=So,y.BeaconIntegrationType=Ho,y.BeaconRenderType=Go,y.ButtonBeaconSize=Fo,y.Configuration=as,y.ConfigurationService=ue,y.ConversationMessageRole=Uo,y.ConversationSseEventType=No,y.ConversationStatus=xo,y.DEFAULT_PERMISSION_POLICIES=Qu,y.DateFormat=lo,y.DrawerWidgetPosition=Ko,y.DropdownBeaconHorizontalPosition=Bo,y.DropdownBeaconVerticalPosition=Wo,y.HttpMethods=wn,y.HttpService=Oo,y.LastActionState=is,y.LearningPathContentType=es,y.LiveBuiltInType=ts,y.LiveStatus=rs,y.Logger=po,y.MeltingSpotApi=oe,y.MeltyHandoffReason=$o,y.MeltyMessageFeedbackReason=Po,y.MeltyMessageFeedbackSignal=Co,y.OverlayBeaconPosition=ko,y.PLAYBOOK_EDITOR_ACTIVE_EVENT=di,y.PlaybookApiService=et,y.PlaybookEditorAwareLifecycle=al,y.PlaybookHotspotLocation=us,y.PlaybookIntentStatus=os,y.PlaybookIntentWidgetMode=ss,y.PlaybookPageMatchingOperator=_e,y.RouteChangeDetector=Dl,y.SpotMemberApiService=tt,y.SpotMemberAuthApiService=rt,y.SpotWidgetContentType=Ei,y.Sso=cs,y.SsoService=it,y.TouchPointAnchorType=Qo,y.TouchPointDOMInjectionPosition=Zo,y.TouchPointDOMSelectorCssStepMode=Vo,y.TouchPointDOMSelectorPathStepType=Jo,y.TouchPointFlexAlign=ns,y.TouchPointFlexDirection=jo,y.TouchPointLayoutType=Xo,y.TriggerType=Yo,y.WidgetInjectionTarget=qo,y.WidgetInjectionType=zo,y.createDialog=Vf,y.createIframe=Xf,y.createIsolatedShadowHost=jf,y.dayjs=gt,y.flattenUtmParameters=Ul,y.formatBaseUrl=_l,y.formatDate=Kc,y.formatDeeplink=dl,y.formatUUID=ll,y.getHTMLElement=Jf,y.getTimeInfoWithStartAndEndDate=Uc,y.isEditorPauseExempt=sl,y.isPlaybookEditorActive=ho,y.isSpotWidgetContentType=jl,y.isTouchDevice=nc,y.matchesDomain=rl,y.parseUtmParameters=xl,y.sanitizeUrl=ur,y.setLoggerDebugMode=cl,y.testUrlMatching=el,y.trimSlashLeft=qu,y.trimSlashRight=Ku,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "MeltingSpot Core SDK",
4
4
  "homepage": "https://meltingspot.io",
5
5
  "license": "BSD-3-Clause",
6
- "version": "1.6.0",
6
+ "version": "1.7.0",
7
7
  "main": "./index.umd.js",
8
8
  "module": "./index.mjs",
9
9
  "typings": "./index.d.ts",
@@ -43,3 +43,19 @@ export interface AccessiblePlaybookIntentOutput {
43
43
  export interface ListAccessiblePlaybookIntentsOutput {
44
44
  items: AccessiblePlaybookIntentOutput[];
45
45
  }
46
+ export interface AccessiblePlaybookIntentCandidateOutput {
47
+ intentId: string;
48
+ widgetId: string;
49
+ mode: PlaybookIntentWidgetMode;
50
+ widgetMetadata: WidgetContentMetadata[];
51
+ }
52
+ export interface AccessiblePlaybookHotspotOutput {
53
+ hotspotId: string;
54
+ location: PlaybookHotspotLocation;
55
+ cssSelector: Nullable<string>;
56
+ highlighted: boolean;
57
+ intents: AccessiblePlaybookIntentCandidateOutput[];
58
+ }
59
+ export interface ListAccessiblePlaybookHotspotsOutput {
60
+ items: AccessiblePlaybookHotspotOutput[];
61
+ }