v-onboarding 2.3.0 → 2.3.2

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.
@@ -1,5 +1,5 @@
1
1
  import { createPopper } from "@popperjs/core";
2
- import { ref, onMounted, onUnmounted, defineComponent, inject, toRefs, computed, withDirectives, openBlock, createElementBlock, createElementVNode, renderSlot, toDisplayString, createCommentVNode, vShow, watch, provide, resolveComponent, createBlock } from "vue";
2
+ import { ref, onMounted, onUnmounted, defineComponent, inject, toRefs, computed, watch, withDirectives, openBlock, createElementBlock, createElementVNode, renderSlot, toDisplayString, createCommentVNode, vShow, provide, resolveComponent, createBlock } from "vue";
3
3
  const STATE_INJECT_KEY = Symbol("onboardingState");
4
4
  const OnboardingState = {
5
5
  IDLE: -1,
@@ -830,7 +830,7 @@ const _sfc_main$1 = defineComponent({
830
830
  }
831
831
  }
832
832
  };
833
- onMounted(attachElement);
833
+ watch(step, attachElement, { immediate: true });
834
834
  return {
835
835
  stepElement,
836
836
  next,
@@ -894,7 +894,6 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
894
894
  _ctx.step.content.title ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(_ctx.step.content.title), 1)) : createCommentVNode("", true),
895
895
  createElementVNode("button", {
896
896
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.exit && _ctx.exit(...args)),
897
- "finish,": "",
898
897
  class: "v-onboarding-item__header-close"
899
898
  }, _hoisted_8)
900
899
  ]),
@@ -990,7 +989,7 @@ const _sfc_main = defineComponent({
990
989
  }
991
990
  setIndex(next2);
992
991
  };
