UNPKG

vue-shepherd

Version:

A Vue wrapper for the site tour library Shepherd.

1 lines 53.8 kB
var VueShepherd=function(t){"use strict";/*! shepherd.js 14.4.0 */function e(t){return t instanceof HTMLElement}function n(t){return"function"==typeof t}function o(t){return"string"==typeof t}function i(t){return void 0===t}class s{on(t,e,n,o=!1){var s;return i(this.bindings)&&(this.bindings={}),i(this.bindings[t])&&(this.bindings[t]=[]),null==(s=this.bindings[t])||s.push({handler:e,ctx:n,once:o}),this}once(t,e,n){return this.on(t,e,n,!0)}off(t,e){if(i(this.bindings)||i(this.bindings[t]))return this;var n;i(e)?delete this.bindings[t]:null==(n=this.bindings[t])||n.forEach(((n,o)=>{var i;n.handler===e&&(null==(i=this.bindings[t])||i.splice(o,1))}));return this}trigger(t,...e){var n;!i(this.bindings)&&this.bindings[t]&&(null==(n=this.bindings[t])||n.forEach(((n,o)=>{const{ctx:i,handler:s,once:r}=n,l=i||this;var c;(s.apply(l,e),r)&&(null==(c=this.bindings[t])||c.splice(o,1))})));return this}}function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},r.apply(null,arguments)}function l(t,e){if(null==t)return{};var n={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(e.includes(o))continue;n[o]=t[o]}return n}const c={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")};function a(t,e){return e}function u(t,e){return t.filter((t=>void 0!==t))}var d;function f(t){return"object"!=typeof t||null===t?0:Array.isArray(t)?2:function(t){if(!p.has(Object.prototype.toString.call(t)))return!1;const{constructor:e}=t;if(void 0===e)return!0;const n=e.prototype;if(null===n||"object"!=typeof n||!p.has(Object.prototype.toString.call(n)))return!1;if(!n.hasOwnProperty("isPrototypeOf"))return!1;return!0}(t)?1:t instanceof Set?3:t instanceof Map?4:5}function h(t){return{*[Symbol.iterator](){for(const e of t)for(const t of e)yield t}}}!function(t){t[t.NOT=0]="NOT",t[t.RECORD=1]="RECORD",t[t.ARRAY=2]="ARRAY",t[t.SET=3]="SET",t[t.MAP=4]="MAP",t[t.OTHER=5]="OTHER"}(d||(d={}));const p=new Set(["[object Object]","[object Module]"]);const m={mergeRecords:function(t,e,n){const o={};for(const r of function(t){const e=new Set;for(const n of t)for(const t of[...Object.keys(n),...Object.getOwnPropertySymbols(n)])e.add(t);return e}(t)){const l=[];for(const e of t)s=r,"object"==typeof(i=e)&&Object.prototype.propertyIsEnumerable.call(i,s)&&l.push(e[r]);if(0===l.length)continue;const a=e.metaDataUpdater(n,{key:r,parents:t}),u=y(l,e,a);u!==c.skip&&("__proto__"===r?Object.defineProperty(o,r,{value:u,configurable:!0,enumerable:!0,writable:!0}):o[r]=u)}var i,s;return o},mergeArrays:function(t){return t.flat()},mergeSets:function(t){return new Set(h(t))},mergeMaps:function(t){return new Map(h(t))},mergeOthers:function(t){return t.at(-1)}};function g(...t){return function(t,e){const n=function(t,e){var n,o,i;return{defaultMergeFunctions:m,mergeFunctions:r({},m,Object.fromEntries(Object.entries(t).filter((([t,e])=>Object.hasOwn(m,t))).map((([t,e])=>!1===e?[t,m.mergeOthers]:[t,e])))),metaDataUpdater:null!=(n=t.metaDataUpdater)?n:a,deepmerge:e,useImplicitDefaultMerging:null!=(o=t.enableImplicitDefaultMerging)&&o,filterValues:!1===t.filterValues?void 0:null!=(i=t.filterValues)?i:u,actions:c}}(t,o);function o(...t){return y(t,n,e)}return o}({})(...t)}function y(t,e,n){var o;const i=null!=(o=null==e.filterValues?void 0:e.filterValues(t,n))?o:t;if(0===i.length)return;if(1===i.length)return v(i,e,n);const s=f(i[0]);if(0!==s&&5!==s)for(let t=1;t<i.length;t++)if(f(i[t])!==s)return v(i,e,n);switch(s){case 1:return function(t,e,n){const o=e.mergeFunctions.mergeRecords(t,e,n);if(o===c.defaultMerge||e.useImplicitDefaultMerging&&void 0===o&&e.mergeFunctions.mergeRecords!==e.defaultMergeFunctions.mergeRecords)return e.defaultMergeFunctions.mergeRecords(t,e,n);return o}(i,e,n);case 2:return function(t,e,n){const o=e.mergeFunctions.mergeArrays(t,e,n);if(o===c.defaultMerge||e.useImplicitDefaultMerging&&void 0===o&&e.mergeFunctions.mergeArrays!==e.defaultMergeFunctions.mergeArrays)return e.defaultMergeFunctions.mergeArrays(t);return o}(i,e,n);case 3:return function(t,e,n){const o=e.mergeFunctions.mergeSets(t,e,n);if(o===c.defaultMerge||e.useImplicitDefaultMerging&&void 0===o&&e.mergeFunctions.mergeSets!==e.defaultMergeFunctions.mergeSets)return e.defaultMergeFunctions.mergeSets(t);return o}(i,e,n);case 4:return function(t,e,n){const o=e.mergeFunctions.mergeMaps(t,e,n);if(o===c.defaultMerge||e.useImplicitDefaultMerging&&void 0===o&&e.mergeFunctions.mergeMaps!==e.defaultMergeFunctions.mergeMaps)return e.defaultMergeFunctions.mergeMaps(t);return o}(i,e,n);default:return v(i,e,n)}}function v(t,e,n){const o=e.mergeFunctions.mergeOthers(t,e,n);return o===c.defaultMerge||e.useImplicitDefaultMerging&&void 0===o&&e.mergeFunctions.mergeOthers!==e.defaultMergeFunctions.mergeOthers?e.defaultMergeFunctions.mergeOthers(t):o}function b(t){const e=Object.getOwnPropertyNames(t.constructor.prototype);for(let n=0;n<e.length;n++){const o=e[n],i=t[o];"constructor"!==o&&"function"==typeof i&&(t[o]=i.bind(t))}return t}function x(t){const{event:e,selector:n}=t.options.advanceOn||{};if(!e)return console.error("advanceOn was defined, but no event name was passed.");{const o=function(t,e){return n=>{if(t.isOpen()){const o=t.el&&n.currentTarget===t.el;(!i(e)&&n.currentTarget.matches(e)||o)&&t.tour.next()}}}(t,n);let s=null;if(!i(n)&&(s=document.querySelector(n),!s))return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);s?(s.addEventListener(e,o),t.on("destroy",(()=>s.removeEventListener(e,o)))):(document.body.addEventListener(e,o,!0),t.on("destroy",(()=>document.body.removeEventListener(e,o,!0))))}}function w(t){return o(t)&&""!==t?"-"!==t.charAt(t.length-1)?`${t}-`:t:""}function $(t){return null==t||(!t.element||!t.on)}function E(){let t=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:3&n|8).toString(16)}))}const O=["start","end"],T=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-"+O[0],e+"-"+O[1])),[]),S=Math.min,_=Math.max,A=Math.round,I=Math.floor,L=t=>({x:t,y:t}),P={left:"right",right:"left",bottom:"top",top:"bottom"},M={start:"end",end:"start"};function R(t,e,n){return _(t,S(e,n))}function k(t,e){return"function"==typeof t?t(e):t}function C(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function D(t){return"x"===t?"y":"x"}function H(t){return"y"===t?"height":"width"}function j(t){return["top","bottom"].includes(C(t))?"y":"x"}function B(t){return D(j(t))}function V(t,e,n){void 0===n&&(n=!1);const o=F(t),i=B(t),s=H(i);let r="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=W(r)),[r,W(r)]}function N(t){return t.replace(/start|end/g,(t=>M[t]))}function W(t){return t.replace(/left|right|bottom|top/g,(t=>P[t]))}function q(t){return"number"!=typeof t?function(t){return r({top:0,right:0,bottom:0,left:0},t)}(t):{top:t,right:t,bottom:t,left:t}}function z(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}const U=["crossAxis","alignment","allowedPlacements","autoAlignment"],Y=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],X=["mainAxis","crossAxis","limiter"];function Z(t,e,n){let{reference:o,floating:i}=t;const s=j(e),r=B(e),l=H(r),c=C(e),a="y"===s,u=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,f=o[l]/2-i[l]/2;let h;switch(c){case"top":h={x:u,y:o.y-i.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:d};break;case"left":h={x:o.x-i.width,y:d};break;default:h={x:o.x,y:o.y}}switch(F(e)){case"start":h[r]-=f*(n&&a?-1:1);break;case"end":h[r]+=f*(n&&a?-1:1)}return h}async function K(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:s,rects:r,elements:l,strategy:c}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=k(e,t),p=q(h),m=l[f?"floating"===d?"reference":"floating":d],g=z(await s.getClippingRect({element:null==(n=await(null==s.isElement?void 0:s.isElement(m)))||n?m:m.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(l.floating)),boundary:a,rootBoundary:u,strategy:c})),y="floating"===d?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l.floating)),b=await(null==s.isElement?void 0:s.isElement(v))&&await(null==s.getScale?void 0:s.getScale(v))||{x:1,y:1},x=z(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:v,strategy:c}):y);return{top:(g.top-x.top+p.top)/b.y,bottom:(x.bottom-g.bottom+p.bottom)/b.y,left:(g.left-x.left+p.left)/b.x,right:(x.right-g.right+p.right)/b.x}}function G(){return"undefined"!=typeof window}function J(t){return et(t)?(t.nodeName||"").toLowerCase():"#document"}function Q(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function tt(t){var e;return null==(e=(et(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function et(t){return!!G()&&(t instanceof Node||t instanceof Q(t).Node)}function nt(t){return!!G()&&(t instanceof Element||t instanceof Q(t).Element)}function ot(t){return!!G()&&(t instanceof HTMLElement||t instanceof Q(t).HTMLElement)}function it(t){return!(!G()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof Q(t).ShadowRoot)}function st(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=dt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function rt(t){return["table","td","th"].includes(J(t))}function lt(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function ct(t){const e=at(),n=nt(t)?dt(t):t;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function at(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ut(t){return["html","body","#document"].includes(J(t))}function dt(t){return Q(t).getComputedStyle(t)}function ft(t){return nt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ht(t){if("html"===J(t))return t;const e=t.assignedSlot||t.parentNode||it(t)&&t.host||tt(t);return it(e)?e.host:e}function pt(t){const e=ht(t);return ut(e)?t.ownerDocument?t.ownerDocument.body:t.body:ot(e)&&st(e)?e:pt(e)}function mt(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const i=pt(t),s=i===(null==(o=t.ownerDocument)?void 0:o.body),r=Q(i);if(s){const t=gt(r);return e.concat(r,r.visualViewport||[],st(i)?i:[],t&&n?mt(t):[])}return e.concat(i,mt(i,[],n))}function gt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function yt(t){const e=dt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=ot(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,l=A(n)!==s||A(o)!==r;return l&&(n=s,o=r),{width:n,height:o,$:l}}function vt(t){return nt(t)?t:t.contextElement}function bt(t){const e=vt(t);if(!ot(e))return L(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=yt(e);let r=(s?A(n.width):n.width)/o,l=(s?A(n.height):n.height)/i;return r&&Number.isFinite(r)||(r=1),l&&Number.isFinite(l)||(l=1),{x:r,y:l}}const xt=L(0);function wt(t){const e=Q(t);return at()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:xt}function $t(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const i=t.getBoundingClientRect(),s=vt(t);let r=L(1);e&&(o?nt(o)&&(r=bt(o)):r=bt(t));const l=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==Q(t))&&e}(s,n,o)?wt(s):L(0);let c=(i.left+l.x)/r.x,a=(i.top+l.y)/r.y,u=i.width/r.x,d=i.height/r.y;if(s){const t=Q(s),e=o&&nt(o)?Q(o):o;let n=t,i=gt(n);for(;i&&o&&e!==n;){const t=bt(i),e=i.getBoundingClientRect(),o=dt(i),s=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,r=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,a*=t.y,u*=t.x,d*=t.y,c+=s,a+=r,n=Q(i),i=gt(n)}}return z({width:u,height:d,x:c,y:a})}function Et(t,e){const n=ft(t).scrollLeft;return e?e.left+n:$t(tt(t)).left+n}function Ot(t,e,n){void 0===n&&(n=!1);const o=t.getBoundingClientRect();return{x:o.left+e.scrollLeft-(n?0:Et(t,o)),y:o.top+e.scrollTop}}function Tt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=Q(t),o=tt(t),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,l=0,c=0;if(i){s=i.width,r=i.height;const t=at();(!t||t&&"fixed"===e)&&(l=i.offsetLeft,c=i.offsetTop)}return{width:s,height:r,x:l,y:c}}(t,n);else if("document"===e)o=function(t){const e=tt(t),n=ft(t),o=t.ownerDocument.body,i=_(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=_(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Et(t);const l=-n.scrollTop;return"rtl"===dt(o).direction&&(r+=_(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:l}}(tt(t));else if(nt(e))o=function(t,e){const n=$t(t,!0,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=ot(t)?bt(t):L(1);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:i*s.x,y:o*s.y}}(e,n);else{const n=wt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return z(o)}function St(t,e){const n=ht(t);return!(n===e||!nt(n)||ut(n))&&("fixed"===dt(n).position||St(n,e))}function _t(t,e,n){const o=ot(e),i=tt(e),s="fixed"===n,r=$t(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const c=L(0);if(o||!o&&!s)if(("body"!==J(e)||st(i))&&(l=ft(e)),o){const t=$t(e,!0,s,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else i&&(c.x=Et(i));const a=!i||o||s?L(0):Ot(i,l);return{x:r.left+l.scrollLeft-c.x-a.x,y:r.top+l.scrollTop-c.y-a.y,width:r.width,height:r.height}}function At(t){return"static"===dt(t).position}function It(t,e){if(!ot(t)||"fixed"===dt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return tt(t)===n&&(n=n.ownerDocument.body),n}function Lt(t,e){const n=Q(t);if(lt(t))return n;if(!ot(t)){let e=ht(t);for(;e&&!ut(e);){if(nt(e)&&!At(e))return e;e=ht(e)}return n}let o=It(t,e);for(;o&&rt(o)&&At(o);)o=It(o,e);return o&&ut(o)&&At(o)&&!ct(o)?n:o||function(t){let e=ht(t);for(;ot(e)&&!ut(e);){if(ct(e))return e;if(lt(e))return null;e=ht(e)}return null}(t)||n}const Pt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s="fixed"===i,r=tt(o),l=!!e&&lt(e.floating);if(o===r||l&&s)return n;let c={scrollLeft:0,scrollTop:0},a=L(1);const u=L(0),d=ot(o);if((d||!d&&!s)&&(("body"!==J(o)||st(r))&&(c=ft(o)),ot(o))){const t=$t(o);a=bt(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const f=!r||d||s?L(0):Ot(r,c,!0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+u.x+f.x,y:n.y*a.y-c.scrollTop*a.y+u.y+f.y}},getDocumentElement:tt,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s="clippingAncestors"===n?lt(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=mt(t,[],!1).filter((t=>nt(t)&&"body"!==J(t))),i=null;const s="fixed"===dt(t).position;let r=s?ht(t):t;for(;nt(r)&&!ut(r);){const e=dt(r),n=ct(r);n||"fixed"!==e.position||(i=null),(s?!n&&!i:!n&&"static"===e.position&&i&&["absolute","fixed"].includes(i.position)||st(r)&&!n&&St(t,r))?o=o.filter((t=>t!==r)):i=e,r=ht(r)}return e.set(t,o),o}(e,this._c):[].concat(n),r=[...s,o],l=r[0],c=r.reduce(((t,n)=>{const o=Tt(e,n,i);return t.top=_(o.top,t.top),t.right=S(o.right,t.right),t.bottom=S(o.bottom,t.bottom),t.left=_(o.left,t.left),t}),Tt(e,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:Lt,getElementRects:async function(t){const e=this.getOffsetParent||Lt,n=this.getDimensions,o=await n(t.floating);return{reference:_t(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=yt(t);return{width:e,height:n}},getScale:bt,isElement:nt,isRTL:function(t){return"rtl"===dt(t).direction}};function Mt(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:a=!1}=o,u=vt(t),d=i||s?[...u?mt(u):[],...mt(e)]:[];d.forEach((t=>{i&&t.addEventListener("scroll",n,{passive:!0}),s&&t.addEventListener("resize",n)}));const f=u&&c?function(t,e){let n,o=null;const i=tt(t);function s(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function l(c,a){void 0===c&&(c=!1),void 0===a&&(a=1),s();const{left:u,top:d,width:f,height:h}=t.getBoundingClientRect();if(c||e(),!f||!h)return;const p={rootMargin:-I(d)+"px "+-I(i.clientWidth-(u+f))+"px "+-I(i.clientHeight-(d+h))+"px "+-I(u)+"px",threshold:_(0,S(1,a))||1};let m=!0;function g(t){const e=t[0].intersectionRatio;if(e!==a){if(!m)return l();e?l(!1,e):n=setTimeout((()=>{l(!1,1e-7)}),1e3)}m=!1}try{o=new IntersectionObserver(g,r({},p,{root:i.ownerDocument}))}catch(t){o=new IntersectionObserver(g,p)}o.observe(t)}(!0),s}(u,n):null;let h,p=-1,m=null;l&&(m=new ResizeObserver((t=>{let[o]=t;o&&o.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=m)||t.observe(e)}))),n()})),u&&!a&&m.observe(u),m.observe(e));let g=a?$t(t):null;return a&&function e(){const o=$t(t);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n();g=o,h=requestAnimationFrame(e)}(),n(),()=>{var t;d.forEach((t=>{i&&t.removeEventListener("scroll",n),s&&t.removeEventListener("resize",n)})),null==f||f(),null==(t=m)||t.disconnect(),m=null,a&&cancelAnimationFrame(h)}}const Rt=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:s,middlewareData:r,placement:c,platform:a,elements:u}=e,d=k(t,e),{crossAxis:f=!1,alignment:h,allowedPlacements:p=T,autoAlignment:m=!0}=d,g=l(d,U),y=void 0!==h||p===T?function(t,e,n){return(t?[...n.filter((e=>F(e)===t)),...n.filter((e=>F(e)!==t))]:n.filter((t=>C(t)===t))).filter((n=>!t||F(n)===t||!!e&&N(n)!==n))}(h||null,m,p):p,v=await K(e,g),b=(null==(n=r.autoPlacement)?void 0:n.index)||0,x=y[b];if(null==x)return{};const w=V(x,s,await(null==a.isRTL?void 0:a.isRTL(u.floating)));if(c!==x)return{reset:{placement:y[0]}};const $=[v[C(x)],v[w[0]],v[w[1]]],E=[...(null==(o=r.autoPlacement)?void 0:o.overflows)||[],{placement:x,overflows:$}],O=y[b+1];if(O)return{data:{index:b+1,overflows:E},reset:{placement:O}};const S=E.map((t=>{const e=F(t.placement);return[t.placement,e&&f?t.overflows.slice(0,2).reduce(((t,e)=>t+e),0):t.overflows[0],t.overflows]})).sort(((t,e)=>t[1]-e[1])),_=(null==(i=S.filter((t=>t[2].slice(0,F(t[0])?2:3).every((t=>t<=0))))[0])?void 0:i[0])||S[0][0];return _!==c?{data:{index:b+1,overflows:E},reset:{placement:_}}:{}}}},kt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,s=k(t,e),{mainAxis:c=!0,crossAxis:a=!1,limiter:u={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}}}=s,d=l(s,X),f={x:n,y:o},h=await K(e,d),p=j(C(i)),m=D(p);let g=f[m],y=f[p];if(c){const t="y"===m?"bottom":"right";g=R(g+h["y"===m?"top":"left"],g,g-h[t])}if(a){const t="y"===p?"bottom":"right";y=R(y+h["y"===p?"top":"left"],y,y-h[t])}const v=u.fn(r({},e,{[m]:g,[p]:y}));return r({},v,{data:{x:v.x-n,y:v.y-o}})}}},Ct=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:a,elements:u}=e,d=k(t,e),{mainAxis:f=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0}=d,v=l(d,Y);if(null!=(n=s.arrow)&&n.alignmentOffset)return{};const b=C(i),x=j(c),w=C(c)===c,$=await(null==a.isRTL?void 0:a.isRTL(u.floating)),E=p||(w||!y?[W(c)]:function(t){const e=W(t);return[N(t),e,N(e)]}(c)),O="none"!==g;!p&&O&&E.push(...function(t,e,n,o){const i=F(t);let s=function(t,e,n){const o=["left","right"],i=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?s:r;default:return[]}}(C(t),"start"===n,o);return i&&(s=s.map((t=>t+"-"+i)),e&&(s=s.concat(s.map(N)))),s}(c,y,g,$));const T=[c,...E],S=await K(e,v),_=[];let A=(null==(o=s.flip)?void 0:o.overflows)||[];if(f&&_.push(S[b]),h){const t=V(i,r,$);_.push(S[t[0]],S[t[1]])}if(A=[...A,{placement:i,overflows:_}],!_.every((t=>t<=0))){var I,L;const t=((null==(I=s.flip)?void 0:I.index)||0)+1,e=T[t];if(e)return{data:{index:t,overflows:A},reset:{placement:e}};let n=null==(L=A.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:L.placement;if(!n)switch(m){case"bestFit":{var P;const t=null==(P=A.filter((t=>{if(O){const e=j(t.placement);return e===x||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:P[0];t&&(n=t);break}case"initialPlacement":n=c}if(i!==n)return{reset:{placement:n}}}return{}}}},Ft=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:l,elements:c,middlewareData:a}=e,{element:u,padding:d=0}=k(t,e)||{};if(null==u)return{};const f=q(d),h={x:n,y:o},p=B(i),m=H(p),g=await l.getDimensions(u),y="y"===p,v=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",w=s.reference[m]+s.reference[p]-h[p]-s.floating[m],$=h[p]-s.reference[p],E=await(null==l.getOffsetParent?void 0:l.getOffsetParent(u));let O=E?E[x]:0;O&&await(null==l.isElement?void 0:l.isElement(E))||(O=c.floating[x]||s.floating[m]);const T=w/2-$/2,_=O/2-g[m]/2-1,A=S(f[v],_),I=S(f[b],_),L=A,P=O-g[m]-I,M=O/2-g[m]/2+T,C=R(L,M,P),D=!a.arrow&&null!=F(i)&&M!==C&&s.reference[m]/2-(M<L?A:I)-g[m]/2<0,j=D?M<L?M-L:M-P:0;return{[p]:h[p]+j,data:r({[p]:C,centerOffset:M-C-j},D&&{alignmentOffset:j}),reset:D}}}),Dt=function(t){return void 0===t&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:i,rects:s,middlewareData:l}=e,{offset:c=0,mainAxis:a=!0,crossAxis:u=!0}=k(t,e),d={x:n,y:o},f=j(i),h=D(f);let p=d[h],m=d[f];const g=k(c,e),y="number"==typeof g?{mainAxis:g,crossAxis:0}:r({mainAxis:0,crossAxis:0},g);if(a){const t="y"===h?"height":"width",e=s.reference[h]-s.floating[t]+y.mainAxis,n=s.reference[h]+s.reference[t]-y.mainAxis;p<e?p=e:p>n&&(p=n)}if(u){var v,b;const t="y"===h?"width":"height",e=["top","left"].includes(C(i)),n=s.reference[f]-s.floating[t]+(e&&(null==(v=l.offset)?void 0:v[f])||0)+(e?0:y.crossAxis),o=s.reference[f]+s.reference[t]+(e?0:(null==(b=l.offset)?void 0:b[f])||0)-(e?y.crossAxis:0);m<n?m=n:m>o&&(m=o)}return{[h]:p,[f]:m}}}},Ht=(t,e,n)=>{const o=new Map,i=r({platform:Pt},n),s=r({},i.platform,{_c:o});return(async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:l}=n,c=s.filter(Boolean),a=await(null==l.isRTL?void 0:l.isRTL(e));let u=await l.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:f}=Z(u,o,a),h=o,p={},m=0;for(let n=0;n<c.length;n++){const{name:s,fn:g}=c[n],{x:y,y:v,data:b,reset:x}=await g({x:d,y:f,initialPlacement:o,placement:h,strategy:i,middlewareData:p,rects:u,platform:l,elements:{reference:t,floating:e}});d=null!=y?y:d,f=null!=v?v:f,p=r({},p,{[s]:r({},p[s],b)}),x&&m<=50&&(m++,"object"==typeof x&&(x.placement&&(h=x.placement),x.rects&&(u=!0===x.rects?await l.getElementRects({reference:t,floating:e,strategy:i}):x.rects),({x:d,y:f}=Z(u,h,a))),n=-1)}return{x:d,y:f,placement:h,strategy:i,middlewareData:p}})(t,e,r({},i,{platform:s}))};function jt(t){t.cleanup&&t.cleanup();const n=t._getResolvedAttachToOptions();let o=n.element;const i=function(t,e){var n,o,i;const s={strategy:"absolute",middleware:[]},r=function(t){if(t.options.arrow&&t.el)return t.el.querySelector(".shepherd-arrow");return!1}(e),l=$(t),c=null==(n=t.on)?void 0:n.includes("auto"),a=(null==t||null==(o=t.on)?void 0:o.includes("-start"))||(null==t||null==(i=t.on)?void 0:i.includes("-end"));if(!l){var u;if(c)s.middleware.push(Rt({crossAxis:!0,alignment:a?null==t||null==(u=t.on)?void 0:u.split("-").pop():null}));else s.middleware.push(Ct());s.middleware.push(kt({limiter:Dt(),crossAxis:!0})),r&&s.middleware.push(Ft({element:r,padding:a?4:0})),c||(s.placement=t.on)}return g(s,e.options.floatingUIOptions||{})}(n,t),s=$(n);if(s){o=document.body;t.shepherdElementComponent.getElement().classList.add("shepherd-centered")}return t.cleanup=Mt(o,t.el,(()=>{t.el?function(t,n,o,i){Ht(t,n.el,o).then(function(t,n){return({x:o,y:i,placement:s,middlewareData:r})=>t.el?(n?Object.assign(t.el.style,{position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)"}):Object.assign(t.el.style,{position:"absolute",left:`${o}px`,top:`${i}px`}),t.el.dataset.popperPlacement=s,function(t,n){const o=t.querySelector(".shepherd-arrow");if(e(o)&&n.arrow){const{x:t,y:e}=n.arrow;Object.assign(o.style,{left:null!=t?`${t}px`:"",top:null!=e?`${e}px`:""})}}(t.el,r),t):t}(n,i)).then((t=>new Promise((e=>{setTimeout((()=>e(t)),300)})))).then((t=>{null!=t&&t.el&&t.el.focus({preventScroll:!0})}))}(o,t,i,s):null==t.cleanup||t.cleanup()})),t.target=n.element,i}function Bt(){}function Vt(t,e){for(const n in e)t[n]=e[n];return t}function Nt(t){return t()}function Wt(){return Object.create(null)}function qt(t){t.forEach(Nt)}function zt(t){return"function"==typeof t}function Ut(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function Yt(t,e){t.appendChild(e)}function Xt(t,e,n){t.insertBefore(e,n||null)}function Zt(t){t.parentNode&&t.parentNode.removeChild(t)}function Kt(t){return document.createElement(t)}function Gt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Jt(t){return document.createTextNode(t)}function Qt(){return Jt(" ")}function te(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function ee(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const ne=["width","height"];function oe(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const o in e)null==e[o]?t.removeAttribute(o):"style"===o?t.style.cssText=e[o]:"__value"===o?t.value=t[o]=e[o]:n[o]&&n[o].set&&-1===ne.indexOf(o)?t[o]=e[o]:ee(t,o,e[o])}function ie(t,e,n){t.classList.toggle(e,!!n)}let se;function re(t){se=t}function le(){if(!se)throw new Error("Function called outside component initialization");return se}function ce(t){le().$$.after_update.push(t)}const ae=[],ue=[];let de=[];const fe=[],he=Promise.resolve();let pe=!1;function me(t){de.push(t)}const ge=new Set;let ye=0;function ve(){if(0!==ye)return;const t=se;do{try{for(;ye<ae.length;){const t=ae[ye];ye++,re(t),be(t.$$)}}catch(t){throw ae.length=0,ye=0,t}for(re(null),ae.length=0,ye=0;ue.length;)ue.pop()();for(let t=0;t<de.length;t+=1){const e=de[t];ge.has(e)||(ge.add(e),e())}de.length=0}while(ae.length);for(;fe.length;)fe.pop()();pe=!1,ge.clear(),re(t)}function be(t){if(null!==t.fragment){t.update(),qt(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(me)}}const xe=new Set;let we;function $e(){we={r:0,c:[],p:we}}function Ee(){we.r||qt(we.c),we=we.p}function Oe(t,e){t&&t.i&&(xe.delete(t),t.i(e))}function Te(t,e,n,o){if(t&&t.o){if(xe.has(t))return;xe.add(t),we.c.push((()=>{xe.delete(t),o&&(n&&t.d(1),o())})),t.o(e)}else o&&o()}function Se(t){return void 0!==(null==t?void 0:t.length)?t:Array.from(t)}function _e(t){t&&t.c()}function Ae(t,e,n){const{fragment:o,after_update:i}=t.$$;o&&o.m(e,n),me((()=>{const e=t.$$.on_mount.map(Nt).filter(zt);t.$$.on_destroy?t.$$.on_destroy.push(...e):qt(e),t.$$.on_mount=[]})),i.forEach(me)}function Ie(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];de.forEach((o=>-1===t.indexOf(o)?e.push(o):n.push(o))),n.forEach((t=>t())),de=e}(n.after_update),qt(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Le(t,e){-1===t.$$.dirty[0]&&(ae.push(t),pe||(pe=!0,he.then(ve)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Pe(t,e,n,o,i,s,r=null,l=[-1]){const c=se;re(t);const a=t.$$={fragment:null,ctx:[],props:s,update:Bt,not_equal:i,bound:Wt(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(c?c.$$.context:[])),callbacks:Wt(),dirty:l,skip_bound:!1,root:e.target||c.$$.root};r&&r(a.root);let u=!1;if(a.ctx=n?n(t,e.props||{},((e,n,...o)=>{const s=o.length?o[0]:n;return a.ctx&&i(a.ctx[e],a.ctx[e]=s)&&(!a.skip_bound&&a.bound[e]&&a.bound[e](s),u&&Le(t,e)),n})):[],a.update(),u=!0,qt(a.before_update),a.fragment=!!o&&o(a.ctx),e.target){if(e.hydrate){const t=function(t){return Array.from(t.childNodes)}(e.target);a.fragment&&a.fragment.l(t),t.forEach(Zt)}else a.fragment&&a.fragment.c();e.intro&&Oe(t.$$.fragment),Ae(t,e.target,e.anchor),ve()}re(c)}class Me{constructor(){this.$$=void 0,this.$$set=void 0}$destroy(){Ie(this,1),this.$destroy=Bt}$on(t,e){if(!zt(e))return Bt;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Re(t){let e,n,o,i,s;return{c(){e=Kt("button"),ee(e,"aria-label",n=t[3]?t[3]:null),ee(e,"class",o=`${t[1]||""} shepherd-button ${t[4]?"shepherd-button-secondary":""}`),e.disabled=t[2],ee(e,"tabindex","0"),ee(e,"type","button")},m(n,o){Xt(n,e,o),e.innerHTML=t[5],i||(s=te(e,"click",(function(){zt(t[0])&&t[0].apply(this,arguments)})),i=!0)},p(i,[s]){t=i,32&s&&(e.innerHTML=t[5]),8&s&&n!==(n=t[3]?t[3]:null)&&ee(e,"aria-label",n),18&s&&o!==(o=`${t[1]||""} shepherd-button ${t[4]?"shepherd-button-secondary":""}`)&&ee(e,"class",o),4&s&&(e.disabled=t[2])},i:Bt,o:Bt,d(t){t&&Zt(e),i=!1,s()}}}function ke(t,e,o){let i,s,r,l,c,a,{config:u,step:d}=e;function f(t){return n(t)?t.call(d):t}return t.$$set=t=>{"config"in t&&o(6,u=t.config),"step"in t&&o(7,d=t.step)},t.$$.update=()=>{192&t.$$.dirty&&(o(0,i=u.action?u.action.bind(d.tour):null),o(1,s=u.classes),o(2,r=!!u.disabled&&f(u.disabled)),o(3,l=u.label?f(u.label):null),o(4,c=u.secondary),o(5,a=u.text?f(u.text):null))},[i,s,r,l,c,a,u,d]}"undefined"!=typeof window&&(window.__svelte||(window.__svelte={v:new Set})).v.add("4");class Ce extends Me{constructor(t){super(),Pe(this,t,ke,Re,Ut,{config:6,step:7})}}function Fe(t,e,n){const o=t.slice();return o[2]=e[n],o}function De(t){let e,n,o=Se(t[1]),i=[];for(let e=0;e<o.length;e+=1)i[e]=He(Fe(t,o,e));const s=t=>Te(i[t],1,1,(()=>{i[t]=null}));return{c(){for(let t=0;t<i.length;t+=1)i[t].c();e=Jt("")},m(t,o){for(let e=0;e<i.length;e+=1)i[e]&&i[e].m(t,o);Xt(t,e,o),n=!0},p(t,n){if(3&n){let r;for(o=Se(t[1]),r=0;r<o.length;r+=1){const s=Fe(t,o,r);i[r]?(i[r].p(s,n),Oe(i[r],1)):(i[r]=He(s),i[r].c(),Oe(i[r],1),i[r].m(e.parentNode,e))}for($e(),r=o.length;r<i.length;r+=1)s(r);Ee()}},i(t){if(!n){for(let t=0;t<o.length;t+=1)Oe(i[t]);n=!0}},o(t){i=i.filter(Boolean);for(let t=0;t<i.length;t+=1)Te(i[t]);n=!1},d(t){t&&Zt(e),function(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}(i,t)}}}function He(t){let e,n;return e=new Ce({props:{config:t[2],step:t[0]}}),{c(){_e(e.$$.fragment)},m(t,o){Ae(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.config=t[2]),1&n&&(o.step=t[0]),e.$set(o)},i(t){n||(Oe(e.$$.fragment,t),n=!0)},o(t){Te(e.$$.fragment,t),n=!1},d(t){Ie(e,t)}}}function je(t){let e,n,o=t[1]&&De(t);return{c(){e=Kt("footer"),o&&o.c(),ee(e,"class","shepherd-footer")},m(t,i){Xt(t,e,i),o&&o.m(e,null),n=!0},p(t,[n]){t[1]?o?(o.p(t,n),2&n&&Oe(o,1)):(o=De(t),o.c(),Oe(o,1),o.m(e,null)):o&&($e(),Te(o,1,1,(()=>{o=null})),Ee())},i(t){n||(Oe(o),n=!0)},o(t){Te(o),n=!1},d(t){t&&Zt(e),o&&o.d()}}}function Be(t,e,n){let o,{step:i}=e;return t.$$set=t=>{"step"in t&&n(0,i=t.step)},t.$$.update=()=>{1&t.$$.dirty&&n(1,o=i.options.buttons)},[i,o]}class Ve extends Me{constructor(t){super(),Pe(this,t,Be,je,Ut,{step:0})}}function Ne(t){let e,n,o,i,s;return{c(){e=Kt("button"),n=Kt("span"),n.textContent="×",ee(n,"aria-hidden","true"),ee(e,"aria-label",o=t[0].label?t[0].label:"Close Tour"),ee(e,"class","shepherd-cancel-icon"),ee(e,"type","button")},m(o,r){Xt(o,e,r),Yt(e,n),i||(s=te(e,"click",t[1]),i=!0)},p(t,[n]){1&n&&o!==(o=t[0].label?t[0].label:"Close Tour")&&ee(e,"aria-label",o)},i:Bt,o:Bt,d(t){t&&Zt(e),i=!1,s()}}}function We(t,e,n){let{cancelIcon:o,step:i}=e;return t.$$set=t=>{"cancelIcon"in t&&n(0,o=t.cancelIcon),"step"in t&&n(2,i=t.step)},[o,t=>{t.preventDefault(),i.cancel()},i]}class qe extends Me{constructor(t){super(),Pe(this,t,We,Ne,Ut,{cancelIcon:0,step:2})}}function ze(t){let e;return{c(){e=Kt("h3"),ee(e,"id",t[1]),ee(e,"class","shepherd-title")},m(n,o){Xt(n,e,o),t[3](e)},p(t,[n]){2&n&&ee(e,"id",t[1])},i:Bt,o:Bt,d(n){n&&Zt(e),t[3](null)}}}function Ue(t,e,o){let{labelId:i,element:s,title:r}=e;return ce((()=>{n(r)&&o(2,r=r()),o(0,s.innerHTML=r,s)})),t.$$set=t=>{"labelId"in t&&o(1,i=t.labelId),"element"in t&&o(0,s=t.element),"title"in t&&o(2,r=t.title)},[s,i,r,function(t){ue[t?"unshift":"push"]((()=>{s=t,o(0,s)}))}]}class Ye extends Me{constructor(t){super(),Pe(this,t,Ue,ze,Ut,{labelId:1,element:0,title:2})}}function Xe(t){let e,n;return e=new Ye({props:{labelId:t[0],title:t[2]}}),{c(){_e(e.$$.fragment)},m(t,o){Ae(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.labelId=t[0]),4&n&&(o.title=t[2]),e.$set(o)},i(t){n||(Oe(e.$$.fragment,t),n=!0)},o(t){Te(e.$$.fragment,t),n=!1},d(t){Ie(e,t)}}}function Ze(t){let e,n;return e=new qe({props:{cancelIcon:t[3],step:t[1]}}),{c(){_e(e.$$.fragment)},m(t,o){Ae(e,t,o),n=!0},p(t,n){const o={};8&n&&(o.cancelIcon=t[3]),2&n&&(o.step=t[1]),e.$set(o)},i(t){n||(Oe(e.$$.fragment,t),n=!0)},o(t){Te(e.$$.fragment,t),n=!1},d(t){Ie(e,t)}}}function Ke(t){let e,n,o,i=t[2]&&Xe(t),s=t[3]&&t[3].enabled&&Ze(t);return{c(){e=Kt("header"),i&&i.c(),n=Qt(),s&&s.c(),ee(e,"class","shepherd-header")},m(t,r){Xt(t,e,r),i&&i.m(e,null),Yt(e,n),s&&s.m(e,null),o=!0},p(t,[o]){t[2]?i?(i.p(t,o),4&o&&Oe(i,1)):(i=Xe(t),i.c(),Oe(i,1),i.m(e,n)):i&&($e(),Te(i,1,1,(()=>{i=null})),Ee()),t[3]&&t[3].enabled?s?(s.p(t,o),8&o&&Oe(s,1)):(s=Ze(t),s.c(),Oe(s,1),s.m(e,null)):s&&($e(),Te(s,1,1,(()=>{s=null})),Ee())},i(t){o||(Oe(i),Oe(s),o=!0)},o(t){Te(i),Te(s),o=!1},d(t){t&&Zt(e),i&&i.d(),s&&s.d()}}}function Ge(t,e,n){let o,i,{labelId:s,step:r}=e;return t.$$set=t=>{"labelId"in t&&n(0,s=t.labelId),"step"in t&&n(1,r=t.step)},t.$$.update=()=>{2&t.$$.dirty&&(n(2,o=r.options.title),n(3,i=r.options.cancelIcon))},[s,r,o,i]}class Je extends Me{constructor(t){super(),Pe(this,t,Ge,Ke,Ut,{labelId:0,step:1})}}function Qe(t){let e;return{c(){e=Kt("div"),ee(e,"class","shepherd-text"),ee(e,"id",t[1])},m(n,o){Xt(n,e,o),t[3](e)},p(t,[n]){2&n&&ee(e,"id",t[1])},i:Bt,o:Bt,d(n){n&&Zt(e),t[3](null)}}}function tn(t,o,i){let{descriptionId:s,element:r,step:l}=o;return ce((()=>{let{text:t}=l.options;n(t)&&(t=t.call(l)),e(t)?r.appendChild(t):i(0,r.innerHTML=t,r)})),t.$$set=t=>{"descriptionId"in t&&i(1,s=t.descriptionId),"element"in t&&i(0,r=t.element),"step"in t&&i(2,l=t.step)},[r,s,l,function(t){ue[t?"unshift":"push"]((()=>{r=t,i(0,r)}))}]}class en extends Me{constructor(t){super(),Pe(this,t,tn,Qe,Ut,{descriptionId:1,element:0,step:2})}}function nn(t){let e,n;return e=new Je({props:{labelId:t[1],step:t[2]}}),{c(){_e(e.$$.fragment)},m(t,o){Ae(e,t,o),n=!0},p(t,n){const o={};2&n&&(o.labelId=t[1]),4&n&&(o.step=t[2]),e.$set(o)},i(t){n||(Oe(e.$$.fragment,t),n=!0)},o(t){Te(e.$$.fragment,t),n=!1},d(t){Ie(e,t)}}}function on(t){let e,n;return e=new en({props:{descriptionId:t[0],step:t[2]}}),{c(){_e(e.$$.fragment)},m(t,o){Ae(e,t,o),n=!0},p(t,n){const o={};1&n&&(o.descriptionId=t[0]),4&n&&(o.step=t[2]),e.$set(o)},i(t){n||(Oe(e.$$.fragment,t),n=!0)},o(t){Te(e.$$.fragment,t),n=!1},d(t){Ie(e,t)}}}function sn(t){let e,n;return e=new Ve({props:{step:t[2]}}),{c(){_e(e.$$.fragment)},m(t,o){Ae(e,t,o),n=!0},p(t,n){const o={};4&n&&(o.step=t[2]),e.$set(o)},i(t){n||(Oe(e.$$.fragment,t),n=!0)},o(t){Te(e.$$.fragment,t),n=!1},d(t){Ie(e,t)}}}function rn(t){let e,n,o,s,r=!i(t[2].options.title)||t[2].options.cancelIcon&&t[2].options.cancelIcon.enabled,l=!i(t[2].options.text),c=Array.isArray(t[2].options.buttons)&&t[2].options.buttons.length,a=r&&nn(t),u=l&&on(t),d=c&&sn(t);return{c(){e=Kt("div"),a&&a.c(),n=Qt(),u&&u.c(),o=Qt(),d&&d.c(),ee(e,"class","shepherd-content")},m(t,i){Xt(t,e,i),a&&a.m(e,null),Yt(e,n),u&&u.m(e,null),Yt(e,o),d&&d.m(e,null),s=!0},p(t,[s]){4&s&&(r=!i(t[2].options.title)||t[2].options.cancelIcon&&t[2].options.cancelIcon.enabled),r?a?(a.p(t,s),4&s&&Oe(a,1)):(a=nn(t),a.c(),Oe(a,1),a.m(e,n)):a&&($e(),Te(a,1,1,(()=>{a=null})),Ee()),4&s&&(l=!i(t[2].options.text)),l?u?(u.p(t,s),4&s&&Oe(u,1)):(u=on(t),u.c(),Oe(u,1),u.m(e,o)):u&&($e(),Te(u,1,1,(()=>{u=null})),Ee()),4&s&&(c=Array.isArray(t[2].options.buttons)&&t[2].options.buttons.length),c?d?(d.p(t,s),4&s&&Oe(d,1)):(d=sn(t),d.c(),Oe(d,1),d.m(e,null)):d&&($e(),Te(d,1,1,(()=>{d=null})),Ee())},i(t){s||(Oe(a),Oe(u),Oe(d),s=!0)},o(t){Te(a),Te(u),Te(d),s=!1},d(t){t&&Zt(e),a&&a.d(),u&&u.d(),d&&d.d()}}}function ln(t,e,n){let{descriptionId:o,labelId:i,step:s}=e;return t.$$set=t=>{"descriptionId"in t&&n(0,o=t.descriptionId),"labelId"in t&&n(1,i=t.labelId),"step"in t&&n(2,s=t.step)},[o,i,s]}class cn extends Me{constructor(t){super(),Pe(this,t,ln,rn,Ut,{descriptionId:0,labelId:1,step:2})}}function an(t){let e;return{c(){e=Kt("div"),ee(e,"class","shepherd-arrow"),ee(e,"data-popper-arrow","")},m(t,n){Xt(t,e,n)},d(t){t&&Zt(e)}}}function un(t){let e,n,o,s,r,l,c,a,u=t[4].options.arrow&&t[4].options.attachTo&&t[4].options.attachTo.element&&t[4].options.attachTo.on&&an();o=new cn({props:{descriptionId:t[2],labelId:t[3],step:t[4]}});let d=[{"aria-describedby":s=i(t[4].options.text)?null:t[2]},{"aria-labelledby":r=t[4].options.title?t[3]:null},t[1],{open:"true"}],f={};for(let t=0;t<d.length;t+=1)f=Vt(f,d[t]);return{c(){e=Kt("dialog"),u&&u.c(),n=Qt(),_e(o.$$.fragment),oe(e,f),ie(e,"shepherd-has-cancel-icon",t[5]),ie(e,"shepherd-has-title",t[6]),ie(e,"shepherd-element",!0)},m(i,s){Xt(i,e,s),u&&u.m(e,null),Yt(e,n),Ae(o,e,null),t[13](e),l=!0,c||(a=te(e,"keydown",t[7]),c=!0)},p(t,[c]){t[4].options.arrow&&t[4].options.attachTo&&t[4].options.attachTo.element&&t[4].options.attachTo.on?u||(u=an(),u.c(),u.m(e,n)):u&&(u.d(1),u=null);const a={};4&c&&(a.descriptionId=t[2]),8&c&&(a.labelId=t[3]),16&c&&(a.step=t[4]),o.$set(a),oe(e,f=function(t,e){const n={},o={},i={$$scope:1};let s=t.length;for(;s--;){const r=t[s],l=e[s];if(l){for(const t in r)t in l||(o[t]=1);for(const t in l)i[t]||(n[t]=l[t],i[t]=1);t[s]=l}else for(const t in r)i[t]=1}for(const t in o)t in n||(n[t]=void 0);return n}(d,[(!l||20&c&&s!==(s=i(t[4].options.text)?null:t[2]))&&{"aria-describedby":s},(!l||24&c&&r!==(r=t[4].options.title?t[3]:null))&&{"aria-labelledby":r},2&c&&t[1],{open:"true"}])),ie(e,"shepherd-has-cancel-icon",t[5]),ie(e,"shepherd-has-title",t[6]),ie(e,"shepherd-element",!0)},i(t){l||(Oe(o.$$.fragment,t),l=!0)},o(t){Te(o.$$.fragment,t),l=!1},d(n){n&&Zt(e),u&&u.d(),Ie(o),t[13](null),c=!1,a()}}}function dn(t){return t.split(" ").filter((t=>!!t.length))}function fn(t,e,n){let i,s,r,{classPrefix:l,element:c,descriptionId:a,firstFocusableElement:u,focusableElements:d,labelId:f,lastFocusableElement:h,step:p,dataStepId:m}=e;var g;g=()=>{n(1,m={[`data-${l}shepherd-step-id`]:p.id}),n(9,d=c.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,u=d[0]),n(10,h=d[d.length-1])},le().$$.on_mount.push(g),ce((()=>{r!==p.options.classes&&(function(t){if(o(t)){const e=dn(t);e.length&&c.classList.remove(...e)}}(r),r=p.options.classes,function(t){if(o(t)){const e=dn(t);e.length&&c.classList.add(...e)}}(r))}));return t.$$set=t=>{"classPrefix"in t&&n(11,l=t.classPrefix),"element"in t&&n(0,c=t.element),"descriptionId"in t&&n(2,a=t.descriptionId),"firstFocusableElement"in t&&n(8,u=t.firstFocusableElement),"focusableElements"in t&&n(9,d=t.focusableElements),"labelId"in t&&n(3,f=t.labelId),"lastFocusableElement"in t&&n(10,h=t.lastFocusableElement),"step"in t&&n(4,p=t.step),"dataStepId"in t&&n(1,m=t.dataStepId)},t.$$.update=()=>{16&t.$$.dirty&&(n(5,i=p.options&&p.options.cancelIcon&&p.options.cancelIcon.enabled),n(6,s=p.options&&p.options.title))},[c,m,a,f,p,i,s,t=>{const{tour:e}=p;switch(t.keyCode){case 9:if(0===d.length){t.preventDefault();break}t.shiftKey?(document.activeElement===u||document.activeElement.classList.contains("shepherd-element"))&&(t.preventDefault(),h.focus()):document.activeElement===h&&(t.preventDefault(),u.focus());break;case 27:e.options.exitOnEsc&&(t.preventDefault(),t.stopPropagation(),p.cancel());break;case 37:e.options.keyboardNavigation&&(t.preventDefault(),t.stopPropagation(),e.back());break;case 39:e.options.keyboardNavigation&&(t.preventDefault(),t.stopPropagation(),e.next())}},u,d,h,l,()=>c,function(t){ue[t?"unshift":"push"]((()=>{c=t,n(0,c)}))}]}class hn extends Me{constructor(t){super(),Pe(this,t,fn,un,Ut,{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 pn extends s{constructor(t,e={}){return super(),this._resolvedAttachTo=void 0,this._resolvedExtraHighlightElements=void 0,this.classPrefix=void 0,this.el=void 0,this.target=void 0,this.tour=void 0,this.tour=t,this.classPrefix=this.tour.options?w(this.tour.options.classPrefix):"",this.styles=t.styles,this._resolvedAttachTo=null,b(this),this._setOptions(e),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){var t;(t=this).cleanup&&t.cleanup(),t.cleanup=null,e(this.el)&&(this.el.remove(),this.el=null),this._updateStepTargetOnHide(),this.trigger("destroy")}getTour(){return this.tour}hide(){var t;null==(t=this.tour.modal)||t.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this._updateStepTargetOnHide(),this.trigger("hide")}_resolveExtraHiglightElements(){var t;return this._resolvedExtraHighlightElements=(t=this).options.extraHighlights?t.options.extraHighlights.flatMap((t=>Array.from(document.querySelectorAll(t)))):[],this._resolvedExtraHighlightElements}_resolveAttachToOptions(){return this._resolvedAttachTo=function(t){const e=t.options.attachTo||{},i=Object.assign({},e);if(n(i.element)&&(i.element=i.element.call(t)),o(i.element)){try{i.element=document.querySelector(i.element)}catch(t){}i.element||console.error(`The element for this Shepherd step was not found ${e.element}`)}return i}(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return null===this._resolvedAttachTo?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return Boolean(this.el&&!this.el.hidden)}show(){return n(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`,e=`${this.id}-label`;return this.shepherdElementComponent=new hn({target:this.tour.options.stepsContainer||document.body,props:{classPrefix:this.classPrefix,descriptionId:t,labelId:e,step:this,styles:this.styles}}),this.shepherdElementComponent.getElement()}_scrollTo(t){const{element:e}=this._getResolvedAttachToOptions();n(this.options.scrollToHandler)?this.options.scrollToHandler(e):e instanceof Element&&"function"==typeof e.scrollIntoView&&e.scrollIntoView(t)}_getClassOptions(t){const e=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,n=t.classes?t.classes:"",o=e&&e.classes?e.classes:"",i=[...n.split(" "),...o.split(" ")],s=new Set(i);return Array.from(s).join(" ").trim()}_setOptions(t={}){let e=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;e=g({},e||{}),this.options=Object.assign({arrow:!0},e,t,function(t,e){return{floatingUIOptions:g(t.floatingUIOptions||{},e.floatingUIOptions||{})}}(e,t));const{when:n}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${E()}`,n&&Object.keys(n).forEach((t=>{this.on(t,n[t],this)}))}_setupElements(){i(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&x(this),jt(this)}_show(){var t;this.trigger("before-show"),this._resolveAttachToOptions(),this._resolveExtraHiglightElements(),this._setupElements(),this.tour.modal||this.tour.setupModal(),null==(t=this.tour.modal)||t.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 e=this.shepherdElementComponent.getElement(),n=this.target||document.body,o=this._resolvedExtraHighlightElements;n.classList.add(`${this.classPrefix}shepherd-enabled`),n.classList.add(`${this.classPrefix}shepherd-target`),e.classList.add("shepherd-enabled"),null==o||o.forEach((t=>{t.classList.add(`${this.classPrefix}shepherd-enabled`),t.classList.add(`${this.classPrefix}shepherd-target`)})),this.trigger("show")}_styleTargetElementForStep(t){const e=t.target,n=t._resolvedExtraHighlightElements;if(!e)return;const o=t.options.highlightClass;o&&(e.classList.add(o),null==n||n.forEach((t=>t.classList.add(o)))),e.classList.remove("shepherd-target-click-disabled"),null==n||n.forEach((t=>t.classList.remove("shepherd-target-click-disabled"))),!1===t.options.canClickTarget&&(e.classList.add("shepherd-target-click-disabled"),null==n||n.forEach((t=>t.classList.add("shepherd-target-click-disabled"))))}_updateStepTargetOnHide(){const t=this.target||document.body,e=this._resolvedExtraHighlightElements,n=this.options.highlightClass;n&&(t.classList.remove(n),null==e||e.forEach((t=>t.classList.remove(n)))),t.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`),null==e||e.forEach((t=>{t.classList.remove("shepherd-target-click-disabled",`${this.classPrefix}shepherd-enabled`,`${this.classPrefix}shepherd-target`)}))}}function mn(t){let e,n,o,i,s;return{c(){e=Gt("svg"),n=Gt("path"),ee(n,"d",t[2]),ee(e,"class",o=(t[1]?"shepherd-modal-is-visible":"")+" shepherd-modal-overlay-container")},m(o,r){Xt(o,e,r),Yt(e,n),t[11](e),i||(s=te(e,"touchmove",t[3]),i=!0)},p(t,[i]){4&i&&ee(n,"d",t[2]),2&i&&o!==(o=(t[1]?"shepherd-modal-is-visible":"")+" shepherd-modal-overlay-container")&&ee(e,"class",o)},i:Bt,o:Bt,d(n){n&&Zt(e),t[11](null),i=!1,s()}}}function gn(t){if(!t)return null;const e=t instanceof HTMLElement&&window.getComputedStyle(t).overflowY;return"hidden"!==e&&"visible"!==e&&t.scrollHeight>=t.clientHeight?t:gn(t.parentElement)}function yn(t,e){const n=t.getBoundingClientRect();let o=n.y||n.top,i=n.bottom||o+n.height;if(e){const t=e.getBoundingClientRect(),n=t.y||t.top,s=t.bottom||n+t.height;o=Math.max(o,n),i=Math.min(i,s)}return{y:o,height:Math.max(i-o,0)}}function vn(t,e,n){let o,i,{element:s,openingProperties:r}=e,l=!1;c();function c(){n(4,r=[{width:0,height:0,x:0,y:0,r:0}])}function a(){n(1,l=!1),h()}function u(t=0,e=0,o=0,i=0,s,l,a){if(l){const c=[l,...a||[]];n(4,r=[]);for(const n of c){if(!n)continue;if(c.indexOf(n)!==c.lastIndexOf(n))continue;const{y:l,height:a}=yn(n,s),{x:u,width:d,left:f}=n.getBoundingClientRect();c.some((t=>{if(t===n)return!1;const e=t.getBoundingClientRect();return u>=e.left&&u+d<=e.right&&l>=e.top&&l+a<=e.bottom}))||r.push({width:d+2*t,height:a+2*t,x:(u||f)+o-t,y:l+i-t,r:e})}}else c()}function d(){n(1,l=!0)}const f=t=>{t.preventDefault()};function h(){o&&(cancelAnimationFrame(o),o=void 0),window.removeEventListener("touchmove",f,{passive:!1})}return t.$$set=t=>{"element"in t&&n(0,s=t.element),"openingProperties"in t&&n(4,r=t.openingProperties)},t.$$.update=()=>{16&t.$$.dirty&&n(2,i=function(t){let e="";const{innerWidth:n,innerHeight:o}=window;return t.forEach((t=>{const{width:n,height:o,x:i=0,y:s=0,r:r=0}=t,{topLeft:l=0,topRight:c=0,bottomRight:a=0,bottomLeft:u=0}="number"==typeof r?{topLeft:r,topRight:r,bottomRight:r,bottomLeft:r}:r;e+=`M${i+l},${s} a${l},${l},0,0,0-${l},${l} V${o+s-u} a${u},${u},0,0,0,${u},${u} H${n+i-a} a${a},${a},0,0,0,${a}-${a} V${s+c} a${c},${c},0,0,0-${c}-${c} Z`})),`M${n},${o} H0 V0 H${n} V${o} Z ${e}`.replace(/\s/g,"")}(r))},[s,l,i,t=>{t.stopPropagation()},r,()=>s,c,a,u,function(t){h(),t.tour.options.useModalOverlay?(!function(t){const{modalOverlayOpeningPadding:e,modalOverlayOpeningRadius:n,modalOverlayOpeningXOffset:i=0,modalOverlayOpeningYOffset:s=0}=t.options,r=function(t){let e={top:0,left:0};if(!t)return e;let n=t.ownerDocument.defaultView;for(;n!==window.top;){var o;const t=null==(o=n)?void 0:o.frameElement;if(t){var i,s;const n=t.getBoundingClientRect();e.top+=n.top+(null!=(i=n.scrollTop)?i:0),e.left+=n.left+(null!=(s=n.scrollLeft)?s:0)}n=n.parent}return e}(t.target),l=gn(t.target),c=()=>{o=void 0,u(e,n,i+r.left,s+r.top,l,t.target,t._resolvedExtraHighlightElements),o=requestAnimationFrame(c)};c(),window.addEventListener("touchmove",f,{passive:!1})}(t),d()):a()},d,function(t){ue[t?"unshift":"push"]((()=>{s=t,n(0,s)}))}]}class bn extends Me{constructor(t){super(),Pe(this,t,vn,mn,Ut,{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 xn=new class extends s{constructor(){super(),this.activeTour=void 0,b(this)}},wn="undefined"==typeof window;xn.Step=wn?class{constructor(t){