react-shepherd 5.0.2 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,7 @@ that can be passed into props for dynamic interactivity.
11
11
  Use this simple NPM command or whatever package manager is your favorite.
12
12
 
13
13
  ```bash
14
- npm install --save @shepherdpro/react
14
+ npm install --save react-shepherd
15
15
  ```
16
16
 
17
17
  ## Usage
@@ -33,8 +33,8 @@ const tourOptions = {
33
33
  };
34
34
 
35
35
  function Button() {
36
- const shepherd = useShepherd(ShepherdTourContext);
37
- const tour = shepherd.Tour({
36
+ const Shepherd = useShepherd();
37
+ const tour = new Shepherd.Tour({
38
38
  ...tourOptions,
39
39
  steps: newSteps
40
40
  });
@@ -59,7 +59,7 @@ export default function App() {
59
59
 
60
60
  ## Configuration
61
61
 
62
- The following configuration options for a tour can be set on the `useShepherd` hook to control the way that Shepherd is used. This is simply a POJO passed to Shepherd to use the options noted in the Shepherd Tour [options](https://shepherdjs.dev/docs/Tour.html). You can also pass an API Key to use [Shepherd Pro](https://shepherdpro.com) features for analytics related events tracking.
62
+ The following configuration options for a tour can be set on the `useShepherd` hook to control the way that Shepherd is used. This is simply a POJO passed to Shepherd to use the options noted in the Shepherd Tour [options](https://docs.shepherdpro.com/api/tour/classes/tour/). You can also pass an API Key to use [Shepherd Pro](https://shepherdpro.com) features for analytics related events tracking.
63
63
 
64
64
  ### apiKey
65
65
 
@@ -68,7 +68,7 @@ Used to connect your tours to a Pro instance to get additional user information
68
68
 
69
69
  ## Steps
70
70
 
71
- The options are the same as Shepherd [options](https://shepherdjs.dev/docs/Step.html).
71
+ The options are the same as Shepherd [options](https://docs.shepherdpro.com/api/step/classes/step/).
72
72
 
73
73
  ## License
74
74
 
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { Context } from 'react';
3
3
  import { default as default_2 } from 'shepherd.js';
4
4
  import { FC } from 'react';
5
5
  import { ReactNode } from 'react';
6
- import { ShepherdPro } from 'node_modules/shepherd.js/dist/tour';
6
+ import { ShepherdPro } from 'shepherd.js/tour';
7
7
 
8
8
  export declare const JourneyMethods: Consumer<ShepherdContextType | undefined>;
9
9
 
@@ -16,7 +16,7 @@ export declare const ShepherdJourneyContext: Context<ShepherdContextType | undef
16
16
  export declare const ShepherdJourneyProvider: FC<ShepherdProviderProps>;
17
17
 
18
18
  declare interface ShepherdProviderProps {
19
- apiKey: string;
19
+ apiKey?: string;
20
20
  apiPath?: string;
21
21
  properties?: Record<string, unknown>;
22
22
  children?: ReactNode;
package/dist/index.js CHANGED
@@ -626,7 +626,7 @@ Check the top-level render call using <` + b + ">.");
626
626
  }
627
627
  process.env.NODE_ENV === "production" ? Rt.exports = Kr() : Rt.exports = zr();
628
628
  var Jr = Rt.exports;
629
- /*! shepherd.js 12.0.1 */
629
+ /*! shepherd.js 12.0.3 */
630
630
  function Gr(e) {
631
631
  return e instanceof Element;
632
632
  }
@@ -4130,7 +4130,7 @@ const Xt = Yr(
4130
4130
  apiPath: t,
4131
4131
  properties: n,
4132
4132
  children: r
4133
- }) => (typeof window < "u" && ne.init(e, t, n), /* @__PURE__ */ Jr.jsx(Xt.Provider, { value: { Shepherd: ne }, children: r }));
4133
+ }) => (typeof window < "u" && e && ne.init(e, t, n), /* @__PURE__ */ Jr.jsx(Xt.Provider, { value: { Shepherd: ne }, children: r }));
4134
4134
  export {
4135
4135
  Ts as JourneyMethods,
4136
4136
  Xt as ShepherdJourneyContext,
@@ -24,4 +24,4 @@ Check the render method of \``+a+"`."}return""}}function ws(a){{if(a!==void 0){v
24
24
 
25
25
  Check your code at `+p+":"+b+"."}return""}}var gr={};function _s(a){{var p=mr();if(!p){var b=typeof a=="string"?a:a.displayName||a.name;b&&(p=`
26
26
 
27
- Check the top-level render call using <`+b+">.")}return p}}function br(a,p){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var b=_s(p);if(gr[b])return;gr[b]=!0;var x="";a&&a._owner&&a._owner!==Xt.current&&(x=" It was passed a child from "+W(a._owner.type)+"."),We(a),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',b,x),We(null)}}function yr(a,p){{if(typeof a!="object")return;if(Jt(a))for(var b=0;b<a.length;b++){var x=a[b];Qt(x)&&br(x,p)}else if(Qt(a))a._store&&(a._store.validated=!0);else if(a){var P=S(a);if(typeof P=="function"&&P!==a.entries)for(var A=P.call(a),R;!(R=A.next()).done;)Qt(R.value)&&br(R.value,p)}}}function Es(a){{var p=a.type;if(p==null||typeof p=="string")return;var b;if(typeof p=="function")b=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===l||p.$$typeof===h))b=p.propTypes;else return;if(b){var x=W(p);cs(b,a.props,"prop",x,a)}else if(p.PropTypes!==void 0&&!Zt){Zt=!0;var P=W(p);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",P||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xs(a){{for(var p=Object.keys(a.props),b=0;b<p.length;b++){var x=p[b];if(x!=="children"&&x!=="key"){We(a),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",x),We(null);break}}a.ref!==null&&(We(a),_("Invalid attribute `ref` supplied to `React.Fragment`."),We(null))}}function vr(a,p,b,x,P,A){{var R=H(a);if(!R){var O="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(O+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=ws(P);U?O+=U:O+=mr();var L;a===null?L="null":Jt(a)?L="array":a!==void 0&&a.$$typeof===t?(L="<"+(W(a.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):L=typeof a,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",L,O)}var B=vs(a,p,b,P,A);if(B==null)return B;if(R){var ee=p.children;if(ee!==void 0)if(x)if(Jt(ee)){for(var Ne=0;Ne<ee.length;Ne++)yr(ee[Ne],a);Object.freeze&&Object.freeze(ee)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else yr(ee,a)}return a===r?xs(B):Es(B),B}}function Ss(a,p,b){return vr(a,p,b,!0)}function Os(a,p,b){return vr(a,p,b,!1)}var Ts=Os,Cs=Ss;Ue.Fragment=r,Ue.jsx=Ts,Ue.jsxs=Cs}()),Ue}process.env.NODE_ENV==="production"?yt.exports=_r():yt.exports=Er();var xr=yt.exports;/*! shepherd.js 12.0.1 */function Sr(e){return e instanceof Element}function He(e){return e instanceof HTMLElement}function me(e){return typeof e=="function"}function Ye(e){return typeof e=="string"}function N(e){return e===void 0}class vt{on(t,n,r,o=!1){var s;return N(this.bindings)&&(this.bindings={}),N(this.bindings[t])&&(this.bindings[t]=[]),(s=this.bindings[t])==null||s.push({handler:n,ctx:r,once:o}),this}once(t,n,r){return this.on(t,n,r,!0)}off(t,n){var r;return N(this.bindings)||N(this.bindings[t])?this:(N(n)?delete this.bindings[t]:(r=this.bindings[t])==null||r.forEach((o,s)=>{var i;o.handler===n&&((i=this.bindings[t])==null||i.splice(s,1))}),this)}trigger(t,...n){var r;return!N(this.bindings)&&this.bindings[t]&&((r=this.bindings[t])==null||r.forEach((o,s)=>{var f;const{ctx:i,handler:c,once:l}=o,u=i||this;c.apply(u,n),l&&((f=this.bindings[t])==null||f.splice(s,1))})),this}}function qe(e){var t,n;function r(s,i){try{var c=e[s](i),l=c.value,u=l instanceof nn;Promise.resolve(u?l.v:l).then(function(f){if(u){var h=s==="return"?"return":"next";if(!l.k||f.done)return r(h,f);f=e[h](f).value}o(c.done?"return":"normal",f)},function(f){r("throw",f)})}catch(f){o("throw",f)}}function o(s,i){switch(s){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(s,i){return new Promise(function(c,l){var u={key:s,arg:i,resolve:c,reject:l,next:null};n?n=n.next=u:(t=n=u,r(s,i))})},typeof e.return!="function"&&(this.return=void 0)}qe.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},qe.prototype.next=function(e){return this._invoke("next",e)},qe.prototype.throw=function(e){return this._invoke("throw",e)},qe.prototype.return=function(e){return this._invoke("return",e)};function nn(e,t){this.v=e,this.k=t}function rn(e){return new nn(e,0)}function Or(e){return function(){return new qe(e.apply(this,arguments))}}function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function on(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const ge={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};ge.defaultMerge;function Tr(e,t){return t}function sn(e){return typeof e!="object"||e===null?0:Array.isArray(e)?2:Pr(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Cr(e){const t=new Set;for(const n of e)for(const r of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(r);return t}function Rr(e,t){return typeof e=="object"&&Object.prototype.propertyIsEnumerable.call(e,t)}function an(e){return{*[Symbol.iterator](){for(const t of e)for(const n of t)yield n}}}const cn=new Set(["[object Object]","[object Module]"]);function Pr(e){if(!cn.has(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(t===void 0)return!0;const n=t.prototype;return!(n===null||typeof n!="object"||!cn.has(Object.prototype.toString.call(n))||!n.hasOwnProperty("isPrototypeOf"))}function Ir(e,t,n){const r={};for(const o of Cr(e)){const s=[];for(const l of e)Rr(l,o)&&s.push(l[o]);if(s.length===0)continue;const i=t.metaDataUpdater(n,{key:o,parents:e}),c=un(s,t,i);c!==ge.skip&&(o==="__proto__"?Object.defineProperty(r,o,{value:c,configurable:!0,enumerable:!0,writable:!0}):r[o]=c)}return r}function kr(e){return e.flat()}function Ar(e){return new Set(an(e))}function Mr(e){return new Map(an(e))}function ln(e){return e.at(-1)}var wt=Object.freeze({__proto__:null,mergeArrays:kr,mergeMaps:Mr,mergeOthers:ln,mergeRecords:Ir,mergeSets:Ar});function _t(...e){return Dr({})(...e)}function Dr(e,t){const n=Fr(e,r);function r(...o){return un(o,n,t)}return r}function Fr(e,t){var n,r;return{defaultMergeFunctions:wt,mergeFunctions:j({},wt,Object.fromEntries(Object.entries(e).filter(([o,s])=>Object.hasOwn(wt,o)).map(([o,s])=>s===!1?[o,ln]:[o,s]))),metaDataUpdater:(n=e.metaDataUpdater)!=null?n:Tr,deepmerge:t,useImplicitDefaultMerging:(r=e.enableImplicitDefaultMerging)!=null?r:!1,actions:ge}}function un(e,t,n){if(e.length===0)return;if(e.length===1)return Et(e,t,n);const r=sn(e[0]);if(r!==0&&r!==5){for(let o=1;o<e.length;o++)if(sn(e[o])!==r)return Et(e,t,n)}switch(r){case 1:return Lr(e,t,n);case 2:return jr(e,t,n);case 3:return Br(e,t,n);case 4:return $r(e,t,n);default:return Et(e,t,n)}}function Lr(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords?t.defaultMergeFunctions.mergeRecords(e,t,n):r}function jr(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays?t.defaultMergeFunctions.mergeArrays(e):r}function Br(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets?t.defaultMergeFunctions.mergeSets(e):r}function $r(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps?t.defaultMergeFunctions.mergeMaps(e):r}function Et(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}function fn(e){const t=Object.getOwnPropertyNames(e.constructor.prototype);for(let n=0;n<t.length;n++){const r=t[n],o=e[r];r!=="constructor"&&typeof o=="function"&&(e[r]=o.bind(e))}return e}function Wr(e,t){return n=>{if(e.isOpen()){const r=e.el&&n.currentTarget===e.el;(!N(t)&&n.currentTarget.matches(t)||r)&&e.tour.next()}}}function Nr(e){const{event:t,selector:n}=e.options.advanceOn||{};if(t){const r=Wr(e,n);let o=null;if(!N(n)&&(o=document.querySelector(n),!o))return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);o?(o.addEventListener(t,r),e.on("destroy",()=>o.removeEventListener(t,r))):(document.body.addEventListener(t,r,!0),e.on("destroy",()=>document.body.removeEventListener(t,r,!0)))}else return console.error("advanceOn was defined, but no event name was passed.")}class Vr{constructor(t){}}class Ur{constructor(t,n){}}function dn(e){return!Ye(e)||e===""?"":e.charAt(e.length-1)!=="-"?`${e}-`:e}function Hr(e){const t=e.options.attachTo||{},n=Object.assign({},t);if(me(n.element)&&(n.element=n.element.call(e)),Ye(n.element)){try{n.element=document.querySelector(n.element)}catch{}n.element||console.error(`The element for this Shepherd step was not found ${t.element}`)}return n}function hn(e){return e==null?!0:!e.element||!e.on}function pn(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(t=="x"?n:n&3|8).toString(16)})}const Ie=Math.min,Ee=Math.max,Qe=Math.round,et=Math.floor,be=e=>({x:e,y:e}),Yr={left:"right",right:"left",bottom:"top",top:"bottom"},qr={start:"end",end:"start"};function xt(e,t,n){return Ee(e,Ie(t,n))}function ke(e,t){return typeof e=="function"?e(t):e}function xe(e){return e.split("-")[0]}function tt(e){return e.split("-")[1]}function St(e){return e==="x"?"y":"x"}function Ot(e){return e==="y"?"height":"width"}function nt(e){return["top","bottom"].includes(xe(e))?"y":"x"}function Tt(e){return St(nt(e))}function Kr(e,t,n){n===void 0&&(n=!1);const r=tt(e),o=Tt(e),s=Ot(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=rt(i)),[i,rt(i)]}function zr(e){const t=rt(e);return[Ct(e),t,Ct(t)]}function Ct(e){return e.replace(/start|end/g,t=>qr[t])}function Jr(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function Gr(e,t,n,r){const o=tt(e);let s=Jr(xe(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ct)))),s}function rt(e){return e.replace(/left|right|bottom|top/g,t=>Yr[t])}function Xr(e){return j({top:0,right:0,bottom:0,left:0},e)}function mn(e){return typeof e!="number"?Xr(e):{top:e,right:e,bottom:e,left:e}}function ot(e){return j({},e,{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}const Zr=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],Qr=["mainAxis","crossAxis","limiter"];function gn(e,t,n){let{reference:r,floating:o}=e;const s=nt(t),i=Tt(t),c=Ot(i),l=xe(t),u=s==="y",f=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,d=r[c]/2-o[c]/2;let m;switch(l){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-o.width,y:h};break;default:m={x:r.x,y:r.y}}switch(tt(t)){case"start":m[i]-=d*(n&&u?-1:1);break;case"end":m[i]+=d*(n&&u?-1:1);break}return m}const eo=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=gn(u,r,l),d=r,m={},y=0;for(let E=0;E<c.length;E++){const{name:S,fn:w}=c[E],{x:_,y:T,data:v,reset:g}=await w({x:f,y:h,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=_??f,h=T??h,m=j({},m,{[S]:j({},m[S],v)}),g&&y<=50&&(y++,typeof g=="object"&&(g.placement&&(d=g.placement),g.rects&&(u=g.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):g.rects),{x:f,y:h}=gn(u,d,l)),E=-1)}return{x:f,y:h,placement:d,strategy:o,middlewareData:m}};async function bn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:d=!1,padding:m=0}=ke(t,e),y=mn(m),S=c[d?h==="floating"?"reference":"floating":h],w=ot(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(S)))==null||n?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:l})),_=h==="floating"?j({},i.floating,{x:r,y:o}):i.reference,T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),v=await(s.isElement==null?void 0:s.isElement(T))?await(s.getScale==null?void 0:s.getScale(T))||{x:1,y:1}:{x:1,y:1},g=ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:T,strategy:l}):_);return{top:(w.top-g.top+y.top)/v.y,bottom:(g.bottom-w.bottom+y.bottom)/v.y,left:(w.left-g.left+y.left)/v.x,right:(g.right-w.right+y.right)/v.x}}const to=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:u,padding:f=0}=ke(e,t)||{};if(u==null)return{};const h=mn(f),d={x:n,y:r},m=Tt(o),y=Ot(m),E=await i.getDimensions(u),S=m==="y",w=S?"top":"left",_=S?"bottom":"right",T=S?"clientHeight":"clientWidth",v=s.reference[y]+s.reference[m]-d[m]-s.floating[y],g=d[m]-s.reference[m],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let V=C?C[T]:0;(!V||!await(i.isElement==null?void 0:i.isElement(C)))&&(V=c.floating[T]||s.floating[y]);const re=v/2-g/2,$=V/2-E[y]/2-1,H=Ie(h[w],$),G=Ie(h[_],$),X=H,W=V-E[y]-G,M=V/2-E[y]/2+re,Z=xt(X,M,W),Q=!l.arrow&&tt(o)!=null&&M!==Z&&s.reference[y]/2-(M<X?H:G)-E[y]/2<0,K=Q?M<X?M-X:M-W:0;return{[m]:d[m]+K,data:j({[m]:Z,centerOffset:M-Z-K},Q&&{alignmentOffset:K}),reset:Q}}}),no=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var r,o;const{placement:s,middlewareData:i,rects:c,initialPlacement:l,platform:u,elements:f}=n,h=ke(t,n),{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:y,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0}=h,_=on(h,Zr);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const T=xe(s),v=xe(l)===l,g=await(u.isRTL==null?void 0:u.isRTL(f.floating)),C=y||(v||!w?[rt(l)]:zr(l));!y&&S!=="none"&&C.push(...Gr(l,w,S,g));const V=[l,...C],re=await bn(n,_),$=[];let H=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&$.push(re[T]),m){const M=Kr(s,c,g);$.push(re[M[0]],re[M[1]])}if(H=[...H,{placement:s,overflows:$}],!$.every(M=>M<=0)){var G,X;const M=(((G=i.flip)==null?void 0:G.index)||0)+1,Z=V[M];if(Z)return{data:{index:M,overflows:H},reset:{placement:Z}};let Q=(X=H.filter(K=>K.overflows[0]<=0).sort((K,de)=>K.overflows[1]-de.overflows[1])[0])==null?void 0:X.placement;if(!Q)switch(E){case"bestFit":{var W;const K=(W=H.map(de=>[de.placement,de.overflows.filter(_e=>_e>0).reduce((_e,dt)=>_e+dt,0)]).sort((de,_e)=>de[1]-_e[1])[0])==null?void 0:W[0];K&&(Q=K);break}case"initialPlacement":Q=l;break}if(s!==Q)return{reset:{placement:Q}}}return{}}}},ro=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:r,y:o,placement:s}=n,i=ke(t,n),{mainAxis:c=!0,crossAxis:l=!1,limiter:u={fn:_=>{let{x:T,y:v}=_;return{x:T,y:v}}}}=i,f=on(i,Qr),h={x:r,y:o},d=await bn(n,f),m=nt(xe(s)),y=St(m);let E=h[y],S=h[m];if(c){const _=y==="y"?"top":"left",T=y==="y"?"bottom":"right",v=E+d[_],g=E-d[T];E=xt(v,E,g)}if(l){const _=m==="y"?"top":"left",T=m==="y"?"bottom":"right",v=S+d[_],g=S-d[T];S=xt(v,S,g)}const w=u.fn(j({},n,{[y]:E,[m]:S}));return j({},w,{data:{x:w.x-r,y:w.y-o}})}}},oo=function(t){return t===void 0&&(t={}),{options:t,fn(n){const{x:r,y:o,placement:s,rects:i,middlewareData:c}=n,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=ke(t,n),h={x:r,y:o},d=nt(s),m=St(d);let y=h[m],E=h[d];const S=ke(l,n),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:j({mainAxis:0,crossAxis:0},S);if(u){const v=m==="y"?"height":"width",g=i.reference[m]-i.floating[v]+w.mainAxis,C=i.reference[m]+i.reference[v]-w.mainAxis;y<g?y=g:y>C&&(y=C)}if(f){var _,T;const v=m==="y"?"width":"height",g=["top","left"].includes(xe(s)),C=i.reference[d]-i.floating[v]+(g&&((_=c.offset)==null?void 0:_[d])||0)+(g?0:w.crossAxis),V=i.reference[d]+i.reference[v]+(g?0:((T=c.offset)==null?void 0:T[d])||0)-(g?w.crossAxis:0);E<C?E=C:E>V&&(E=V)}return{[m]:y,[d]:E}}}};function ye(e){return yn(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(yn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yn(e){return e instanceof Node||e instanceof Y(e).Node}function ce(e){return e instanceof Element||e instanceof Y(e).Element}function ie(e){return e instanceof HTMLElement||e instanceof Y(e).HTMLElement}function vn(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function Ke(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function io(e){return["table","td","th"].includes(ye(e))}function Rt(e){const t=Pt(),n=z(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function so(e){let t=Ae(e);for(;ie(t)&&!it(t);){if(Rt(t))return t;t=Ae(t)}return null}function Pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function it(e){return["html","body","#document"].includes(ye(e))}function z(e){return Y(e).getComputedStyle(e)}function st(e){return ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ae(e){if(ye(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vn(e)&&e.host||ae(e);return vn(t)?t.host:t}function wn(e){const t=Ae(e);return it(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ke(t)?t:wn(t)}function ze(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wn(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Y(o);return s?t.concat(i,i.visualViewport||[],Ke(o)?o:[],i.frameElement&&n?ze(i.frameElement):[]):t.concat(o,ze(o,[],n))}function _n(e){const t=z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ie(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=Qe(n)!==s||Qe(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function It(e){return ce(e)?e:e.contextElement}function Me(e){const t=It(e);if(!ie(t))return be(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=_n(t);let i=(s?Qe(n.width):n.width)/r,c=(s?Qe(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const ao=be(0);function En(e){const t=Y(e);return!Pt()||!t.visualViewport?ao:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function co(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Y(e)?!1:t}function Se(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=It(e);let i=be(1);t&&(r?ce(r)&&(i=Me(r)):i=Me(e));const c=co(s,n,r)?En(s):be(0);let l=(o.left+c.x)/i.x,u=(o.top+c.y)/i.y,f=o.width/i.x,h=o.height/i.y;if(s){const d=Y(s),m=r&&ce(r)?Y(r):r;let y=d,E=y.frameElement;for(;E&&r&&m!==y;){const S=Me(E),w=E.getBoundingClientRect(),_=z(E),T=w.left+(E.clientLeft+parseFloat(_.paddingLeft))*S.x,v=w.top+(E.clientTop+parseFloat(_.paddingTop))*S.y;l*=S.x,u*=S.y,f*=S.x,h*=S.y,l+=T,u+=v,y=Y(E),E=y.frameElement}}return ot({width:f,height:h,x:l,y:u})}const lo=[":popover-open",":modal"];function xn(e){return lo.some(t=>{try{return e.matches(t)}catch{return!1}})}function uo(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=ae(r),c=t?xn(t.floating):!1;if(r===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=be(1);const f=be(0),h=ie(r);if((h||!h&&!s)&&((ye(r)!=="body"||Ke(i))&&(l=st(r)),ie(r))){const d=Se(r);u=Me(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x,y:n.y*u.y-l.scrollTop*u.y+f.y}}function fo(e){return Array.from(e.getClientRects())}function Sn(e){return Se(ae(e)).left+st(e).scrollLeft}function ho(e){const t=ae(e),n=st(e),r=e.ownerDocument.body,o=Ee(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ee(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Sn(e);const c=-n.scrollTop;return z(r).direction==="rtl"&&(i+=Ee(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}function po(e,t){const n=Y(e),r=ae(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,l=0;if(o){s=o.width,i=o.height;const u=Pt();(!u||u&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:c,y:l}}function mo(e,t){const n=Se(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ie(e)?Me(e):be(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:c,x:l,y:u}}function On(e,t,n){let r;if(t==="viewport")r=po(e,n);else if(t==="document")r=ho(ae(e));else if(ce(t))r=mo(t,n);else{const o=En(e);r=j({},t,{x:t.x-o.x,y:t.y-o.y})}return ot(r)}function Tn(e,t){const n=Ae(e);return n===t||!ce(n)||it(n)?!1:z(n).position==="fixed"||Tn(n,t)}function go(e,t){const n=t.get(e);if(n)return n;let r=ze(e,[],!1).filter(c=>ce(c)&&ye(c)!=="body"),o=null;const s=z(e).position==="fixed";let i=s?Ae(e):e;for(;ce(i)&&!it(i);){const c=z(i),l=Rt(i);!l&&c.position==="fixed"&&(o=null),(s?!l&&!o:!l&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ke(i)&&!l&&Tn(e,i))?r=r.filter(f=>f!==i):o=c,i=Ae(i)}return t.set(e,r),r}function bo(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?go(t,this._c):[].concat(n),r],c=i[0],l=i.reduce((u,f)=>{const h=On(t,f,o);return u.top=Ee(h.top,u.top),u.right=Ie(h.right,u.right),u.bottom=Ie(h.bottom,u.bottom),u.left=Ee(h.left,u.left),u},On(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function yo(e){const{width:t,height:n}=_n(e);return{width:t,height:n}}function vo(e,t,n){const r=ie(t),o=ae(t),s=n==="fixed",i=Se(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=be(0);if(r||!r&&!s)if((ye(t)!=="body"||Ke(o))&&(c=st(t)),r){const h=Se(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=Sn(o));const u=i.left+c.scrollLeft-l.x,f=i.top+c.scrollTop-l.y;return{x:u,y:f,width:i.width,height:i.height}}function Cn(e,t){return!ie(e)||z(e).position==="fixed"?null:t?t(e):e.offsetParent}function Rn(e,t){const n=Y(e);if(!ie(e)||xn(e))return n;let r=Cn(e,t);for(;r&&io(r)&&z(r).position==="static";)r=Cn(r,t);return r&&(ye(r)==="html"||ye(r)==="body"&&z(r).position==="static"&&!Rt(r))?n:r||so(e)||n}const wo=async function(t){const n=this.getOffsetParent||Rn,r=this.getDimensions;return{reference:vo(t.reference,await n(t.floating),t.strategy),floating:j({x:0,y:0},await r(t.floating))}};function _o(e){return z(e).direction==="rtl"}const Eo={convertOffsetParentRelativeRectToViewportRelativeRect:uo,getDocumentElement:ae,getClippingRect:bo,getOffsetParent:Rn,getElementRects:wo,getClientRects:fo,getDimensions:yo,getScale:Me,isElement:ce,isRTL:_o};function xo(e,t){let n=null,r;const o=ae(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:u,top:f,width:h,height:d}=e.getBoundingClientRect();if(c||t(),!h||!d)return;const m=et(f),y=et(o.clientWidth-(u+h)),E=et(o.clientHeight-(f+d)),S=et(u),_={rootMargin:-m+"px "+-y+"px "+-E+"px "+-S+"px",threshold:Ee(0,Ie(1,l))||1};let T=!0;function v(g){const C=g[0].intersectionRatio;if(C!==l){if(!T)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},100)}T=!1}try{n=new IntersectionObserver(v,j({},_,{root:o.ownerDocument}))}catch{n=new IntersectionObserver(v,_)}n.observe(e)}return i(!0),s}function So(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=It(e),f=o||s?[...u?ze(u):[],...ze(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const h=u&&c?xo(u,n):null;let d=-1,m=null;i&&(m=new ResizeObserver(w=>{let[_]=w;_&&_.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var T;(T=m)==null||T.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let y,E=l?Se(e):null;l&&S();function S(){const w=Se(e);E&&(w.x!==E.x||w.y!==E.y||w.width!==E.width||w.height!==E.height)&&n(),E=w,y=requestAnimationFrame(S)}return n(),()=>{var w;f.forEach(_=>{o&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),h==null||h(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const Oo=ro,To=no,Co=to,Ro=oo,Po=(e,t,n)=>{const r=new Map,o=j({platform:Eo},n),s=j({},o.platform,{_c:r});return eo(e,t,j({},o,{platform:s}))};function Io(e){e.cleanup&&e.cleanup();const t=e._getResolvedAttachToOptions();let n=t.element;const r=Lo(t,e),o=hn(t);return o&&(n=document.body,e.shepherdElementComponent.getElement().classList.add("shepherd-centered")),e.cleanup=So(n,e.el,()=>{var s;if(!e.el){(s=e.cleanup)==null||s.call(e);return}Mo(n,e,r,o)}),e.target=t.element,r}function ko(e,t){return{floatingUIOptions:_t(e.floatingUIOptions||{},t.floatingUIOptions||{})}}function Ao(e){e.cleanup&&e.cleanup(),e.cleanup=null}function Mo(e,t,n,r){return Po(e,t.el,n).then(Do(t,r)).then(o=>new Promise(s=>{setTimeout(()=>s(o),300)})).then(o=>{o!=null&&o.el&&o.el.focus({preventScroll:!0})})}function Do(e,t){return({x:n,y:r,placement:o,middlewareData:s})=>(e.el&&(t?Object.assign(e.el.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}):Object.assign(e.el.style,{position:"absolute",left:`${n}px`,top:`${r}px`}),e.el.dataset.popperPlacement=o,Fo(e.el,s)),e)}function Fo(e,t){const n=e.querySelector(".shepherd-arrow");if(He(n)&&t.arrow){const{x:r,y:o}=t.arrow;Object.assign(n.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:""})}}function Lo(e,t){const n={strategy:"absolute"};n.middleware=[];const r=jo(t);return hn(e)||(n.middleware.push(To(),Oo({limiter:Ro(),crossAxis:!0})),r&&n.middleware.push(Co({element:r})),n.placement=e.on),_t(t.options.floatingUIOptions||{},n)}function jo(e){return e.options.arrow&&e.el?e.el.querySelector(".shepherd-arrow"):!1}function q(){}function Bo(e,t){for(const n in t)e[n]=t[n];return e}function Pn(e){return e()}function In(){return Object.create(null)}function Je(e){e.forEach(Pn)}function kt(e){return typeof e=="function"}function le(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function $o(e){return Object.keys(e).length===0}function De(e,t){e.appendChild(t)}function te(e,t,n){e.insertBefore(t,n||null)}function J(e){e.parentNode&&e.parentNode.removeChild(e)}function Wo(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function se(e){return document.createElement(e)}function kn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function An(e){return document.createTextNode(e)}function at(){return An(" ")}function No(){return An("")}function ct(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function k(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const Vo=["width","height"];function Mn(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)t[r]==null?e.removeAttribute(r):r==="style"?e.style.cssText=t[r]:r==="__value"?e.value=e[r]=t[r]:n[r]&&n[r].set&&Vo.indexOf(r)===-1?e[r]=t[r]:k(e,r,t[r])}function Uo(e){return Array.from(e.childNodes)}function Fe(e,t,n){e.classList.toggle(t,!!n)}let Ge;function Xe(e){Ge=e}function Dn(){if(!Ge)throw new Error("Function called outside component initialization");return Ge}function Ho(e){Dn().$$.on_mount.push(e)}function At(e){Dn().$$.after_update.push(e)}const Le=[],je=[];let Be=[];const Fn=[],Yo=Promise.resolve();let Mt=!1;function qo(){Mt||(Mt=!0,Yo.then(Ln))}function Dt(e){Be.push(e)}const Ft=new Set;let $e=0;function Ln(){if($e!==0)return;const e=Ge;do{try{for(;$e<Le.length;){const t=Le[$e];$e++,Xe(t),Ko(t.$$)}}catch(t){throw Le.length=0,$e=0,t}for(Xe(null),Le.length=0,$e=0;je.length;)je.pop()();for(let t=0;t<Be.length;t+=1){const n=Be[t];Ft.has(n)||(Ft.add(n),n())}Be.length=0}while(Le.length);for(;Fn.length;)Fn.pop()();Mt=!1,Ft.clear(),Xe(e)}function Ko(e){if(e.fragment!==null){e.update(),Je(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Dt)}}function zo(e){const t=[],n=[];Be.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Be=t}const lt=new Set;let Oe;function Te(){Oe={r:0,c:[],p:Oe}}function Ce(){Oe.r||Je(Oe.c),Oe=Oe.p}function I(e,t){e&&e.i&&(lt.delete(e),e.i(t))}function D(e,t,n,r){if(e&&e.o){if(lt.has(e))return;lt.add(e),Oe.c.push(()=>{lt.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}function jn(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Jo(e,t){const n={},r={},o={$$scope:1};let s=e.length;for(;s--;){const i=e[s],c=t[s];if(c){for(const l in i)l in c||(r[l]=1);for(const l in c)o[l]||(n[l]=c[l],o[l]=1);e[s]=c}else for(const l in i)o[l]=1}for(const i in r)i in n||(n[i]=void 0);return n}function Re(e){e&&e.c()}function ve(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),Dt(()=>{const s=e.$$.on_mount.map(Pn).filter(kt);e.$$.on_destroy?e.$$.on_destroy.push(...s):Je(s),e.$$.on_mount=[]}),o.forEach(Dt)}function we(e,t){const n=e.$$;n.fragment!==null&&(zo(n.after_update),Je(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Go(e,t){e.$$.dirty[0]===-1&&(Le.push(e),qo(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ue(e,t,n,r,o,s,i=null,c=[-1]){const l=Ge;Xe(e);const u=e.$$={fragment:null,ctx:[],props:s,update:q,not_equal:o,bound:In(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:In(),dirty:c,skip_bound:!1,root:t.target||l.$$.root};i&&i(u.root);let f=!1;if(u.ctx=n?n(e,t.props||{},(h,d,...m)=>{const y=m.length?m[0]:d;return u.ctx&&o(u.ctx[h],u.ctx[h]=y)&&(!u.skip_bound&&u.bound[h]&&u.bound[h](y),f&&Go(e,h)),d}):[],u.update(),f=!0,Je(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const h=Uo(t.target);u.fragment&&u.fragment.l(h),h.forEach(J)}else u.fragment&&u.fragment.c();t.intro&&I(e.$$.fragment),ve(e,t.target,t.anchor),Ln()}Xe(l)}class fe{constructor(){this.$$=void 0,this.$$set=void 0}$destroy(){we(this,1),this.$destroy=q}$on(t,n){if(!kt(n))return q;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(t){this.$$set&&!$o(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Xo="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Xo);function Zo(e){let t,n,r,o,s;return{c(){t=se("button"),k(t,"aria-label",n=e[3]?e[3]:null),k(t,"class",r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`),t.disabled=e[2],k(t,"tabindex","0"),k(t,"type","button")},m(i,c){te(i,t,c),t.innerHTML=e[5],o||(s=ct(t,"click",function(){kt(e[0])&&e[0].apply(this,arguments)}),o=!0)},p(i,[c]){e=i,c&32&&(t.innerHTML=e[5]),c&8&&n!==(n=e[3]?e[3]:null)&&k(t,"aria-label",n),c&18&&r!==(r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`)&&k(t,"class",r),c&4&&(t.disabled=e[2])},i:q,o:q,d(i){i&&J(t),o=!1,s()}}}function Qo(e,t,n){let{config:r,step:o}=t,s,i,c,l,u,f;function h(d){return me(d)?d=d.call(o):d}return e.$$set=d=>{"config"in d&&n(6,r=d.config),"step"in d&&n(7,o=d.step)},e.$$.update=()=>{e.$$.dirty&192&&(n(0,s=r.action?r.action.bind(o.tour):null),n(1,i=r.classes),n(2,c=r.disabled?h(r.disabled):!1),n(3,l=r.label?h(r.label):null),n(4,u=r.secondary),n(5,f=r.text?h(r.text):null))},[s,i,c,l,u,f,r,o]}class ei extends fe{constructor(t){super(),ue(this,t,Qo,Zo,le,{config:6,step:7})}}function Bn(e,t,n){const r=e.slice();return r[2]=t[n],r}function $n(e){let t,n,r=jn(e[1]),o=[];for(let i=0;i<r.length;i+=1)o[i]=Wn(Bn(e,r,i));const s=i=>D(o[i],1,1,()=>{o[i]=null});return{c(){for(let i=0;i<o.length;i+=1)o[i].c();t=No()},m(i,c){for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(i,c);te(i,t,c),n=!0},p(i,c){if(c&3){r=jn(i[1]);let l;for(l=0;l<r.length;l+=1){const u=Bn(i,r,l);o[l]?(o[l].p(u,c),I(o[l],1)):(o[l]=Wn(u),o[l].c(),I(o[l],1),o[l].m(t.parentNode,t))}for(Te(),l=r.length;l<o.length;l+=1)s(l);Ce()}},i(i){if(!n){for(let c=0;c<r.length;c+=1)I(o[c]);n=!0}},o(i){o=o.filter(Boolean);for(let c=0;c<o.length;c+=1)D(o[c]);n=!1},d(i){i&&J(t),Wo(o,i)}}}function Wn(e){let t,n;return t=new ei({props:{config:e[2],step:e[0]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&2&&(s.config=r[2]),o&1&&(s.step=r[0]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function ti(e){let t,n,r=e[1]&&$n(e);return{c(){t=se("footer"),r&&r.c(),k(t,"class","shepherd-footer")},m(o,s){te(o,t,s),r&&r.m(t,null),n=!0},p(o,[s]){o[1]?r?(r.p(o,s),s&2&&I(r,1)):(r=$n(o),r.c(),I(r,1),r.m(t,null)):r&&(Te(),D(r,1,1,()=>{r=null}),Ce())},i(o){n||(I(r),n=!0)},o(o){D(r),n=!1},d(o){o&&J(t),r&&r.d()}}}function ni(e,t,n){let r,{step:o}=t;return e.$$set=s=>{"step"in s&&n(0,o=s.step)},e.$$.update=()=>{e.$$.dirty&1&&n(1,r=o.options.buttons)},[o,r]}class ri extends fe{constructor(t){super(),ue(this,t,ni,ti,le,{step:0})}}function oi(e){let t,n,r,o,s;return{c(){t=se("button"),n=se("span"),n.textContent="×",k(n,"aria-hidden","true"),k(t,"aria-label",r=e[0].label?e[0].label:"Close Tour"),k(t,"class","shepherd-cancel-icon"),k(t,"type","button")},m(i,c){te(i,t,c),De(t,n),o||(s=ct(t,"click",e[1]),o=!0)},p(i,[c]){c&1&&r!==(r=i[0].label?i[0].label:"Close Tour")&&k(t,"aria-label",r)},i:q,o:q,d(i){i&&J(t),o=!1,s()}}}function ii(e,t,n){let{cancelIcon:r,step:o}=t;const s=i=>{i.preventDefault(),o.cancel()};return e.$$set=i=>{"cancelIcon"in i&&n(0,r=i.cancelIcon),"step"in i&&n(2,o=i.step)},[r,s,o]}class si extends fe{constructor(t){super(),ue(this,t,ii,oi,le,{cancelIcon:0,step:2})}}function ai(e){let t;return{c(){t=se("h3"),k(t,"id",e[1]),k(t,"class","shepherd-title")},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:q,o:q,d(n){n&&J(t),e[3](null)}}}function ci(e,t,n){let{labelId:r,element:o,title:s}=t;At(()=>{me(s)&&n(2,s=s()),n(0,o.innerHTML=s,o)});function i(c){je[c?"unshift":"push"](()=>{o=c,n(0,o)})}return e.$$set=c=>{"labelId"in c&&n(1,r=c.labelId),"element"in c&&n(0,o=c.element),"title"in c&&n(2,s=c.title)},[o,r,s,i]}class li extends fe{constructor(t){super(),ue(this,t,ci,ai,le,{labelId:1,element:0,title:2})}}function Nn(e){let t,n;return t=new li({props:{labelId:e[0],title:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&1&&(s.labelId=r[0]),o&4&&(s.title=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function Vn(e){let t,n;return t=new si({props:{cancelIcon:e[3],step:e[1]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&8&&(s.cancelIcon=r[3]),o&2&&(s.step=r[1]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function ui(e){let t,n,r,o=e[2]&&Nn(e),s=e[3]&&e[3].enabled&&Vn(e);return{c(){t=se("header"),o&&o.c(),n=at(),s&&s.c(),k(t,"class","shepherd-header")},m(i,c){te(i,t,c),o&&o.m(t,null),De(t,n),s&&s.m(t,null),r=!0},p(i,[c]){i[2]?o?(o.p(i,c),c&4&&I(o,1)):(o=Nn(i),o.c(),I(o,1),o.m(t,n)):o&&(Te(),D(o,1,1,()=>{o=null}),Ce()),i[3]&&i[3].enabled?s?(s.p(i,c),c&8&&I(s,1)):(s=Vn(i),s.c(),I(s,1),s.m(t,null)):s&&(Te(),D(s,1,1,()=>{s=null}),Ce())},i(i){r||(I(o),I(s),r=!0)},o(i){D(o),D(s),r=!1},d(i){i&&J(t),o&&o.d(),s&&s.d()}}}function fi(e,t,n){let{labelId:r,step:o}=t,s,i;return e.$$set=c=>{"labelId"in c&&n(0,r=c.labelId),"step"in c&&n(1,o=c.step)},e.$$.update=()=>{e.$$.dirty&2&&(n(2,s=o.options.title),n(3,i=o.options.cancelIcon))},[r,o,s,i]}class di extends fe{constructor(t){super(),ue(this,t,fi,ui,le,{labelId:0,step:1})}}function hi(e){let t;return{c(){t=se("div"),k(t,"class","shepherd-text"),k(t,"id",e[1])},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:q,o:q,d(n){n&&J(t),e[3](null)}}}function pi(e,t,n){let{descriptionId:r,element:o,step:s}=t;At(()=>{let{text:c}=s.options;me(c)&&(c=c.call(s)),He(c)?o.appendChild(c):n(0,o.innerHTML=c,o)});function i(c){je[c?"unshift":"push"](()=>{o=c,n(0,o)})}return e.$$set=c=>{"descriptionId"in c&&n(1,r=c.descriptionId),"element"in c&&n(0,o=c.element),"step"in c&&n(2,s=c.step)},[o,r,s,i]}class mi extends fe{constructor(t){super(),ue(this,t,pi,hi,le,{descriptionId:1,element:0,step:2})}}function Un(e){let t,n;return t=new di({props:{labelId:e[1],step:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&2&&(s.labelId=r[1]),o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function Hn(e){let t,n;return t=new mi({props:{descriptionId:e[0],step:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&1&&(s.descriptionId=r[0]),o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function Yn(e){let t,n;return t=new ri({props:{step:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function gi(e){let t,n=!N(e[2].options.title)||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled,r,o=!N(e[2].options.text),s,i=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length,c,l=n&&Un(e),u=o&&Hn(e),f=i&&Yn(e);return{c(){t=se("div"),l&&l.c(),r=at(),u&&u.c(),s=at(),f&&f.c(),k(t,"class","shepherd-content")},m(h,d){te(h,t,d),l&&l.m(t,null),De(t,r),u&&u.m(t,null),De(t,s),f&&f.m(t,null),c=!0},p(h,[d]){d&4&&(n=!N(h[2].options.title)||h[2].options.cancelIcon&&h[2].options.cancelIcon.enabled),n?l?(l.p(h,d),d&4&&I(l,1)):(l=Un(h),l.c(),I(l,1),l.m(t,r)):l&&(Te(),D(l,1,1,()=>{l=null}),Ce()),d&4&&(o=!N(h[2].options.text)),o?u?(u.p(h,d),d&4&&I(u,1)):(u=Hn(h),u.c(),I(u,1),u.m(t,s)):u&&(Te(),D(u,1,1,()=>{u=null}),Ce()),d&4&&(i=Array.isArray(h[2].options.buttons)&&h[2].options.buttons.length),i?f?(f.p(h,d),d&4&&I(f,1)):(f=Yn(h),f.c(),I(f,1),f.m(t,null)):f&&(Te(),D(f,1,1,()=>{f=null}),Ce())},i(h){c||(I(l),I(u),I(f),c=!0)},o(h){D(l),D(u),D(f),c=!1},d(h){h&&J(t),l&&l.d(),u&&u.d(),f&&f.d()}}}function bi(e,t,n){let{descriptionId:r,labelId:o,step:s}=t;return e.$$set=i=>{"descriptionId"in i&&n(0,r=i.descriptionId),"labelId"in i&&n(1,o=i.labelId),"step"in i&&n(2,s=i.step)},[r,o,s]}class yi extends fe{constructor(t){super(),ue(this,t,bi,gi,le,{descriptionId:0,labelId:1,step:2})}}function qn(e){let t;return{c(){t=se("div"),k(t,"class","shepherd-arrow"),k(t,"data-popper-arrow","")},m(n,r){te(n,t,r)},d(n){n&&J(t)}}}function vi(e){let t,n,r,o,s,i,c,l,u=e[4].options.arrow&&e[4].options.attachTo&&e[4].options.attachTo.element&&e[4].options.attachTo.on&&qn();r=new yi({props:{descriptionId:e[2],labelId:e[3],step:e[4]}});let f=[{"aria-describedby":o=N(e[4].options.text)?null:e[2]},{"aria-labelledby":s=e[4].options.title?e[3]:null},e[1],{role:"dialog"},{tabindex:"0"}],h={};for(let d=0;d<f.length;d+=1)h=Bo(h,f[d]);return{c(){t=se("div"),u&&u.c(),n=at(),Re(r.$$.fragment),Mn(t,h),Fe(t,"shepherd-has-cancel-icon",e[5]),Fe(t,"shepherd-has-title",e[6]),Fe(t,"shepherd-element",!0)},m(d,m){te(d,t,m),u&&u.m(t,null),De(t,n),ve(r,t,null),e[13](t),i=!0,c||(l=ct(t,"keydown",e[7]),c=!0)},p(d,[m]){d[4].options.arrow&&d[4].options.attachTo&&d[4].options.attachTo.element&&d[4].options.attachTo.on?u||(u=qn(),u.c(),u.m(t,n)):u&&(u.d(1),u=null);const y={};m&4&&(y.descriptionId=d[2]),m&8&&(y.labelId=d[3]),m&16&&(y.step=d[4]),r.$set(y),Mn(t,h=Jo(f,[(!i||m&20&&o!==(o=N(d[4].options.text)?null:d[2]))&&{"aria-describedby":o},(!i||m&24&&s!==(s=d[4].options.title?d[3]:null))&&{"aria-labelledby":s},m&2&&d[1],{role:"dialog"},{tabindex:"0"}])),Fe(t,"shepherd-has-cancel-icon",d[5]),Fe(t,"shepherd-has-title",d[6]),Fe(t,"shepherd-element",!0)},i(d){i||(I(r.$$.fragment,d),i=!0)},o(d){D(r.$$.fragment,d),i=!1},d(d){d&&J(t),u&&u.d(),we(r),e[13](null),c=!1,l()}}}const wi=9,_i=27,Ei=37,xi=39;function Kn(e){return e.split(" ").filter(t=>!!t.length)}function Si(e,t,n){let{classPrefix:r,element:o,descriptionId:s,firstFocusableElement:i,focusableElements:c,labelId:l,lastFocusableElement:u,step:f,dataStepId:h}=t,d,m,y;const E=()=>o;Ho(()=>{n(1,h={[`data-${r}shepherd-step-id`]:f.id}),n(9,c=o.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,i=c[0]),n(10,u=c[c.length-1])}),At(()=>{y!==f.options.classes&&S()});function S(){w(y),y=f.options.classes,_(y)}function w(g){if(Ye(g)){const C=Kn(g);C.length&&o.classList.remove(...C)}}function _(g){if(Ye(g)){const C=Kn(g);C.length&&o.classList.add(...C)}}const T=g=>{const{tour:C}=f;switch(g.keyCode){case wi:if(c.length===0){g.preventDefault();break}g.shiftKey?(document.activeElement===i||document.activeElement.classList.contains("shepherd-element"))&&(g.preventDefault(),u.focus()):document.activeElement===u&&(g.preventDefault(),i.focus());break;case _i:C.options.exitOnEsc&&(g.preventDefault(),g.stopPropagation(),f.cancel());break;case Ei:C.options.keyboardNavigation&&(g.preventDefault(),g.stopPropagation(),C.back());break;case xi:C.options.keyboardNavigation&&(g.preventDefault(),g.stopPropagation(),C.next());break}};function v(g){je[g?"unshift":"push"](()=>{o=g,n(0,o)})}return e.$$set=g=>{"classPrefix"in g&&n(11,r=g.classPrefix),"element"in g&&n(0,o=g.element),"descriptionId"in g&&n(2,s=g.descriptionId),"firstFocusableElement"in g&&n(8,i=g.firstFocusableElement),"focusableElements"in g&&n(9,c=g.focusableElements),"labelId"in g&&n(3,l=g.labelId),"lastFocusableElement"in g&&n(10,u=g.lastFocusableElement),"step"in g&&n(4,f=g.step),"dataStepId"in g&&n(1,h=g.dataStepId)},e.$$.update=()=>{e.$$.dirty&16&&(n(5,d=f.options&&f.options.cancelIcon&&f.options.cancelIcon.enabled),n(6,m=f.options&&f.options.title))},[o,h,s,l,f,d,m,T,i,c,u,r,E,v]}class Oi extends fe{constructor(t){super(),ue(this,t,Si,vi,le,{classPrefix:11,element:0,descriptionId:2,firstFocusableElement:8,focusableElements:9,labelId:3,lastFocusableElement:10,step:4,dataStepId:1,getElement:12})}get getElement(){return this.$$.ctx[12]}}class Lt extends vt{constructor(t,n={}){return super(),this.tour=t,this.classPrefix=this.tour.options?dn(this.tour.options.classPrefix):"",this.styles=t.styles,this._resolvedAttachTo=null,fn(this),this._setOptions(n),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){Ao(this),He(this.el)&&(this.el.remove(),this.el=null),this._updateStepTargetOnHide(),this.trigger("destroy")}getTour(){return this.tour}hide(){var t;(t=this.tour.modal)==null||t.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this._updateStepTargetOnHide(),this.trigger("hide")}_resolveAttachToOptions(){return this._resolvedAttachTo=Hr(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return this._resolvedAttachTo===null?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return!!(this.el&&!this.el.hidden)}show(){return me(this.options.beforeShowPromise)?Promise.resolve(this.options.beforeShowPromise()).then(()=>this._show()):Promise.resolve(this._show())}updateStepOptions(t){Object.assign(this.options,t),this.shepherdElementComponent&&this.shepherdElementComponent.$set({step:this})}getElement(){return this.el}getTarget(){return this.target}_createTooltipContent(){const t=`${this.id}-description`,n=`${this.id}-label`;return this.shepherdElementComponent=new Oi({target:this.tour.options.stepsContainer||document.body,props:{classPrefix:this.classPrefix,descriptionId:t,labelId:n,step:this,styles:this.styles}}),this.shepherdElementComponent.getElement()}_scrollTo(t){const{element:n}=this._getResolvedAttachToOptions();me(this.options.scrollToHandler)?this.options.scrollToHandler(n):Sr(n)&&typeof n.scrollIntoView=="function"&&n.scrollIntoView(t)}_getClassOptions(t){const n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,r=t.classes?t.classes:"",o=n&&n.classes?n.classes:"",s=[...r.split(" "),...o.split(" ")],i=new Set(s);return Array.from(i).join(" ").trim()}_setOptions(t={}){let n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;n=_t({},n||{}),this.options=Object.assign({arrow:!0},n,t,ko(n,t));const{when:r}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${pn()}`,r&&Object.keys(r).forEach(o=>{this.on(o,r[o],this)})}_setupElements(){N(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&Nr(this),Io(this)}_show(){var r;this.trigger("before-show"),this._resolveAttachToOptions(),this._setupElements(),this.tour.modal||this.tour.setupModal(),(r=this.tour.modal)==null||r.setupForStep(this),this._styleTargetElementForStep(this),this.el&&(this.el.hidden=!1),this.options.scrollTo&&setTimeout(()=>{this._scrollTo(this.options.scrollTo)}),this.el&&(this.el.hidden=!1);const t=this.shepherdElementComponent.getElement(),n=this.target||document.body;n.classList.add(`${this.classPrefix}shepherd-enabled`),n.classList.add(`${this.classPrefix}shepherd-target`),t.classList.add("shepherd-enabled"),this.trigger("show")}_styleTargetElementForStep(t){const n=t.target;n&&(t.options.highlightClass&&n.classList.add(t.options.highlightClass),n.classList.remove("shepherd-target-click-disabled"),t.options.canClickTarget===!1&&n.classList.add("shepherd-target-click-disabled"))}_updateStepTargetOnHide(){const t=this.target||document.body;this.options.highlightClass&&t.classList.remove(this.options.highlightClass),t.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}}function Ti(e){let t={};if(e.navigator){const n=e.navigator.userAgent;t={...t,$os:Ri(e),$browser:zn(n,e.navigator.vendor,!!e.opera),$referrer:e.document.referrer,$referring_domain:Ii(e.document.referrer),$device:Pi(n),$current_url:e.location.href,$host:e.location.host,$pathname:e.location.pathname,$browser_version:Ci(n,e.navigator.vendor,!!e.opera),$screen_height:e.screen.height,$screen_width:e.screen.width,$screen_dpr:e.devicePixelRatio}}return t={...t,$lib:"js",$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:new Date().getTime()/1e3},t}function F(e,t){return e.indexOf(t)>=0}function zn(e,t,n){return t=t||"",n||F(e," OPR/")?F(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":F(e,"IEMobile")||F(e,"WPDesktop")?"Internet Explorer Mobile":F(e,"SamsungBrowser/")?"Samsung Internet":F(e,"Edge")||F(e,"Edg/")?"Microsoft Edge":F(e,"FBIOS")?"Facebook Mobile":F(e,"Chrome")?"Chrome":F(e,"CriOS")?"Chrome iOS":F(e,"UCWEB")||F(e,"UCBrowser")?"UC Browser":F(e,"FxiOS")?"Firefox iOS":F(t,"Apple")?F(e,"Mobile")?"Mobile Safari":"Safari":F(e,"Android")?"Android Mobile":F(e,"Konqueror")?"Konqueror":F(e,"Firefox")?"Firefox":F(e,"MSIE")||F(e,"Trident/")?"Internet Explorer":F(e,"Gecko")?"Mozilla":""}function Ci(e,t,n){const r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/},o=zn(e,t,n),s=r[o]||void 0;if(s===void 0)return null;const i=e.match(s);return i?parseFloat(i[i.length-2]):null}function Ri(e){const t=e.navigator.userAgent;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""}function Pi(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""}function Ii(e){const t=e.split("/");return t.length>=3?t[2]:""}function ki(e){if(e){const{steps:t}=e;t.forEach(n=>{n.options&&n.options.canClickTarget===!1&&n.options.attachTo&&He(n.target)&&n.target.classList.remove("shepherd-target-click-disabled")})}}const jt=(e,t)=>t.some(n=>e instanceof n);let Jn,Gn;function Ai(){return Jn||(Jn=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Mi(){return Gn||(Gn=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Bt=new WeakMap,$t=new WeakMap,ut=new WeakMap;function Di(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{n(Pe(e.result)),o()},i=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",i)});return ut.set(t,e),t}function Fi(e){if(Bt.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{n(),o()},i=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)});Bt.set(e,t)}let Wt={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Bt.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Pe(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Xn(e){Wt=e(Wt)}function Li(e){return Mi().includes(e)?function(...t){return e.apply(Nt(this),t),Pe(this.request)}:function(...t){return Pe(e.apply(Nt(this),t))}}function ji(e){return typeof e=="function"?Li(e):(e instanceof IDBTransaction&&Fi(e),jt(e,Ai())?new Proxy(e,Wt):e)}function Pe(e){if(e instanceof IDBRequest)return Di(e);if($t.has(e))return $t.get(e);const t=ji(e);return t!==e&&($t.set(e,t),ut.set(t,e)),t}const Nt=e=>ut.get(e);function Bi(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),c=Pe(i);return r&&i.addEventListener("upgradeneeded",l=>{r(Pe(i.result),l.oldVersion,l.newVersion,Pe(i.transaction),l)}),n&&i.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),c.then(l=>{s&&l.addEventListener("close",()=>s()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),c}const $i=["get","getKey","getAll","getAllKeys","count"],Wi=["put","add","delete","clear"],Vt=new Map;function Zn(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Vt.get(t))return Vt.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Wi.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||$i.includes(n)))return;const s=async function(c,...l){const u=this.transaction(c,o?"readwrite":"readonly");let f=u.store;return r&&(f=f.index(l.shift())),(await Promise.all([f[n](...l),o&&u.done]))[0]};return Vt.set(t,s),s}Xn(e=>j({},e,{get:(t,n,r)=>Zn(t,n)||e.get(t,n,r),has:(t,n)=>!!Zn(t,n)||e.has(t,n)}));const Ni=["continue","continuePrimaryKey","advance"],Qn={},Ut=new WeakMap,er=new WeakMap,Vi={get(e,t){if(!Ni.includes(t))return e[t];let n=Qn[t];return n||(n=Qn[t]=function(...r){Ut.set(this,er.get(this)[t](...r))}),n}};function Ui(){return Ht.apply(this,arguments)}function Ht(){return Ht=Or(function*(...e){let t=this;if(t instanceof IDBCursor||(t=yield rn(t.openCursor(...e))),!t)return;t=t;const n=new Proxy(t,Vi);for(er.set(n,t),ut.set(n,Nt(t));t;)yield n,t=yield rn(Ut.get(n)||t.continue()),Ut.delete(n)}),Ht.apply(this,arguments)}function tr(e,t){return t===Symbol.asyncIterator&&jt(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&jt(e,[IDBIndex,IDBObjectStore])}Xn(e=>j({},e,{get(t,n,r){return tr(t,n)?Ui:e.get(t,n,r)},has(t,n){return tr(t,n)||e.has(t,n)}}));class Hi{constructor(t,n,r){if(!t)throw new Error("Shepherd Pro: Missing required apiKey option.");if(!n)throw new Error("Shepherd Pro: Missing required apiPath option.");this.apiKey=t,this.apiPath=n,this.properties=r}async getTourState(){try{const t=await fetch(`${this.apiPath}/api/v1/state`,{headers:{Authorization:`ApiKey ${this.apiKey}`,"Content-Type":"application/json"},method:"GET"});if(!t.ok)throw new Error("Could not fetch state for tours 🐑");const{data:n}=await t.json();if(this.tourStateDb=await Bi("TourState",1,{upgrade(r){r.createObjectStore("tours",{keyPath:"uniqueId"})}}),Array.isArray(n)&&n.length){const r=this.tourStateDb.transaction("tours","readwrite"),o=n.map(s=>r.store.put(s));await Promise.all([...o,r.done])}}catch(t){throw new Error("Error fetching data: "+(t instanceof Error?t.message:"Unknown error"))}}async sendEvents(t){t.data.properties=this.properties;try{const n=await fetch(`${this.apiPath}/api/v1/actor`,{headers:{Authorization:`ApiKey ${this.apiKey}`,"Content-Type":"application/json"},method:"POST",body:JSON.stringify(t)});if(!n.ok)throw new Error("Could not create an event 🐑");const{data:r}=await n.json();return r}catch(n){throw new Error("Error fetching data: "+(n instanceof Error?n.message:"Unknown error"))}}}function Yi({width:e,height:t,x:n=0,y:r=0,r:o=0}){const{innerWidth:s,innerHeight:i}=window,{topLeft:c=0,topRight:l=0,bottomRight:u=0,bottomLeft:f=0}=typeof o=="number"?{topLeft:o,topRight:o,bottomRight:o,bottomLeft:o}:o;return`M${s},${i}H0V0H${s}V${i}ZM${n+c},${r}a${c},${c},0,0,0-${c},${c}V${t+r-f}a${f},${f},0,0,0,${f},${f}H${e+n-u}a${u},${u},0,0,0,${u}-${u}V${r+l}a${l},${l},0,0,0-${l}-${l}Z`}function qi(e){let t,n,r,o,s;return{c(){t=kn("svg"),n=kn("path"),k(n,"d",e[2]),k(t,"class",r=`${e[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(i,c){te(i,t,c),De(t,n),e[11](t),o||(s=ct(t,"touchmove",e[3]),o=!0)},p(i,[c]){c&4&&k(n,"d",i[2]),c&2&&r!==(r=`${i[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&k(t,"class",r)},i:q,o:q,d(i){i&&J(t),e[11](null),o=!1,s()}}}function nr(e){if(!e)return null;const n=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return n!=="hidden"&&n!=="visible"&&e.scrollHeight>=e.clientHeight?e:nr(e.parentElement)}function Ki(e){let t={top:0,left:0};if(!e)return t;let n=e.ownerDocument.defaultView;for(;n!==window.top;){var r;const i=(r=n)==null?void 0:r.frameElement;if(i){var o,s;const c=i.getBoundingClientRect();t.top+=c.top+((o=c.scrollTop)!=null?o:0),t.left+=c.left+((s=c.scrollLeft)!=null?s:0)}n=n.parent}return t}function zi(e,t){const n=e.getBoundingClientRect();let r=n.y||n.top,o=n.bottom||r+n.height;if(t){const i=t.getBoundingClientRect(),c=i.y||i.top,l=i.bottom||c+i.height;r=Math.max(r,c),o=Math.min(o,l)}const s=Math.max(o-r,0);return{y:r,height:s}}function Ji(e,t,n){let{element:r,openingProperties:o}=t,s=!1,i,c;u();const l=()=>r;function u(){n(4,o={width:0,height:0,x:0,y:0,r:0})}function f(){n(1,s=!1),w()}function h(v=0,g=0,C=0,V=0,re,$){if($){const{y:H,height:G}=zi($,re),{x:X,width:W,left:M}=$.getBoundingClientRect();n(4,o={width:W+v*2,height:G+v*2,x:(X||M)+C-v,y:H+V-v,r:g})}else u()}function d(v){w(),v.tour.options.useModalOverlay?(_(v),m()):f()}function m(){n(1,s=!0)}const y=v=>{v.preventDefault()},E=v=>{v.stopPropagation()};function S(){window.addEventListener("touchmove",y,{passive:!1})}function w(){i&&(cancelAnimationFrame(i),i=void 0),window.removeEventListener("touchmove",y,{passive:!1})}function _(v){const{modalOverlayOpeningPadding:g,modalOverlayOpeningRadius:C,modalOverlayOpeningXOffset:V=0,modalOverlayOpeningYOffset:re=0}=v.options,$=Ki(v.target),H=nr(v.target),G=()=>{i=void 0,h(g,C,V+$.left,re+$.top,H,v.target),i=requestAnimationFrame(G)};G(),S()}function T(v){je[v?"unshift":"push"](()=>{r=v,n(0,r)})}return e.$$set=v=>{"element"in v&&n(0,r=v.element),"openingProperties"in v&&n(4,o=v.openingProperties)},e.$$.update=()=>{e.$$.dirty&16&&n(2,c=Yi(o))},[r,s,c,E,o,l,u,f,h,d,m,T]}class Gi extends fe{constructor(t){super(),ue(this,t,Ji,qi,le,{element:0,openingProperties:4,getElement:5,closeModalOpening:6,hide:7,positionModal:8,setupForStep:9,show:10})}get getElement(){return this.$$.ctx[5]}get closeModalOpening(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[7]}get positionModal(){return this.$$.ctx[8]}get setupForStep(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}}const Xi="https://shepherdpro.com",Yt="shepherdPro:userId";class Zi extends vt{constructor(){super(...arguments),this.isProEnabled=!1}async init(t,n,r){if(!t)throw new Error("Shepherd Pro: Missing required apiKey option.");if(this.apiKey=t,this.apiPath=n??Xi,this.properties=r??{},this.properties.context=Ti(window),this.apiKey){this.dataRequester=new Hi(this.apiKey,this.apiPath,this.properties),this.isProEnabled=!0;const o=localStorage.getItem(Yt),s=[this.dataRequester.getTourState()];o||s.push(this.createNewActor()),await Promise.all(s)}}async createNewActor(){if(!this.dataRequester)return;const t=await this.dataRequester.sendEvents({data:{currentUserId:null,eventType:"setup"}});localStorage.setItem(Yt,String(t.actorId))}async isTourEnabled(t){var r;if(!this.dataRequester)return;const n=await((r=this.dataRequester.tourStateDb)==null?void 0:r.get("tours",t));return(n==null?void 0:n.isActive)??!0}}class Qi extends vt{constructor(t={}){super(),this.trackedEvents=["active","cancel","complete","show"],fn(this);const n={exitOnEsc:!0,keyboardNavigation:!0};this.options=Object.assign({},n,t),this.classPrefix=dn(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),["active","cancel","complete","inactive","show","start"].map(s=>{(i=>{this.on(i,c=>{c=c||{},c.tour=this,ne.trigger(i,c)})})(s)}),this._setTourID(t.id);const{dataRequester:o}=ne;return o&&this.trackedEvents.forEach(s=>this.on(s,i=>{const{tour:c}=i,{id:l,steps:u}=c;let f;if(s!=="active"){const{step:d}=i;d&&(f=u.findIndex(m=>m.id===d.id)+1)}const h={currentUserId:localStorage.getItem(Yt),eventType:s,journeyData:{id:l,currentStep:f,numberOfSteps:u.length,tourOptions:c.options}};o.sendEvents({data:h})})),this}addStep(t,n){let r=t;return r instanceof Lt?r.tour=this:r=new Lt(this,r),N(n)?this.steps.push(r):this.steps.splice(n,0,r),r}addSteps(t){return Array.isArray(t)&&t.forEach(n=>{this.addStep(n)}),this}back(){const t=this.steps.indexOf(this.currentStep);this.show(t-1,!1)}async cancel(){if(this.options.confirmCancel){const t=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";let n;me(this.options.confirmCancel)?n=await this.options.confirmCancel():n=window.confirm(t),n&&this._done("cancel")}else this._done("cancel")}complete(){this._done("complete")}getById(t){return this.steps.find(n=>n.id===t)}getCurrentStep(){return this.currentStep}hide(){const t=this.getCurrentStep();if(t)return t.hide()}isActive(){return ne.activeTour===this}next(){const t=this.steps.indexOf(this.currentStep);t===this.steps.length-1?this.complete():this.show(t+1,!0)}removeStep(t){const n=this.getCurrentStep();this.steps.some((r,o)=>{if(r.id===t)return r.isOpen()&&r.hide(),r.destroy(),this.steps.splice(o,1),!0}),n&&n.id===t&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(t=0,n=!0){const r=Ye(t)?this.getById(t):this.steps[t];r&&(this._updateStateBeforeShow(),me(r.options.showOn)&&!r.options.showOn()?this._skipStep(r,n):(this.trigger("show",{step:r,previous:this.currentStep}),this.currentStep=r,r.show()))}async start(){ne.isProEnabled&&!await ne.isTourEnabled(this.options.id)||(this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this.setupModal(),this._setupActiveTour(),this.next())}_done(t){const n=this.steps.indexOf(this.currentStep);if(Array.isArray(this.steps)&&this.steps.forEach(r=>r.destroy()),ki(this),this.trigger(t,{index:n}),ne.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),(t==="cancel"||t==="complete")&&this.modal){const r=document.querySelector(".shepherd-modal-overlay-container");r&&(r.remove(),this.modal=null)}He(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),ne.activeTour=this}setupModal(){this.modal=new Gi({target:this.options.modalContainer||document.body,props:{styles:this.styles}})}_skipStep(t,n){const r=this.steps.indexOf(t);if(r===this.steps.length-1)this.complete();else{const o=n?r+1:r-1;this.show(o,n)}}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(t){const n=this.options.tourName||"tour",r=t||pn();this.id=`${n}--${r}`}}const ne=new Zi,rr=typeof window>"u";ne.Step=rr?Vr:Lt,ne.Tour=rr?Ur:Qi;const ft=pe.createContext(void 0),es=ft.Consumer,ts=()=>{const e=pe.useContext(ft);if(!e)throw new Error("useShepherd must be used within a ShepherdJourneyProvider");const{Shepherd:t}=e;return t},ns=({apiKey:e,apiPath:t,properties:n,children:r})=>(typeof window<"u"&&ne.init(e,t,n),xr.jsx(ft.Provider,{value:{Shepherd:ne},children:r}));oe.JourneyMethods=es,oe.ShepherdJourneyContext=ft,oe.ShepherdJourneyProvider=ns,oe.useShepherd=ts,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})});
27
+ Check the top-level render call using <`+b+">.")}return p}}function br(a,p){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var b=_s(p);if(gr[b])return;gr[b]=!0;var x="";a&&a._owner&&a._owner!==Xt.current&&(x=" It was passed a child from "+W(a._owner.type)+"."),We(a),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',b,x),We(null)}}function yr(a,p){{if(typeof a!="object")return;if(Jt(a))for(var b=0;b<a.length;b++){var x=a[b];Qt(x)&&br(x,p)}else if(Qt(a))a._store&&(a._store.validated=!0);else if(a){var P=S(a);if(typeof P=="function"&&P!==a.entries)for(var A=P.call(a),R;!(R=A.next()).done;)Qt(R.value)&&br(R.value,p)}}}function Es(a){{var p=a.type;if(p==null||typeof p=="string")return;var b;if(typeof p=="function")b=p.propTypes;else if(typeof p=="object"&&(p.$$typeof===l||p.$$typeof===h))b=p.propTypes;else return;if(b){var x=W(p);cs(b,a.props,"prop",x,a)}else if(p.PropTypes!==void 0&&!Zt){Zt=!0;var P=W(p);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",P||"Unknown")}typeof p.getDefaultProps=="function"&&!p.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xs(a){{for(var p=Object.keys(a.props),b=0;b<p.length;b++){var x=p[b];if(x!=="children"&&x!=="key"){We(a),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",x),We(null);break}}a.ref!==null&&(We(a),_("Invalid attribute `ref` supplied to `React.Fragment`."),We(null))}}function vr(a,p,b,x,P,A){{var R=H(a);if(!R){var O="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(O+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var U=ws(P);U?O+=U:O+=mr();var L;a===null?L="null":Jt(a)?L="array":a!==void 0&&a.$$typeof===t?(L="<"+(W(a.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):L=typeof a,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",L,O)}var B=vs(a,p,b,P,A);if(B==null)return B;if(R){var ee=p.children;if(ee!==void 0)if(x)if(Jt(ee)){for(var Ne=0;Ne<ee.length;Ne++)yr(ee[Ne],a);Object.freeze&&Object.freeze(ee)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else yr(ee,a)}return a===r?xs(B):Es(B),B}}function Ss(a,p,b){return vr(a,p,b,!0)}function Os(a,p,b){return vr(a,p,b,!1)}var Ts=Os,Cs=Ss;Ue.Fragment=r,Ue.jsx=Ts,Ue.jsxs=Cs}()),Ue}process.env.NODE_ENV==="production"?yt.exports=_r():yt.exports=Er();var xr=yt.exports;/*! shepherd.js 12.0.3 */function Sr(e){return e instanceof Element}function He(e){return e instanceof HTMLElement}function me(e){return typeof e=="function"}function Ye(e){return typeof e=="string"}function N(e){return e===void 0}class vt{on(t,n,r,o=!1){var s;return N(this.bindings)&&(this.bindings={}),N(this.bindings[t])&&(this.bindings[t]=[]),(s=this.bindings[t])==null||s.push({handler:n,ctx:r,once:o}),this}once(t,n,r){return this.on(t,n,r,!0)}off(t,n){var r;return N(this.bindings)||N(this.bindings[t])?this:(N(n)?delete this.bindings[t]:(r=this.bindings[t])==null||r.forEach((o,s)=>{var i;o.handler===n&&((i=this.bindings[t])==null||i.splice(s,1))}),this)}trigger(t,...n){var r;return!N(this.bindings)&&this.bindings[t]&&((r=this.bindings[t])==null||r.forEach((o,s)=>{var f;const{ctx:i,handler:c,once:l}=o,u=i||this;c.apply(u,n),l&&((f=this.bindings[t])==null||f.splice(s,1))})),this}}function qe(e){var t,n;function r(s,i){try{var c=e[s](i),l=c.value,u=l instanceof nn;Promise.resolve(u?l.v:l).then(function(f){if(u){var h=s==="return"?"return":"next";if(!l.k||f.done)return r(h,f);f=e[h](f).value}o(c.done?"return":"normal",f)},function(f){r("throw",f)})}catch(f){o("throw",f)}}function o(s,i){switch(s){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(s,i){return new Promise(function(c,l){var u={key:s,arg:i,resolve:c,reject:l,next:null};n?n=n.next=u:(t=n=u,r(s,i))})},typeof e.return!="function"&&(this.return=void 0)}qe.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},qe.prototype.next=function(e){return this._invoke("next",e)},qe.prototype.throw=function(e){return this._invoke("throw",e)},qe.prototype.return=function(e){return this._invoke("return",e)};function nn(e,t){this.v=e,this.k=t}function rn(e){return new nn(e,0)}function Or(e){return function(){return new qe(e.apply(this,arguments))}}function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}function on(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const ge={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};ge.defaultMerge;function Tr(e,t){return t}function sn(e){return typeof e!="object"||e===null?0:Array.isArray(e)?2:Pr(e)?1:e instanceof Set?3:e instanceof Map?4:5}function Cr(e){const t=new Set;for(const n of e)for(const r of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])t.add(r);return t}function Rr(e,t){return typeof e=="object"&&Object.prototype.propertyIsEnumerable.call(e,t)}function an(e){return{*[Symbol.iterator](){for(const t of e)for(const n of t)yield n}}}const cn=new Set(["[object Object]","[object Module]"]);function Pr(e){if(!cn.has(Object.prototype.toString.call(e)))return!1;const{constructor:t}=e;if(t===void 0)return!0;const n=t.prototype;return!(n===null||typeof n!="object"||!cn.has(Object.prototype.toString.call(n))||!n.hasOwnProperty("isPrototypeOf"))}function Ir(e,t,n){const r={};for(const o of Cr(e)){const s=[];for(const l of e)Rr(l,o)&&s.push(l[o]);if(s.length===0)continue;const i=t.metaDataUpdater(n,{key:o,parents:e}),c=un(s,t,i);c!==ge.skip&&(o==="__proto__"?Object.defineProperty(r,o,{value:c,configurable:!0,enumerable:!0,writable:!0}):r[o]=c)}return r}function kr(e){return e.flat()}function Ar(e){return new Set(an(e))}function Mr(e){return new Map(an(e))}function ln(e){return e.at(-1)}var wt=Object.freeze({__proto__:null,mergeArrays:kr,mergeMaps:Mr,mergeOthers:ln,mergeRecords:Ir,mergeSets:Ar});function _t(...e){return Dr({})(...e)}function Dr(e,t){const n=Fr(e,r);function r(...o){return un(o,n,t)}return r}function Fr(e,t){var n,r;return{defaultMergeFunctions:wt,mergeFunctions:j({},wt,Object.fromEntries(Object.entries(e).filter(([o,s])=>Object.hasOwn(wt,o)).map(([o,s])=>s===!1?[o,ln]:[o,s]))),metaDataUpdater:(n=e.metaDataUpdater)!=null?n:Tr,deepmerge:t,useImplicitDefaultMerging:(r=e.enableImplicitDefaultMerging)!=null?r:!1,actions:ge}}function un(e,t,n){if(e.length===0)return;if(e.length===1)return Et(e,t,n);const r=sn(e[0]);if(r!==0&&r!==5){for(let o=1;o<e.length;o++)if(sn(e[o])!==r)return Et(e,t,n)}switch(r){case 1:return Lr(e,t,n);case 2:return jr(e,t,n);case 3:return Br(e,t,n);case 4:return $r(e,t,n);default:return Et(e,t,n)}}function Lr(e,t,n){const r=t.mergeFunctions.mergeRecords(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeRecords!==t.defaultMergeFunctions.mergeRecords?t.defaultMergeFunctions.mergeRecords(e,t,n):r}function jr(e,t,n){const r=t.mergeFunctions.mergeArrays(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeArrays!==t.defaultMergeFunctions.mergeArrays?t.defaultMergeFunctions.mergeArrays(e):r}function Br(e,t,n){const r=t.mergeFunctions.mergeSets(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeSets!==t.defaultMergeFunctions.mergeSets?t.defaultMergeFunctions.mergeSets(e):r}function $r(e,t,n){const r=t.mergeFunctions.mergeMaps(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeMaps!==t.defaultMergeFunctions.mergeMaps?t.defaultMergeFunctions.mergeMaps(e):r}function Et(e,t,n){const r=t.mergeFunctions.mergeOthers(e,t,n);return r===ge.defaultMerge||t.useImplicitDefaultMerging&&r===void 0&&t.mergeFunctions.mergeOthers!==t.defaultMergeFunctions.mergeOthers?t.defaultMergeFunctions.mergeOthers(e):r}function fn(e){const t=Object.getOwnPropertyNames(e.constructor.prototype);for(let n=0;n<t.length;n++){const r=t[n],o=e[r];r!=="constructor"&&typeof o=="function"&&(e[r]=o.bind(e))}return e}function Wr(e,t){return n=>{if(e.isOpen()){const r=e.el&&n.currentTarget===e.el;(!N(t)&&n.currentTarget.matches(t)||r)&&e.tour.next()}}}function Nr(e){const{event:t,selector:n}=e.options.advanceOn||{};if(t){const r=Wr(e,n);let o=null;if(!N(n)&&(o=document.querySelector(n),!o))return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);o?(o.addEventListener(t,r),e.on("destroy",()=>o.removeEventListener(t,r))):(document.body.addEventListener(t,r,!0),e.on("destroy",()=>document.body.removeEventListener(t,r,!0)))}else return console.error("advanceOn was defined, but no event name was passed.")}class Vr{constructor(t){}}class Ur{constructor(t,n){}}function dn(e){return!Ye(e)||e===""?"":e.charAt(e.length-1)!=="-"?`${e}-`:e}function Hr(e){const t=e.options.attachTo||{},n=Object.assign({},t);if(me(n.element)&&(n.element=n.element.call(e)),Ye(n.element)){try{n.element=document.querySelector(n.element)}catch{}n.element||console.error(`The element for this Shepherd step was not found ${t.element}`)}return n}function hn(e){return e==null?!0:!e.element||!e.on}function pn(){let e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(t=="x"?n:n&3|8).toString(16)})}const Ie=Math.min,Ee=Math.max,Qe=Math.round,et=Math.floor,be=e=>({x:e,y:e}),Yr={left:"right",right:"left",bottom:"top",top:"bottom"},qr={start:"end",end:"start"};function xt(e,t,n){return Ee(e,Ie(t,n))}function ke(e,t){return typeof e=="function"?e(t):e}function xe(e){return e.split("-")[0]}function tt(e){return e.split("-")[1]}function St(e){return e==="x"?"y":"x"}function Ot(e){return e==="y"?"height":"width"}function nt(e){return["top","bottom"].includes(xe(e))?"y":"x"}function Tt(e){return St(nt(e))}function Kr(e,t,n){n===void 0&&(n=!1);const r=tt(e),o=Tt(e),s=Ot(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=rt(i)),[i,rt(i)]}function zr(e){const t=rt(e);return[Ct(e),t,Ct(t)]}function Ct(e){return e.replace(/start|end/g,t=>qr[t])}function Jr(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function Gr(e,t,n,r){const o=tt(e);let s=Jr(xe(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ct)))),s}function rt(e){return e.replace(/left|right|bottom|top/g,t=>Yr[t])}function Xr(e){return j({top:0,right:0,bottom:0,left:0},e)}function mn(e){return typeof e!="number"?Xr(e):{top:e,right:e,bottom:e,left:e}}function ot(e){return j({},e,{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}const Zr=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],Qr=["mainAxis","crossAxis","limiter"];function gn(e,t,n){let{reference:r,floating:o}=e;const s=nt(t),i=Tt(t),c=Ot(i),l=xe(t),u=s==="y",f=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,d=r[c]/2-o[c]/2;let m;switch(l){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-o.width,y:h};break;default:m={x:r.x,y:r.y}}switch(tt(t)){case"start":m[i]-=d*(n&&u?-1:1);break;case"end":m[i]+=d*(n&&u?-1:1);break}return m}const eo=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:h}=gn(u,r,l),d=r,m={},y=0;for(let E=0;E<c.length;E++){const{name:S,fn:w}=c[E],{x:_,y:T,data:v,reset:g}=await w({x:f,y:h,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=_??f,h=T??h,m=j({},m,{[S]:j({},m[S],v)}),g&&y<=50&&(y++,typeof g=="object"&&(g.placement&&(d=g.placement),g.rects&&(u=g.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):g.rects),{x:f,y:h}=gn(u,d,l)),E=-1)}return{x:f,y:h,placement:d,strategy:o,middlewareData:m}};async function bn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:d=!1,padding:m=0}=ke(t,e),y=mn(m),S=c[d?h==="floating"?"reference":"floating":h],w=ot(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(S)))==null||n?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:f,strategy:l})),_=h==="floating"?j({},i.floating,{x:r,y:o}):i.reference,T=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),v=await(s.isElement==null?void 0:s.isElement(T))?await(s.getScale==null?void 0:s.getScale(T))||{x:1,y:1}:{x:1,y:1},g=ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:T,strategy:l}):_);return{top:(w.top-g.top+y.top)/v.y,bottom:(g.bottom-w.bottom+y.bottom)/v.y,left:(w.left-g.left+y.left)/v.x,right:(g.right-w.right+y.right)/v.x}}const to=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:u,padding:f=0}=ke(e,t)||{};if(u==null)return{};const h=mn(f),d={x:n,y:r},m=Tt(o),y=Ot(m),E=await i.getDimensions(u),S=m==="y",w=S?"top":"left",_=S?"bottom":"right",T=S?"clientHeight":"clientWidth",v=s.reference[y]+s.reference[m]-d[m]-s.floating[y],g=d[m]-s.reference[m],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let V=C?C[T]:0;(!V||!await(i.isElement==null?void 0:i.isElement(C)))&&(V=c.floating[T]||s.floating[y]);const re=v/2-g/2,$=V/2-E[y]/2-1,H=Ie(h[w],$),G=Ie(h[_],$),X=H,W=V-E[y]-G,M=V/2-E[y]/2+re,Z=xt(X,M,W),Q=!l.arrow&&tt(o)!=null&&M!==Z&&s.reference[y]/2-(M<X?H:G)-E[y]/2<0,K=Q?M<X?M-X:M-W:0;return{[m]:d[m]+K,data:j({[m]:Z,centerOffset:M-Z-K},Q&&{alignmentOffset:K}),reset:Q}}}),no=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var r,o;const{placement:s,middlewareData:i,rects:c,initialPlacement:l,platform:u,elements:f}=n,h=ke(t,n),{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:y,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0}=h,_=on(h,Zr);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const T=xe(s),v=xe(l)===l,g=await(u.isRTL==null?void 0:u.isRTL(f.floating)),C=y||(v||!w?[rt(l)]:zr(l));!y&&S!=="none"&&C.push(...Gr(l,w,S,g));const V=[l,...C],re=await bn(n,_),$=[];let H=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&$.push(re[T]),m){const M=Kr(s,c,g);$.push(re[M[0]],re[M[1]])}if(H=[...H,{placement:s,overflows:$}],!$.every(M=>M<=0)){var G,X;const M=(((G=i.flip)==null?void 0:G.index)||0)+1,Z=V[M];if(Z)return{data:{index:M,overflows:H},reset:{placement:Z}};let Q=(X=H.filter(K=>K.overflows[0]<=0).sort((K,de)=>K.overflows[1]-de.overflows[1])[0])==null?void 0:X.placement;if(!Q)switch(E){case"bestFit":{var W;const K=(W=H.map(de=>[de.placement,de.overflows.filter(_e=>_e>0).reduce((_e,dt)=>_e+dt,0)]).sort((de,_e)=>de[1]-_e[1])[0])==null?void 0:W[0];K&&(Q=K);break}case"initialPlacement":Q=l;break}if(s!==Q)return{reset:{placement:Q}}}return{}}}},ro=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:r,y:o,placement:s}=n,i=ke(t,n),{mainAxis:c=!0,crossAxis:l=!1,limiter:u={fn:_=>{let{x:T,y:v}=_;return{x:T,y:v}}}}=i,f=on(i,Qr),h={x:r,y:o},d=await bn(n,f),m=nt(xe(s)),y=St(m);let E=h[y],S=h[m];if(c){const _=y==="y"?"top":"left",T=y==="y"?"bottom":"right",v=E+d[_],g=E-d[T];E=xt(v,E,g)}if(l){const _=m==="y"?"top":"left",T=m==="y"?"bottom":"right",v=S+d[_],g=S-d[T];S=xt(v,S,g)}const w=u.fn(j({},n,{[y]:E,[m]:S}));return j({},w,{data:{x:w.x-r,y:w.y-o}})}}},oo=function(t){return t===void 0&&(t={}),{options:t,fn(n){const{x:r,y:o,placement:s,rects:i,middlewareData:c}=n,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=ke(t,n),h={x:r,y:o},d=nt(s),m=St(d);let y=h[m],E=h[d];const S=ke(l,n),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:j({mainAxis:0,crossAxis:0},S);if(u){const v=m==="y"?"height":"width",g=i.reference[m]-i.floating[v]+w.mainAxis,C=i.reference[m]+i.reference[v]-w.mainAxis;y<g?y=g:y>C&&(y=C)}if(f){var _,T;const v=m==="y"?"width":"height",g=["top","left"].includes(xe(s)),C=i.reference[d]-i.floating[v]+(g&&((_=c.offset)==null?void 0:_[d])||0)+(g?0:w.crossAxis),V=i.reference[d]+i.reference[v]+(g?0:((T=c.offset)==null?void 0:T[d])||0)-(g?w.crossAxis:0);E<C?E=C:E>V&&(E=V)}return{[m]:y,[d]:E}}}};function ye(e){return yn(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(yn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yn(e){return e instanceof Node||e instanceof Y(e).Node}function ce(e){return e instanceof Element||e instanceof Y(e).Element}function ie(e){return e instanceof HTMLElement||e instanceof Y(e).HTMLElement}function vn(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot}function Ke(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function io(e){return["table","td","th"].includes(ye(e))}function Rt(e){const t=Pt(),n=z(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function so(e){let t=Ae(e);for(;ie(t)&&!it(t);){if(Rt(t))return t;t=Ae(t)}return null}function Pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function it(e){return["html","body","#document"].includes(ye(e))}function z(e){return Y(e).getComputedStyle(e)}function st(e){return ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ae(e){if(ye(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vn(e)&&e.host||ae(e);return vn(t)?t.host:t}function wn(e){const t=Ae(e);return it(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Ke(t)?t:wn(t)}function ze(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=wn(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Y(o);return s?t.concat(i,i.visualViewport||[],Ke(o)?o:[],i.frameElement&&n?ze(i.frameElement):[]):t.concat(o,ze(o,[],n))}function _n(e){const t=z(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ie(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,c=Qe(n)!==s||Qe(r)!==i;return c&&(n=s,r=i),{width:n,height:r,$:c}}function It(e){return ce(e)?e:e.contextElement}function Me(e){const t=It(e);if(!ie(t))return be(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=_n(t);let i=(s?Qe(n.width):n.width)/r,c=(s?Qe(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const ao=be(0);function En(e){const t=Y(e);return!Pt()||!t.visualViewport?ao:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function co(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Y(e)?!1:t}function Se(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=It(e);let i=be(1);t&&(r?ce(r)&&(i=Me(r)):i=Me(e));const c=co(s,n,r)?En(s):be(0);let l=(o.left+c.x)/i.x,u=(o.top+c.y)/i.y,f=o.width/i.x,h=o.height/i.y;if(s){const d=Y(s),m=r&&ce(r)?Y(r):r;let y=d,E=y.frameElement;for(;E&&r&&m!==y;){const S=Me(E),w=E.getBoundingClientRect(),_=z(E),T=w.left+(E.clientLeft+parseFloat(_.paddingLeft))*S.x,v=w.top+(E.clientTop+parseFloat(_.paddingTop))*S.y;l*=S.x,u*=S.y,f*=S.x,h*=S.y,l+=T,u+=v,y=Y(E),E=y.frameElement}}return ot({width:f,height:h,x:l,y:u})}const lo=[":popover-open",":modal"];function xn(e){return lo.some(t=>{try{return e.matches(t)}catch{return!1}})}function uo(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=ae(r),c=t?xn(t.floating):!1;if(r===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=be(1);const f=be(0),h=ie(r);if((h||!h&&!s)&&((ye(r)!=="body"||Ke(i))&&(l=st(r)),ie(r))){const d=Se(r);u=Me(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x,y:n.y*u.y-l.scrollTop*u.y+f.y}}function fo(e){return Array.from(e.getClientRects())}function Sn(e){return Se(ae(e)).left+st(e).scrollLeft}function ho(e){const t=ae(e),n=st(e),r=e.ownerDocument.body,o=Ee(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ee(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Sn(e);const c=-n.scrollTop;return z(r).direction==="rtl"&&(i+=Ee(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:c}}function po(e,t){const n=Y(e),r=ae(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,c=0,l=0;if(o){s=o.width,i=o.height;const u=Pt();(!u||u&&t==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:c,y:l}}function mo(e,t){const n=Se(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ie(e)?Me(e):be(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=o*s.x,u=r*s.y;return{width:i,height:c,x:l,y:u}}function On(e,t,n){let r;if(t==="viewport")r=po(e,n);else if(t==="document")r=ho(ae(e));else if(ce(t))r=mo(t,n);else{const o=En(e);r=j({},t,{x:t.x-o.x,y:t.y-o.y})}return ot(r)}function Tn(e,t){const n=Ae(e);return n===t||!ce(n)||it(n)?!1:z(n).position==="fixed"||Tn(n,t)}function go(e,t){const n=t.get(e);if(n)return n;let r=ze(e,[],!1).filter(c=>ce(c)&&ye(c)!=="body"),o=null;const s=z(e).position==="fixed";let i=s?Ae(e):e;for(;ce(i)&&!it(i);){const c=z(i),l=Rt(i);!l&&c.position==="fixed"&&(o=null),(s?!l&&!o:!l&&c.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ke(i)&&!l&&Tn(e,i))?r=r.filter(f=>f!==i):o=c,i=Ae(i)}return t.set(e,r),r}function bo(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?go(t,this._c):[].concat(n),r],c=i[0],l=i.reduce((u,f)=>{const h=On(t,f,o);return u.top=Ee(h.top,u.top),u.right=Ie(h.right,u.right),u.bottom=Ie(h.bottom,u.bottom),u.left=Ee(h.left,u.left),u},On(t,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function yo(e){const{width:t,height:n}=_n(e);return{width:t,height:n}}function vo(e,t,n){const r=ie(t),o=ae(t),s=n==="fixed",i=Se(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=be(0);if(r||!r&&!s)if((ye(t)!=="body"||Ke(o))&&(c=st(t)),r){const h=Se(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&(l.x=Sn(o));const u=i.left+c.scrollLeft-l.x,f=i.top+c.scrollTop-l.y;return{x:u,y:f,width:i.width,height:i.height}}function Cn(e,t){return!ie(e)||z(e).position==="fixed"?null:t?t(e):e.offsetParent}function Rn(e,t){const n=Y(e);if(!ie(e)||xn(e))return n;let r=Cn(e,t);for(;r&&io(r)&&z(r).position==="static";)r=Cn(r,t);return r&&(ye(r)==="html"||ye(r)==="body"&&z(r).position==="static"&&!Rt(r))?n:r||so(e)||n}const wo=async function(t){const n=this.getOffsetParent||Rn,r=this.getDimensions;return{reference:vo(t.reference,await n(t.floating),t.strategy),floating:j({x:0,y:0},await r(t.floating))}};function _o(e){return z(e).direction==="rtl"}const Eo={convertOffsetParentRelativeRectToViewportRelativeRect:uo,getDocumentElement:ae,getClippingRect:bo,getOffsetParent:Rn,getElementRects:wo,getClientRects:fo,getDimensions:yo,getScale:Me,isElement:ce,isRTL:_o};function xo(e,t){let n=null,r;const o=ae(e);function s(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:u,top:f,width:h,height:d}=e.getBoundingClientRect();if(c||t(),!h||!d)return;const m=et(f),y=et(o.clientWidth-(u+h)),E=et(o.clientHeight-(f+d)),S=et(u),_={rootMargin:-m+"px "+-y+"px "+-E+"px "+-S+"px",threshold:Ee(0,Ie(1,l))||1};let T=!0;function v(g){const C=g[0].intersectionRatio;if(C!==l){if(!T)return i();C?i(!1,C):r=setTimeout(()=>{i(!1,1e-7)},100)}T=!1}try{n=new IntersectionObserver(v,j({},_,{root:o.ownerDocument}))}catch{n=new IntersectionObserver(v,_)}n.observe(e)}return i(!0),s}function So(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=It(e),f=o||s?[...u?ze(u):[],...ze(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const h=u&&c?xo(u,n):null;let d=-1,m=null;i&&(m=new ResizeObserver(w=>{let[_]=w;_&&_.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var T;(T=m)==null||T.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let y,E=l?Se(e):null;l&&S();function S(){const w=Se(e);E&&(w.x!==E.x||w.y!==E.y||w.width!==E.width||w.height!==E.height)&&n(),E=w,y=requestAnimationFrame(S)}return n(),()=>{var w;f.forEach(_=>{o&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),h==null||h(),(w=m)==null||w.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const Oo=ro,To=no,Co=to,Ro=oo,Po=(e,t,n)=>{const r=new Map,o=j({platform:Eo},n),s=j({},o.platform,{_c:r});return eo(e,t,j({},o,{platform:s}))};function Io(e){e.cleanup&&e.cleanup();const t=e._getResolvedAttachToOptions();let n=t.element;const r=Lo(t,e),o=hn(t);return o&&(n=document.body,e.shepherdElementComponent.getElement().classList.add("shepherd-centered")),e.cleanup=So(n,e.el,()=>{var s;if(!e.el){(s=e.cleanup)==null||s.call(e);return}Mo(n,e,r,o)}),e.target=t.element,r}function ko(e,t){return{floatingUIOptions:_t(e.floatingUIOptions||{},t.floatingUIOptions||{})}}function Ao(e){e.cleanup&&e.cleanup(),e.cleanup=null}function Mo(e,t,n,r){return Po(e,t.el,n).then(Do(t,r)).then(o=>new Promise(s=>{setTimeout(()=>s(o),300)})).then(o=>{o!=null&&o.el&&o.el.focus({preventScroll:!0})})}function Do(e,t){return({x:n,y:r,placement:o,middlewareData:s})=>(e.el&&(t?Object.assign(e.el.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}):Object.assign(e.el.style,{position:"absolute",left:`${n}px`,top:`${r}px`}),e.el.dataset.popperPlacement=o,Fo(e.el,s)),e)}function Fo(e,t){const n=e.querySelector(".shepherd-arrow");if(He(n)&&t.arrow){const{x:r,y:o}=t.arrow;Object.assign(n.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:""})}}function Lo(e,t){const n={strategy:"absolute"};n.middleware=[];const r=jo(t);return hn(e)||(n.middleware.push(To(),Oo({limiter:Ro(),crossAxis:!0})),r&&n.middleware.push(Co({element:r})),n.placement=e.on),_t(t.options.floatingUIOptions||{},n)}function jo(e){return e.options.arrow&&e.el?e.el.querySelector(".shepherd-arrow"):!1}function q(){}function Bo(e,t){for(const n in t)e[n]=t[n];return e}function Pn(e){return e()}function In(){return Object.create(null)}function Je(e){e.forEach(Pn)}function kt(e){return typeof e=="function"}function le(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function $o(e){return Object.keys(e).length===0}function De(e,t){e.appendChild(t)}function te(e,t,n){e.insertBefore(t,n||null)}function J(e){e.parentNode&&e.parentNode.removeChild(e)}function Wo(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function se(e){return document.createElement(e)}function kn(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function An(e){return document.createTextNode(e)}function at(){return An(" ")}function No(){return An("")}function ct(e,t,n,r){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}function k(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const Vo=["width","height"];function Mn(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const r in t)t[r]==null?e.removeAttribute(r):r==="style"?e.style.cssText=t[r]:r==="__value"?e.value=e[r]=t[r]:n[r]&&n[r].set&&Vo.indexOf(r)===-1?e[r]=t[r]:k(e,r,t[r])}function Uo(e){return Array.from(e.childNodes)}function Fe(e,t,n){e.classList.toggle(t,!!n)}let Ge;function Xe(e){Ge=e}function Dn(){if(!Ge)throw new Error("Function called outside component initialization");return Ge}function Ho(e){Dn().$$.on_mount.push(e)}function At(e){Dn().$$.after_update.push(e)}const Le=[],je=[];let Be=[];const Fn=[],Yo=Promise.resolve();let Mt=!1;function qo(){Mt||(Mt=!0,Yo.then(Ln))}function Dt(e){Be.push(e)}const Ft=new Set;let $e=0;function Ln(){if($e!==0)return;const e=Ge;do{try{for(;$e<Le.length;){const t=Le[$e];$e++,Xe(t),Ko(t.$$)}}catch(t){throw Le.length=0,$e=0,t}for(Xe(null),Le.length=0,$e=0;je.length;)je.pop()();for(let t=0;t<Be.length;t+=1){const n=Be[t];Ft.has(n)||(Ft.add(n),n())}Be.length=0}while(Le.length);for(;Fn.length;)Fn.pop()();Mt=!1,Ft.clear(),Xe(e)}function Ko(e){if(e.fragment!==null){e.update(),Je(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Dt)}}function zo(e){const t=[],n=[];Be.forEach(r=>e.indexOf(r)===-1?t.push(r):n.push(r)),n.forEach(r=>r()),Be=t}const lt=new Set;let Oe;function Te(){Oe={r:0,c:[],p:Oe}}function Ce(){Oe.r||Je(Oe.c),Oe=Oe.p}function I(e,t){e&&e.i&&(lt.delete(e),e.i(t))}function D(e,t,n,r){if(e&&e.o){if(lt.has(e))return;lt.add(e),Oe.c.push(()=>{lt.delete(e),r&&(n&&e.d(1),r())}),e.o(t)}else r&&r()}function jn(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Jo(e,t){const n={},r={},o={$$scope:1};let s=e.length;for(;s--;){const i=e[s],c=t[s];if(c){for(const l in i)l in c||(r[l]=1);for(const l in c)o[l]||(n[l]=c[l],o[l]=1);e[s]=c}else for(const l in i)o[l]=1}for(const i in r)i in n||(n[i]=void 0);return n}function Re(e){e&&e.c()}function ve(e,t,n){const{fragment:r,after_update:o}=e.$$;r&&r.m(t,n),Dt(()=>{const s=e.$$.on_mount.map(Pn).filter(kt);e.$$.on_destroy?e.$$.on_destroy.push(...s):Je(s),e.$$.on_mount=[]}),o.forEach(Dt)}function we(e,t){const n=e.$$;n.fragment!==null&&(zo(n.after_update),Je(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Go(e,t){e.$$.dirty[0]===-1&&(Le.push(e),qo(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ue(e,t,n,r,o,s,i=null,c=[-1]){const l=Ge;Xe(e);const u=e.$$={fragment:null,ctx:[],props:s,update:q,not_equal:o,bound:In(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:In(),dirty:c,skip_bound:!1,root:t.target||l.$$.root};i&&i(u.root);let f=!1;if(u.ctx=n?n(e,t.props||{},(h,d,...m)=>{const y=m.length?m[0]:d;return u.ctx&&o(u.ctx[h],u.ctx[h]=y)&&(!u.skip_bound&&u.bound[h]&&u.bound[h](y),f&&Go(e,h)),d}):[],u.update(),f=!0,Je(u.before_update),u.fragment=r?r(u.ctx):!1,t.target){if(t.hydrate){const h=Uo(t.target);u.fragment&&u.fragment.l(h),h.forEach(J)}else u.fragment&&u.fragment.c();t.intro&&I(e.$$.fragment),ve(e,t.target,t.anchor),Ln()}Xe(l)}class fe{constructor(){this.$$=void 0,this.$$set=void 0}$destroy(){we(this,1),this.$destroy=q}$on(t,n){if(!kt(n))return q;const r=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return r.push(n),()=>{const o=r.indexOf(n);o!==-1&&r.splice(o,1)}}$set(t){this.$$set&&!$o(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Xo="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Xo);function Zo(e){let t,n,r,o,s;return{c(){t=se("button"),k(t,"aria-label",n=e[3]?e[3]:null),k(t,"class",r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`),t.disabled=e[2],k(t,"tabindex","0"),k(t,"type","button")},m(i,c){te(i,t,c),t.innerHTML=e[5],o||(s=ct(t,"click",function(){kt(e[0])&&e[0].apply(this,arguments)}),o=!0)},p(i,[c]){e=i,c&32&&(t.innerHTML=e[5]),c&8&&n!==(n=e[3]?e[3]:null)&&k(t,"aria-label",n),c&18&&r!==(r=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`)&&k(t,"class",r),c&4&&(t.disabled=e[2])},i:q,o:q,d(i){i&&J(t),o=!1,s()}}}function Qo(e,t,n){let{config:r,step:o}=t,s,i,c,l,u,f;function h(d){return me(d)?d=d.call(o):d}return e.$$set=d=>{"config"in d&&n(6,r=d.config),"step"in d&&n(7,o=d.step)},e.$$.update=()=>{e.$$.dirty&192&&(n(0,s=r.action?r.action.bind(o.tour):null),n(1,i=r.classes),n(2,c=r.disabled?h(r.disabled):!1),n(3,l=r.label?h(r.label):null),n(4,u=r.secondary),n(5,f=r.text?h(r.text):null))},[s,i,c,l,u,f,r,o]}class ei extends fe{constructor(t){super(),ue(this,t,Qo,Zo,le,{config:6,step:7})}}function Bn(e,t,n){const r=e.slice();return r[2]=t[n],r}function $n(e){let t,n,r=jn(e[1]),o=[];for(let i=0;i<r.length;i+=1)o[i]=Wn(Bn(e,r,i));const s=i=>D(o[i],1,1,()=>{o[i]=null});return{c(){for(let i=0;i<o.length;i+=1)o[i].c();t=No()},m(i,c){for(let l=0;l<o.length;l+=1)o[l]&&o[l].m(i,c);te(i,t,c),n=!0},p(i,c){if(c&3){r=jn(i[1]);let l;for(l=0;l<r.length;l+=1){const u=Bn(i,r,l);o[l]?(o[l].p(u,c),I(o[l],1)):(o[l]=Wn(u),o[l].c(),I(o[l],1),o[l].m(t.parentNode,t))}for(Te(),l=r.length;l<o.length;l+=1)s(l);Ce()}},i(i){if(!n){for(let c=0;c<r.length;c+=1)I(o[c]);n=!0}},o(i){o=o.filter(Boolean);for(let c=0;c<o.length;c+=1)D(o[c]);n=!1},d(i){i&&J(t),Wo(o,i)}}}function Wn(e){let t,n;return t=new ei({props:{config:e[2],step:e[0]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&2&&(s.config=r[2]),o&1&&(s.step=r[0]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function ti(e){let t,n,r=e[1]&&$n(e);return{c(){t=se("footer"),r&&r.c(),k(t,"class","shepherd-footer")},m(o,s){te(o,t,s),r&&r.m(t,null),n=!0},p(o,[s]){o[1]?r?(r.p(o,s),s&2&&I(r,1)):(r=$n(o),r.c(),I(r,1),r.m(t,null)):r&&(Te(),D(r,1,1,()=>{r=null}),Ce())},i(o){n||(I(r),n=!0)},o(o){D(r),n=!1},d(o){o&&J(t),r&&r.d()}}}function ni(e,t,n){let r,{step:o}=t;return e.$$set=s=>{"step"in s&&n(0,o=s.step)},e.$$.update=()=>{e.$$.dirty&1&&n(1,r=o.options.buttons)},[o,r]}class ri extends fe{constructor(t){super(),ue(this,t,ni,ti,le,{step:0})}}function oi(e){let t,n,r,o,s;return{c(){t=se("button"),n=se("span"),n.textContent="×",k(n,"aria-hidden","true"),k(t,"aria-label",r=e[0].label?e[0].label:"Close Tour"),k(t,"class","shepherd-cancel-icon"),k(t,"type","button")},m(i,c){te(i,t,c),De(t,n),o||(s=ct(t,"click",e[1]),o=!0)},p(i,[c]){c&1&&r!==(r=i[0].label?i[0].label:"Close Tour")&&k(t,"aria-label",r)},i:q,o:q,d(i){i&&J(t),o=!1,s()}}}function ii(e,t,n){let{cancelIcon:r,step:o}=t;const s=i=>{i.preventDefault(),o.cancel()};return e.$$set=i=>{"cancelIcon"in i&&n(0,r=i.cancelIcon),"step"in i&&n(2,o=i.step)},[r,s,o]}class si extends fe{constructor(t){super(),ue(this,t,ii,oi,le,{cancelIcon:0,step:2})}}function ai(e){let t;return{c(){t=se("h3"),k(t,"id",e[1]),k(t,"class","shepherd-title")},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:q,o:q,d(n){n&&J(t),e[3](null)}}}function ci(e,t,n){let{labelId:r,element:o,title:s}=t;At(()=>{me(s)&&n(2,s=s()),n(0,o.innerHTML=s,o)});function i(c){je[c?"unshift":"push"](()=>{o=c,n(0,o)})}return e.$$set=c=>{"labelId"in c&&n(1,r=c.labelId),"element"in c&&n(0,o=c.element),"title"in c&&n(2,s=c.title)},[o,r,s,i]}class li extends fe{constructor(t){super(),ue(this,t,ci,ai,le,{labelId:1,element:0,title:2})}}function Nn(e){let t,n;return t=new li({props:{labelId:e[0],title:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&1&&(s.labelId=r[0]),o&4&&(s.title=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function Vn(e){let t,n;return t=new si({props:{cancelIcon:e[3],step:e[1]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&8&&(s.cancelIcon=r[3]),o&2&&(s.step=r[1]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function ui(e){let t,n,r,o=e[2]&&Nn(e),s=e[3]&&e[3].enabled&&Vn(e);return{c(){t=se("header"),o&&o.c(),n=at(),s&&s.c(),k(t,"class","shepherd-header")},m(i,c){te(i,t,c),o&&o.m(t,null),De(t,n),s&&s.m(t,null),r=!0},p(i,[c]){i[2]?o?(o.p(i,c),c&4&&I(o,1)):(o=Nn(i),o.c(),I(o,1),o.m(t,n)):o&&(Te(),D(o,1,1,()=>{o=null}),Ce()),i[3]&&i[3].enabled?s?(s.p(i,c),c&8&&I(s,1)):(s=Vn(i),s.c(),I(s,1),s.m(t,null)):s&&(Te(),D(s,1,1,()=>{s=null}),Ce())},i(i){r||(I(o),I(s),r=!0)},o(i){D(o),D(s),r=!1},d(i){i&&J(t),o&&o.d(),s&&s.d()}}}function fi(e,t,n){let{labelId:r,step:o}=t,s,i;return e.$$set=c=>{"labelId"in c&&n(0,r=c.labelId),"step"in c&&n(1,o=c.step)},e.$$.update=()=>{e.$$.dirty&2&&(n(2,s=o.options.title),n(3,i=o.options.cancelIcon))},[r,o,s,i]}class di extends fe{constructor(t){super(),ue(this,t,fi,ui,le,{labelId:0,step:1})}}function hi(e){let t;return{c(){t=se("div"),k(t,"class","shepherd-text"),k(t,"id",e[1])},m(n,r){te(n,t,r),e[3](t)},p(n,[r]){r&2&&k(t,"id",n[1])},i:q,o:q,d(n){n&&J(t),e[3](null)}}}function pi(e,t,n){let{descriptionId:r,element:o,step:s}=t;At(()=>{let{text:c}=s.options;me(c)&&(c=c.call(s)),He(c)?o.appendChild(c):n(0,o.innerHTML=c,o)});function i(c){je[c?"unshift":"push"](()=>{o=c,n(0,o)})}return e.$$set=c=>{"descriptionId"in c&&n(1,r=c.descriptionId),"element"in c&&n(0,o=c.element),"step"in c&&n(2,s=c.step)},[o,r,s,i]}class mi extends fe{constructor(t){super(),ue(this,t,pi,hi,le,{descriptionId:1,element:0,step:2})}}function Un(e){let t,n;return t=new di({props:{labelId:e[1],step:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&2&&(s.labelId=r[1]),o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function Hn(e){let t,n;return t=new mi({props:{descriptionId:e[0],step:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&1&&(s.descriptionId=r[0]),o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function Yn(e){let t,n;return t=new ri({props:{step:e[2]}}),{c(){Re(t.$$.fragment)},m(r,o){ve(t,r,o),n=!0},p(r,o){const s={};o&4&&(s.step=r[2]),t.$set(s)},i(r){n||(I(t.$$.fragment,r),n=!0)},o(r){D(t.$$.fragment,r),n=!1},d(r){we(t,r)}}}function gi(e){let t,n=!N(e[2].options.title)||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled,r,o=!N(e[2].options.text),s,i=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length,c,l=n&&Un(e),u=o&&Hn(e),f=i&&Yn(e);return{c(){t=se("div"),l&&l.c(),r=at(),u&&u.c(),s=at(),f&&f.c(),k(t,"class","shepherd-content")},m(h,d){te(h,t,d),l&&l.m(t,null),De(t,r),u&&u.m(t,null),De(t,s),f&&f.m(t,null),c=!0},p(h,[d]){d&4&&(n=!N(h[2].options.title)||h[2].options.cancelIcon&&h[2].options.cancelIcon.enabled),n?l?(l.p(h,d),d&4&&I(l,1)):(l=Un(h),l.c(),I(l,1),l.m(t,r)):l&&(Te(),D(l,1,1,()=>{l=null}),Ce()),d&4&&(o=!N(h[2].options.text)),o?u?(u.p(h,d),d&4&&I(u,1)):(u=Hn(h),u.c(),I(u,1),u.m(t,s)):u&&(Te(),D(u,1,1,()=>{u=null}),Ce()),d&4&&(i=Array.isArray(h[2].options.buttons)&&h[2].options.buttons.length),i?f?(f.p(h,d),d&4&&I(f,1)):(f=Yn(h),f.c(),I(f,1),f.m(t,null)):f&&(Te(),D(f,1,1,()=>{f=null}),Ce())},i(h){c||(I(l),I(u),I(f),c=!0)},o(h){D(l),D(u),D(f),c=!1},d(h){h&&J(t),l&&l.d(),u&&u.d(),f&&f.d()}}}function bi(e,t,n){let{descriptionId:r,labelId:o,step:s}=t;return e.$$set=i=>{"descriptionId"in i&&n(0,r=i.descriptionId),"labelId"in i&&n(1,o=i.labelId),"step"in i&&n(2,s=i.step)},[r,o,s]}class yi extends fe{constructor(t){super(),ue(this,t,bi,gi,le,{descriptionId:0,labelId:1,step:2})}}function qn(e){let t;return{c(){t=se("div"),k(t,"class","shepherd-arrow"),k(t,"data-popper-arrow","")},m(n,r){te(n,t,r)},d(n){n&&J(t)}}}function vi(e){let t,n,r,o,s,i,c,l,u=e[4].options.arrow&&e[4].options.attachTo&&e[4].options.attachTo.element&&e[4].options.attachTo.on&&qn();r=new yi({props:{descriptionId:e[2],labelId:e[3],step:e[4]}});let f=[{"aria-describedby":o=N(e[4].options.text)?null:e[2]},{"aria-labelledby":s=e[4].options.title?e[3]:null},e[1],{role:"dialog"},{tabindex:"0"}],h={};for(let d=0;d<f.length;d+=1)h=Bo(h,f[d]);return{c(){t=se("div"),u&&u.c(),n=at(),Re(r.$$.fragment),Mn(t,h),Fe(t,"shepherd-has-cancel-icon",e[5]),Fe(t,"shepherd-has-title",e[6]),Fe(t,"shepherd-element",!0)},m(d,m){te(d,t,m),u&&u.m(t,null),De(t,n),ve(r,t,null),e[13](t),i=!0,c||(l=ct(t,"keydown",e[7]),c=!0)},p(d,[m]){d[4].options.arrow&&d[4].options.attachTo&&d[4].options.attachTo.element&&d[4].options.attachTo.on?u||(u=qn(),u.c(),u.m(t,n)):u&&(u.d(1),u=null);const y={};m&4&&(y.descriptionId=d[2]),m&8&&(y.labelId=d[3]),m&16&&(y.step=d[4]),r.$set(y),Mn(t,h=Jo(f,[(!i||m&20&&o!==(o=N(d[4].options.text)?null:d[2]))&&{"aria-describedby":o},(!i||m&24&&s!==(s=d[4].options.title?d[3]:null))&&{"aria-labelledby":s},m&2&&d[1],{role:"dialog"},{tabindex:"0"}])),Fe(t,"shepherd-has-cancel-icon",d[5]),Fe(t,"shepherd-has-title",d[6]),Fe(t,"shepherd-element",!0)},i(d){i||(I(r.$$.fragment,d),i=!0)},o(d){D(r.$$.fragment,d),i=!1},d(d){d&&J(t),u&&u.d(),we(r),e[13](null),c=!1,l()}}}const wi=9,_i=27,Ei=37,xi=39;function Kn(e){return e.split(" ").filter(t=>!!t.length)}function Si(e,t,n){let{classPrefix:r,element:o,descriptionId:s,firstFocusableElement:i,focusableElements:c,labelId:l,lastFocusableElement:u,step:f,dataStepId:h}=t,d,m,y;const E=()=>o;Ho(()=>{n(1,h={[`data-${r}shepherd-step-id`]:f.id}),n(9,c=o.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,i=c[0]),n(10,u=c[c.length-1])}),At(()=>{y!==f.options.classes&&S()});function S(){w(y),y=f.options.classes,_(y)}function w(g){if(Ye(g)){const C=Kn(g);C.length&&o.classList.remove(...C)}}function _(g){if(Ye(g)){const C=Kn(g);C.length&&o.classList.add(...C)}}const T=g=>{const{tour:C}=f;switch(g.keyCode){case wi:if(c.length===0){g.preventDefault();break}g.shiftKey?(document.activeElement===i||document.activeElement.classList.contains("shepherd-element"))&&(g.preventDefault(),u.focus()):document.activeElement===u&&(g.preventDefault(),i.focus());break;case _i:C.options.exitOnEsc&&(g.preventDefault(),g.stopPropagation(),f.cancel());break;case Ei:C.options.keyboardNavigation&&(g.preventDefault(),g.stopPropagation(),C.back());break;case xi:C.options.keyboardNavigation&&(g.preventDefault(),g.stopPropagation(),C.next());break}};function v(g){je[g?"unshift":"push"](()=>{o=g,n(0,o)})}return e.$$set=g=>{"classPrefix"in g&&n(11,r=g.classPrefix),"element"in g&&n(0,o=g.element),"descriptionId"in g&&n(2,s=g.descriptionId),"firstFocusableElement"in g&&n(8,i=g.firstFocusableElement),"focusableElements"in g&&n(9,c=g.focusableElements),"labelId"in g&&n(3,l=g.labelId),"lastFocusableElement"in g&&n(10,u=g.lastFocusableElement),"step"in g&&n(4,f=g.step),"dataStepId"in g&&n(1,h=g.dataStepId)},e.$$.update=()=>{e.$$.dirty&16&&(n(5,d=f.options&&f.options.cancelIcon&&f.options.cancelIcon.enabled),n(6,m=f.options&&f.options.title))},[o,h,s,l,f,d,m,T,i,c,u,r,E,v]}class Oi extends fe{constructor(t){super(),ue(this,t,Si,vi,le,{classPrefix:11,element:0,descriptionId:2,firstFocusableElement:8,focusableElements:9,labelId:3,lastFocusableElement:10,step:4,dataStepId:1,getElement:12})}get getElement(){return this.$$.ctx[12]}}class Lt extends vt{constructor(t,n={}){return super(),this.tour=t,this.classPrefix=this.tour.options?dn(this.tour.options.classPrefix):"",this.styles=t.styles,this._resolvedAttachTo=null,fn(this),this._setOptions(n),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){Ao(this),He(this.el)&&(this.el.remove(),this.el=null),this._updateStepTargetOnHide(),this.trigger("destroy")}getTour(){return this.tour}hide(){var t;(t=this.tour.modal)==null||t.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this._updateStepTargetOnHide(),this.trigger("hide")}_resolveAttachToOptions(){return this._resolvedAttachTo=Hr(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return this._resolvedAttachTo===null?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return!!(this.el&&!this.el.hidden)}show(){return me(this.options.beforeShowPromise)?Promise.resolve(this.options.beforeShowPromise()).then(()=>this._show()):Promise.resolve(this._show())}updateStepOptions(t){Object.assign(this.options,t),this.shepherdElementComponent&&this.shepherdElementComponent.$set({step:this})}getElement(){return this.el}getTarget(){return this.target}_createTooltipContent(){const t=`${this.id}-description`,n=`${this.id}-label`;return this.shepherdElementComponent=new Oi({target:this.tour.options.stepsContainer||document.body,props:{classPrefix:this.classPrefix,descriptionId:t,labelId:n,step:this,styles:this.styles}}),this.shepherdElementComponent.getElement()}_scrollTo(t){const{element:n}=this._getResolvedAttachToOptions();me(this.options.scrollToHandler)?this.options.scrollToHandler(n):Sr(n)&&typeof n.scrollIntoView=="function"&&n.scrollIntoView(t)}_getClassOptions(t){const n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,r=t.classes?t.classes:"",o=n&&n.classes?n.classes:"",s=[...r.split(" "),...o.split(" ")],i=new Set(s);return Array.from(i).join(" ").trim()}_setOptions(t={}){let n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;n=_t({},n||{}),this.options=Object.assign({arrow:!0},n,t,ko(n,t));const{when:r}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${pn()}`,r&&Object.keys(r).forEach(o=>{this.on(o,r[o],this)})}_setupElements(){N(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&Nr(this),Io(this)}_show(){var r;this.trigger("before-show"),this._resolveAttachToOptions(),this._setupElements(),this.tour.modal||this.tour.setupModal(),(r=this.tour.modal)==null||r.setupForStep(this),this._styleTargetElementForStep(this),this.el&&(this.el.hidden=!1),this.options.scrollTo&&setTimeout(()=>{this._scrollTo(this.options.scrollTo)}),this.el&&(this.el.hidden=!1);const t=this.shepherdElementComponent.getElement(),n=this.target||document.body;n.classList.add(`${this.classPrefix}shepherd-enabled`),n.classList.add(`${this.classPrefix}shepherd-target`),t.classList.add("shepherd-enabled"),this.trigger("show")}_styleTargetElementForStep(t){const n=t.target;n&&(t.options.highlightClass&&n.classList.add(t.options.highlightClass),n.classList.remove("shepherd-target-click-disabled"),t.options.canClickTarget===!1&&n.classList.add("shepherd-target-click-disabled"))}_updateStepTargetOnHide(){const t=this.target||document.body;this.options.highlightClass&&t.classList.remove(this.options.highlightClass),t.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}}function Ti(e){let t={};if(e.navigator){const n=e.navigator.userAgent;t={...t,$os:Ri(e),$browser:zn(n,e.navigator.vendor,!!e.opera),$referrer:e.document.referrer,$referring_domain:Ii(e.document.referrer),$device:Pi(n),$current_url:e.location.href,$host:e.location.host,$pathname:e.location.pathname,$browser_version:Ci(n,e.navigator.vendor,!!e.opera),$screen_height:e.screen.height,$screen_width:e.screen.width,$screen_dpr:e.devicePixelRatio}}return t={...t,$lib:"js",$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:new Date().getTime()/1e3},t}function F(e,t){return e.indexOf(t)>=0}function zn(e,t,n){return t=t||"",n||F(e," OPR/")?F(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":F(e,"IEMobile")||F(e,"WPDesktop")?"Internet Explorer Mobile":F(e,"SamsungBrowser/")?"Samsung Internet":F(e,"Edge")||F(e,"Edg/")?"Microsoft Edge":F(e,"FBIOS")?"Facebook Mobile":F(e,"Chrome")?"Chrome":F(e,"CriOS")?"Chrome iOS":F(e,"UCWEB")||F(e,"UCBrowser")?"UC Browser":F(e,"FxiOS")?"Firefox iOS":F(t,"Apple")?F(e,"Mobile")?"Mobile Safari":"Safari":F(e,"Android")?"Android Mobile":F(e,"Konqueror")?"Konqueror":F(e,"Firefox")?"Firefox":F(e,"MSIE")||F(e,"Trident/")?"Internet Explorer":F(e,"Gecko")?"Mozilla":""}function Ci(e,t,n){const r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/},o=zn(e,t,n),s=r[o]||void 0;if(s===void 0)return null;const i=e.match(s);return i?parseFloat(i[i.length-2]):null}function Ri(e){const t=e.navigator.userAgent;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""}function Pi(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""}function Ii(e){const t=e.split("/");return t.length>=3?t[2]:""}function ki(e){if(e){const{steps:t}=e;t.forEach(n=>{n.options&&n.options.canClickTarget===!1&&n.options.attachTo&&He(n.target)&&n.target.classList.remove("shepherd-target-click-disabled")})}}const jt=(e,t)=>t.some(n=>e instanceof n);let Jn,Gn;function Ai(){return Jn||(Jn=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Mi(){return Gn||(Gn=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Bt=new WeakMap,$t=new WeakMap,ut=new WeakMap;function Di(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",s),e.removeEventListener("error",i)},s=()=>{n(Pe(e.result)),o()},i=()=>{r(e.error),o()};e.addEventListener("success",s),e.addEventListener("error",i)});return ut.set(t,e),t}function Fi(e){if(Bt.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",i),e.removeEventListener("abort",i)},s=()=>{n(),o()},i=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",s),e.addEventListener("error",i),e.addEventListener("abort",i)});Bt.set(e,t)}let Wt={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Bt.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Pe(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Xn(e){Wt=e(Wt)}function Li(e){return Mi().includes(e)?function(...t){return e.apply(Nt(this),t),Pe(this.request)}:function(...t){return Pe(e.apply(Nt(this),t))}}function ji(e){return typeof e=="function"?Li(e):(e instanceof IDBTransaction&&Fi(e),jt(e,Ai())?new Proxy(e,Wt):e)}function Pe(e){if(e instanceof IDBRequest)return Di(e);if($t.has(e))return $t.get(e);const t=ji(e);return t!==e&&($t.set(e,t),ut.set(t,e)),t}const Nt=e=>ut.get(e);function Bi(e,t,{blocked:n,upgrade:r,blocking:o,terminated:s}={}){const i=indexedDB.open(e,t),c=Pe(i);return r&&i.addEventListener("upgradeneeded",l=>{r(Pe(i.result),l.oldVersion,l.newVersion,Pe(i.transaction),l)}),n&&i.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),c.then(l=>{s&&l.addEventListener("close",()=>s()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),c}const $i=["get","getKey","getAll","getAllKeys","count"],Wi=["put","add","delete","clear"],Vt=new Map;function Zn(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Vt.get(t))return Vt.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=Wi.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||$i.includes(n)))return;const s=async function(c,...l){const u=this.transaction(c,o?"readwrite":"readonly");let f=u.store;return r&&(f=f.index(l.shift())),(await Promise.all([f[n](...l),o&&u.done]))[0]};return Vt.set(t,s),s}Xn(e=>j({},e,{get:(t,n,r)=>Zn(t,n)||e.get(t,n,r),has:(t,n)=>!!Zn(t,n)||e.has(t,n)}));const Ni=["continue","continuePrimaryKey","advance"],Qn={},Ut=new WeakMap,er=new WeakMap,Vi={get(e,t){if(!Ni.includes(t))return e[t];let n=Qn[t];return n||(n=Qn[t]=function(...r){Ut.set(this,er.get(this)[t](...r))}),n}};function Ui(){return Ht.apply(this,arguments)}function Ht(){return Ht=Or(function*(...e){let t=this;if(t instanceof IDBCursor||(t=yield rn(t.openCursor(...e))),!t)return;t=t;const n=new Proxy(t,Vi);for(er.set(n,t),ut.set(n,Nt(t));t;)yield n,t=yield rn(Ut.get(n)||t.continue()),Ut.delete(n)}),Ht.apply(this,arguments)}function tr(e,t){return t===Symbol.asyncIterator&&jt(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&jt(e,[IDBIndex,IDBObjectStore])}Xn(e=>j({},e,{get(t,n,r){return tr(t,n)?Ui:e.get(t,n,r)},has(t,n){return tr(t,n)||e.has(t,n)}}));class Hi{constructor(t,n,r){if(!t)throw new Error("Shepherd Pro: Missing required apiKey option.");if(!n)throw new Error("Shepherd Pro: Missing required apiPath option.");this.apiKey=t,this.apiPath=n,this.properties=r}async getTourState(){try{const t=await fetch(`${this.apiPath}/api/v1/state`,{headers:{Authorization:`ApiKey ${this.apiKey}`,"Content-Type":"application/json"},method:"GET"});if(!t.ok)throw new Error("Could not fetch state for tours 🐑");const{data:n}=await t.json();if(this.tourStateDb=await Bi("TourState",1,{upgrade(r){r.createObjectStore("tours",{keyPath:"uniqueId"})}}),Array.isArray(n)&&n.length){const r=this.tourStateDb.transaction("tours","readwrite"),o=n.map(s=>r.store.put(s));await Promise.all([...o,r.done])}}catch(t){throw new Error("Error fetching data: "+(t instanceof Error?t.message:"Unknown error"))}}async sendEvents(t){t.data.properties=this.properties;try{const n=await fetch(`${this.apiPath}/api/v1/actor`,{headers:{Authorization:`ApiKey ${this.apiKey}`,"Content-Type":"application/json"},method:"POST",body:JSON.stringify(t)});if(!n.ok)throw new Error("Could not create an event 🐑");const{data:r}=await n.json();return r}catch(n){throw new Error("Error fetching data: "+(n instanceof Error?n.message:"Unknown error"))}}}function Yi({width:e,height:t,x:n=0,y:r=0,r:o=0}){const{innerWidth:s,innerHeight:i}=window,{topLeft:c=0,topRight:l=0,bottomRight:u=0,bottomLeft:f=0}=typeof o=="number"?{topLeft:o,topRight:o,bottomRight:o,bottomLeft:o}:o;return`M${s},${i}H0V0H${s}V${i}ZM${n+c},${r}a${c},${c},0,0,0-${c},${c}V${t+r-f}a${f},${f},0,0,0,${f},${f}H${e+n-u}a${u},${u},0,0,0,${u}-${u}V${r+l}a${l},${l},0,0,0-${l}-${l}Z`}function qi(e){let t,n,r,o,s;return{c(){t=kn("svg"),n=kn("path"),k(n,"d",e[2]),k(t,"class",r=`${e[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(i,c){te(i,t,c),De(t,n),e[11](t),o||(s=ct(t,"touchmove",e[3]),o=!0)},p(i,[c]){c&4&&k(n,"d",i[2]),c&2&&r!==(r=`${i[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&k(t,"class",r)},i:q,o:q,d(i){i&&J(t),e[11](null),o=!1,s()}}}function nr(e){if(!e)return null;const n=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return n!=="hidden"&&n!=="visible"&&e.scrollHeight>=e.clientHeight?e:nr(e.parentElement)}function Ki(e){let t={top:0,left:0};if(!e)return t;let n=e.ownerDocument.defaultView;for(;n!==window.top;){var r;const i=(r=n)==null?void 0:r.frameElement;if(i){var o,s;const c=i.getBoundingClientRect();t.top+=c.top+((o=c.scrollTop)!=null?o:0),t.left+=c.left+((s=c.scrollLeft)!=null?s:0)}n=n.parent}return t}function zi(e,t){const n=e.getBoundingClientRect();let r=n.y||n.top,o=n.bottom||r+n.height;if(t){const i=t.getBoundingClientRect(),c=i.y||i.top,l=i.bottom||c+i.height;r=Math.max(r,c),o=Math.min(o,l)}const s=Math.max(o-r,0);return{y:r,height:s}}function Ji(e,t,n){let{element:r,openingProperties:o}=t,s=!1,i,c;u();const l=()=>r;function u(){n(4,o={width:0,height:0,x:0,y:0,r:0})}function f(){n(1,s=!1),w()}function h(v=0,g=0,C=0,V=0,re,$){if($){const{y:H,height:G}=zi($,re),{x:X,width:W,left:M}=$.getBoundingClientRect();n(4,o={width:W+v*2,height:G+v*2,x:(X||M)+C-v,y:H+V-v,r:g})}else u()}function d(v){w(),v.tour.options.useModalOverlay?(_(v),m()):f()}function m(){n(1,s=!0)}const y=v=>{v.preventDefault()},E=v=>{v.stopPropagation()};function S(){window.addEventListener("touchmove",y,{passive:!1})}function w(){i&&(cancelAnimationFrame(i),i=void 0),window.removeEventListener("touchmove",y,{passive:!1})}function _(v){const{modalOverlayOpeningPadding:g,modalOverlayOpeningRadius:C,modalOverlayOpeningXOffset:V=0,modalOverlayOpeningYOffset:re=0}=v.options,$=Ki(v.target),H=nr(v.target),G=()=>{i=void 0,h(g,C,V+$.left,re+$.top,H,v.target),i=requestAnimationFrame(G)};G(),S()}function T(v){je[v?"unshift":"push"](()=>{r=v,n(0,r)})}return e.$$set=v=>{"element"in v&&n(0,r=v.element),"openingProperties"in v&&n(4,o=v.openingProperties)},e.$$.update=()=>{e.$$.dirty&16&&n(2,c=Yi(o))},[r,s,c,E,o,l,u,f,h,d,m,T]}class Gi extends fe{constructor(t){super(),ue(this,t,Ji,qi,le,{element:0,openingProperties:4,getElement:5,closeModalOpening:6,hide:7,positionModal:8,setupForStep:9,show:10})}get getElement(){return this.$$.ctx[5]}get closeModalOpening(){return this.$$.ctx[6]}get hide(){return this.$$.ctx[7]}get positionModal(){return this.$$.ctx[8]}get setupForStep(){return this.$$.ctx[9]}get show(){return this.$$.ctx[10]}}const Xi="https://shepherdpro.com",Yt="shepherdPro:userId";class Zi extends vt{constructor(){super(...arguments),this.isProEnabled=!1}async init(t,n,r){if(!t)throw new Error("Shepherd Pro: Missing required apiKey option.");if(this.apiKey=t,this.apiPath=n??Xi,this.properties=r??{},this.properties.context=Ti(window),this.apiKey){this.dataRequester=new Hi(this.apiKey,this.apiPath,this.properties),this.isProEnabled=!0;const o=localStorage.getItem(Yt),s=[this.dataRequester.getTourState()];o||s.push(this.createNewActor()),await Promise.all(s)}}async createNewActor(){if(!this.dataRequester)return;const t=await this.dataRequester.sendEvents({data:{currentUserId:null,eventType:"setup"}});localStorage.setItem(Yt,String(t.actorId))}async isTourEnabled(t){var r;if(!this.dataRequester)return;const n=await((r=this.dataRequester.tourStateDb)==null?void 0:r.get("tours",t));return(n==null?void 0:n.isActive)??!0}}class Qi extends vt{constructor(t={}){super(),this.trackedEvents=["active","cancel","complete","show"],fn(this);const n={exitOnEsc:!0,keyboardNavigation:!0};this.options=Object.assign({},n,t),this.classPrefix=dn(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),["active","cancel","complete","inactive","show","start"].map(s=>{(i=>{this.on(i,c=>{c=c||{},c.tour=this,ne.trigger(i,c)})})(s)}),this._setTourID(t.id);const{dataRequester:o}=ne;return o&&this.trackedEvents.forEach(s=>this.on(s,i=>{const{tour:c}=i,{id:l,steps:u}=c;let f;if(s!=="active"){const{step:d}=i;d&&(f=u.findIndex(m=>m.id===d.id)+1)}const h={currentUserId:localStorage.getItem(Yt),eventType:s,journeyData:{id:l,currentStep:f,numberOfSteps:u.length,tourOptions:c.options}};o.sendEvents({data:h})})),this}addStep(t,n){let r=t;return r instanceof Lt?r.tour=this:r=new Lt(this,r),N(n)?this.steps.push(r):this.steps.splice(n,0,r),r}addSteps(t){return Array.isArray(t)&&t.forEach(n=>{this.addStep(n)}),this}back(){const t=this.steps.indexOf(this.currentStep);this.show(t-1,!1)}async cancel(){if(this.options.confirmCancel){const t=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";let n;me(this.options.confirmCancel)?n=await this.options.confirmCancel():n=window.confirm(t),n&&this._done("cancel")}else this._done("cancel")}complete(){this._done("complete")}getById(t){return this.steps.find(n=>n.id===t)}getCurrentStep(){return this.currentStep}hide(){const t=this.getCurrentStep();if(t)return t.hide()}isActive(){return ne.activeTour===this}next(){const t=this.steps.indexOf(this.currentStep);t===this.steps.length-1?this.complete():this.show(t+1,!0)}removeStep(t){const n=this.getCurrentStep();this.steps.some((r,o)=>{if(r.id===t)return r.isOpen()&&r.hide(),r.destroy(),this.steps.splice(o,1),!0}),n&&n.id===t&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(t=0,n=!0){const r=Ye(t)?this.getById(t):this.steps[t];r&&(this._updateStateBeforeShow(),me(r.options.showOn)&&!r.options.showOn()?this._skipStep(r,n):(this.trigger("show",{step:r,previous:this.currentStep}),this.currentStep=r,r.show()))}async start(){ne.isProEnabled&&!await ne.isTourEnabled(this.options.id)||(this.trigger("start"),this.focusedElBeforeOpen=document.activeElement,this.currentStep=null,this.setupModal(),this._setupActiveTour(),this.next())}_done(t){const n=this.steps.indexOf(this.currentStep);if(Array.isArray(this.steps)&&this.steps.forEach(r=>r.destroy()),ki(this),this.trigger(t,{index:n}),ne.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),(t==="cancel"||t==="complete")&&this.modal){const r=document.querySelector(".shepherd-modal-overlay-container");r&&(r.remove(),this.modal=null)}He(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),ne.activeTour=this}setupModal(){this.modal=new Gi({target:this.options.modalContainer||document.body,props:{styles:this.styles}})}_skipStep(t,n){const r=this.steps.indexOf(t);if(r===this.steps.length-1)this.complete();else{const o=n?r+1:r-1;this.show(o,n)}}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(t){const n=this.options.tourName||"tour",r=t||pn();this.id=`${n}--${r}`}}const ne=new Zi,rr=typeof window>"u";ne.Step=rr?Vr:Lt,ne.Tour=rr?Ur:Qi;const ft=pe.createContext(void 0),es=ft.Consumer,ts=()=>{const e=pe.useContext(ft);if(!e)throw new Error("useShepherd must be used within a ShepherdJourneyProvider");const{Shepherd:t}=e;return t},ns=({apiKey:e,apiPath:t,properties:n,children:r})=>(typeof window<"u"&&e&&ne.init(e,t,n),xr.jsx(ft.Provider,{value:{Shepherd:ne},children:r}));oe.JourneyMethods=es,oe.ShepherdJourneyContext=ft,oe.ShepherdJourneyProvider=ns,oe.useShepherd=ts,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-shepherd",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -24,12 +24,12 @@
24
24
  "src"
25
25
  ],
26
26
  "dependencies": {
27
- "shepherd.js": "^12.0.2"
27
+ "shepherd.js": "12.0.3"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@testing-library/jest-dom": "^6.2.0",
31
- "@testing-library/react": "^15.0.6",
32
- "@types/react": "^18.3.1",
31
+ "@testing-library/react": "^15.0.7",
32
+ "@types/react": "^18.3.2",
33
33
  "@vitejs/plugin-react": "^4.2.1",
34
34
  "@vitest/ui": "^1.6.0",
35
35
  "happy-dom": "^14.7.1",
package/src/index.tsx CHANGED
@@ -3,10 +3,8 @@ import { createContext, FC, useContext, type ReactNode } from 'react';
3
3
  import Shepherd from 'shepherd.js';
4
4
  import type ShepherdPro from 'shepherd.js';
5
5
 
6
- // declare const window: Window;
7
-
8
6
  interface ShepherdProviderProps {
9
- apiKey: string;
7
+ apiKey?: string;
10
8
  apiPath?: string;
11
9
  properties?: Record<string, unknown>;
12
10
  children?: ReactNode;
@@ -41,7 +39,7 @@ export const ShepherdJourneyProvider: FC<ShepherdProviderProps> = ({
41
39
  children
42
40
  }: ShepherdProviderProps) => {
43
41
  if (typeof window !== 'undefined') {
44
- Shepherd.init(apiKey, apiPath, properties);
42
+ if (apiKey) Shepherd.init(apiKey, apiPath, properties);
45
43
  }
46
44
 
47
45
  return (