993
- const state = ref({
992
+ const state = computed(() => ({
994
993
  step: activeStep,
995
994
  options: computed(() => merge({}, defaultVOnboardingWrapperOptions, props.options)),
996
995
  next,
@@ -999,10 +998,8 @@ const _sfc_main = defineComponent({
999
998
  exit,
1000
999
  isFirstStep: computed(() => privateIndex.value === 0),
1001
1000
  isLastStep: computed(() => privateIndex.value === props.steps.length - 1)
1002
- });
1001
+ }));
1003
1002
  provide(STATE_INJECT_KEY, state);
1004
- const isFirstStep = computed(() => privateIndex.value === 0);
1005
- const isLastStep = computed(() => privateIndex.value === props.steps.length - 1);
1006
1003
  return {
1007
1004
  index,
1008
1005
  activeStep,
@@ -1010,8 +1007,8 @@ const _sfc_main = defineComponent({
1010
1007
  previous,
1011
1008
  isFinished,
1012
1009
  setIndex,
1013
- isFirstStep,
1014
- isLastStep,
1010
+ isFirstStep: state.value.isFirstStep,
1011
+ isLastStep: state.value.isLastStep,
1015
1012
  finish,
1016
1013
  exit
1017
1014
  };
@@ -1034,12 +1031,12 @@ function useStepHooks() {
1034
1031
  const { setClassName, unsetClassName } = useSetElementClassName();
1035
1032
  const beforeHook = (step) => {
1036
1033
  var _a, _b;
1037
- unsetClassName({ element: useGetElement(step.attachTo.element), classList: step.attachTo.classList });
1034
+ setClassName({ element: useGetElement(step.attachTo.element), classList: step.attachTo.classList });
1038
1035
  return (_b = (_a = step.on) == null ? void 0 : _a.beforeStep) == null ? void 0 : _b.call(_a);
1039
1036
  };
1040
1037
  const afterHook = (step) => {
1041
1038
  var _a, _b;
1042
- setClassName({ element: useGetElement(step.attachTo.element), classList: step.attachTo.classList });
1039
+ unsetClassName({ element: useGetElement(step.attachTo.element), classList: step.attachTo.classList });
1043
1040
  return (_b = (_a = step.on) == null ? void 0 : _a.afterStep) == null ? void 0 : _b.call(_a);
1044
1041
  };
1045
1042
  return { beforeHook, afterHook };
@@ -1,12 +1,12 @@
1
- (function($,J){typeof exports=="object"&&typeof module!="undefined"?J(exports,require("@popperjs/core"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@popperjs/core","vue"],J):($=typeof globalThis!="undefined"?globalThis:$||self,J($["v-onboarding"]={},$.core,$.Vue))})(this,function($,J,o){"use strict";const Nt=Symbol("onboardingState"),mt={IDLE:-1,FINISHED:-2};var rt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},vt={exports:{}};(function(r,b){var h=200,m="__lodash_hash_undefined__",f=800,s=16,v=9007199254740991,N="[object Arguments]",V="[object Array]",H="[object AsyncFunction]",S="[object Boolean]",T="[object Date]",I="[object Error]",B="[object Function]",L="[object GeneratorFunction]",j="[object Map]",P="[object Number]",w="[object Null]",a="[object Object]",l="[object Proxy]",u="[object RegExp]",x="[object Set]",O="[object String]",A="[object Undefined]",M="[object WeakMap]",D="[object ArrayBuffer]",k="[object DataView]",U="[object Float32Array]",G="[object Float64Array]",R="[object Int8Array]",it="[object Int16Array]",at="[object Int32Array]",st="[object Uint8Array]",lt="[object Uint8ClampedArray]",Ce="[object Uint16Array]",Ee="[object Uint32Array]",$e=/[\\^$.*+?()[\]{}|]/g,Be=/^\[object .+?Constructor\]$/,je=/^(?:0|[1-9]\d*)$/,g={};g[U]=g[G]=g[R]=g[it]=g[at]=g[st]=g[lt]=g[Ce]=g[Ee]=!0,g[N]=g[V]=g[D]=g[S]=g[k]=g[T]=g[I]=g[B]=g[j]=g[P]=g[a]=g[u]=g[x]=g[O]=g[M]=!1;var zt=typeof rt=="object"&&rt&&rt.Object===Object&&rt,Ae=typeof self=="object"&&self&&self.Object===Object&&self,Y=zt||Ae||Function("return this")(),Ft=b&&!b.nodeType&&b,X=Ft&&!0&&r&&!r.nodeType&&r,Ht=X&&X.exports===Ft,yt=Ht&&zt.process,Pt=function(){try{var t=X&&X.require&&X.require("util").types;return t||yt&&yt.binding&&yt.binding("util")}catch{}}(),Mt=Pt&&Pt.isTypedArray;function Ne(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 Ve(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function Ie(t){return function(e){return t(e)}}function Le(t,e){return t==null?void 0:t[e]}function ze(t,e){return function(n){return t(e(n))}}var Fe=Array.prototype,He=Function.prototype,ct=Object.prototype,Tt=Y["__core-js_shared__"],dt=He.toString,z=ct.hasOwnProperty,Dt=function(){var t=/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),kt=ct.toString,Pe=dt.call(Object),Me=RegExp("^"+dt.call(z).replace($e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ut=Ht?Y.Buffer:void 0,Ut=Y.Symbol,Gt=Y.Uint8Array,Rt=ut?ut.allocUnsafe:void 0,qt=ze(Object.getPrototypeOf,Object),Kt=Object.create,De=ct.propertyIsEnumerable,ke=Fe.splice,q=Ut?Ut.toStringTag:void 0,ft=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Ue=ut?ut.isBuffer:void 0,Wt=Math.max,Ge=Date.now,Qt=xt(Y,"Map"),tt=xt(Object,"create"),Re=function(){function t(){}return function(e){if(!W(e))return{};if(Kt)return Kt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function K(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 qe(){this.__data__=tt?tt(null):{},this.size=0}function Ke(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function We(t){var e=this.__data__;if(tt){var n=e[t];return n===m?void 0:n}return z.call(e,t)?e[t]:void 0}function Qe(t){var e=this.__data__;return tt?e[t]!==void 0:z.call(e,t)}function Ze(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=tt&&e===void 0?m:e,this}K.prototype.clear=qe,K.prototype.delete=Ke,K.prototype.get=We,K.prototype.has=Qe,K.prototype.set=Ze;function F(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__=[],this.size=0}function Ye(t){var e=this.__data__,n=pt(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 Xe(t){var e=this.__data__,n=pt(e,t);return n<0?void 0:e[n][1]}function tn(t){return pt(this.__data__,t)>-1}function en(t,e){var n=this.__data__,i=pt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}F.prototype.clear=Je,F.prototype.delete=Ye,F.prototype.get=Xe,F.prototype.has=tn,F.prototype.set=en;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 nn(){this.size=0,this.__data__={hash:new K,map:new(Qt||F),string:new K}}function rn(t){var e=gt(this,t).delete(t);return this.size-=e?1:0,e}function on(t){return gt(this,t).get(t)}function an(t){return gt(this,t).has(t)}function sn(t,e){var n=gt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}Q.prototype.clear=nn,Q.prototype.delete=rn,Q.prototype.get=on,Q.prototype.has=an,Q.prototype.set=sn;function Z(t){var e=this.__data__=new F(t);this.size=e.size}function ln(){this.__data__=new F,this.size=0}function cn(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function dn(t){return this.__data__.get(t)}function un(t){return this.__data__.has(t)}function fn(t,e){var n=this.__data__;if(n instanceof F){var i=n.__data__;if(!Qt||i.length<h-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Q(i)}return n.set(t,e),this.size=n.size,this}Z.prototype.clear=ln,Z.prototype.delete=cn,Z.prototype.get=dn,Z.prototype.has=un,Z.prototype.set=fn;function pn(t,e){var n=Et(t),i=!n&&Ct(t),d=!n&&!i&&te(t),p=!n&&!i&&!d&&ne(t),_=n||i||d||p,c=_?Ve(t.length,String):[],y=c.length;for(var E in t)(e||z.call(t,E))&&!(_&&(E=="length"||d&&(E=="offset"||E=="parent")||p&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||Yt(E,y)))&&c.push(E);return c}function St(t,e,n){(n!==void 0&&!bt(t[e],n)||n===void 0&&!(e in t))&&wt(t,e,n)}function hn(t,e,n){var i=t[e];(!(z.call(t,e)&&bt(i,n))||n===void 0&&!(e in t))&&wt(t,e,n)}function pt(t,e){for(var n=t.length;n--;)if(bt(t[n][0],e))return n;return-1}function wt(t,e,n){e=="__proto__"&&ft?ft(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var gn=$n();function ht(t){return t==null?t===void 0?A:w:q&&q in Object(t)?Bn(t):Ln(t)}function Zt(t){return et(t)&&ht(t)==N}function bn(t){if(!W(t)||Vn(t))return!1;var e=Bt(t)?Me:Be;return e.test(Pn(t))}function mn(t){return et(t)&&ee(t.length)&&!!g[ht(t)]}function vn(t){if(!W(t))return In(t);var e=Xt(t),n=[];for(var i in t)i=="constructor"&&(e||!z.call(t,i))||n.push(i);return n}function Jt(t,e,n,i,d){t!==e&&gn(e,function(p,_){if(d||(d=new Z),W(p))_n(t,e,_,n,Jt,i,d);else{var c=i?i(Ot(t,_),p,_+"",t,e,d):void 0;c===void 0&&(c=p),St(t,_,c)}},re)}function _n(t,e,n,i,d,p,_){var c=Ot(t,n),y=Ot(e,n),E=_.get(y);if(E){St(t,n,E);return}var C=p?p(c,y,n+"",t,e,_):void 0,nt=C===void 0;if(nt){var jt=Et(y),At=!jt&&te(y),ie=!jt&&!At&&ne(y);C=y,jt||At||ie?Et(c)?C=c:Mn(c)?C=On(c):At?(nt=!1,C=Sn(y,!0)):ie?(nt=!1,C=xn(y,!0)):C=[]:Dn(y)||Ct(y)?(C=c,Ct(c)?C=kn(c):(!W(c)||Bt(c))&&(C=jn(y))):nt=!1}nt&&(_.set(y,C),d(C,y,i,p,_),_.delete(y)),St(t,n,C)}function yn(t,e){return Fn(zn(t,e,oe),t+"")}var Tn=ft?function(t,e){return ft(t,"toString",{configurable:!0,enumerable:!1,value:Gn(e),writable:!0})}:oe;function Sn(t,e){if(e)return t.slice();var n=t.length,i=Rt?Rt(n):new t.constructor(n);return t.copy(i),i}function wn(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function xn(t,e){var n=e?wn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function On(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}function Cn(t,e,n,i){var d=!n;n||(n={});for(var p=-1,_=e.length;++p<_;){var c=e[p],y=i?i(n[c],t[c],c,n,t):void 0;y===void 0&&(y=t[c]),d?wt(n,c,y):hn(n,c,y)}return n}function En(t){return yn(function(e,n){var i=-1,d=n.length,p=d>1?n[d-1]:void 0,_=d>2?n[2]:void 0;for(p=t.length>3&&typeof p=="function"?(d--,p):void 0,_&&An(n[0],n[1],_)&&(p=d<3?void 0:p,d=1),e=Object(e);++i<d;){var c=n[i];c&&t(e,c,i,p)}return e})}function $n(t){return function(e,n,i){for(var d=-1,p=Object(e),_=i(e),c=_.length;c--;){var y=_[t?c:++d];if(n(p[y],y,p)===!1)break}return e}}function gt(t,e){var n=t.__data__;return Nn(e)?n[typeof e=="string"?"string":"hash"]:n.map}function xt(t,e){var n=Le(t,e);return bn(n)?n:void 0}function Bn(t){var e=z.call(t,q),n=t[q];try{t[q]=void 0;var i=!0}catch{}var d=kt.call(t);return i&&(e?t[q]=n:delete t[q]),d}function jn(t){return typeof t.constructor=="function"&&!Xt(t)?Re(qt(t)):{}}function Yt(t,e){var n=typeof t;return e=e==null?v:e,!!e&&(n=="number"||n!="symbol"&&je.test(t))&&t>-1&&t%1==0&&t<e}function An(t,e,n){if(!W(n))return!1;var i=typeof e;return(i=="number"?$t(n)&&Yt(e,n.length):i=="string"&&e in n)?bt(n[e],t):!1}function Nn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Vn(t){return!!Dt&&Dt in t}function Xt(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||ct;return t===n}function In(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function Ln(t){return kt.call(t)}function zn(t,e,n){return e=Wt(e===void 0?t.length-1:e,0),function(){for(var i=arguments,d=-1,p=Wt(i.length-e,0),_=Array(p);++d<p;)_[d]=i[e+d];d=-1;for(var c=Array(e+1);++d<e;)c[d]=i[d];return c[e]=n(_),Ne(t,this,c)}}function Ot(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Fn=Hn(Tn);function Hn(t){var e=0,n=0;return function(){var i=Ge(),d=s-(i-n);if(n=i,d>0){if(++e>=f)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Pn(t){if(t!=null){try{return dt.call(t)}catch{}try{return t+""}catch{}}return""}function bt(t,e){return t===e||t!==t&&e!==e}var Ct=Zt(function(){return arguments}())?Zt:function(t){return et(t)&&z.call(t,"callee")&&!De.call(t,"callee")},Et=Array.isArray;function $t(t){return t!=null&&ee(t.length)&&!Bt(t)}function Mn(t){return et(t)&&$t(t)}var te=Ue||Rn;function Bt(t){if(!W(t))return!1;var e=ht(t);return e==B||e==L||e==H||e==l}function ee(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=v}function W(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function et(t){return t!=null&&typeof t=="object"}function Dn(t){if(!et(t)||ht(t)!=a)return!1;var e=qt(t);if(e===null)return!0;var n=z.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&dt.call(n)==Pe}var ne=Mt?Ie(Mt):mn;function kn(t){return Cn(t,re(t))}function re(t){return $t(t)?pn(t,!0):vn(t)}var Un=En(function(t,e,n){Jt(t,e,n)});function Gn(t){return function(){return t}}function oe(t){return t}function Rn(){return!1}r.exports=Un})(vt,vt.exports);var Vt=vt.exports;function _t(r){return typeof r=="string"?document.querySelector(r):typeof r=="function"?r():null}const ot={popper:{},overlay:{enabled:!0,padding:0,borderRadius:0},scrollToStep:{enabled:!0,options:{behavior:"smooth",block:"center",inline:"center"}},labels:{previousButton:"Previous",nextButton:"Next",finishButton:"Finish"},hideButtons:{previous:!1,next:!1}};function ae(){var v,N,V,H;const r=o.ref(""),b=o.ref(null),h=o.ref((N=(v=ot.overlay)==null?void 0:v.padding)!=null?N:0),m=o.ref((H=(V=ot.overlay)==null?void 0:V.borderRadius)!=null?H:0),f=()=>{s(b.value,{padding:h.value,borderRadius:m.value})},s=async(S,T=ot.overlay)=>{var O,A,M,D,k,U,G,R,it,at,st,lt;if(!S)return;const{innerWidth:I,innerHeight:B}=window,{left:L,top:j,width:P,height:w}=S.getBoundingClientRect(),a=typeof T.padding=="number"?{top:T.padding,right:T.padding,bottom:T.padding,left:T.padding}:T.padding,l=typeof T.borderRadius=="number"?{leftTop:T.borderRadius,rightTop:T.borderRadius,rightBottom:T.borderRadius,leftBottom:T.borderRadius}:T.borderRadius,u={top:j-((O=a==null?void 0:a.top)!=null?O:0),right:L+P+((A=a==null?void 0:a.right)!=null?A:0),bottom:j+w+((M=a==null?void 0:a.bottom)!=null?M:0),left:L-((D=a==null?void 0:a.left)!=null?D:0)},x={leftTop:`M${u.left+((k=l==null?void 0:l.leftTop)!=null?k:0)},${u.top} Q${u.left},${u.top} ${u.left},${u.top+((U=l==null?void 0:l.leftTop)!=null?U:0)}`,rightTop:`V${u.top+((G=l==null?void 0:l.rightTop)!=null?G:0)} Q${u.right},${u.top} ${u.right-((R=l==null?void 0:l.rightTop)!=null?R:0)},${u.top}`,rightBottom:`H${u.right-((it=l==null?void 0:l.rightBottom)!=null?it:0)} Q${u.right},${u.bottom} ${u.right},${u.bottom-((at=l==null?void 0:l.rightBottom)!=null?at:0)}`,leftBottom:`V${u.bottom-((st=l==null?void 0:l.leftBottom)!=null?st:0)} Q${u.left},${u.bottom} ${u.left+((lt=l==null?void 0:l.leftBottom)!=null?lt:0)},${u.bottom}`};r.value=`
2
- M${I},${B}
1
+ (function(B,J){typeof exports=="object"&&typeof module!="undefined"?J(exports,require("@popperjs/core"),require("vue")):typeof define=="function"&&define.amd?define(["exports","@popperjs/core","vue"],J):(B=typeof globalThis!="undefined"?globalThis:B||self,J(B["v-onboarding"]={},B.core,B.Vue))})(this,function(B,J,o){"use strict";const Nt=Symbol("onboardingState"),mt={IDLE:-1,FINISHED:-2};var rt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},vt={exports:{}};(function(r,b){var p=200,m="__lodash_hash_undefined__",u=800,a=16,v=9007199254740991,N="[object Arguments]",V="[object Array]",H="[object AsyncFunction]",w="[object Boolean]",T="[object Date]",I="[object Error]",j="[object Function]",L="[object GeneratorFunction]",E="[object Map]",S="[object Number]",x="[object Null]",f="[object Object]",s="[object Proxy]",d="[object RegExp]",O="[object Set]",A="[object String]",P="[object Undefined]",D="[object WeakMap]",M="[object ArrayBuffer]",k="[object DataView]",U="[object Float32Array]",G="[object Float64Array]",R="[object Int8Array]",it="[object Int16Array]",at="[object Int32Array]",st="[object Uint8Array]",lt="[object Uint8ClampedArray]",Ce="[object Uint16Array]",Ee="[object Uint32Array]",$e=/[\\^$.*+?()[\]{}|]/g,Be=/^\[object .+?Constructor\]$/,je=/^(?:0|[1-9]\d*)$/,g={};g[U]=g[G]=g[R]=g[it]=g[at]=g[st]=g[lt]=g[Ce]=g[Ee]=!0,g[N]=g[V]=g[M]=g[w]=g[k]=g[T]=g[I]=g[j]=g[E]=g[S]=g[f]=g[d]=g[O]=g[A]=g[D]=!1;var zt=typeof rt=="object"&&rt&&rt.Object===Object&&rt,Ae=typeof self=="object"&&self&&self.Object===Object&&self,Y=zt||Ae||Function("return this")(),Ft=b&&!b.nodeType&&b,X=Ft&&!0&&r&&!r.nodeType&&r,Ht=X&&X.exports===Ft,yt=Ht&&zt.process,Pt=function(){try{var t=X&&X.require&&X.require("util").types;return t||yt&&yt.binding&&yt.binding("util")}catch{}}(),Dt=Pt&&Pt.isTypedArray;function Ne(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 Ve(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}function Ie(t){return function(e){return t(e)}}function Le(t,e){return t==null?void 0:t[e]}function ze(t,e){return function(n){return t(e(n))}}var Fe=Array.prototype,He=Function.prototype,ct=Object.prototype,Tt=Y["__core-js_shared__"],dt=He.toString,z=ct.hasOwnProperty,Mt=function(){var t=/[^.]+$/.exec(Tt&&Tt.keys&&Tt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),kt=ct.toString,Pe=dt.call(Object),De=RegExp("^"+dt.call(z).replace($e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ut=Ht?Y.Buffer:void 0,Ut=Y.Symbol,Gt=Y.Uint8Array,Rt=ut?ut.allocUnsafe:void 0,qt=ze(Object.getPrototypeOf,Object),Kt=Object.create,Me=ct.propertyIsEnumerable,ke=Fe.splice,q=Ut?Ut.toStringTag:void 0,ft=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Ue=ut?ut.isBuffer:void 0,Wt=Math.max,Ge=Date.now,Qt=xt(Y,"Map"),tt=xt(Object,"create"),Re=function(){function t(){}return function(e){if(!W(e))return{};if(Kt)return Kt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function K(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 qe(){this.__data__=tt?tt(null):{},this.size=0}function Ke(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function We(t){var e=this.__data__;if(tt){var n=e[t];return n===m?void 0:n}return z.call(e,t)?e[t]:void 0}function Qe(t){var e=this.__data__;return tt?e[t]!==void 0:z.call(e,t)}function Ze(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=tt&&e===void 0?m:e,this}K.prototype.clear=qe,K.prototype.delete=Ke,K.prototype.get=We,K.prototype.has=Qe,K.prototype.set=Ze;function F(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__=[],this.size=0}function Ye(t){var e=this.__data__,n=pt(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 Xe(t){var e=this.__data__,n=pt(e,t);return n<0?void 0:e[n][1]}function tn(t){return pt(this.__data__,t)>-1}function en(t,e){var n=this.__data__,i=pt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}F.prototype.clear=Je,F.prototype.delete=Ye,F.prototype.get=Xe,F.prototype.has=tn,F.prototype.set=en;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 nn(){this.size=0,this.__data__={hash:new K,map:new(Qt||F),string:new K}}function rn(t){var e=gt(this,t).delete(t);return this.size-=e?1:0,e}function on(t){return gt(this,t).get(t)}function an(t){return gt(this,t).has(t)}function sn(t,e){var n=gt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}Q.prototype.clear=nn,Q.prototype.delete=rn,Q.prototype.get=on,Q.prototype.has=an,Q.prototype.set=sn;function Z(t){var e=this.__data__=new F(t);this.size=e.size}function ln(){this.__data__=new F,this.size=0}function cn(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function dn(t){return this.__data__.get(t)}function un(t){return this.__data__.has(t)}function fn(t,e){var n=this.__data__;if(n instanceof F){var i=n.__data__;if(!Qt||i.length<p-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Q(i)}return n.set(t,e),this.size=n.size,this}Z.prototype.clear=ln,Z.prototype.delete=cn,Z.prototype.get=dn,Z.prototype.has=un,Z.prototype.set=fn;function pn(t,e){var n=Et(t),i=!n&&Ct(t),c=!n&&!i&&te(t),h=!n&&!i&&!c&&ne(t),_=n||i||c||h,l=_?Ve(t.length,String):[],y=l.length;for(var $ in t)(e||z.call(t,$))&&!(_&&($=="length"||c&&($=="offset"||$=="parent")||h&&($=="buffer"||$=="byteLength"||$=="byteOffset")||Yt($,y)))&&l.push($);return l}function St(t,e,n){(n!==void 0&&!bt(t[e],n)||n===void 0&&!(e in t))&&wt(t,e,n)}function hn(t,e,n){var i=t[e];(!(z.call(t,e)&&bt(i,n))||n===void 0&&!(e in t))&&wt(t,e,n)}function pt(t,e){for(var n=t.length;n--;)if(bt(t[n][0],e))return n;return-1}function wt(t,e,n){e=="__proto__"&&ft?ft(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var gn=$n();function ht(t){return t==null?t===void 0?P:x:q&&q in Object(t)?Bn(t):Ln(t)}function Zt(t){return et(t)&&ht(t)==N}function bn(t){if(!W(t)||Vn(t))return!1;var e=Bt(t)?De:Be;return e.test(Pn(t))}function mn(t){return et(t)&&ee(t.length)&&!!g[ht(t)]}function vn(t){if(!W(t))return In(t);var e=Xt(t),n=[];for(var i in t)i=="constructor"&&(e||!z.call(t,i))||n.push(i);return n}function Jt(t,e,n,i,c){t!==e&&gn(e,function(h,_){if(c||(c=new Z),W(h))_n(t,e,_,n,Jt,i,c);else{var l=i?i(Ot(t,_),h,_+"",t,e,c):void 0;l===void 0&&(l=h),St(t,_,l)}},re)}function _n(t,e,n,i,c,h,_){var l=Ot(t,n),y=Ot(e,n),$=_.get(y);if($){St(t,n,$);return}var C=h?h(l,y,n+"",t,e,_):void 0,nt=C===void 0;if(nt){var jt=Et(y),At=!jt&&te(y),ie=!jt&&!At&&ne(y);C=y,jt||At||ie?Et(l)?C=l:Dn(l)?C=On(l):At?(nt=!1,C=Sn(y,!0)):ie?(nt=!1,C=xn(y,!0)):C=[]:Mn(y)||Ct(y)?(C=l,Ct(l)?C=kn(l):(!W(l)||Bt(l))&&(C=jn(y))):nt=!1}nt&&(_.set(y,C),c(C,y,i,h,_),_.delete(y)),St(t,n,C)}function yn(t,e){return Fn(zn(t,e,oe),t+"")}var Tn=ft?function(t,e){return ft(t,"toString",{configurable:!0,enumerable:!1,value:Gn(e),writable:!0})}:oe;function Sn(t,e){if(e)return t.slice();var n=t.length,i=Rt?Rt(n):new t.constructor(n);return t.copy(i),i}function wn(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function xn(t,e){var n=e?wn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function On(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}function Cn(t,e,n,i){var c=!n;n||(n={});for(var h=-1,_=e.length;++h<_;){var l=e[h],y=i?i(n[l],t[l],l,n,t):void 0;y===void 0&&(y=t[l]),c?wt(n,l,y):hn(n,l,y)}return n}function En(t){return yn(function(e,n){var i=-1,c=n.length,h=c>1?n[c-1]:void 0,_=c>2?n[2]:void 0;for(h=t.length>3&&typeof h=="function"?(c--,h):void 0,_&&An(n[0],n[1],_)&&(h=c<3?void 0:h,c=1),e=Object(e);++i<c;){var l=n[i];l&&t(e,l,i,h)}return e})}function $n(t){return function(e,n,i){for(var c=-1,h=Object(e),_=i(e),l=_.length;l--;){var y=_[t?l:++c];if(n(h[y],y,h)===!1)break}return e}}function gt(t,e){var n=t.__data__;return Nn(e)?n[typeof e=="string"?"string":"hash"]:n.map}function xt(t,e){var n=Le(t,e);return bn(n)?n:void 0}function Bn(t){var e=z.call(t,q),n=t[q];try{t[q]=void 0;var i=!0}catch{}var c=kt.call(t);return i&&(e?t[q]=n:delete t[q]),c}function jn(t){return typeof t.constructor=="function"&&!Xt(t)?Re(qt(t)):{}}function Yt(t,e){var n=typeof t;return e=e==null?v:e,!!e&&(n=="number"||n!="symbol"&&je.test(t))&&t>-1&&t%1==0&&t<e}function An(t,e,n){if(!W(n))return!1;var i=typeof e;return(i=="number"?$t(n)&&Yt(e,n.length):i=="string"&&e in n)?bt(n[e],t):!1}function Nn(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Vn(t){return!!Mt&&Mt in t}function Xt(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||ct;return t===n}function In(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}function Ln(t){return kt.call(t)}function zn(t,e,n){return e=Wt(e===void 0?t.length-1:e,0),function(){for(var i=arguments,c=-1,h=Wt(i.length-e,0),_=Array(h);++c<h;)_[c]=i[e+c];c=-1;for(var l=Array(e+1);++c<e;)l[c]=i[c];return l[e]=n(_),Ne(t,this,l)}}function Ot(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Fn=Hn(Tn);function Hn(t){var e=0,n=0;return function(){var i=Ge(),c=a-(i-n);if(n=i,c>0){if(++e>=u)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Pn(t){if(t!=null){try{return dt.call(t)}catch{}try{return t+""}catch{}}return""}function bt(t,e){return t===e||t!==t&&e!==e}var Ct=Zt(function(){return arguments}())?Zt:function(t){return et(t)&&z.call(t,"callee")&&!Me.call(t,"callee")},Et=Array.isArray;function $t(t){return t!=null&&ee(t.length)&&!Bt(t)}function Dn(t){return et(t)&&$t(t)}var te=Ue||Rn;function Bt(t){if(!W(t))return!1;var e=ht(t);return e==j||e==L||e==H||e==s}function ee(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=v}function W(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function et(t){return t!=null&&typeof t=="object"}function Mn(t){if(!et(t)||ht(t)!=f)return!1;var e=qt(t);if(e===null)return!0;var n=z.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&dt.call(n)==Pe}var ne=Dt?Ie(Dt):mn;function kn(t){return Cn(t,re(t))}function re(t){return $t(t)?pn(t,!0):vn(t)}var Un=En(function(t,e,n){Jt(t,e,n)});function Gn(t){return function(){return t}}function oe(t){return t}function Rn(){return!1}r.exports=Un})(vt,vt.exports);var Vt=vt.exports;function _t(r){return typeof r=="string"?document.querySelector(r):typeof r=="function"?r():null}const ot={popper:{},overlay:{enabled:!0,padding:0,borderRadius:0},scrollToStep:{enabled:!0,options:{behavior:"smooth",block:"center",inline:"center"}},labels:{previousButton:"Previous",nextButton:"Next",finishButton:"Finish"},hideButtons:{previous:!1,next:!1}};function ae(){var v,N,V,H;const r=o.ref(""),b=o.ref(null),p=o.ref((N=(v=ot.overlay)==null?void 0:v.padding)!=null?N:0),m=o.ref((H=(V=ot.overlay)==null?void 0:V.borderRadius)!=null?H:0),u=()=>{a(b.value,{padding:p.value,borderRadius:m.value})},a=async(w,T=ot.overlay)=>{var A,P,D,M,k,U,G,R,it,at,st,lt;if(!w)return;const{innerWidth:I,innerHeight:j}=window,{left:L,top:E,width:S,height:x}=w.getBoundingClientRect(),f=typeof T.padding=="number"?{top:T.padding,right:T.padding,bottom:T.padding,left:T.padding}:T.padding,s=typeof T.borderRadius=="number"?{leftTop:T.borderRadius,rightTop:T.borderRadius,rightBottom:T.borderRadius,leftBottom:T.borderRadius}:T.borderRadius,d={top:E-((A=f==null?void 0:f.top)!=null?A:0),right:L+S+((P=f==null?void 0:f.right)!=null?P:0),bottom:E+x+((D=f==null?void 0:f.bottom)!=null?D:0),left:L-((M=f==null?void 0:f.left)!=null?M:0)},O={leftTop:`M${d.left+((k=s==null?void 0:s.leftTop)!=null?k:0)},${d.top} Q${d.left},${d.top} ${d.left},${d.top+((U=s==null?void 0:s.leftTop)!=null?U:0)}`,rightTop:`V${d.top+((G=s==null?void 0:s.rightTop)!=null?G:0)} Q${d.right},${d.top} ${d.right-((R=s==null?void 0:s.rightTop)!=null?R:0)},${d.top}`,rightBottom:`H${d.right-((it=s==null?void 0:s.rightBottom)!=null?it:0)} Q${d.right},${d.bottom} ${d.right},${d.bottom-((at=s==null?void 0:s.rightBottom)!=null?at:0)}`,leftBottom:`V${d.bottom-((st=s==null?void 0:s.leftBottom)!=null?st:0)} Q${d.left},${d.bottom} ${d.left+((lt=s==null?void 0:s.leftBottom)!=null?lt:0)},${d.bottom}`};r.value=`
2
+ M${I},${j}
3
3
  H0V0
4
- H${I}V${B}
4
+ H${I}V${j}
5
5
  Z
6
- ${x.leftTop}
7
- ${x.leftBottom}
8
- ${x.rightBottom}
9
- ${x.rightTop}
6
+ ${O.leftTop}
7
+ ${O.leftBottom}
8
+ ${O.rightBottom}
9
+ ${O.rightTop}
10
10
  Z
11
- `,b.value=S,h.value=a,m.value=l};return o.onMounted(()=>{window.addEventListener("scroll",f),window.addEventListener("resize",f)}),o.onUnmounted(()=>{window.removeEventListener("scroll",f),window.removeEventListener("resize",f)}),{path:r,updatePath:s}}var It=(r,b)=>{const h=r.__vccOpts||r;for(const[m,f]of b)h[m]=f;return h};const se=o.defineComponent({name:"VOnboardingStep",setup(){const r=o.ref(!1),b=o.inject(Nt,{}),{step:h,isFirstStep:m,isLastStep:f,options:s,next:v,previous:N,exit:V,finish:H}=o.toRefs(b.value),S=o.computed(()=>Vt({},s==null?void 0:s.value,h.value.options)),T=o.computed(()=>{var w,a;return{previous:!((w=S.value.hideButtons)!=null&&w.previous),next:!((a=S.value.hideButtons)!=null&&a.next)}}),I=o.computed(()=>{var w,a,l,u,x,O;return{previous:(a=(w=S.value)==null?void 0:w.labels)==null?void 0:a.previousButton,next:(u=(l=S.value)==null?void 0:l.labels)==null?void 0:u.nextButton,finish:(O=(x=S.value)==null?void 0:x.labels)==null?void 0:O.finishButton}}),{updatePath:B,path:L}=ae(),j=o.ref(),P=()=>{var a,l,u,x,O,A,M,D,k,U,G,R;const w=_t((l=(a=h==null?void 0:h.value)==null?void 0:a.attachTo)==null?void 0:l.element);w&&j.value&&(r.value=!0,(x=(u=S.value)==null?void 0:u.scrollToStep)!=null&&x.enabled&&w.scrollIntoView((A=(O=S.value)==null?void 0:O.scrollToStep)==null?void 0:A.options),J.createPopper(w,j.value,S.value.popper),(D=(M=S.value)==null?void 0:M.overlay)!=null&&D.enabled&&B(w,{padding:(U=(k=S.value)==null?void 0:k.overlay)==null?void 0:U.padding,borderRadius:(R=(G=S.value)==null?void 0:G.overlay)==null?void 0:R.borderRadius}))};return o.onMounted(P),{stepElement:j,next:v,previous:N,path:L,show:r,step:h,isFirstStep:m,isLastStep:f,exit:V,finish:H,isButtonVisible:T,buttonLabels:I}}}),le={style:{width:"100%",height:"100%",position:"fixed",top:"0",left:"0",opacity:"0.5","z-index":"var(--v-onboarding-overlay-z, 10)","pointer-events":"none"}},ce=["d"],de={ref:"stepElement",style:{position:"relative","z-index":"var(--v-onboarding-step-z, 20)"}},ue={class:"v-onboarding-item"},fe={class:"v-onboarding-item__header"},pe={key:0,class:"v-onboarding-item__header-title"},he=[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)],ge={key:0,class:"v-onboarding-item__description"},be={class:"v-onboarding-item__actions"},me=o.createElementVNode("div",{"data-popper-arrow":""},null,-1);function ve(r,b,h,m,f,s){return o.withDirectives((o.openBlock(),o.createElementBlock("div",null,[(o.openBlock(),o.createElementBlock("svg",le,[o.createElementVNode("path",{d:r.path},null,8,ce)])),o.createElementVNode("div",de,[r.step?o.renderSlot(r.$slots,"default",{key:0},()=>[o.createElementVNode("div",ue,[o.createElementVNode("div",fe,[r.step.content.title?(o.openBlock(),o.createElementBlock("span",pe,o.toDisplayString(r.step.content.title),1)):o.createCommentVNode("",!0),o.createElementVNode("button",{onClick:b[0]||(b[0]=(...v)=>r.exit&&r.exit(...v)),"finish,":"",class:"v-onboarding-item__header-close"},he)]),r.step.content.description?(o.openBlock(),o.createElementBlock("p",ge,o.toDisplayString(r.step.content.description),1)):o.createCommentVNode("",!0),o.createElementVNode("div",be,[!r.isFirstStep&&r.isButtonVisible.previous?(o.openBlock(),o.createElementBlock("button",{key:0,type:"button",onClick:b[1]||(b[1]=(...v)=>r.previous&&r.previous(...v)),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:b[2]||(b[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),me],512)],512)),[[o.vShow,r.show]])}var Lt=It(se,[["render",ve]]);const _e=o.defineComponent({name:"VOnboardingWrapper",components:{VOnboardingStep:Lt},props:{steps:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},emits:["finish","exit"],setup(r,{expose:b,emit:h}){const m=o.ref(mt.IDLE),f=o.ref(m.value),s=a=>{typeof a=="function"?m.value=a(m.value):m.value=a},{beforeHook:v,afterHook:N}=Te(),V=o.computed(()=>{var a;return(a=r.steps)==null?void 0:a[f.value]});o.watch(m,async(a,l)=>{var O,A;const u=(O=r.steps)==null?void 0:O[l];u&&await N(u);const x=(A=r.steps)==null?void 0:A[a];x&&await v(x),f.value=a});const H=o.computed(()=>f.value===mt.FINISHED),S=()=>s(0),T=()=>{s(mt.FINISHED),h("finish")},I=()=>h("exit");b({start:S,finish:T,goToStep:s});const B=()=>{s(a=>a-1)},L=()=>{const a=f.value+1;if(a===r.steps.length){T();return}s(a)},j=o.ref({step:V,options:o.computed(()=>Vt({},ot,r.options)),next:L,previous:B,finish:T,exit:I,isFirstStep:o.computed(()=>f.value===0),isLastStep:o.computed(()=>f.value===r.steps.length-1)});o.provide(Nt,j);const P=o.computed(()=>f.value===0),w=o.computed(()=>f.value===r.steps.length-1);return{index:m,activeStep:V,next:L,previous:B,isFinished:H,setIndex:s,isFirstStep:P,isLastStep:w,finish:T,exit:I}}});function ye(){return{setClassName:({element:h,classList:m=[]})=>{!h||h.classList.add(...m)},unsetClassName:({element:h,classList:m=[]})=>{!h||h.classList.remove(...m)}}}function Te(){const{setClassName:r,unsetClassName:b}=ye();return{beforeHook:f=>{var s,v;return b({element:_t(f.attachTo.element),classList:f.attachTo.classList}),(v=(s=f.on)==null?void 0:s.beforeStep)==null?void 0:v.call(s)},afterHook:f=>{var s,v;return r({element:_t(f.attachTo.element),classList:f.attachTo.classList}),(v=(s=f.on)==null?void 0:s.afterStep)==null?void 0:v.call(s)}}}const Se={key:0,"data-v-onboarding-wrapper":""};function we(r,b,h,m,f,s){const v=o.resolveComponent("VOnboardingStep");return r.isFinished?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Se,[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(v,{key:r.index}))])]))}var xe=It(_e,[["render",we]]);function Oe(r){return{start:()=>{var s;return(s=r==null?void 0:r.value)==null?void 0:s.start()},finish:()=>{var s;return(s=r==null?void 0:r.value)==null?void 0:s.finish()},exit:()=>{var s;return(s=r==null?void 0:r.value)==null?void 0:s.exit()},goToStep:s=>{var v;return(v=r==null?void 0:r.value)==null?void 0:v.goToStep(s)}}}var Kn=(()=>`.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}
12
- `)();$.VOnboardingStep=Lt,$.VOnboardingWrapper=xe,$.useVOnboarding=Oe,Object.defineProperties($,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
11
+ `,b.value=w,p.value=f,m.value=s};return o.onMounted(()=>{window.addEventListener("scroll",u),window.addEventListener("resize",u)}),o.onUnmounted(()=>{window.removeEventListener("scroll",u),window.removeEventListener("resize",u)}),{path:r,updatePath:a}}var It=(r,b)=>{const p=r.__vccOpts||r;for(const[m,u]of b)p[m]=u;return p};const se=o.defineComponent({name:"VOnboardingStep",setup(){const r=o.ref(!1),b=o.inject(Nt,{}),{step:p,isFirstStep:m,isLastStep:u,options:a,next:v,previous:N,exit:V,finish:H}=o.toRefs(b.value),w=o.computed(()=>Vt({},a==null?void 0:a.value,p.value.options)),T=o.computed(()=>{var x,f;return{previous:!((x=w.value.hideButtons)!=null&&x.previous),next:!((f=w.value.hideButtons)!=null&&f.next)}}),I=o.computed(()=>{var x,f,s,d,O,A;return{previous:(f=(x=w.value)==null?void 0:x.labels)==null?void 0:f.previousButton,next:(d=(s=w.value)==null?void 0:s.labels)==null?void 0:d.nextButton,finish:(A=(O=w.value)==null?void 0:O.labels)==null?void 0:A.finishButton}}),{updatePath:j,path:L}=ae(),E=o.ref(),S=()=>{var f,s,d,O,A,P,D,M,k,U,G,R;const x=_t((s=(f=p==null?void 0:p.value)==null?void 0:f.attachTo)==null?void 0:s.element);x&&E.value&&(r.value=!0,(O=(d=w.value)==null?void 0:d.scrollToStep)!=null&&O.enabled&&x.scrollIntoView((P=(A=w.value)==null?void 0:A.scrollToStep)==null?void 0:P.options),J.createPopper(x,E.value,w.value.popper),(M=(D=w.value)==null?void 0:D.overlay)!=null&&M.enabled&&j(x,{padding:(U=(k=w.value)==null?void 0:k.overlay)==null?void 0:U.padding,borderRadius:(R=(G=w.value)==null?void 0:G.overlay)==null?void 0:R.borderRadius}))};return o.watch(p,S,{immediate:!0}),{stepElement:E,next:v,previous:N,path:L,show:r,step:p,isFirstStep:m,isLastStep:u,exit:V,finish:H,isButtonVisible:T,buttonLabels:I}}}),le={style:{width:"100%",height:"100%",position:"fixed",top:"0",left:"0",opacity:"0.5","z-index":"var(--v-onboarding-overlay-z, 10)","pointer-events":"none"}},ce=["d"],de={ref:"stepElement",style:{position:"relative","z-index":"var(--v-onboarding-step-z, 20)"}},ue={class:"v-onboarding-item"},fe={class:"v-onboarding-item__header"},pe={key:0,class:"v-onboarding-item__header-title"},he=[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)],ge={key:0,class:"v-onboarding-item__description"},be={class:"v-onboarding-item__actions"},me=o.createElementVNode("div",{"data-popper-arrow":""},null,-1);function ve(r,b,p,m,u,a){return o.withDirectives((o.openBlock(),o.createElementBlock("div",null,[(o.openBlock(),o.createElementBlock("svg",le,[o.createElementVNode("path",{d:r.path},null,8,ce)])),o.createElementVNode("div",de,[r.step?o.renderSlot(r.$slots,"default",{key:0},()=>[o.createElementVNode("div",ue,[o.createElementVNode("div",fe,[r.step.content.title?(o.openBlock(),o.createElementBlock("span",pe,o.toDisplayString(r.step.content.title),1)):o.createCommentVNode("",!0),o.createElementVNode("button",{onClick:b[0]||(b[0]=(...v)=>r.exit&&r.exit(...v)),class:"v-onboarding-item__header-close"},he)]),r.step.content.description?(o.openBlock(),o.createElementBlock("p",ge,o.toDisplayString(r.step.content.description),1)):o.createCommentVNode("",!0),o.createElementVNode("div",be,[!r.isFirstStep&&r.isButtonVisible.previous?(o.openBlock(),o.createElementBlock("button",{key:0,type:"button",onClick:b[1]||(b[1]=(...v)=>r.previous&&r.previous(...v)),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:b[2]||(b[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),me],512)],512)),[[o.vShow,r.show]])}var Lt=It(se,[["render",ve]]);const _e=o.defineComponent({name:"VOnboardingWrapper",components:{VOnboardingStep:Lt},props:{steps:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},emits:["finish","exit"],setup(r,{expose:b,emit:p}){const m=o.ref(mt.IDLE),u=o.ref(m.value),a=S=>{typeof S=="function"?m.value=S(m.value):m.value=S},{beforeHook:v,afterHook:N}=Te(),V=o.computed(()=>{var S;return(S=r.steps)==null?void 0:S[u.value]});o.watch(m,async(S,x)=>{var d,O;const f=(d=r.steps)==null?void 0:d[x];f&&await N(f);const s=(O=r.steps)==null?void 0:O[S];s&&await v(s),u.value=S});const H=o.computed(()=>u.value===mt.FINISHED),w=()=>a(0),T=()=>{a(mt.FINISHED),p("finish")},I=()=>p("exit");b({start:w,finish:T,goToStep:a});const j=()=>{a(S=>S-1)},L=()=>{const S=u.value+1;if(S===r.steps.length){T();return}a(S)},E=o.computed(()=>({step:V,options:o.computed(()=>Vt({},ot,r.options)),next:L,previous:j,finish:T,exit:I,isFirstStep:o.computed(()=>u.value===0),isLastStep:o.computed(()=>u.value===r.steps.length-1)}));return o.provide(Nt,E),{index:m,activeStep:V,next:L,previous:j,isFinished:H,setIndex:a,isFirstStep:E.value.isFirstStep,isLastStep:E.value.isLastStep,finish:T,exit:I}}});function ye(){return{setClassName:({element:p,classList:m=[]})=>{!p||p.classList.add(...m)},unsetClassName:({element:p,classList:m=[]})=>{!p||p.classList.remove(...m)}}}function Te(){const{setClassName:r,unsetClassName:b}=ye();return{beforeHook:u=>{var a,v;return r({element:_t(u.attachTo.element),classList:u.attachTo.classList}),(v=(a=u.on)==null?void 0:a.beforeStep)==null?void 0:v.call(a)},afterHook:u=>{var a,v;return b({element:_t(u.attachTo.element),classList:u.attachTo.classList}),(v=(a=u.on)==null?void 0:a.afterStep)==null?void 0:v.call(a)}}}const Se={key:0,"data-v-onboarding-wrapper":""};function we(r,b,p,m,u,a){const v=o.resolveComponent("VOnboardingStep");return r.isFinished?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Se,[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(v,{key:r.index}))])]))}var xe=It(_e,[["render",we]]);function Oe(r){return{start:()=>{var a;return(a=r==null?void 0:r.value)==null?void 0:a.start()},finish:()=>{var a;return(a=r==null?void 0:r.value)==null?void 0:a.finish()},exit:()=>{var a;return(a=r==null?void 0:r.value)==null?void 0:a.exit()},goToStep:a=>{var v;return(v=r==null?void 0:r.value)==null?void 0:v.goToStep(a)}}}var Kn=(()=>`.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}
12
+ `)();B.VOnboardingStep=Lt,B.VOnboardingWrapper=xe,B.useVOnboarding=Oe,Object.defineProperties(B,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v-onboarding",
3
- "version": "2.3.0",
3
+ "version": "2.3.2",
4
4
  "description": "v-onboarding is a super-slim, fully-typed onboarding component for Vue 3",
5
5
  "repository": {
6
6
  "type": "git",