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

v-onboarding

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-onboarding - npm Package Compare versions

Comparing version 2.6.0 to 2.7.0

128

dist/v-onboarding.es.js

@@ -718,3 +718,4 @@ var __defProp = Object.defineProperty;

padding: 0,
borderRadius: 0
borderRadius: 0,
preventOverlayInteraction: true
},

@@ -739,3 +740,4 @@ scrollToStep: {

exit: false
}
},
hideNextStepDuringHook: false
};

@@ -845,3 +847,3 @@ function useSvgOverlay() {

const attachElement = async () => {
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
await nextTick();

@@ -852,9 +854,9 @@ const element = useGetElement((_b = (_a = step == null ? void 0 : step.value) == null ? void 0 : _a.attachTo) == null ? void 0 : _b.element);

if ((_d = (_c = mergedOptions.value) == null ? void 0 : _c.scrollToStep) == null ? void 0 : _d.enabled) {
element.scrollIntoView((_f = (_e = mergedOptions.value) == null ? void 0 : _e.scrollToStep) == null ? void 0 : _f.options);
(_g = element.scrollIntoView) == null ? void 0 : _g.call(element, (_f = (_e = mergedOptions.value) == null ? void 0 : _e.scrollToStep) == null ? void 0 : _f.options);
}
createPopper(element, stepElement.value, mergedOptions.value.popper);
if ((_h = (_g = mergedOptions.value) == null ? void 0 : _g.overlay) == null ? void 0 : _h.enabled) {
if ((_i = (_h = mergedOptions.value) == null ? void 0 : _h.overlay) == null ? void 0 : _i.enabled) {
updatePath(element, {
padding: (_j = (_i = mergedOptions.value) == null ? void 0 : _i.overlay) == null ? void 0 : _j.padding,
borderRadius: (_l = (_k = mergedOptions.value) == null ? void 0 : _k.overlay) == null ? void 0 : _l.borderRadius
padding: (_k = (_j = mergedOptions.value) == null ? void 0 : _j.overlay) == null ? void 0 : _k.padding,
borderRadius: (_m = (_l = mergedOptions.value) == null ? void 0 : _l.overlay) == null ? void 0 : _m.borderRadius
});

@@ -917,8 +919,9 @@ }

];
const _hoisted_9 = {
key: 0,
const _hoisted_9 = ["innerHTML"];
const _hoisted_10 = {
key: 1,
class: "v-onboarding-item__description"
};
const _hoisted_10 = { class: "v-onboarding-item__actions" };
const _hoisted_11 = /* @__PURE__ */ createElementVNode("div", { "data-popper-arrow": "" }, null, -1);
const _hoisted_11 = { class: "v-onboarding-item__actions" };
const _hoisted_12 = /* @__PURE__ */ createElementVNode("div", { "data-popper-arrow": "" }, null, -1);
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {

@@ -937,7 +940,12 @@ return withDirectives((openBlock(), createElementBlock("div", null, [

onClick: _cache[0] || (_cache[0] = (...args) => _ctx.exit && _ctx.exit(...args)),
"aria-label": "Close",
class: "v-onboarding-item__header-close"
}, _hoisted_8)) : createCommentVNode("", true)
]),
_ctx.step.content.description ? (openBlock(), createElementBlock("p", _hoisted_9, toDisplayString(_ctx.step.content.description), 1)) : createCommentVNode("", true),
createElementVNode("div", _hoisted_10, [
_ctx.step.content.description && _ctx.step.content.html ? (openBlock(), createElementBlock("p", {
key: 0,
class: "v-onboarding-item__description",
innerHTML: _ctx.step.content.description
}, null, 8, _hoisted_9)) : _ctx.step.content.description ? (openBlock(), createElementBlock("p", _hoisted_10, toDisplayString(_ctx.step.content.description), 1)) : createCommentVNode("", true),
createElementVNode("div", _hoisted_11, [
!_ctx.isFirstStep && _ctx.isButtonVisible.previous ? (openBlock(), createElementBlock("button", {

@@ -958,3 +966,3 @@ key: 0,

]) : createCommentVNode("", true),
_hoisted_11
_hoisted_12
], 512)

@@ -983,2 +991,4 @@ ], 512)), [

setup(props, { expose, emit }) {
const mergedOptions = computed(() => merge({}, defaultVOnboardingWrapperOptions, props.options));
const showStep = ref(true);
const index = ref(OnboardingState.IDLE);

@@ -993,3 +1003,2 @@ const privateIndex = ref(index.value);

};
const { beforeHook, afterHook } = useStepHooks();
const activeStep = computed(() => {

@@ -999,4 +1008,11 @@ var _a;

});
const activeStepMergedOptions = computed(() => {
return activeStep.value ? merge({}, mergedOptions.value, activeStep.value.options) : mergedOptions.value;
});
const mergeOptions = (step) => {
return merge({}, mergedOptions.value, step.options);
};
const { beforeHook, afterHook } = useStepHooks(activeStepMergedOptions);
watch(index, async (newIndex, oldIndex) => {
var _a, _b;
var _a, _b, _c, _d;
const direction = newIndex < oldIndex ? Direction.BACKWARD : Direction.FORWARD;

@@ -1014,2 +1030,3 @@ const globalHookOptions = {

});
removePointerEvents(useGetElement(oldStep.attachTo.element));
await afterHook(oldStep, afterHookOptions);

@@ -1023,6 +1040,26 @@ }

});
removePointerEvents(useGetElement(newStep.attachTo.element));
if ((_c = mergeOptions(newStep)) == null ? void 0 : _c.hideNextStepDuringHook) {
showStep.value = false;
}
await beforeHook(newStep, beforeHookOptions);
}
privateIndex.value = newIndex;
showStep.value = true;
removePointerEvents(useGetElement("body"));
if ((_d = activeStepMergedOptions.value.overlay) == null ? void 0 : _d.preventOverlayInteraction) {
updateBodyPointerEvents();
}
});
const { addPointerEvents, removePointerEvents } = useSetPointerEvents();
const updateBodyPointerEvents = () => {
const body = useGetElement("body");
if (!body)
return;
if ([OnboardingState.IDLE, OnboardingState.FINISHED].includes(privateIndex.value)) {
removePointerEvents(body);
} else {
addPointerEvents(body, "none");
}
};
const isFinished = computed(() => {

@@ -1055,3 +1092,3 @@ return privateIndex.value === OnboardingState.FINISHED;

step: activeStep,
options: computed(() => merge({}, defaultVOnboardingWrapperOptions, props.options)),
options: mergedOptions,
next,

@@ -1075,3 +1112,4 @@ previous,

finish,
exit
exit,
showStep
};

@@ -1093,13 +1131,46 @@ }

}
function useStepHooks() {
function useSetPointerEvents() {
const pointerEventsDataAttribute = "data-v-onboarding-pointer-events";
const addPointerEvents = (element, value = "auto") => {
if (!element)
return;
const currentPointerEvents = element.style.pointerEvents;
if (currentPointerEvents) {
element.setAttribute(pointerEventsDataAttribute, currentPointerEvents);
}
element.style.setProperty("pointer-events", value);
};
const removePointerEvents = (element) => {
if (!element)
return;
const storedPointerEvent = element.getAttribute(pointerEventsDataAttribute);
if (storedPointerEvent) {
element.style.setProperty("pointer-events", storedPointerEvent);
element.removeAttribute(pointerEventsDataAttribute);
} else {
element.style.removeProperty("pointer-events");
}
};
return { addPointerEvents, removePointerEvents };
}
function useStepHooks(stepOptions) {
const { setClassName, unsetClassName } = useSetElementClassName();
const { addPointerEvents, removePointerEvents } = useSetPointerEvents();
const beforeHook = (step, options) => {
var _a, _b;
setClassName({ element: useGetElement(step.attachTo.element), classList: step.attachTo.classList });
return (_b = (_a = step.on) == null ? void 0 : _a.beforeStep) == null ? void 0 : _b.call(_a, options);
var _a, _b, _c, _d;
const element = useGetElement(step.attachTo.element);
if ((_b = (_a = stepOptions.value) == null ? void 0 : _a.overlay) == null ? void 0 : _b.preventOverlayInteraction) {
addPointerEvents(element);
}
setClassName({ element, classList: step.attachTo.classList });
return (_d = (_c = step.on) == null ? void 0 : _c.beforeStep) == null ? void 0 : _d.call(_c, options);
};
const afterHook = (step, options) => {
var _a, _b;
unsetClassName({ element: useGetElement(step.attachTo.element), classList: step.attachTo.classList });
return (_b = (_a = step.on) == null ? void 0 : _a.afterStep) == null ? void 0 : _b.call(_a, options);
var _a, _b, _c, _d;
const element = useGetElement(step.attachTo.element);
if ((_b = (_a = stepOptions.value) == null ? void 0 : _a.overlay) == null ? void 0 : _b.preventOverlayInteraction) {
removePointerEvents(element);
}
unsetClassName({ element, classList: step.attachTo.classList });
return (_d = (_c = step.on) == null ? void 0 : _c.afterStep) == null ? void 0 : _d.call(_c, options);
};

@@ -1110,3 +1181,4 @@ return { beforeHook, afterHook };

key: 0,
"data-v-onboarding-wrapper": ""
"data-v-onboarding-wrapper": "",
style: { "pointer-events": "auto" }
};

@@ -1116,3 +1188,3 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {

return !_ctx.isFinished ? (openBlock(), createElementBlock("div", _hoisted_1, [
renderSlot(_ctx.$slots, "default", {
_ctx.showStep ? renderSlot(_ctx.$slots, "default", {
key: _ctx.index,

@@ -1128,3 +1200,3 @@ step: _ctx.activeStep,

(openBlock(), createBlock(_component_VOnboardingStep, { key: _ctx.index }))
])
]) : createCommentVNode("", true)
])) : createCommentVNode("", true);

@@ -1131,0 +1203,0 @@ }

@@ -1,12 +0,12 @@

(function(x,O){typeof exports=="object"&&typeof module!="undefined"?O(exports,require("@popperjs/core"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@popperjs/core","vue"],O):(x=typeof globalThis!="undefined"?globalThis:x||self,O(x["v-onboarding"]={},x.core,x.Vue))})(this,function(x,O,r){"use strict";var Jn=Object.defineProperty,Yn=Object.defineProperties;var Xn=Object.getOwnPropertyDescriptors;var ce=Object.getOwnPropertySymbols;var tr=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable;var de=(x,O,r)=>O in x?Jn(x,O,{enumerable:!0,configurable:!0,writable:!0,value:r}):x[O]=r,Vt=(x,O)=>{for(var r in O||(O={}))tr.call(O,r)&&de(x,r,O[r]);if(ce)for(var r of ce(O))er.call(O,r)&&de(x,r,O[r]);return x},Lt=(x,O)=>Yn(x,Xn(O));const Ft=Symbol("onboardingState"),vt={IDLE:-1,FINISHED:-2},ot={BACKWARD:-1,FORWARD:1};var it=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},_t={exports:{}};(function(o,m){var h=200,v="__lodash_hash_undefined__",f=800,u=16,p=9007199254740991,C="[object Arguments]",F="[object Array]",I="[object AsyncFunction]",S="[object Boolean]",w="[object Date]",z="[object Error]",L="[object Function]",D="[object GeneratorFunction]",j="[object Map]",T="[object Number]",P="[object Null]",c="[object Object]",a="[object Proxy]",s="[object RegExp]",B="[object Set]",E="[object String]",A="[object Undefined]",V="[object WeakMap]",M="[object ArrayBuffer]",R="[object DataView]",U="[object Float32Array]",G="[object Float64Array]",W="[object Int8Array]",K="[object Int16Array]",st="[object Int32Array]",lt="[object Uint8Array]",ct="[object Uint8ClampedArray]",je="[object Uint16Array]",Ne="[object Uint32Array]",Ve=/[\\^$.*+?()[\]{}|]/g,Le=/^\[object .+?Constructor\]$/,Fe=/^(?:0|[1-9]\d*)$/,b={};b[U]=b[G]=b[W]=b[K]=b[st]=b[lt]=b[ct]=b[je]=b[Ne]=!0,b[C]=b[F]=b[M]=b[S]=b[R]=b[w]=b[z]=b[L]=b[j]=b[T]=b[c]=b[s]=b[B]=b[E]=b[V]=!1;var kt=typeof it=="object"&&it&&it.Object===Object&&it,Ie=typeof self=="object"&&self&&self.Object===Object&&self,X=kt||Ie||Function("return this")(),Ht=m&&!m.nodeType&&m,tt=Ht&&!0&&o&&!o.nodeType&&o,Pt=tt&&tt.exports===Ht,Tt=Pt&&kt.process,Mt=function(){try{var t=tt&&tt.require&&tt.require("util").types;return t||Tt&&Tt.binding&&Tt.binding("util")}catch{}}(),Rt=Mt&&Mt.isTypedArray;function ze(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function De(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function ke(t){return function(e){return t(e)}}function He(t,e){return t==null?void 0:t[e]}function Pe(t,e){return function(n){return t(e(n))}}var Me=Array.prototype,Re=Function.prototype,dt=Object.prototype,St=X["__core-js_shared__"],ut=Re.toString,k=dt.hasOwnProperty,Ut=function(){var t=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Gt=dt.toString,Ue=ut.call(Object),Ge=RegExp("^"+ut.call(k).replace(Ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ft=Pt?X.Buffer:void 0,Wt=X.Symbol,Kt=X.Uint8Array,qt=ft?ft.allocUnsafe:void 0,Qt=Pe(Object.getPrototypeOf,Object),Zt=Object.create,We=dt.propertyIsEnumerable,Ke=Me.splice,q=Wt?Wt.toStringTag:void 0,pt=function(){try{var t=Ot(Object,"defineProperty");return t({},"",{}),t}catch{}}(),qe=ft?ft.isBuffer:void 0,Jt=Math.max,Qe=Date.now,Yt=Ot(X,"Map"),et=Ot(Object,"create"),Ze=function(){function t(){}return function(e){if(!Z(e))return{};if(Zt)return Zt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Q(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Je(){this.__data__=et?et(null):{},this.size=0}function Ye(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Xe(t){var e=this.__data__;if(et){var n=e[t];return n===v?void 0:n}return k.call(e,t)?e[t]:void 0}function tn(t){var e=this.__data__;return et?e[t]!==void 0:k.call(e,t)}function en(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=et&&e===void 0?v:e,this}Q.prototype.clear=Je,Q.prototype.delete=Ye,Q.prototype.get=Xe,Q.prototype.has=tn,Q.prototype.set=en;function H(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function nn(){this.__data__=[],this.size=0}function rn(t){var e=this.__data__,n=ht(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Ke.call(e,n,1),--this.size,!0}function on(t){var e=this.__data__,n=ht(e,t);return n<0?void 0:e[n][1]}function an(t){return ht(this.__data__,t)>-1}function sn(t,e){var n=this.__data__,i=ht(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}H.prototype.clear=nn,H.prototype.delete=rn,H.prototype.get=on,H.prototype.has=an,H.prototype.set=sn;function J(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function ln(){this.size=0,this.__data__={hash:new Q,map:new(Yt||H),string:new Q}}function cn(t){var e=bt(this,t).delete(t);return this.size-=e?1:0,e}function dn(t){return bt(this,t).get(t)}function un(t){return bt(this,t).has(t)}function fn(t,e){var n=bt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}J.prototype.clear=ln,J.prototype.delete=cn,J.prototype.get=dn,J.prototype.has=un,J.prototype.set=fn;function Y(t){var e=this.__data__=new H(t);this.size=e.size}function pn(){this.__data__=new H,this.size=0}function hn(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function gn(t){return this.__data__.get(t)}function bn(t){return this.__data__.has(t)}function mn(t,e){var n=this.__data__;if(n instanceof H){var i=n.__data__;if(!Yt||i.length<h-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new J(i)}return n.set(t,e),this.size=n.size,this}Y.prototype.clear=pn,Y.prototype.delete=hn,Y.prototype.get=gn,Y.prototype.has=bn,Y.prototype.set=mn;function vn(t,e){var n=Et(t),i=!n&&Ct(t),d=!n&&!i&&re(t),g=!n&&!i&&!d&&ie(t),_=n||i||d||g,l=_?De(t.length,String):[],y=l.length;for(var N in t)(e||k.call(t,N))&&!(_&&(N=="length"||d&&(N=="offset"||N=="parent")||g&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||ee(N,y)))&&l.push(N);return l}function wt(t,e,n){(n!==void 0&&!mt(t[e],n)||n===void 0&&!(e in t))&&xt(t,e,n)}function _n(t,e,n){var i=t[e];(!(k.call(t,e)&&mt(i,n))||n===void 0&&!(e in t))&&xt(t,e,n)}function ht(t,e){for(var n=t.length;n--;)if(mt(t[n][0],e))return n;return-1}function xt(t,e,n){e=="__proto__"&&pt?pt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var yn=Vn();function gt(t){return t==null?t===void 0?A:P:q&&q in Object(t)?Ln(t):Hn(t)}function Xt(t){return nt(t)&&gt(t)==C}function Tn(t){if(!Z(t)||Dn(t))return!1;var e=$t(t)?Ge:Le;return e.test(Un(t))}function Sn(t){return nt(t)&&oe(t.length)&&!!b[gt(t)]}function wn(t){if(!Z(t))return kn(t);var e=ne(t),n=[];for(var i in t)i=="constructor"&&(e||!k.call(t,i))||n.push(i);return n}function te(t,e,n,i,d){t!==e&&yn(e,function(g,_){if(d||(d=new Y),Z(g))xn(t,e,_,n,te,i,d);else{var l=i?i(Bt(t,_),g,_+"",t,e,d):void 0;l===void 0&&(l=g),wt(t,_,l)}},ae)}function xn(t,e,n,i,d,g,_){var l=Bt(t,n),y=Bt(e,n),N=_.get(y);if(N){wt(t,n,N);return}var $=g?g(l,y,n+"",t,e,_):void 0,rt=$===void 0;if(rt){var jt=Et(y),Nt=!jt&&re(y),le=!jt&&!Nt&&ie(y);$=y,jt||Nt||le?Et(l)?$=l:Gn(l)?$=$n(l):Nt?(rt=!1,$=Cn(y,!0)):le?(rt=!1,$=An(y,!0)):$=[]:Wn(y)||Ct(y)?($=l,Ct(l)?$=Kn(l):(!Z(l)||$t(l))&&($=Fn(y))):rt=!1}rt&&(_.set(y,$),d($,y,i,g,_),_.delete(y)),wt(t,n,$)}function On(t,e){return Mn(Pn(t,e,se),t+"")}var Bn=pt?function(t,e){return pt(t,"toString",{configurable:!0,enumerable:!1,value:Qn(e),writable:!0})}:se;function Cn(t,e){if(e)return t.slice();var n=t.length,i=qt?qt(n):new t.constructor(n);return t.copy(i),i}function En(t){var e=new t.constructor(t.byteLength);return new Kt(e).set(new Kt(t)),e}function An(t,e){var n=e?En(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function $n(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}function jn(t,e,n,i){var d=!n;n||(n={});for(var g=-1,_=e.length;++g<_;){var l=e[g],y=i?i(n[l],t[l],l,n,t):void 0;y===void 0&&(y=t[l]),d?xt(n,l,y):_n(n,l,y)}return n}function Nn(t){return On(function(e,n){var i=-1,d=n.length,g=d>1?n[d-1]:void 0,_=d>2?n[2]:void 0;for(g=t.length>3&&typeof g=="function"?(d--,g):void 0,_&&In(n[0],n[1],_)&&(g=d<3?void 0:g,d=1),e=Object(e);++i<d;){var l=n[i];l&&t(e,l,i,g)}return e})}function Vn(t){return function(e,n,i){for(var d=-1,g=Object(e),_=i(e),l=_.length;l--;){var y=_[t?l:++d];if(n(g[y],y,g)===!1)break}return e}}function bt(t,e){var n=t.__data__;return zn(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Ot(t,e){var n=He(t,e);return Tn(n)?n:void 0}function Ln(t){var e=k.call(t,q),n=t[q];try{t[q]=void 0;var i=!0}catch{}var d=Gt.call(t);return i&&(e?t[q]=n:delete t[q]),d}function Fn(t){return typeof t.constructor=="function"&&!ne(t)?Ze(Qt(t)):{}}function ee(t,e){var n=typeof t;return e=e==null?p:e,!!e&&(n=="number"||n!="symbol"&&Fe.test(t))&&t>-1&&t%1==0&&t<e}function In(t,e,n){if(!Z(n))return!1;var i=typeof e;return(i=="number"?At(n)&&ee(e,n.length):i=="string"&&e in n)?mt(n[e],t):!1}function zn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Dn(t){return!!Ut&&Ut in t}function ne(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||dt;return t===n}function kn(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function Hn(t){return Gt.call(t)}function Pn(t,e,n){return e=Jt(e===void 0?t.length-1:e,0),function(){for(var i=arguments,d=-1,g=Jt(i.length-e,0),_=Array(g);++d<g;)_[d]=i[e+d];d=-1;for(var l=Array(e+1);++d<e;)l[d]=i[d];return l[e]=n(_),ze(t,this,l)}}function Bt(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Mn=Rn(Bn);function Rn(t){var e=0,n=0;return function(){var i=Qe(),d=u-(i-n);if(n=i,d>0){if(++e>=f)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Un(t){if(t!=null){try{return ut.call(t)}catch{}try{return t+""}catch{}}return""}function mt(t,e){return t===e||t!==t&&e!==e}var Ct=Xt(function(){return arguments}())?Xt:function(t){return nt(t)&&k.call(t,"callee")&&!We.call(t,"callee")},Et=Array.isArray;function At(t){return t!=null&&oe(t.length)&&!$t(t)}function Gn(t){return nt(t)&&At(t)}var re=qe||Zn;function $t(t){if(!Z(t))return!1;var e=gt(t);return e==L||e==D||e==I||e==a}function oe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=p}function Z(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function nt(t){return t!=null&&typeof t=="object"}function Wn(t){if(!nt(t)||gt(t)!=c)return!1;var e=Qt(t);if(e===null)return!0;var n=k.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ut.call(n)==Ue}var ie=Rt?ke(Rt):Sn;function Kn(t){return jn(t,ae(t))}function ae(t){return At(t)?vn(t,!0):wn(t)}var qn=Nn(function(t,e,n){te(t,e,n)});function Qn(t){return function(){return t}}function se(t){return t}function Zn(){return!1}o.exports=qn})(_t,_t.exports);var It=_t.exports;function yt(o){return typeof o=="string"?document.querySelector(o):typeof o=="function"?o():null}const at={popper:{},overlay:{enabled:!0,padding:0,borderRadius:0},scrollToStep:{enabled:!0,options:{behavior:"smooth",block:"center",inline:"center"}},autoFinishByExit:!0,labels:{previousButton:"Previous",nextButton:"Next",finishButton:"Finish"},hideButtons:{previous:!1,next:!1,exit:!1}};function ue(){var p,C,F,I;const o=r.ref(""),m=r.ref(null),h=r.ref((C=(p=at.overlay)==null?void 0:p.padding)!=null?C:0),v=r.ref((I=(F=at.overlay)==null?void 0:F.borderRadius)!=null?I:0),f=()=>{u(m.value,{padding:h.value,borderRadius:v.value})},u=async(S,w=at.overlay)=>{var E,A,V,M,R,U,G,W,K,st,lt,ct;if(!S)return;const{innerWidth:z,innerHeight:L}=window,{left:D,top:j,width:T,height:P}=S.getBoundingClientRect(),c=typeof w.padding=="number"?{top:w.padding,right:w.padding,bottom:w.padding,left:w.padding}:w.padding,a=typeof w.borderRadius=="number"?{leftTop:w.borderRadius,rightTop:w.borderRadius,rightBottom:w.borderRadius,leftBottom:w.borderRadius}:w.borderRadius,s={top:j-((E=c==null?void 0:c.top)!=null?E:0),right:D+T+((A=c==null?void 0:c.right)!=null?A:0),bottom:j+P+((V=c==null?void 0:c.bottom)!=null?V:0),left:D-((M=c==null?void 0:c.left)!=null?M:0)},B={leftTop:`M${s.left+((R=a==null?void 0:a.leftTop)!=null?R:0)},${s.top} Q${s.left},${s.top} ${s.left},${s.top+((U=a==null?void 0:a.leftTop)!=null?U:0)}`,rightTop:`V${s.top+((G=a==null?void 0:a.rightTop)!=null?G:0)} Q${s.right},${s.top} ${s.right-((W=a==null?void 0:a.rightTop)!=null?W:0)},${s.top}`,rightBottom:`H${s.right-((K=a==null?void 0:a.rightBottom)!=null?K:0)} Q${s.right},${s.bottom} ${s.right},${s.bottom-((st=a==null?void 0:a.rightBottom)!=null?st:0)}`,leftBottom:`V${s.bottom-((lt=a==null?void 0:a.leftBottom)!=null?lt:0)} Q${s.left},${s.bottom} ${s.left+((ct=a==null?void 0:a.leftBottom)!=null?ct:0)},${s.bottom}`};o.value=`
M${z},${L}
(function(O,x){typeof exports=="object"&&typeof module!="undefined"?x(exports,require("@popperjs/core"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@popperjs/core","vue"],x):(O=typeof globalThis!="undefined"?globalThis:O||self,x(O["v-onboarding"]={},O.core,O.Vue))})(this,function(O,x,o){"use strict";var Xn=Object.defineProperty,tr=Object.defineProperties;var er=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var nr=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable;var ue=(O,x,o)=>x in O?Xn(O,x,{enumerable:!0,configurable:!0,writable:!0,value:o}):O[x]=o,It=(O,x)=>{for(var o in x||(x={}))nr.call(x,o)&&ue(O,o,x[o]);if(de)for(var o of de(x))rr.call(x,o)&&ue(O,o,x[o]);return O},Pt=(O,x)=>tr(O,er(x));const Lt=Symbol("onboardingState"),rt={IDLE:-1,FINISHED:-2},ct={BACKWARD:-1,FORWARD:1};var dt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},St={exports:{}};(function(r,v){var h=200,d="__lodash_hash_undefined__",_=800,p=16,m=9007199254740991,E="[object Arguments]",A="[object Array]",C="[object AsyncFunction]",g="[object Boolean]",S="[object Date]",B="[object Error]",$="[object Function]",D="[object GeneratorFunction]",H="[object Map]",Q="[object Number]",tt="[object Null]",s="[object Object]",a="[object Proxy]",l="[object RegExp]",N="[object Set]",j="[object String]",f="[object Undefined]",F="[object WeakMap]",k="[object ArrayBuffer]",z="[object DataView]",P="[object Float32Array]",V="[object Float64Array]",M="[object Int8Array]",R="[object Int16Array]",U="[object Int32Array]",Z="[object Uint8Array]",K="[object Uint8ClampedArray]",Ve="[object Uint16Array]",Ie="[object Uint32Array]",Pe=/[\\^$.*+?()[\]{}|]/g,Le=/^\[object .+?Constructor\]$/,De=/^(?:0|[1-9]\d*)$/,y={};y[P]=y[V]=y[M]=y[R]=y[U]=y[Z]=y[K]=y[Ve]=y[Ie]=!0,y[E]=y[A]=y[k]=y[g]=y[z]=y[S]=y[B]=y[$]=y[H]=y[Q]=y[s]=y[l]=y[N]=y[j]=y[F]=!1;var Ht=typeof dt=="object"&&dt&&dt.Object===Object&&dt,Fe=typeof self=="object"&&self&&self.Object===Object&&self,ot=Ht||Fe||Function("return this")(),zt=v&&!v.nodeType&&v,it=zt&&!0&&r&&!r.nodeType&&r,Mt=it&&it.exports===zt,Tt=Mt&&Ht.process,Rt=function(){try{var t=it&&it.require&&it.require("util").types;return t||Tt&&Tt.binding&&Tt.binding("util")}catch{}}(),Ut=Rt&&Rt.isTypedArray;function ke(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function He(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function ze(t){return function(e){return t(e)}}function Me(t,e){return t==null?void 0:t[e]}function Re(t,e){return function(n){return t(e(n))}}var Ue=Array.prototype,Ge=Function.prototype,pt=Object.prototype,wt=ot["__core-js_shared__"],ht=Ge.toString,G=pt.hasOwnProperty,Gt=function(){var t=/[^.]+$/.exec(wt&&wt.keys&&wt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Wt=pt.toString,We=ht.call(Object),Ke=RegExp("^"+ht.call(G).replace(Pe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gt=Mt?ot.Buffer:void 0,Kt=ot.Symbol,qt=ot.Uint8Array,Qt=gt?gt.allocUnsafe:void 0,Zt=Re(Object.getPrototypeOf,Object),Jt=Object.create,qe=pt.propertyIsEnumerable,Qe=Ue.splice,J=Kt?Kt.toStringTag:void 0,bt=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Ze=gt?gt.isBuffer:void 0,Yt=Math.max,Je=Date.now,Xt=xt(ot,"Map"),at=xt(Object,"create"),Ye=function(){function t(){}return function(e){if(!X(e))return{};if(Jt)return Jt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Y(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function Xe(){this.__data__=at?at(null):{},this.size=0}function tn(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function en(t){var e=this.__data__;if(at){var n=e[t];return n===d?void 0:n}return G.call(e,t)?e[t]:void 0}function nn(t){var e=this.__data__;return at?e[t]!==void 0:G.call(e,t)}function rn(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=at&&e===void 0?d:e,this}Y.prototype.clear=Xe,Y.prototype.delete=tn,Y.prototype.get=en,Y.prototype.has=nn,Y.prototype.set=rn;function W(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function on(){this.__data__=[],this.size=0}function an(t){var e=this.__data__,n=vt(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Qe.call(e,n,1),--this.size,!0}function sn(t){var e=this.__data__,n=vt(e,t);return n<0?void 0:e[n][1]}function ln(t){return vt(this.__data__,t)>-1}function cn(t,e){var n=this.__data__,i=vt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}W.prototype.clear=on,W.prototype.delete=an,W.prototype.get=sn,W.prototype.has=ln,W.prototype.set=cn;function et(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function dn(){this.size=0,this.__data__={hash:new Y,map:new(Xt||W),string:new Y}}function un(t){var e=yt(this,t).delete(t);return this.size-=e?1:0,e}function fn(t){return yt(this,t).get(t)}function pn(t){return yt(this,t).has(t)}function hn(t,e){var n=yt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}et.prototype.clear=dn,et.prototype.delete=un,et.prototype.get=fn,et.prototype.has=pn,et.prototype.set=hn;function nt(t){var e=this.__data__=new W(t);this.size=e.size}function gn(){this.__data__=new W,this.size=0}function bn(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function vn(t){return this.__data__.get(t)}function mn(t){return this.__data__.has(t)}function yn(t,e){var n=this.__data__;if(n instanceof W){var i=n.__data__;if(!Xt||i.length<h-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new et(i)}return n.set(t,e),this.size=n.size,this}nt.prototype.clear=gn,nt.prototype.delete=bn,nt.prototype.get=vn,nt.prototype.has=mn,nt.prototype.set=yn;function _n(t,e){var n=At(t),i=!n&&Ct(t),u=!n&&!i&&oe(t),b=!n&&!i&&!u&&ae(t),T=n||i||u||b,c=T?He(t.length,String):[],w=c.length;for(var L in t)(e||G.call(t,L))&&!(T&&(L=="length"||u&&(L=="offset"||L=="parent")||b&&(L=="buffer"||L=="byteLength"||L=="byteOffset")||ne(L,w)))&&c.push(L);return c}function Et(t,e,n){(n!==void 0&&!_t(t[e],n)||n===void 0&&!(e in t))&&Ot(t,e,n)}function Sn(t,e,n){var i=t[e];(!(G.call(t,e)&&_t(i,n))||n===void 0&&!(e in t))&&Ot(t,e,n)}function vt(t,e){for(var n=t.length;n--;)if(_t(t[n][0],e))return n;return-1}function Ot(t,e,n){e=="__proto__"&&bt?bt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Tn=Pn();function mt(t){return t==null?t===void 0?f:tt:J&&J in Object(t)?Ln(t):Mn(t)}function te(t){return st(t)&&mt(t)==E}function wn(t){if(!X(t)||Hn(t))return!1;var e=Nt(t)?Ke:Le;return e.test(Wn(t))}function En(t){return st(t)&&ie(t.length)&&!!y[mt(t)]}function On(t){if(!X(t))return zn(t);var e=re(t),n=[];for(var i in t)i=="constructor"&&(e||!G.call(t,i))||n.push(i);return n}function ee(t,e,n,i,u){t!==e&&Tn(e,function(b,T){if(u||(u=new nt),X(b))xn(t,e,T,n,ee,i,u);else{var c=i?i(Bt(t,T),b,T+"",t,e,u):void 0;c===void 0&&(c=b),Et(t,T,c)}},se)}function xn(t,e,n,i,u,b,T){var c=Bt(t,n),w=Bt(e,n),L=T.get(w);if(L){Et(t,n,L);return}var I=b?b(c,w,n+"",t,e,T):void 0,lt=I===void 0;if(lt){var jt=At(w),Vt=!jt&&oe(w),ce=!jt&&!Vt&&ae(w);I=w,jt||Vt||ce?At(c)?I=c:Kn(c)?I=jn(c):Vt?(lt=!1,I=An(w,!0)):ce?(lt=!1,I=Nn(w,!0)):I=[]:qn(w)||Ct(w)?(I=c,Ct(c)?I=Qn(c):(!X(c)||Nt(c))&&(I=Dn(w))):lt=!1}lt&&(T.set(w,I),u(I,w,i,b,T),T.delete(w)),Et(t,n,I)}function Bn(t,e){return Un(Rn(t,e,le),t+"")}var Cn=bt?function(t,e){return bt(t,"toString",{configurable:!0,enumerable:!1,value:Jn(e),writable:!0})}:le;function An(t,e){if(e)return t.slice();var n=t.length,i=Qt?Qt(n):new t.constructor(n);return t.copy(i),i}function $n(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e}function Nn(t,e){var n=e?$n(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function jn(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}function Vn(t,e,n,i){var u=!n;n||(n={});for(var b=-1,T=e.length;++b<T;){var c=e[b],w=i?i(n[c],t[c],c,n,t):void 0;w===void 0&&(w=t[c]),u?Ot(n,c,w):Sn(n,c,w)}return n}function In(t){return Bn(function(e,n){var i=-1,u=n.length,b=u>1?n[u-1]:void 0,T=u>2?n[2]:void 0;for(b=t.length>3&&typeof b=="function"?(u--,b):void 0,T&&Fn(n[0],n[1],T)&&(b=u<3?void 0:b,u=1),e=Object(e);++i<u;){var c=n[i];c&&t(e,c,i,b)}return e})}function Pn(t){return function(e,n,i){for(var u=-1,b=Object(e),T=i(e),c=T.length;c--;){var w=T[t?c:++u];if(n(b[w],w,b)===!1)break}return e}}function yt(t,e){var n=t.__data__;return kn(e)?n[typeof e=="string"?"string":"hash"]:n.map}function xt(t,e){var n=Me(t,e);return wn(n)?n:void 0}function Ln(t){var e=G.call(t,J),n=t[J];try{t[J]=void 0;var i=!0}catch{}var u=Wt.call(t);return i&&(e?t[J]=n:delete t[J]),u}function Dn(t){return typeof t.constructor=="function"&&!re(t)?Ye(Zt(t)):{}}function ne(t,e){var n=typeof t;return e=e==null?m:e,!!e&&(n=="number"||n!="symbol"&&De.test(t))&&t>-1&&t%1==0&&t<e}function Fn(t,e,n){if(!X(n))return!1;var i=typeof e;return(i=="number"?$t(n)&&ne(e,n.length):i=="string"&&e in n)?_t(n[e],t):!1}function kn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Hn(t){return!!Gt&&Gt in t}function re(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||pt;return t===n}function zn(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function Mn(t){return Wt.call(t)}function Rn(t,e,n){return e=Yt(e===void 0?t.length-1:e,0),function(){for(var i=arguments,u=-1,b=Yt(i.length-e,0),T=Array(b);++u<b;)T[u]=i[e+u];u=-1;for(var c=Array(e+1);++u<e;)c[u]=i[u];return c[e]=n(T),ke(t,this,c)}}function Bt(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Un=Gn(Cn);function Gn(t){var e=0,n=0;return function(){var i=Je(),u=p-(i-n);if(n=i,u>0){if(++e>=_)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Wn(t){if(t!=null){try{return ht.call(t)}catch{}try{return t+""}catch{}}return""}function _t(t,e){return t===e||t!==t&&e!==e}var Ct=te(function(){return arguments}())?te:function(t){return st(t)&&G.call(t,"callee")&&!qe.call(t,"callee")},At=Array.isArray;function $t(t){return t!=null&&ie(t.length)&&!Nt(t)}function Kn(t){return st(t)&&$t(t)}var oe=Ze||Yn;function Nt(t){if(!X(t))return!1;var e=mt(t);return e==$||e==D||e==C||e==a}function ie(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=m}function X(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function st(t){return t!=null&&typeof t=="object"}function qn(t){if(!st(t)||mt(t)!=s)return!1;var e=Zt(t);if(e===null)return!0;var n=G.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ht.call(n)==We}var ae=Ut?ze(Ut):En;function Qn(t){return Vn(t,se(t))}function se(t){return $t(t)?_n(t,!0):On(t)}var Zn=In(function(t,e,n){ee(t,e,n)});function Jn(t){return function(){return t}}function le(t){return t}function Yn(){return!1}r.exports=Zn})(St,St.exports);var ut=St.exports;function q(r){return typeof r=="string"?document.querySelector(r):typeof r=="function"?r():null}const ft={popper:{},overlay:{enabled:!0,padding:0,borderRadius:0,preventOverlayInteraction:!0},scrollToStep:{enabled:!0,options:{behavior:"smooth",block:"center",inline:"center"}},autoFinishByExit:!0,labels:{previousButton:"Previous",nextButton:"Next",finishButton:"Finish"},hideButtons:{previous:!1,next:!1,exit:!1},hideNextStepDuringHook:!1};function fe(){var m,E,A,C;const r=o.ref(""),v=o.ref(null),h=o.ref((E=(m=ft.overlay)==null?void 0:m.padding)!=null?E:0),d=o.ref((C=(A=ft.overlay)==null?void 0:A.borderRadius)!=null?C:0),_=()=>{p(v.value,{padding:h.value,borderRadius:d.value})},p=async(g,S=ft.overlay)=>{var j,f,F,k,z,P,V,M,R,U,Z,K;if(!g)return;const{innerWidth:B,innerHeight:$}=window,{left:D,top:H,width:Q,height:tt}=g.getBoundingClientRect(),s=typeof S.padding=="number"?{top:S.padding,right:S.padding,bottom:S.padding,left:S.padding}:S.padding,a=typeof S.borderRadius=="number"?{leftTop:S.borderRadius,rightTop:S.borderRadius,rightBottom:S.borderRadius,leftBottom:S.borderRadius}:S.borderRadius,l={top:H-((j=s==null?void 0:s.top)!=null?j:0),right:D+Q+((f=s==null?void 0:s.right)!=null?f:0),bottom:H+tt+((F=s==null?void 0:s.bottom)!=null?F:0),left:D-((k=s==null?void 0:s.left)!=null?k:0)},N={leftTop:`M${l.left+((z=a==null?void 0:a.leftTop)!=null?z:0)},${l.top} Q${l.left},${l.top} ${l.left},${l.top+((P=a==null?void 0:a.leftTop)!=null?P:0)}`,rightTop:`V${l.top+((V=a==null?void 0:a.rightTop)!=null?V:0)} Q${l.right},${l.top} ${l.right-((M=a==null?void 0:a.rightTop)!=null?M:0)},${l.top}`,rightBottom:`H${l.right-((R=a==null?void 0:a.rightBottom)!=null?R:0)} Q${l.right},${l.bottom} ${l.right},${l.bottom-((U=a==null?void 0:a.rightBottom)!=null?U:0)}`,leftBottom:`V${l.bottom-((Z=a==null?void 0:a.leftBottom)!=null?Z:0)} Q${l.left},${l.bottom} ${l.left+((K=a==null?void 0:a.leftBottom)!=null?K:0)},${l.bottom}`};r.value=`
M${B},${$}
H0V0
H${z}V${L}
H${B}V${$}
Z
${B.leftTop}
${B.leftBottom}
${B.rightBottom}
${B.rightTop}
${N.leftTop}
${N.leftBottom}
${N.rightBottom}
${N.rightTop}
Z
`,m.value=S,h.value=c,v.value=a};return r.onMounted(()=>{window.addEventListener("scroll",f),window.addEventListener("resize",f)}),r.onUnmounted(()=>{window.removeEventListener("scroll",f),window.removeEventListener("resize",f)}),{path:o,updatePath:u}}var zt=(o,m)=>{const h=o.__vccOpts||o;for(const[v,f]of m)h[v]=f;return h};const fe=r.defineComponent({name:"VOnboardingStep",setup(){const o=r.ref(!1),m=r.inject(Ft,{}),{step:h,isFirstStep:v,isLastStep:f,options:u,next:p,previous:C,exit:F,finish:I}=m.value,S=r.computed(()=>It({},u==null?void 0:u.value,h.value.options)),w=r.computed(()=>{var c,a,s;return{previous:!((c=S.value.hideButtons)!=null&&c.previous),next:!((a=S.value.hideButtons)!=null&&a.next),exit:!((s=S.value.hideButtons)!=null&&s.exit)}}),z=r.computed(()=>{var c,a,s,B,E,A;return{previous:(a=(c=S.value)==null?void 0:c.labels)==null?void 0:a.previousButton,next:(B=(s=S.value)==null?void 0:s.labels)==null?void 0:B.nextButton,finish:(A=(E=S.value)==null?void 0:E.labels)==null?void 0:A.finishButton}}),{updatePath:L,path:D}=ue(),j=r.ref(),T=async()=>{var a,s,B,E,A,V,M,R,U,G,W,K;await r.nextTick();const c=yt((s=(a=h==null?void 0:h.value)==null?void 0:a.attachTo)==null?void 0:s.element);c&&j.value&&(o.value=!0,(E=(B=S.value)==null?void 0:B.scrollToStep)!=null&&E.enabled&&c.scrollIntoView((V=(A=S.value)==null?void 0:A.scrollToStep)==null?void 0:V.options),O.createPopper(c,j.value,S.value.popper),(R=(M=S.value)==null?void 0:M.overlay)!=null&&R.enabled&&L(c,{padding:(G=(U=S.value)==null?void 0:U.overlay)==null?void 0:G.padding,borderRadius:(K=(W=S.value)==null?void 0:W.overlay)==null?void 0:K.borderRadius}))};return r.watch(h,T,{immediate:!0}),{stepElement:j,next:p,previous:C,path:D,show:o,step:h,isFirstStep:v,isLastStep:f,exit:()=>{var c;F(),(c=S.value)!=null&&c.autoFinishByExit&&I()},finish:I,isButtonVisible:w,buttonLabels:z}}}),pe={style:{width:"100%",height:"100%",position:"fixed",top:"0",left:"0",fill:"var(--v-onboarding-overlay-fill, black)",opacity:"var(--v-onboarding-overlay-opacity, 0.5)","z-index":"var(--v-onboarding-overlay-z, 10)","pointer-events":"none"}},he=["d"],ge={ref:"stepElement",style:{position:"relative","z-index":"var(--v-onboarding-step-z, 20)"}},be={class:"v-onboarding-item"},me={class:"v-onboarding-item__header"},ve={key:0,class:"v-onboarding-item__header-title"},_e=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[r.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)],ye={key:0,class:"v-onboarding-item__description"},Te={class:"v-onboarding-item__actions"},Se=r.createElementVNode("div",{"data-popper-arrow":""},null,-1);function we(o,m,h,v,f,u){return r.withDirectives((r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createElementBlock("svg",pe,[r.createElementVNode("path",{d:o.path},null,8,he)])),r.createElementVNode("div",ge,[o.step?r.renderSlot(o.$slots,"default",{key:0},()=>[r.createElementVNode("div",be,[r.createElementVNode("div",me,[o.step.content.title?(r.openBlock(),r.createElementBlock("span",ve,r.toDisplayString(o.step.content.title),1)):r.createCommentVNode("",!0),o.isButtonVisible.exit?(r.openBlock(),r.createElementBlock("button",{key:1,onClick:m[0]||(m[0]=(...p)=>o.exit&&o.exit(...p)),class:"v-onboarding-item__header-close"},_e)):r.createCommentVNode("",!0)]),o.step.content.description?(r.openBlock(),r.createElementBlock("p",ye,r.toDisplayString(o.step.content.description),1)):r.createCommentVNode("",!0),r.createElementVNode("div",Te,[!o.isFirstStep&&o.isButtonVisible.previous?(r.openBlock(),r.createElementBlock("button",{key:0,type:"button",onClick:m[1]||(m[1]=(...p)=>o.previous&&o.previous(...p)),class:"v-onboarding-btn-secondary"},r.toDisplayString(o.buttonLabels.previous),1)):r.createCommentVNode("",!0),o.isButtonVisible.next?(r.openBlock(),r.createElementBlock("button",{key:1,onClick:m[2]||(m[2]=()=>o.isLastStep?o.finish():o.next()),type:"button",class:"v-onboarding-btn-primary"},r.toDisplayString(o.isLastStep?o.buttonLabels.finish:o.buttonLabels.next),1)):r.createCommentVNode("",!0)])])]):r.createCommentVNode("",!0),Se],512)],512)),[[r.vShow,o.show]])}var Dt=zt(fe,[["render",we]]);const xe=r.defineComponent({name:"VOnboardingWrapper",components:{VOnboardingStep:Dt},props:{steps:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},emits:["finish","exit"],setup(o,{expose:m,emit:h}){const v=r.ref(vt.IDLE),f=r.ref(v.value),u=T=>{typeof T=="function"?v.value=T(v.value):v.value=T},{beforeHook:p,afterHook:C}=Be(),F=r.computed(()=>{var T;return(T=o.steps)==null?void 0:T[f.value]});r.watch(v,async(T,P)=>{var E,A;const c=T<P?ot.BACKWARD:ot.FORWARD,a={direction:c,isForward:c===ot.FORWARD,isBackward:c===ot.BACKWARD},s=(E=o.steps)==null?void 0:E[P];if(s){const V=Lt(Vt({},a),{index:P,step:s});await C(s,V)}const B=(A=o.steps)==null?void 0:A[T];if(B){const V=Lt(Vt({},a),{index:T,step:B});await p(B,V)}f.value=T});const I=r.computed(()=>f.value===vt.FINISHED),S=()=>u(0),w=()=>{u(vt.FINISHED),h("finish")},z=()=>h("exit");m({start:S,finish:w,goToStep:u});const L=()=>{u(T=>T-1)},D=()=>{const T=f.value+1;if(T===o.steps.length){w();return}u(T)},j=r.computed(()=>({step:F,options:r.computed(()=>It({},at,o.options)),next:D,previous:L,finish:w,exit:z,isFirstStep:r.computed(()=>f.value===0),isLastStep:r.computed(()=>f.value===o.steps.length-1)}));return r.provide(Ft,j),{index:v,activeStep:F,next:D,previous:L,isFinished:I,setIndex:u,isFirstStep:j.value.isFirstStep,isLastStep:j.value.isLastStep,finish:w,exit:z}}});function Oe(){return{setClassName:({element:h,classList:v=[]})=>{!h||h.classList.add(...v)},unsetClassName:({element:h,classList:v=[]})=>{!h||h.classList.remove(...v)}}}function Be(){const{setClassName:o,unsetClassName:m}=Oe();return{beforeHook:(f,u)=>{var p,C;return o({element:yt(f.attachTo.element),classList:f.attachTo.classList}),(C=(p=f.on)==null?void 0:p.beforeStep)==null?void 0:C.call(p,u)},afterHook:(f,u)=>{var p,C;return m({element:yt(f.attachTo.element),classList:f.attachTo.classList}),(C=(p=f.on)==null?void 0:p.afterStep)==null?void 0:C.call(p,u)}}}const Ce={key:0,"data-v-onboarding-wrapper":""};function Ee(o,m,h,v,f,u){const p=r.resolveComponent("VOnboardingStep");return o.isFinished?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Ce,[r.renderSlot(o.$slots,"default",{key:o.index,step:o.activeStep,next:o.next,previous:o.previous,exit:o.exit,isFirst:o.isFirstStep,isLast:o.isLastStep,index:o.index},()=>[(r.openBlock(),r.createBlock(p,{key:o.index}))])]))}var Ae=zt(xe,[["render",Ee]]);function $e(o){return{start:()=>{var u;return(u=o==null?void 0:o.value)==null?void 0:u.start()},finish:()=>{var u;return(u=o==null?void 0:o.value)==null?void 0:u.finish()},exit:()=>{var u;return(u=o==null?void 0:o.value)==null?void 0:u.exit()},goToStep:u=>{var p;return(p=o==null?void 0:o.value)==null?void 0:p.goToStep(u)}}}var rr=(()=>`.v-onboarding-item{width:20rem;padding:1rem;background-color:#fff;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border-radius:.375rem}.v-onboarding-item__header{display:flex;justify-content:space-between}.v-onboarding-item__header-title{font-size:1.25rem;font-weight:500;line-height:1.5}.v-onboarding-item__header-close{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;flex-shrink:0;border-radius:50%}.v-onboarding-item__header-close:hover{background:rgba(0,0,0,.1)}.v-onboarding-item__description{font-size:.875rem;color:#71717a;margin-top:.5rem}.v-onboarding-item__actions{display:flex;margin-top:1rem}.v-onboarding-item__actions>:not([hidden])~:not([hidden]){margin-left:.5rem}.v-onboarding-item__actions button{display:inline-flex;flex:1;align-items:center;justify-content:center;padding:.5rem 1.25rem;border-width:1px;border-style:solid;font-size:1rem;font-weight:500;box-shadow:0 1px 2px #0000000d;border-radius:9999px;background-color:transparent;background-image:none;cursor:pointer}.v-onboarding-item__actions button.v-onboarding-btn-primary{border-color:transparent;color:#fff;background-color:#4f46e5}.v-onboarding-item__actions button.v-onboarding-btn-primary:hover{background-color:#4338ca}.v-onboarding-item__actions button.v-onboarding-btn-secondary{border-color:#d4d4d8;color:#3f3f46}.v-onboarding-item__actions button.v-onboarding-btn-secondary:hover{background-color:#fafafa}[data-v-onboarding-wrapper] [data-popper-arrow]:before{content:"";background:var(--v-onboarding-step-arrow-background, white);top:0;left:0;transition:transform .2s ease-out,visibility .2s ease-out;visibility:visible;transform:translate(0) rotate(45deg);transform-origin:center;width:var(--v-onboarding-step-arrow-size, 10px);height:var(--v-onboarding-step-arrow-size, 10px);position:absolute;z-index:-1}[data-v-onboarding-wrapper] [data-popper-placement^=top]>[data-popper-arrow]{bottom:5px}[data-v-onboarding-wrapper] [data-popper-placement^=right]>[data-popper-arrow]{left:-4px}[data-v-onboarding-wrapper] [data-popper-placement^=bottom]>[data-popper-arrow]{top:-4px}[data-v-onboarding-wrapper] [data-popper-placement^=left]>[data-popper-arrow]{right:-4px}
`)();x.VOnboardingStep=Dt,x.VOnboardingWrapper=Ae,x.useVOnboarding=$e,Object.defineProperties(x,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
`,v.value=g,h.value=s,d.value=a};return o.onMounted(()=>{window.addEventListener("scroll",_),window.addEventListener("resize",_)}),o.onUnmounted(()=>{window.removeEventListener("scroll",_),window.removeEventListener("resize",_)}),{path:r,updatePath:p}}var Dt=(r,v)=>{const h=r.__vccOpts||r;for(const[d,_]of v)h[d]=_;return h};const pe=o.defineComponent({name:"VOnboardingStep",setup(){const r=o.ref(!1),v=o.inject(Lt,{}),{step:h,isFirstStep:d,isLastStep:_,options:p,next:m,previous:E,exit:A,finish:C}=v.value,g=o.computed(()=>ut({},p==null?void 0:p.value,h.value.options)),S=o.computed(()=>{var s,a,l;return{previous:!((s=g.value.hideButtons)!=null&&s.previous),next:!((a=g.value.hideButtons)!=null&&a.next),exit:!((l=g.value.hideButtons)!=null&&l.exit)}}),B=o.computed(()=>{var s,a,l,N,j,f;return{previous:(a=(s=g.value)==null?void 0:s.labels)==null?void 0:a.previousButton,next:(N=(l=g.value)==null?void 0:l.labels)==null?void 0:N.nextButton,finish:(f=(j=g.value)==null?void 0:j.labels)==null?void 0:f.finishButton}}),{updatePath:$,path:D}=fe(),H=o.ref(),Q=async()=>{var a,l,N,j,f,F,k,z,P,V,M,R,U;await o.nextTick();const s=q((l=(a=h==null?void 0:h.value)==null?void 0:a.attachTo)==null?void 0:l.element);s&&H.value&&(r.value=!0,(j=(N=g.value)==null?void 0:N.scrollToStep)!=null&&j.enabled&&((k=s.scrollIntoView)==null||k.call(s,(F=(f=g.value)==null?void 0:f.scrollToStep)==null?void 0:F.options)),x.createPopper(s,H.value,g.value.popper),(P=(z=g.value)==null?void 0:z.overlay)!=null&&P.enabled&&$(s,{padding:(M=(V=g.value)==null?void 0:V.overlay)==null?void 0:M.padding,borderRadius:(U=(R=g.value)==null?void 0:R.overlay)==null?void 0:U.borderRadius}))};return o.watch(h,Q,{immediate:!0}),{stepElement:H,next:m,previous:E,path:D,show:r,step:h,isFirstStep:d,isLastStep:_,exit:()=>{var s;A(),(s=g.value)!=null&&s.autoFinishByExit&&C()},finish:C,isButtonVisible:S,buttonLabels:B}}}),he={style:{width:"100%",height:"100%",position:"fixed",top:"0",left:"0",fill:"var(--v-onboarding-overlay-fill, black)",opacity:"var(--v-onboarding-overlay-opacity, 0.5)","z-index":"var(--v-onboarding-overlay-z, 10)","pointer-events":"none"}},ge=["d"],be={ref:"stepElement",style:{position:"relative","z-index":"var(--v-onboarding-step-z, 20)"}},ve={class:"v-onboarding-item"},me={class:"v-onboarding-item__header"},ye={key:0,class:"v-onboarding-item__header-title"},_e=[o.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[o.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)],Se=["innerHTML"],Te={key:1,class:"v-onboarding-item__description"},we={class:"v-onboarding-item__actions"},Ee=o.createElementVNode("div",{"data-popper-arrow":""},null,-1);function Oe(r,v,h,d,_,p){return o.withDirectives((o.openBlock(),o.createElementBlock("div",null,[(o.openBlock(),o.createElementBlock("svg",he,[o.createElementVNode("path",{d:r.path},null,8,ge)])),o.createElementVNode("div",be,[r.step?o.renderSlot(r.$slots,"default",{key:0},()=>[o.createElementVNode("div",ve,[o.createElementVNode("div",me,[r.step.content.title?(o.openBlock(),o.createElementBlock("span",ye,o.toDisplayString(r.step.content.title),1)):o.createCommentVNode("",!0),r.isButtonVisible.exit?(o.openBlock(),o.createElementBlock("button",{key:1,onClick:v[0]||(v[0]=(...m)=>r.exit&&r.exit(...m)),"aria-label":"Close",class:"v-onboarding-item__header-close"},_e)):o.createCommentVNode("",!0)]),r.step.content.description&&r.step.content.html?(o.openBlock(),o.createElementBlock("p",{key:0,class:"v-onboarding-item__description",innerHTML:r.step.content.description},null,8,Se)):r.step.content.description?(o.openBlock(),o.createElementBlock("p",Te,o.toDisplayString(r.step.content.description),1)):o.createCommentVNode("",!0),o.createElementVNode("div",we,[!r.isFirstStep&&r.isButtonVisible.previous?(o.openBlock(),o.createElementBlock("button",{key:0,type:"button",onClick:v[1]||(v[1]=(...m)=>r.previous&&r.previous(...m)),class:"v-onboarding-btn-secondary"},o.toDisplayString(r.buttonLabels.previous),1)):o.createCommentVNode("",!0),r.isButtonVisible.next?(o.openBlock(),o.createElementBlock("button",{key:1,onClick:v[2]||(v[2]=()=>r.isLastStep?r.finish():r.next()),type:"button",class:"v-onboarding-btn-primary"},o.toDisplayString(r.isLastStep?r.buttonLabels.finish:r.buttonLabels.next),1)):o.createCommentVNode("",!0)])])]):o.createCommentVNode("",!0),Ee],512)],512)),[[o.vShow,r.show]])}var Ft=Dt(pe,[["render",Oe]]);const xe=o.defineComponent({name:"VOnboardingWrapper",components:{VOnboardingStep:Ft},props:{steps:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},emits:["finish","exit"],setup(r,{expose:v,emit:h}){const d=o.computed(()=>ut({},ft,r.options)),_=o.ref(!0),p=o.ref(rt.IDLE),m=o.ref(p.value),E=f=>{typeof f=="function"?p.value=f(p.value):p.value=f},A=o.computed(()=>{var f;return(f=r.steps)==null?void 0:f[m.value]}),C=o.computed(()=>A.value?ut({},d.value,A.value.options):d.value),g=f=>ut({},d.value,f.options),{beforeHook:S,afterHook:B}=Ce(C);o.watch(p,async(f,F)=>{var M,R,U,Z;const k=f<F?ct.BACKWARD:ct.FORWARD,z={direction:k,isForward:k===ct.FORWARD,isBackward:k===ct.BACKWARD},P=(M=r.steps)==null?void 0:M[F];if(P){const K=Pt(It({},z),{index:F,step:P});D(q(P.attachTo.element)),await B(P,K)}const V=(R=r.steps)==null?void 0:R[f];if(V){const K=Pt(It({},z),{index:f,step:V});D(q(V.attachTo.element)),(U=g(V))!=null&&U.hideNextStepDuringHook&&(_.value=!1),await S(V,K)}m.value=f,_.value=!0,D(q("body")),(Z=C.value.overlay)!=null&&Z.preventOverlayInteraction&&H()});const{addPointerEvents:$,removePointerEvents:D}=kt(),H=()=>{const f=q("body");!f||([rt.IDLE,rt.FINISHED].includes(m.value)?D(f):$(f,"none"))},Q=o.computed(()=>m.value===rt.FINISHED),tt=()=>E(0),s=()=>{E(rt.FINISHED),h("finish")},a=()=>h("exit");v({start:tt,finish:s,goToStep:E});const l=()=>{E(f=>f-1)},N=()=>{const f=m.value+1;if(f===r.steps.length){s();return}E(f)},j=o.computed(()=>({step:A,options:d,next:N,previous:l,finish:s,exit:a,isFirstStep:o.computed(()=>m.value===0),isLastStep:o.computed(()=>m.value===r.steps.length-1)}));return o.provide(Lt,j),{index:p,activeStep:A,next:N,previous:l,isFinished:Q,setIndex:E,isFirstStep:j.value.isFirstStep,isLastStep:j.value.isLastStep,finish:s,exit:a,showStep:_}}});function Be(){return{setClassName:({element:h,classList:d=[]})=>{!h||h.classList.add(...d)},unsetClassName:({element:h,classList:d=[]})=>{!h||h.classList.remove(...d)}}}function kt(){const r="data-v-onboarding-pointer-events";return{addPointerEvents:(d,_="auto")=>{if(!d)return;const p=d.style.pointerEvents;p&&d.setAttribute(r,p),d.style.setProperty("pointer-events",_)},removePointerEvents:d=>{if(!d)return;const _=d.getAttribute(r);_?(d.style.setProperty("pointer-events",_),d.removeAttribute(r)):d.style.removeProperty("pointer-events")}}}function Ce(r){const{setClassName:v,unsetClassName:h}=Be(),{addPointerEvents:d,removePointerEvents:_}=kt();return{beforeHook:(E,A)=>{var g,S,B,$;const C=q(E.attachTo.element);return(S=(g=r.value)==null?void 0:g.overlay)!=null&&S.preventOverlayInteraction&&d(C),v({element:C,classList:E.attachTo.classList}),($=(B=E.on)==null?void 0:B.beforeStep)==null?void 0:$.call(B,A)},afterHook:(E,A)=>{var g,S,B,$;const C=q(E.attachTo.element);return(S=(g=r.value)==null?void 0:g.overlay)!=null&&S.preventOverlayInteraction&&_(C),h({element:C,classList:E.attachTo.classList}),($=(B=E.on)==null?void 0:B.afterStep)==null?void 0:$.call(B,A)}}}const Ae={key:0,"data-v-onboarding-wrapper":"",style:{"pointer-events":"auto"}};function $e(r,v,h,d,_,p){const m=o.resolveComponent("VOnboardingStep");return r.isFinished?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Ae,[r.showStep?o.renderSlot(r.$slots,"default",{key:r.index,step:r.activeStep,next:r.next,previous:r.previous,exit:r.exit,isFirst:r.isFirstStep,isLast:r.isLastStep,index:r.index},()=>[(o.openBlock(),o.createBlock(m,{key:r.index}))]):o.createCommentVNode("",!0)]))}var Ne=Dt(xe,[["render",$e]]);function je(r){return{start:()=>{var p;return(p=r==null?void 0:r.value)==null?void 0:p.start()},finish:()=>{var p;return(p=r==null?void 0:r.value)==null?void 0:p.finish()},exit:()=>{var p;return(p=r==null?void 0:r.value)==null?void 0:p.exit()},goToStep:p=>{var m;return(m=r==null?void 0:r.value)==null?void 0:m.goToStep(p)}}}var ir=(()=>`.v-onboarding-item{width:20rem;padding:1rem;background-color:#fff;box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;border-radius:.375rem}.v-onboarding-item__header{display:flex;justify-content:space-between}.v-onboarding-item__header-title{font-size:1.25rem;font-weight:500;line-height:1.5}.v-onboarding-item__header-close{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;flex-shrink:0;border-radius:50%}.v-onboarding-item__header-close:hover{background:rgba(0,0,0,.1)}.v-onboarding-item__description{font-size:.875rem;color:#71717a;margin-top:.5rem}.v-onboarding-item__actions{display:flex;margin-top:1rem}.v-onboarding-item__actions>:not([hidden])~:not([hidden]){margin-left:.5rem}.v-onboarding-item__actions button{display:inline-flex;flex:1;align-items:center;justify-content:center;padding:.5rem 1.25rem;border-width:1px;border-style:solid;font-size:1rem;font-weight:500;box-shadow:0 1px 2px #0000000d;border-radius:9999px;background-color:transparent;background-image:none;cursor:pointer}.v-onboarding-item__actions button.v-onboarding-btn-primary{border-color:transparent;color:#fff;background-color:#4f46e5}.v-onboarding-item__actions button.v-onboarding-btn-primary:hover{background-color:#4338ca}.v-onboarding-item__actions button.v-onboarding-btn-secondary{border-color:#d4d4d8;color:#3f3f46}.v-onboarding-item__actions button.v-onboarding-btn-secondary:hover{background-color:#fafafa}[data-v-onboarding-wrapper] [data-popper-arrow]:before{content:"";background:var(--v-onboarding-step-arrow-background, white);top:0;left:0;transition:transform .2s ease-out,visibility .2s ease-out;visibility:visible;transform:translate(0) rotate(45deg);transform-origin:center;width:var(--v-onboarding-step-arrow-size, 10px);height:var(--v-onboarding-step-arrow-size, 10px);position:absolute;z-index:-1}[data-v-onboarding-wrapper] [data-popper-placement^=top]>[data-popper-arrow]{bottom:5px}[data-v-onboarding-wrapper] [data-popper-placement^=right]>[data-popper-arrow]{left:-4px}[data-v-onboarding-wrapper] [data-popper-placement^=bottom]>[data-popper-arrow]{top:-4px}[data-v-onboarding-wrapper] [data-popper-placement^=left]>[data-popper-arrow]{right:-4px}
`)();O.VOnboardingStep=Ft,O.VOnboardingWrapper=Ne,O.useVOnboarding=je,Object.defineProperties(O,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
{
"name": "v-onboarding",
"version": "2.6.0",
"version": "2.7.0",
"description": "v-onboarding is a super-slim, fully-typed onboarding component for Vue 3",

@@ -5,0 +5,0 @@ "repository": {

@@ -23,2 +23,3 @@ import { VOnboardingWrapperOptions } from "@/types/VOnboardingWrapper";

description?: string;
html?: boolean
}

@@ -25,0 +26,0 @@ on?: {

@@ -17,2 +17,3 @@ import type { createPopper } from "@popperjs/core/lib/createPopper";

}
preventOverlayInteraction?: boolean
}

@@ -38,2 +39,3 @@

}
hideNextStepDuringHook?: boolean
}

@@ -47,2 +49,3 @@

borderRadius: 0,
preventOverlayInteraction: true
},

@@ -67,3 +70,4 @@ scrollToStep: {

exit: false
}
},
hideNextStepDuringHook: false
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc