Current File : /home/pacjaorg/public_html/km/media/plg_system_guidedtours/js/guidedtours.min.js
/*! shepherd.js 11.2.0 */var isMergeableObject=function(t){return isNonNullObject(t)&&!isSpecial(t)};function isNonNullObject(e){return!!e&&typeof e=="object"}function isSpecial(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||isReactElement(e)}var canUseSymbol=typeof Symbol=="function"&&Symbol.for,REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;function isReactElement(e){return e.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(e){return Array.isArray(e)?[]:{}}function cloneUnlessOtherwiseSpecified(e,t){return t.clone!==!1&&t.isMergeableObject(e)?deepmerge(emptyTarget(e),e,t):e}function defaultArrayMerge(e,t,n){return e.concat(t).map(function(s){return cloneUnlessOtherwiseSpecified(s,n)})}function getMergeFunction(e,t){if(!t.customMerge)return deepmerge;var n=t.customMerge(e);return typeof n=="function"?n:deepmerge}function getEnumerableOwnPropertySymbols(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function getKeys(e){return Object.keys(e).concat(getEnumerableOwnPropertySymbols(e))}function propertyIsOnObject(e,t){try{return t in e}catch{return!1}}function propertyIsUnsafe(e,t){return propertyIsOnObject(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function mergeObject(e,t,n){var s={};return n.isMergeableObject(e)&&getKeys(e).forEach(function(i){s[i]=cloneUnlessOtherwiseSpecified(e[i],n)}),getKeys(t).forEach(function(i){propertyIsUnsafe(e,i)||(propertyIsOnObject(e,i)&&n.isMergeableObject(t[i])?s[i]=getMergeFunction(i,n)(e[i],t[i],n):s[i]=cloneUnlessOtherwiseSpecified(t[i],n))}),s}function deepmerge(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||defaultArrayMerge,n.isMergeableObject=n.isMergeableObject||isMergeableObject,n.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var s=Array.isArray(t),i=Array.isArray(e),o=s===i;return o?s?n.arrayMerge(e,t,n):mergeObject(e,t,n):cloneUnlessOtherwiseSpecified(t,n)}deepmerge.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(s,i){return deepmerge(s,i,n)},{})};var deepmerge_1=deepmerge,cjs=deepmerge_1;function isElement$1(e){return e instanceof Element}function isHTMLElement$1(e){return e instanceof HTMLElement}function isFunction(e){return typeof e=="function"}function isString(e){return typeof e=="string"}function isUndefined(e){return e===void 0}class Evented{on(t,n,s,i=!1){return isUndefined(this.bindings)&&(this.bindings={}),isUndefined(this.bindings[t])&&(this.bindings[t]=[]),this.bindings[t].push({handler:n,ctx:s,once:i}),this}once(t,n,s){return this.on(t,n,s,!0)}off(t,n){return isUndefined(this.bindings)||isUndefined(this.bindings[t])?this:(isUndefined(n)?delete this.bindings[t]:this.bindings[t].forEach((s,i)=>{s.handler===n&&this.bindings[t].splice(i,1)}),this)}trigger(t,...n){return!isUndefined(this.bindings)&&this.bindings[t]&&this.bindings[t].forEach((s,i)=>{const{ctx:o,handler:r,once:l}=s,c=o||this;r.apply(c,n),l&&this.bindings[t].splice(i,1)}),this}}function autoBind(e){const t=Object.getOwnPropertyNames(e.constructor.prototype);for(let n=0;n<t.length;n++){const s=t[n],i=e[s];s!=="constructor"&&typeof i=="function"&&(e[s]=i.bind(e))}return e}function _setupAdvanceOnHandler(e,t){return n=>{if(t.isOpen()){const s=t.el&&n.currentTarget===t.el;(!isUndefined(e)&&n.currentTarget.matches(e)||s)&&t.tour.next()}}}function bindAdvance(e){const{event:t,selector:n}=e.options.advanceOn||{};if(t){const s=_setupAdvanceOnHandler(n,e);let i;try{i=document.querySelector(n)}catch{}if(!isUndefined(n)&&!i)return console.error(`No element was found for the selector supplied to advanceOn: ${n}`);i?(i.addEventListener(t,s),e.on("destroy",()=>i.removeEventListener(t,s))):(document.body.addEventListener(t,s,!0),e.on("destroy",()=>document.body.removeEventListener(t,s,!0)))}else return console.error("advanceOn was defined, but no event name was passed.")}function normalizePrefix(e){return!isString(e)||e===""?"":e.charAt(e.length-1)!=="-"?`${e}-`:e}function parseAttachTo(e){const t=e.options.attachTo||{},n=Object.assign({},t);if(isFunction(n.element)&&(n.element=n.element.call(e)),isString(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 shouldCenterStep(e){return e==null?!0:!e.element||!e.on}function uuid(){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)})}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var n={},s=Object.keys(e),i,o;for(o=0;o<s.length;o++)i=s[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}const min=Math.min,max=Math.max,round=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(e,t,n){return max(e,min(t,n))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}function getSideAxis(e){return["top","bottom"].includes(getSide(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){n===void 0&&(n=!1);const s=getAlignment(e),i=getAlignmentAxis(e),o=getAxisLength(i);let r=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(r=getOppositePlacement(r)),[r,getOppositePlacement(r)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}function getSideList(e,t,n){const s=["left","right"],i=["right","left"],o=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:s:t?s:i;case"left":case"right":return t?o:r;default:return[]}}function getOppositeAxisPlacements(e,t,n,s){const i=getAlignment(e);let o=getSideList(getSide(e),n==="start",s);return i&&(o=o.map(r=>r+"-"+i),t&&(o=o.concat(o.map(getOppositeAlignmentPlacement)))),o}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return _extends({top:0,right:0,bottom:0,left:0},e)}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){return _extends({},e,{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}const _excluded2=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],_excluded4=["mainAxis","crossAxis","limiter"];function computeCoordsFromPlacement(e,t,n){let{reference:s,floating:i}=e;const o=getSideAxis(t),r=getAlignmentAxis(t),l=getAxisLength(r),c=getSide(t),a=o==="y",f=s.x+s.width/2-i.width/2,d=s.y+s.height/2-i.height/2,u=s[l]/2-i[l]/2;let p;switch(c){case"top":p={x:f,y:s.y-i.height};break;case"bottom":p={x:f,y:s.y+s.height};break;case"right":p={x:s.x+s.width,y:d};break;case"left":p={x:s.x-i.width,y:d};break;default:p={x:s.x,y:s.y}}switch(getAlignment(t)){case"start":p[r]-=u*(n&&a?-1:1);break;case"end":p[r]+=u*(n&&a?-1:1);break}return p}const computePosition$1=async(e,t,n)=>{const{placement:s="bottom",strategy:i="absolute",middleware:o=[],platform:r}=n,l=o.filter(Boolean),c=await(r.isRTL==null?void 0:r.isRTL(t));let a=await r.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=computeCoordsFromPlacement(a,s,c),u=s,p={},m=0;for(let b=0;b<l.length;b++){const{name:w,fn:y}=l[b],{x:S,y:v,data:g,reset:h}=await y({x:f,y:d,initialPlacement:s,placement:u,strategy:i,middlewareData:p,rects:a,platform:r,elements:{reference:e,floating:t}});if(f=S??f,d=v??d,p=_extends({},p,{[w]:_extends({},p[w],g)}),h&&m<=50){m++,typeof h=="object"&&(h.placement&&(u=h.placement),h.rects&&(a=h.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:i}):h.rects),{x:f,y:d}=computeCoordsFromPlacement(a,u,c)),b=-1;continue}}return{x:f,y:d,placement:u,strategy:i,middlewareData:p}};async function detectOverflow(e,t){var n;t===void 0&&(t={});const{x:s,y:i,platform:o,rects:r,elements:l,strategy:c}=e,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:u=!1,padding:p=0}=evaluate(t,e),m=getPaddingObject(p),w=l[u?d==="floating"?"reference":"floating":d],y=rectToClientRect(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:a,rootBoundary:f,strategy:c})),S=d==="floating"?_extends({},r.floating,{x:s,y:i}):r.reference,v=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),g=await(o.isElement==null?void 0:o.isElement(v))?await(o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},h=rectToClientRect(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:S,offsetParent:v,strategy:c}):S);return{top:(y.top-h.top+m.top)/g.y,bottom:(h.bottom-y.bottom+m.bottom)/g.y,left:(y.left-h.left+m.left)/g.x,right:(h.right-y.right+m.right)/g.x}}const arrow=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:i,rects:o,platform:r,elements:l}=t,{element:c,padding:a=0}=evaluate(e,t)||{};if(c==null)return{};const f=getPaddingObject(a),d={x:n,y:s},u=getAlignmentAxis(i),p=getAxisLength(u),m=await r.getDimensions(c),b=u==="y",w=b?"top":"left",y=b?"bottom":"right",S=b?"clientHeight":"clientWidth",v=o.reference[p]+o.reference[u]-d[u]-o.floating[p],g=d[u]-o.reference[u],h=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c));let _=h?h[S]:0;(!_||!await(r.isElement==null?void 0:r.isElement(h)))&&(_=l.floating[S]||o.floating[p]);const E=v/2-g/2,T=_/2-m[p]/2-1,O=min(f[w],T),C=min(f[y],T),I=O,L=_-m[p]-C,x=_/2-m[p]/2+E,k=clamp(I,x,L),A=getAlignment(i)!=null&&x!=k&&o.reference[p]/2-(x<I?O:C)-m[p]/2<0?x<I?I-x:L-x:0;return{[u]:d[u]-A,data:{[u]:k,centerOffset:x-k+A}}}}),flip=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var s;const{placement:i,middlewareData:o,rects:r,initialPlacement:l,platform:c,elements:a}=n,f=evaluate(t,n),{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0}=f,y=_objectWithoutPropertiesLoose(f,_excluded2),S=getSide(i),v=getSide(l)===l,g=await(c.isRTL==null?void 0:c.isRTL(a.floating)),h=p||(v||!w?[getOppositePlacement(l)]:getExpandedPlacements(l));!p&&b!=="none"&&h.push(...getOppositeAxisPlacements(l,w,b,g));const _=[l,...h],E=await detectOverflow(n,y),T=[];let O=((s=o.flip)==null?void 0:s.overflows)||[];if(d&&T.push(E[S]),u){const x=getAlignmentSides(i,r,g);T.push(E[x[0]],E[x[1]])}if(O=[...O,{placement:i,overflows:T}],!T.every(x=>x<=0)){var C,I;const x=(((C=o.flip)==null?void 0:C.index)||0)+1,k=_[x];if(k)return{data:{index:x,overflows:O},reset:{placement:k}};let R=(I=O.filter(A=>A.overflows[0]<=0).sort((A,P)=>A.overflows[1]-P.overflows[1])[0])==null?void 0:I.placement;if(!R)switch(m){case"bestFit":{var L;const A=(L=O.map(P=>[P.placement,P.overflows.filter(M=>M>0).reduce((M,D)=>M+D,0)]).sort((P,M)=>P[1]-M[1])[0])==null?void 0:L[0];A&&(R=A);break}case"initialPlacement":R=l;break}if(i!==R)return{reset:{placement:R}}}return{}}}},shift=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:s,y:i,placement:o}=n,r=evaluate(t,n),{mainAxis:l=!0,crossAxis:c=!1,limiter:a={fn:S=>{let{x:v,y:g}=S;return{x:v,y:g}}}}=r,f=_objectWithoutPropertiesLoose(r,_excluded4),d={x:s,y:i},u=await detectOverflow(n,f),p=getSideAxis(getSide(o)),m=getOppositeAxis(p);let b=d[m],w=d[p];if(l){const S=m==="y"?"top":"left",v=m==="y"?"bottom":"right",g=b+u[S],h=b-u[v];b=clamp(g,b,h)}if(c){const S=p==="y"?"top":"left",v=p==="y"?"bottom":"right",g=w+u[S],h=w-u[v];w=clamp(g,w,h)}const y=a.fn(_extends({},n,{[m]:b,[p]:w}));return _extends({},y,{data:{x:y.x-s,y:y.y-i}})}}},limitShift=function(t){return t===void 0&&(t={}),{options:t,fn(n){const{x:s,y:i,placement:o,rects:r,middlewareData:l}=n,{offset:c=0,mainAxis:a=!0,crossAxis:f=!0}=evaluate(t,n),d={x:s,y:i},u=getSideAxis(o),p=getOppositeAxis(u);let m=d[p],b=d[u];const w=evaluate(c,n),y=typeof w=="number"?{mainAxis:w,crossAxis:0}:_extends({mainAxis:0,crossAxis:0},w);if(a){const g=p==="y"?"height":"width",h=r.reference[p]-r.floating[g]+y.mainAxis,_=r.reference[p]+r.reference[g]-y.mainAxis;m<h?m=h:m>_&&(m=_)}if(f){var S,v;const g=p==="y"?"width":"height",h=["top","left"].includes(getSide(o)),_=r.reference[u]-r.floating[g]+(h&&((S=l.offset)==null?void 0:S[u])||0)+(h?0:y.crossAxis),E=r.reference[u]+r.reference[g]+(h?0:((v=l.offset)==null?void 0:v[u])||0)-(h?y.crossAxis:0);b<_?b=_:b>E&&(b=E)}return{[p]:m,[u]:b}}}};function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){return e instanceof Node||e instanceof getWindow(e).Node}function isElement(e){return e instanceof Element||e instanceof getWindow(e).Element}function isHTMLElement(e){return e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement}function isShadowRoot(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:s,display:i}=getComputedStyle(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!["inline","contents"].includes(i)}function isTableElement(e){return["table","td","th"].includes(getNodeName(e))}function isContainingBlock(e){const t=isWebKit(),n=getComputedStyle(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(s=>(n.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(n.contain||"").includes(s))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;t=getParentNode(t)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(e){return["html","body","#document"].includes(getNodeName(e))}function getComputedStyle(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function getParentNode(e){if(getNodeName(e)==="html")return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t){var n;t===void 0&&(t=[]);const s=getNearestOverflowAncestor(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=getWindow(s);return i?t.concat(o,o.visualViewport||[],isOverflowElement(s)?s:[]):t.concat(s,getOverflowAncestors(s))}function getCssDimensions(e){const t=getComputedStyle(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=isHTMLElement(e),o=i?e.offsetWidth:n,r=i?e.offsetHeight:s,l=round(n)!==o||round(s)!==r;return l&&(n=o,s=r),{width:n,height:s,$:l}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:s,height:i,$:o}=getCssDimensions(t);let r=(o?round(n.width):n.width)/s,l=(o?round(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return!isWebKit()||!t.visualViewport?noOffsets:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==getWindow(e)?!1:t}function getBoundingClientRect(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=unwrapElement(e);let r=createCoords(1);t&&(s?isElement(s)&&(r=getScale(s)):r=getScale(e));const l=shouldAddVisualOffsets(o,n,s)?getVisualOffsets(o):createCoords(0);let c=(i.left+l.x)/r.x,a=(i.top+l.y)/r.y,f=i.width/r.x,d=i.height/r.y;if(o){const u=getWindow(o),p=s&&isElement(s)?getWindow(s):s;let m=u.frameElement;for(;m&&s&&p!==u;){const b=getScale(m),w=m.getBoundingClientRect(),y=getComputedStyle(m),S=w.left+(m.clientLeft+parseFloat(y.paddingLeft))*b.x,v=w.top+(m.clientTop+parseFloat(y.paddingTop))*b.y;c*=b.x,a*=b.y,f*=b.x,d*=b.y,c+=S,a+=v,m=getWindow(m).frameElement}}return rectToClientRect({width:f,height:d,x:c,y:a})}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{rect:t,offsetParent:n,strategy:s}=e;const i=isHTMLElement(n),o=getDocumentElement(n);if(n===o)return t;let r={scrollLeft:0,scrollTop:0},l=createCoords(1);const c=createCoords(0);if((i||!i&&s!=="fixed")&&((getNodeName(n)!=="body"||isOverflowElement(o))&&(r=getNodeScroll(n)),isHTMLElement(n))){const a=getBoundingClientRect(n);l=getScale(n),c.x=a.x+n.clientLeft,c.y=a.y+n.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-r.scrollLeft*l.x+c.x,y:t.y*l.y-r.scrollTop*l.y+c.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getNodeScroll(e).scrollLeft}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),s=e.ownerDocument.body,i=max(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=max(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+getWindowScrollBarX(e);const l=-n.scrollTop;return getComputedStyle(s).direction==="rtl"&&(r+=max(t.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:l}}function getViewportRect(e,t){const n=getWindow(e),s=getDocumentElement(e),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,l=0,c=0;if(i){o=i.width,r=i.height;const a=isWebKit();(!a||a&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:r,x:l,y:c}}function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,t==="fixed"),s=n.top+e.clientTop,i=n.left+e.clientLeft,o=isHTMLElement(e)?getScale(e):createCoords(1),r=e.clientWidth*o.x,l=e.clientHeight*o.y,c=i*o.x,a=s*o.y;return{width:r,height:l,x:c,y:a}}function getClientRectFromClippingAncestor(e,t,n){let s;if(t==="viewport")s=getViewportRect(e,n);else if(t==="document")s=getDocumentRect(getDocumentElement(e));else if(isElement(t))s=getInnerBoundingClientRect(t,n);else{const i=getVisualOffsets(e);s=_extends({},t,{x:t.x-i.x,y:t.y-i.y})}return rectToClientRect(s)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return n===t||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle(n).position==="fixed"||hasFixedPositionAncestor(n,t)}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let s=getOverflowAncestors(e).filter(l=>isElement(l)&&getNodeName(l)!=="body"),i=null;const o=getComputedStyle(e).position==="fixed";let r=o?getParentNode(e):e;for(;isElement(r)&&!isLastTraversableNode(r);){const l=getComputedStyle(r),c=isContainingBlock(r);!c&&l.position==="fixed"&&(i=null),(o?!c&&!i:!c&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||isOverflowElement(r)&&!c&&hasFixedPositionAncestor(e,r))?s=s.filter(f=>f!==r):i=l,r=getParentNode(r)}return t.set(e,s),s}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:s,strategy:i}=e;const r=[...n==="clippingAncestors"?getClippingElementAncestors(t,this._c):[].concat(n),s],l=r[0],c=r.reduce((a,f)=>{const d=getClientRectFromClippingAncestor(t,f,i);return a.top=max(d.top,a.top),a.right=min(d.right,a.right),a.bottom=min(d.bottom,a.bottom),a.left=max(d.left,a.left),a},getClientRectFromClippingAncestor(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function getDimensions(e){return getCssDimensions(e)}function getRectRelativeToOffsetParent(e,t,n){const s=isHTMLElement(t),i=getDocumentElement(t),o=n==="fixed",r=getBoundingClientRect(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=createCoords(0);if(s||!s&&!o)if((getNodeName(t)!=="body"||isOverflowElement(i))&&(l=getNodeScroll(t)),s){const a=getBoundingClientRect(t,!0,o,t);c.x=a.x+t.clientLeft,c.y=a.y+t.clientTop}else i&&(c.x=getWindowScrollBarX(i));return{x:r.left+l.scrollLeft-c.x,y:r.top+l.scrollTop-c.y,width:r.width,height:r.height}}function getTrueOffsetParent(e,t){return!isHTMLElement(e)||getComputedStyle(e).position==="fixed"?null:t?t(e):e.offsetParent}function getOffsetParent(e,t){const n=getWindow(e);if(!isHTMLElement(e))return n;let s=getTrueOffsetParent(e,t);for(;s&&isTableElement(s)&&getComputedStyle(s).position==="static";)s=getTrueOffsetParent(s,t);return s&&(getNodeName(s)==="html"||getNodeName(s)==="body"&&getComputedStyle(s).position==="static"&&!isContainingBlock(s))?n:s||getContainingBlock(e)||n}const getElementRects=async function(t){let{reference:n,floating:s,strategy:i}=t;const o=this.getOffsetParent||getOffsetParent,r=this.getDimensions;return{reference:getRectRelativeToOffsetParent(n,await o(s),i),floating:_extends({x:0,y:0},await r(s))}};function isRTL(e){return getComputedStyle(e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function observeMove(e,t){let n=null,s;const i=getDocumentElement(e);function o(){clearTimeout(s),n&&n.disconnect(),n=null}function r(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const{left:a,top:f,width:d,height:u}=e.getBoundingClientRect();if(l||t(),!d||!u)return;const p=floor(f),m=floor(i.clientWidth-(a+d)),b=floor(i.clientHeight-(f+u)),w=floor(a),S={rootMargin:-p+"px "+-m+"px "+-b+"px "+-w+"px",threshold:max(0,min(1,c))||1};let v=!0;function g(h){const _=h[0].intersectionRatio;if(_!==c){if(!v)return r();_?r(!1,_):s=setTimeout(()=>{r(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(g,_extends({},S,{root:i.ownerDocument}))}catch{n=new IntersectionObserver(g,S)}n.observe(e)}return r(!0),o}function autoUpdate(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=s,a=unwrapElement(e),f=i||o?[...a?getOverflowAncestors(a):[],...getOverflowAncestors(t)]:[];f.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const d=a&&l?observeMove(a,n):null;let u=-1,p=null;r&&(p=new ResizeObserver(y=>{let[S]=y;S&&S.target===a&&p&&(p.unobserve(t),cancelAnimationFrame(u),u=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),a&&!c&&p.observe(a),p.observe(t));let m,b=c?getBoundingClientRect(e):null;c&&w();function w(){const y=getBoundingClientRect(e);b&&(y.x!==b.x||y.y!==b.y||y.width!==b.width||y.height!==b.height)&&n(),b=y,m=requestAnimationFrame(w)}return n(),()=>{f.forEach(y=>{i&&y.removeEventListener("scroll",n),o&&y.removeEventListener("resize",n)}),d&&d(),p&&p.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const computePosition=(e,t,n)=>{const s=new Map,i=_extends({platform},n),o=_extends({},i.platform,{_c:s});return computePosition$1(e,t,_extends({},i,{platform:o}))};function setupTooltip(e){e.cleanup&&e.cleanup();const t=e._getResolvedAttachToOptions();let n=t.element;const s=getFloatingUIOptions(t,e),i=shouldCenterStep(t);return i&&(n=document.body,e.shepherdElementComponent.getElement().classList.add("shepherd-centered")),e.cleanup=autoUpdate(n,e.el,()=>{if(!e.el){e.cleanup();return}setPosition(n,e,s,i)}),e.target=t.element,s}function mergeTooltipConfig(e,t){return{floatingUIOptions:cjs(e.floatingUIOptions||{},t.floatingUIOptions||{})}}function destroyTooltip(e){e.cleanup&&e.cleanup(),e.cleanup=null}function setPosition(e,t,n,s){return computePosition(e,t.el,n).then(floatingUIposition(t,s)).then(i=>new Promise(o=>{setTimeout(()=>o(i),300)})).then(i=>{i&&i.el&&i.el.focus({preventScroll:!0})})}function floatingUIposition(e,t){return({x:n,y:s,placement:i,middlewareData:o})=>(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:`${s}px`}),e.el.dataset.popperPlacement=i,placeArrow(e.el,o)),e)}function placeArrow(e,t){const n=e.querySelector(".shepherd-arrow");if(n&&t.arrow){const{x:s,y:i}=t.arrow;Object.assign(n.style,{left:s!=null?`${s}px`:"",top:i!=null?`${i}px`:""})}}function getFloatingUIOptions(e,t){const n={strategy:"absolute",middleware:[]},s=addArrow(t);return shouldCenterStep(e)||(n.middleware.push(flip(),shift({limiter:limitShift(),crossAxis:!0})),s&&n.middleware.push(arrow({element:s})),n.placement=e.on),cjs(t.options.floatingUIOptions||{},n)}function addArrow(e){return e.options.arrow&&e.el?e.el.querySelector(".shepherd-arrow"):!1}function noop(){}function assign(e,t){for(const n in t)e[n]=t[n];return e}function run(e){return e()}function blank_object(){return Object.create(null)}function run_all(e){e.forEach(run)}function is_function(e){return typeof e=="function"}function safe_not_equal(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function is_empty(e){return Object.keys(e).length===0}function append(e,t){e.appendChild(t)}function insert(e,t,n){e.insertBefore(t,n||null)}function detach(e){e.parentNode&&e.parentNode.removeChild(e)}function destroy_each(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function element(e){return document.createElement(e)}function svg_element(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function text(e){return document.createTextNode(e)}function space(){return text(" ")}function empty(){return text("")}function listen(e,t,n,s){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)}function attr(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}const always_set_through_set_attribute=["width","height"];function set_attributes(e,t){const n=Object.getOwnPropertyDescriptors(e.__proto__);for(const s in t)t[s]==null?e.removeAttribute(s):s==="style"?e.style.cssText=t[s]:s==="__value"?e.value=e[s]=t[s]:n[s]&&n[s].set&&always_set_through_set_attribute.indexOf(s)===-1?e[s]=t[s]:attr(e,s,t[s])}function children(e){return Array.from(e.childNodes)}function toggle_class(e,t,n){e.classList[n?"add":"remove"](t)}let current_component;function set_current_component(e){current_component=e}function get_current_component(){if(!current_component)throw new Error("Function called outside component initialization");return current_component}function onMount(e){get_current_component().$$.on_mount.push(e)}function afterUpdate(e){get_current_component().$$.after_update.push(e)}const dirty_components=[],binding_callbacks=[];let render_callbacks=[];const flush_callbacks=[],resolved_promise=Promise.resolve();let update_scheduled=!1;function schedule_update(){update_scheduled||(update_scheduled=!0,resolved_promise.then(flush))}function add_render_callback(e){render_callbacks.push(e)}const seen_callbacks=new Set;let flushidx=0;function flush(){if(flushidx!==0)return;const e=current_component;do{try{for(;flushidx<dirty_components.length;){const t=dirty_components[flushidx];flushidx++,set_current_component(t),update(t.$$)}}catch(t){throw dirty_components.length=0,flushidx=0,t}for(set_current_component(null),dirty_components.length=0,flushidx=0;binding_callbacks.length;)binding_callbacks.pop()();for(let t=0;t<render_callbacks.length;t+=1){const n=render_callbacks[t];seen_callbacks.has(n)||(seen_callbacks.add(n),n())}render_callbacks.length=0}while(dirty_components.length);for(;flush_callbacks.length;)flush_callbacks.pop()();update_scheduled=!1,seen_callbacks.clear(),set_current_component(e)}function update(e){if(e.fragment!==null){e.update(),run_all(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(add_render_callback)}}function flush_render_callbacks(e){const t=[],n=[];render_callbacks.forEach(s=>e.indexOf(s)===-1?t.push(s):n.push(s)),n.forEach(s=>s()),render_callbacks=t}const outroing=new Set;let outros;function group_outros(){outros={r:0,c:[],p:outros}}function check_outros(){outros.r||run_all(outros.c),outros=outros.p}function transition_in(e,t){e&&e.i&&(outroing.delete(e),e.i(t))}function transition_out(e,t,n,s){if(e&&e.o){if(outroing.has(e))return;outroing.add(e),outros.c.push(()=>{outroing.delete(e),s&&(n&&e.d(1),s())}),e.o(t)}else s&&s()}function get_spread_update(e,t){const n={},s={},i={$$scope:1};let o=e.length;for(;o--;){const r=e[o],l=t[o];if(l){for(const c in r)c in l||(s[c]=1);for(const c in l)i[c]||(n[c]=l[c],i[c]=1);e[o]=l}else for(const c in r)i[c]=1}for(const r in s)r in n||(n[r]=void 0);return n}function create_component(e){e&&e.c()}function mount_component(e,t,n,s){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),s||add_render_callback(()=>{const r=e.$$.on_mount.map(run).filter(is_function);e.$$.on_destroy?e.$$.on_destroy.push(...r):run_all(r),e.$$.on_mount=[]}),o.forEach(add_render_callback)}function destroy_component(e,t){const n=e.$$;n.fragment!==null&&(flush_render_callbacks(n.after_update),run_all(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function make_dirty(e,t){e.$$.dirty[0]===-1&&(dirty_components.push(e),schedule_update(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function init(e,t,n,s,i,o,r,l=[-1]){const c=current_component;set_current_component(e);const a=e.$$={fragment:null,ctx:[],props:o,update:noop,not_equal:i,bound:blank_object(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(c?c.$$.context:[])),callbacks:blank_object(),dirty:l,skip_bound:!1,root:t.target||c.$$.root};r&&r(a.root);let f=!1;if(a.ctx=n?n(e,t.props||{},(d,u,...p)=>{const m=p.length?p[0]:u;return a.ctx&&i(a.ctx[d],a.ctx[d]=m)&&(!a.skip_bound&&a.bound[d]&&a.bound[d](m),f&&make_dirty(e,d)),u}):[],a.update(),f=!0,run_all(a.before_update),a.fragment=s?s(a.ctx):!1,t.target){if(t.hydrate){const d=children(t.target);a.fragment&&a.fragment.l(d),d.forEach(detach)}else a.fragment&&a.fragment.c();t.intro&&transition_in(e.$$.fragment),mount_component(e,t.target,t.anchor,t.customElement),flush()}set_current_component(c)}class SvelteComponent{$destroy(){destroy_component(this,1),this.$destroy=noop}$on(t,n){if(!is_function(n))return noop;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(n),()=>{const i=s.indexOf(n);i!==-1&&s.splice(i,1)}}$set(t){this.$$set&&!is_empty(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function create_fragment$8(e){let t,n,s,i,o;return{c(){t=element("button"),attr(t,"aria-label",n=e[3]?e[3]:null),attr(t,"class",s=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`),t.disabled=e[2],attr(t,"tabindex","0")},m(r,l){insert(r,t,l),t.innerHTML=e[5],i||(o=listen(t,"click",function(){is_function(e[0])&&e[0].apply(this,arguments)}),i=!0)},p(r,[l]){e=r,l&32&&(t.innerHTML=e[5]),l&8&&n!==(n=e[3]?e[3]:null)&&attr(t,"aria-label",n),l&18&&s!==(s=`${e[1]||""} shepherd-button ${e[4]?"shepherd-button-secondary":""}`)&&attr(t,"class",s),l&4&&(t.disabled=e[2])},i:noop,o:noop,d(r){r&&detach(t),i=!1,o()}}}function instance$8(e,t,n){let{config:s,step:i}=t,o,r,l,c,a,f;function d(u){return isFunction(u)?u=u.call(i):u}return e.$$set=u=>{"config"in u&&n(6,s=u.config),"step"in u&&n(7,i=u.step)},e.$$.update=()=>{e.$$.dirty&192&&(n(0,o=s.action?s.action.bind(i.tour):null),n(1,r=s.classes),n(2,l=s.disabled?d(s.disabled):!1),n(3,c=s.label?d(s.label):null),n(4,a=s.secondary),n(5,f=s.text?d(s.text):null))},[o,r,l,c,a,f,s,i]}class Shepherd_button extends SvelteComponent{constructor(t){super(),init(this,t,instance$8,create_fragment$8,safe_not_equal,{config:6,step:7})}}function get_each_context(e,t,n){const s=e.slice();return s[2]=t[n],s}function create_if_block$3(e){let t,n,s=e[1],i=[];for(let r=0;r<s.length;r+=1)i[r]=create_each_block(get_each_context(e,s,r));const o=r=>transition_out(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r<i.length;r+=1)i[r].c();t=empty()},m(r,l){for(let c=0;c<i.length;c+=1)i[c]&&i[c].m(r,l);insert(r,t,l),n=!0},p(r,l){if(l&3){s=r[1];let c;for(c=0;c<s.length;c+=1){const a=get_each_context(r,s,c);i[c]?(i[c].p(a,l),transition_in(i[c],1)):(i[c]=create_each_block(a),i[c].c(),transition_in(i[c],1),i[c].m(t.parentNode,t))}for(group_outros(),c=s.length;c<i.length;c+=1)o(c);check_outros()}},i(r){if(!n){for(let l=0;l<s.length;l+=1)transition_in(i[l]);n=!0}},o(r){i=i.filter(Boolean);for(let l=0;l<i.length;l+=1)transition_out(i[l]);n=!1},d(r){destroy_each(i,r),r&&detach(t)}}}function create_each_block(e){let t,n;return t=new Shepherd_button({props:{config:e[2],step:e[0]}}),{c(){create_component(t.$$.fragment)},m(s,i){mount_component(t,s,i),n=!0},p(s,i){const o={};i&2&&(o.config=s[2]),i&1&&(o.step=s[0]),t.$set(o)},i(s){n||(transition_in(t.$$.fragment,s),n=!0)},o(s){transition_out(t.$$.fragment,s),n=!1},d(s){destroy_component(t,s)}}}function create_fragment$7(e){let t,n,s=e[1]&&create_if_block$3(e);return{c(){t=element("footer"),s&&s.c(),attr(t,"class","shepherd-footer")},m(i,o){insert(i,t,o),s&&s.m(t,null),n=!0},p(i,[o]){i[1]?s?(s.p(i,o),o&2&&transition_in(s,1)):(s=create_if_block$3(i),s.c(),transition_in(s,1),s.m(t,null)):s&&(group_outros(),transition_out(s,1,1,()=>{s=null}),check_outros())},i(i){n||(transition_in(s),n=!0)},o(i){transition_out(s),n=!1},d(i){i&&detach(t),s&&s.d()}}}function instance$7(e,t,n){let s,{step:i}=t;return e.$$set=o=>{"step"in o&&n(0,i=o.step)},e.$$.update=()=>{e.$$.dirty&1&&n(1,s=i.options.buttons)},[i,s]}class Shepherd_footer extends SvelteComponent{constructor(t){super(),init(this,t,instance$7,create_fragment$7,safe_not_equal,{step:0})}}function create_fragment$6(e){let t,n,s,i,o;return{c(){t=element("button"),n=element("span"),n.textContent="\xD7",attr(n,"aria-hidden","true"),attr(t,"aria-label",s=e[0].label?e[0].label:"Close Tour"),attr(t,"class","shepherd-cancel-icon"),attr(t,"type","button")},m(r,l){insert(r,t,l),append(t,n),i||(o=listen(t,"click",e[1]),i=!0)},p(r,[l]){l&1&&s!==(s=r[0].label?r[0].label:"Close Tour")&&attr(t,"aria-label",s)},i:noop,o:noop,d(r){r&&detach(t),i=!1,o()}}}function instance$6(e,t,n){let{cancelIcon:s,step:i}=t;const o=r=>{r.preventDefault(),i.cancel()};return e.$$set=r=>{"cancelIcon"in r&&n(0,s=r.cancelIcon),"step"in r&&n(2,i=r.step)},[s,o,i]}class Shepherd_cancel_icon extends SvelteComponent{constructor(t){super(),init(this,t,instance$6,create_fragment$6,safe_not_equal,{cancelIcon:0,step:2})}}function create_fragment$5(e){let t;return{c(){t=element("h3"),attr(t,"id",e[1]),attr(t,"class","shepherd-title")},m(n,s){insert(n,t,s),e[3](t)},p(n,[s]){s&2&&attr(t,"id",n[1])},i:noop,o:noop,d(n){n&&detach(t),e[3](null)}}}function instance$5(e,t,n){let{labelId:s,element:i,title:o}=t;afterUpdate(()=>{isFunction(o)&&n(2,o=o()),n(0,i.innerHTML=o,i)});function r(l){binding_callbacks[l?"unshift":"push"](()=>{i=l,n(0,i)})}return e.$$set=l=>{"labelId"in l&&n(1,s=l.labelId),"element"in l&&n(0,i=l.element),"title"in l&&n(2,o=l.title)},[i,s,o,r]}class Shepherd_title extends SvelteComponent{constructor(t){super(),init(this,t,instance$5,create_fragment$5,safe_not_equal,{labelId:1,element:0,title:2})}}function create_if_block_1$1(e){let t,n;return t=new Shepherd_title({props:{labelId:e[0],title:e[2]}}),{c(){create_component(t.$$.fragment)},m(s,i){mount_component(t,s,i),n=!0},p(s,i){const o={};i&1&&(o.labelId=s[0]),i&4&&(o.title=s[2]),t.$set(o)},i(s){n||(transition_in(t.$$.fragment,s),n=!0)},o(s){transition_out(t.$$.fragment,s),n=!1},d(s){destroy_component(t,s)}}}function create_if_block$2(e){let t,n;return t=new Shepherd_cancel_icon({props:{cancelIcon:e[3],step:e[1]}}),{c(){create_component(t.$$.fragment)},m(s,i){mount_component(t,s,i),n=!0},p(s,i){const o={};i&8&&(o.cancelIcon=s[3]),i&2&&(o.step=s[1]),t.$set(o)},i(s){n||(transition_in(t.$$.fragment,s),n=!0)},o(s){transition_out(t.$$.fragment,s),n=!1},d(s){destroy_component(t,s)}}}function create_fragment$4(e){let t,n,s,i=e[2]&&create_if_block_1$1(e),o=e[3]&&e[3].enabled&&create_if_block$2(e);return{c(){t=element("header"),i&&i.c(),n=space(),o&&o.c(),attr(t,"class","shepherd-header")},m(r,l){insert(r,t,l),i&&i.m(t,null),append(t,n),o&&o.m(t,null),s=!0},p(r,[l]){r[2]?i?(i.p(r,l),l&4&&transition_in(i,1)):(i=create_if_block_1$1(r),i.c(),transition_in(i,1),i.m(t,n)):i&&(group_outros(),transition_out(i,1,1,()=>{i=null}),check_outros()),r[3]&&r[3].enabled?o?(o.p(r,l),l&8&&transition_in(o,1)):(o=create_if_block$2(r),o.c(),transition_in(o,1),o.m(t,null)):o&&(group_outros(),transition_out(o,1,1,()=>{o=null}),check_outros())},i(r){s||(transition_in(i),transition_in(o),s=!0)},o(r){transition_out(i),transition_out(o),s=!1},d(r){r&&detach(t),i&&i.d(),o&&o.d()}}}function instance$4(e,t,n){let{labelId:s,step:i}=t,o,r;return e.$$set=l=>{"labelId"in l&&n(0,s=l.labelId),"step"in l&&n(1,i=l.step)},e.$$.update=()=>{e.$$.dirty&2&&(n(2,o=i.options.title),n(3,r=i.options.cancelIcon))},[s,i,o,r]}class Shepherd_header extends SvelteComponent{constructor(t){super(),init(this,t,instance$4,create_fragment$4,safe_not_equal,{labelId:0,step:1})}}function create_fragment$3(e){let t;return{c(){t=element("div"),attr(t,"class","shepherd-text"),attr(t,"id",e[1])},m(n,s){insert(n,t,s),e[3](t)},p(n,[s]){s&2&&attr(t,"id",n[1])},i:noop,o:noop,d(n){n&&detach(t),e[3](null)}}}function instance$3(e,t,n){let{descriptionId:s,element:i,step:o}=t;afterUpdate(()=>{let{text:l}=o.options;isFunction(l)&&(l=l.call(o)),isHTMLElement$1(l)?i.appendChild(l):n(0,i.innerHTML=l,i)});function r(l){binding_callbacks[l?"unshift":"push"](()=>{i=l,n(0,i)})}return e.$$set=l=>{"descriptionId"in l&&n(1,s=l.descriptionId),"element"in l&&n(0,i=l.element),"step"in l&&n(2,o=l.step)},[i,s,o,r]}class Shepherd_text extends SvelteComponent{constructor(t){super(),init(this,t,instance$3,create_fragment$3,safe_not_equal,{descriptionId:1,element:0,step:2})}}function create_if_block_2(e){let t,n;return t=new Shepherd_header({props:{labelId:e[1],step:e[2]}}),{c(){create_component(t.$$.fragment)},m(s,i){mount_component(t,s,i),n=!0},p(s,i){const o={};i&2&&(o.labelId=s[1]),i&4&&(o.step=s[2]),t.$set(o)},i(s){n||(transition_in(t.$$.fragment,s),n=!0)},o(s){transition_out(t.$$.fragment,s),n=!1},d(s){destroy_component(t,s)}}}function create_if_block_1(e){let t,n;return t=new Shepherd_text({props:{descriptionId:e[0],step:e[2]}}),{c(){create_component(t.$$.fragment)},m(s,i){mount_component(t,s,i),n=!0},p(s,i){const o={};i&1&&(o.descriptionId=s[0]),i&4&&(o.step=s[2]),t.$set(o)},i(s){n||(transition_in(t.$$.fragment,s),n=!0)},o(s){transition_out(t.$$.fragment,s),n=!1},d(s){destroy_component(t,s)}}}function create_if_block$1(e){let t,n;return t=new Shepherd_footer({props:{step:e[2]}}),{c(){create_component(t.$$.fragment)},m(s,i){mount_component(t,s,i),n=!0},p(s,i){const o={};i&4&&(o.step=s[2]),t.$set(o)},i(s){n||(transition_in(t.$$.fragment,s),n=!0)},o(s){transition_out(t.$$.fragment,s),n=!1},d(s){destroy_component(t,s)}}}function create_fragment$2(e){let t,n=!isUndefined(e[2].options.title)||e[2].options.cancelIcon&&e[2].options.cancelIcon.enabled,s,i=!isUndefined(e[2].options.text),o,r=Array.isArray(e[2].options.buttons)&&e[2].options.buttons.length,l,c=n&&create_if_block_2(e),a=i&&create_if_block_1(e),f=r&&create_if_block$1(e);return{c(){t=element("div"),c&&c.c(),s=space(),a&&a.c(),o=space(),f&&f.c(),attr(t,"class","shepherd-content")},m(d,u){insert(d,t,u),c&&c.m(t,null),append(t,s),a&&a.m(t,null),append(t,o),f&&f.m(t,null),l=!0},p(d,[u]){u&4&&(n=!isUndefined(d[2].options.title)||d[2].options.cancelIcon&&d[2].options.cancelIcon.enabled),n?c?(c.p(d,u),u&4&&transition_in(c,1)):(c=create_if_block_2(d),c.c(),transition_in(c,1),c.m(t,s)):c&&(group_outros(),transition_out(c,1,1,()=>{c=null}),check_outros()),u&4&&(i=!isUndefined(d[2].options.text)),i?a?(a.p(d,u),u&4&&transition_in(a,1)):(a=create_if_block_1(d),a.c(),transition_in(a,1),a.m(t,o)):a&&(group_outros(),transition_out(a,1,1,()=>{a=null}),check_outros()),u&4&&(r=Array.isArray(d[2].options.buttons)&&d[2].options.buttons.length),r?f?(f.p(d,u),u&4&&transition_in(f,1)):(f=create_if_block$1(d),f.c(),transition_in(f,1),f.m(t,null)):f&&(group_outros(),transition_out(f,1,1,()=>{f=null}),check_outros())},i(d){l||(transition_in(c),transition_in(a),transition_in(f),l=!0)},o(d){transition_out(c),transition_out(a),transition_out(f),l=!1},d(d){d&&detach(t),c&&c.d(),a&&a.d(),f&&f.d()}}}function instance$2(e,t,n){let{descriptionId:s,labelId:i,step:o}=t;return e.$$set=r=>{"descriptionId"in r&&n(0,s=r.descriptionId),"labelId"in r&&n(1,i=r.labelId),"step"in r&&n(2,o=r.step)},[s,i,o]}class Shepherd_content extends SvelteComponent{constructor(t){super(),init(this,t,instance$2,create_fragment$2,safe_not_equal,{descriptionId:0,labelId:1,step:2})}}function create_if_block(e){let t;return{c(){t=element("div"),attr(t,"class","shepherd-arrow"),attr(t,"data-popper-arrow","")},m(n,s){insert(n,t,s)},d(n){n&&detach(t)}}}function create_fragment$1(e){let t,n,s,i,o,r,l,c,a=e[4].options.arrow&&e[4].options.attachTo&&e[4].options.attachTo.element&&e[4].options.attachTo.on&&create_if_block();s=new Shepherd_content({props:{descriptionId:e[2],labelId:e[3],step:e[4]}});let f=[{"aria-describedby":i=isUndefined(e[4].options.text)?null:e[2]},{"aria-labelledby":o=e[4].options.title?e[3]:null},e[1],{role:"dialog"},{tabindex:"0"}],d={};for(let u=0;u<f.length;u+=1)d=assign(d,f[u]);return{c(){t=element("div"),a&&a.c(),n=space(),create_component(s.$$.fragment),set_attributes(t,d),toggle_class(t,"shepherd-has-cancel-icon",e[5]),toggle_class(t,"shepherd-has-title",e[6]),toggle_class(t,"shepherd-element",!0)},m(u,p){insert(u,t,p),a&&a.m(t,null),append(t,n),mount_component(s,t,null),e[13](t),r=!0,l||(c=listen(t,"keydown",e[7]),l=!0)},p(u,[p]){u[4].options.arrow&&u[4].options.attachTo&&u[4].options.attachTo.element&&u[4].options.attachTo.on?a||(a=create_if_block(),a.c(),a.m(t,n)):a&&(a.d(1),a=null);const m={};p&4&&(m.descriptionId=u[2]),p&8&&(m.labelId=u[3]),p&16&&(m.step=u[4]),s.$set(m),set_attributes(t,d=get_spread_update(f,[(!r||p&20&&i!==(i=isUndefined(u[4].options.text)?null:u[2]))&&{"aria-describedby":i},(!r||p&24&&o!==(o=u[4].options.title?u[3]:null))&&{"aria-labelledby":o},p&2&&u[1],{role:"dialog"},{tabindex:"0"}])),toggle_class(t,"shepherd-has-cancel-icon",u[5]),toggle_class(t,"shepherd-has-title",u[6]),toggle_class(t,"shepherd-element",!0)},i(u){r||(transition_in(s.$$.fragment,u),r=!0)},o(u){transition_out(s.$$.fragment,u),r=!1},d(u){u&&detach(t),a&&a.d(),destroy_component(s),e[13](null),l=!1,c()}}}const KEY_TAB=9,KEY_ESC=27,LEFT_ARROW=37,RIGHT_ARROW=39;function getClassesArray(e){return e.split(" ").filter(t=>!!t.length)}function instance$1(e,t,n){let{classPrefix:s,element:i,descriptionId:o,firstFocusableElement:r,focusableElements:l,labelId:c,lastFocusableElement:a,step:f,dataStepId:d}=t,u,p,m;const b=()=>i;onMount(()=>{n(1,d={[`data-${s}shepherd-step-id`]:f.id}),n(9,l=i.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]')),n(8,r=l[0]),n(10,a=l[l.length-1])}),afterUpdate(()=>{m!==f.options.classes&&w()});function w(){y(m),m=f.options.classes,S(m)}function y(h){if(isString(h)){const _=getClassesArray(h);_.length&&i.classList.remove(..._)}}function S(h){if(isString(h)){const _=getClassesArray(h);_.length&&i.classList.add(..._)}}const v=h=>{const{tour:_}=f;switch(h.keyCode){case KEY_TAB:if(l.length===0){h.preventDefault();break}h.shiftKey?(document.activeElement===r||document.activeElement.classList.contains("shepherd-element"))&&(h.preventDefault(),a.focus()):document.activeElement===a&&(h.preventDefault(),r.focus());break;case KEY_ESC:_.options.exitOnEsc&&(h.stopPropagation(),f.cancel());break;case LEFT_ARROW:_.options.keyboardNavigation&&(h.stopPropagation(),_.back());break;case RIGHT_ARROW:_.options.keyboardNavigation&&(h.stopPropagation(),_.next());break}};function g(h){binding_callbacks[h?"unshift":"push"](()=>{i=h,n(0,i)})}return e.$$set=h=>{"classPrefix"in h&&n(11,s=h.classPrefix),"element"in h&&n(0,i=h.element),"descriptionId"in h&&n(2,o=h.descriptionId),"firstFocusableElement"in h&&n(8,r=h.firstFocusableElement),"focusableElements"in h&&n(9,l=h.focusableElements),"labelId"in h&&n(3,c=h.labelId),"lastFocusableElement"in h&&n(10,a=h.lastFocusableElement),"step"in h&&n(4,f=h.step),"dataStepId"in h&&n(1,d=h.dataStepId)},e.$$.update=()=>{e.$$.dirty&16&&(n(5,u=f.options&&f.options.cancelIcon&&f.options.cancelIcon.enabled),n(6,p=f.options&&f.options.title))},[i,d,o,c,f,u,p,v,r,l,a,s,b,g]}class Shepherd_element extends SvelteComponent{constructor(t){super(),init(this,t,instance$1,create_fragment$1,safe_not_equal,{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 Step extends Evented{constructor(t,n={}){return super(t,n),this.tour=t,this.classPrefix=this.tour.options?normalizePrefix(this.tour.options.classPrefix):"",this.styles=t.styles,this._resolvedAttachTo=null,autoBind(this),this._setOptions(n),this}cancel(){this.tour.cancel(),this.trigger("cancel")}complete(){this.tour.complete(),this.trigger("complete")}destroy(){destroyTooltip(this),isHTMLElement$1(this.el)&&(this.el.remove(),this.el=null),this._updateStepTargetOnHide(),this.trigger("destroy")}getTour(){return this.tour}hide(){this.tour.modal.hide(),this.trigger("before-hide"),this.el&&(this.el.hidden=!0),this._updateStepTargetOnHide(),this.trigger("hide")}_resolveAttachToOptions(){return this._resolvedAttachTo=parseAttachTo(this),this._resolvedAttachTo}_getResolvedAttachToOptions(){return this._resolvedAttachTo===null?this._resolveAttachToOptions():this._resolvedAttachTo}isOpen(){return!!(this.el&&!this.el.hidden)}show(){return isFunction(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 Shepherd_element({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();isFunction(this.options.scrollToHandler)?this.options.scrollToHandler(n):isElement$1(n)&&typeof n.scrollIntoView=="function"&&n.scrollIntoView(t)}_getClassOptions(t){const n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions,s=t.classes?t.classes:"",i=n&&n.classes?n.classes:"",o=[...s.split(" "),...i.split(" ")],r=new Set(o);return Array.from(r).join(" ").trim()}_setOptions(t={}){let n=this.tour&&this.tour.options&&this.tour.options.defaultStepOptions;n=cjs({},n||{}),this.options=Object.assign({arrow:!0},n,t,mergeTooltipConfig(n,t));const{when:s}=this.options;this.options.classes=this._getClassOptions(t),this.destroy(),this.id=this.options.id||`step-${uuid()}`,s&&Object.keys(s).forEach(i=>{this.on(i,s[i],this)})}_setupElements(){isUndefined(this.el)||this.destroy(),this.el=this._createTooltipContent(),this.options.advanceOn&&bindAdvance(this),setupTooltip(this)}_show(){this.trigger("before-show"),this._resolveAttachToOptions(),this._setupElements(),this.tour.modal||this.tour._setupModal(),this.tour.modal.setupForStep(this),this._styleTargetElementForStep(this),this.el.hidden=!1,this.options.scrollTo&&setTimeout(()=>{this._scrollTo(this.options.scrollTo)}),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 cleanupSteps(e){if(e){const{steps:t}=e;t.forEach(n=>{n.options&&n.options.canClickTarget===!1&&n.options.attachTo&&n.target instanceof HTMLElement&&n.target.classList.remove("shepherd-target-click-disabled")})}}function makeOverlayPath({width:e,height:t,x:n=0,y:s=0,r:i=0}){const{innerWidth:o,innerHeight:r}=window,{topLeft:l=0,topRight:c=0,bottomRight:a=0,bottomLeft:f=0}=typeof i=="number"?{topLeft:i,topRight:i,bottomRight:i,bottomLeft:i}:i;return`M${o},${r}H0V0H${o}V${r}ZM${n+l},${s}a${l},${l},0,0,0-${l},${l}V${t+s-f}a${f},${f},0,0,0,${f},${f}H${e+n-a}a${a},${a},0,0,0,${a}-${a}V${s+c}a${c},${c},0,0,0-${c}-${c}Z`}function create_fragment(e){let t,n,s,i,o;return{c(){t=svg_element("svg"),n=svg_element("path"),attr(n,"d",e[2]),attr(t,"class",s=`${e[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)},m(r,l){insert(r,t,l),append(t,n),e[11](t),i||(o=listen(t,"touchmove",e[3]),i=!0)},p(r,[l]){l&4&&attr(n,"d",r[2]),l&2&&s!==(s=`${r[1]?"shepherd-modal-is-visible":""} shepherd-modal-overlay-container`)&&attr(t,"class",s)},i:noop,o:noop,d(r){r&&detach(t),e[11](null),i=!1,o()}}}function _getScrollParent(e){if(!e)return null;const n=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return n!=="hidden"&&n!=="visible"&&e.scrollHeight>=e.clientHeight?e:_getScrollParent(e.parentElement)}function _getVisibleHeight(e,t){const n=e.getBoundingClientRect();let s=n.y||n.top,i=n.bottom||s+n.height;if(t){const r=t.getBoundingClientRect(),l=r.y||r.top,c=r.bottom||l+r.height;s=Math.max(s,l),i=Math.min(i,c)}const o=Math.max(i-s,0);return{y:s,height:o}}function instance(e,t,n){let{element:s,openingProperties:i}=t;uuid();let o=!1,r,l;a();const c=()=>s;function a(){n(4,i={width:0,height:0,x:0,y:0,r:0})}function f(){n(1,o=!1),y()}function d(g=0,h=0,_,E){if(E){const{y:T,height:O}=_getVisibleHeight(E,_),{x:C,width:I,left:L}=E.getBoundingClientRect();n(4,i={width:I+g*2,height:O+g*2,x:(C||L)-g,y:T-g,r:h})}else a()}function u(g){y(),g.tour.options.useModalOverlay?(S(g),p()):f()}function p(){n(1,o=!0)}const m=g=>{g.preventDefault()},b=g=>{g.stopPropagation()};function w(){window.addEventListener("touchmove",m,{passive:!1})}function y(){r&&(cancelAnimationFrame(r),r=void 0),window.removeEventListener("touchmove",m,{passive:!1})}function S(g){const{modalOverlayOpeningPadding:h,modalOverlayOpeningRadius:_}=g.options,E=_getScrollParent(g.target),T=()=>{r=void 0,d(h,_,E,g.target),r=requestAnimationFrame(T)};T(),w()}function v(g){binding_callbacks[g?"unshift":"push"](()=>{s=g,n(0,s)})}return e.$$set=g=>{"element"in g&&n(0,s=g.element),"openingProperties"in g&&n(4,i=g.openingProperties)},e.$$.update=()=>{e.$$.dirty&16&&n(2,l=makeOverlayPath(i))},[s,o,l,b,i,c,a,f,d,u,p,v]}class Shepherd_modal extends SvelteComponent{constructor(t){super(),init(this,t,instance,create_fragment,safe_not_equal,{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 Shepherd=new Evented;class Tour extends Evented{constructor(t={}){super(t),autoBind(this);const n={exitOnEsc:!0,keyboardNavigation:!0};return this.options=Object.assign({},n,t),this.classPrefix=normalizePrefix(this.options.classPrefix),this.steps=[],this.addSteps(this.options.steps),["active","cancel","complete","inactive","show","start"].map(i=>{(o=>{this.on(o,r=>{r=r||{},r.tour=this,Shepherd.trigger(o,r)})})(i)}),this._setTourID(),this}addStep(t,n){let s=t;return s instanceof Step?s.tour=this:s=new Step(this,s),isUndefined(n)?this.steps.push(s):this.steps.splice(n,0,s),s}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=typeof this.options.confirmCancel=="function",n=this.options.confirmCancelMessage||"Are you sure you want to stop the tour?";(t?await this.options.confirmCancel():window.confirm(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 Shepherd.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((s,i)=>{if(s.id===t)return s.isOpen()&&s.hide(),s.destroy(),this.steps.splice(i,1),!0}),n&&n.id===t&&(this.currentStep=void 0,this.steps.length?this.show(0):this.cancel())}show(t=0,n=!0){const s=isString(t)?this.getById(t):this.steps[t];s&&(this._updateStateBeforeShow(),isFunction(s.options.showOn)&&!s.options.showOn()?this._skipStep(s,n):(this.trigger("show",{step:s,previous:this.currentStep}),this.currentStep=s,s.show()))}start(){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(s=>s.destroy()),cleanupSteps(this),this.trigger(t,{index:n}),Shepherd.activeTour=null,this.trigger("inactive",{tour:this}),this.modal&&this.modal.hide(),(t==="cancel"||t==="complete")&&this.modal){const s=document.querySelector(".shepherd-modal-overlay-container");s&&s.remove()}isHTMLElement$1(this.focusedElBeforeOpen)&&this.focusedElBeforeOpen.focus()}_setupActiveTour(){this.trigger("active",{tour:this}),Shepherd.activeTour=this}_setupModal(){this.modal=new Shepherd_modal({target:this.options.modalContainer||document.body,props:{classPrefix:this.classPrefix,styles:this.styles}})}_skipStep(t,n){const s=this.steps.indexOf(t);if(s===this.steps.length-1)this.complete();else{const i=n?s+1:s-1;this.show(i,n)}}_updateStateBeforeShow(){this.currentStep&&this.currentStep.hide(),this.isActive()||this._setupActiveTour()}_setTourID(){const t=this.options.tourName||"tour";this.id=`${t}--${uuid()}`}}const isServerSide=typeof window>"u";class NoOp{constructor(){}}isServerSide?Object.assign(Shepherd,{Tour:NoOp,Step:NoOp}):Object.assign(Shepherd,{Tour,Step});/**
 * @copyright   (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */if(!Joomla)throw new Error("Joomla API is not properly initialised");function emptyStorage(){sessionStorage.removeItem("currentStepId"),sessionStorage.removeItem("stepCount"),sessionStorage.removeItem("tourId"),sessionStorage.removeItem("tourToken"),sessionStorage.removeItem("previousStepUrl")}function getTourInstance(){const e=new Shepherd.Tour({defaultStepOptions:{cancelIcon:{enabled:!0,label:Joomla.Text._("JCANCEL")},classes:"shepherd-theme-arrows",scrollTo:{behavior:"smooth",block:"center"}},useModalOverlay:!0,keyboardNavigation:!0});return e.on("cancel",()=>{emptyStorage(),e.steps=[]}),e}function addProgressIndicator(e,t,n){const s=e.querySelector(".shepherd-header"),i=document.createElement("div");i.classList.add("shepherd-progress"),i.setAttribute("role","status"),i.setAttribute("aria-label",Joomla.Text._("PLG_SYSTEM_GUIDEDTOURS_STEP_NUMBER_OF").replace("{number}",t).replace("{total}",n));const o=document.createElement("span");o.setAttribute("aria-hidden",!0),o.innerText=`${t}/${n}`,i.appendChild(o),s.insertBefore(i,e.querySelector(".shepherd-cancel-icon"))}function setFocus(e,t,n){e&&!e.disabled?e.focus():t&&!t.disabled?t.focus():n.focus()}function addStepToTourButton(e,t,n){const s=new Shepherd.Step(e,{title:t.title,text:t.description,classes:"shepherd-theme-arrows",buttons:n,id:t.id,arrow:!0,beforeShowPromise(){return new Promise(i=>{if(e.currentStep.options.attachTo.element){const o=e.currentStep.options.attachTo.element.split(","),r=e.currentStep.options.attachTo.on;e.currentStep.options.attachTo.element="",e.currentStep.options.attachTo.on="center";for(let l=0;l<o.length;l+=1){const c=document.querySelector(o[l]);if(c!=null&&!c.disabled&&!c.readonly&&c.style.display!=="none"){e.currentStep.options.attachTo.element=o[l],e.currentStep.options.attachTo.on=r;break}}}if(e.currentStep.options.attachTo.type==="redirect"){const o=Joomla.getOptions("system.paths").rootFull+e.currentStep.options.attachTo.url;window.location.href!==o?(sessionStorage.setItem("currentStepId",e.currentStep.id),sessionStorage.setItem("previousStepUrl",window.location.href),window.location.href=o):i()}else i()}).catch(()=>{})},when:{show(){const i=this.getElement(),o=this.getTarget();if(i.setAttribute("aria-live","assertive"),sessionStorage.setItem("currentStepId",this.id),addProgressIndicator(i,this.id+1,sessionStorage.getItem("stepCount")),o&&this.options.attachTo.type==="interactive"){const r=i.querySelector(".shepherd-cancel-icon"),l=i.querySelector(".shepherd-button-primary"),c=i.querySelector(".shepherd-button-secondary");o.tagName.toLowerCase()==="input"&&o.hasAttribute("required")&&["email","password","search","tel","text","url"].includes(o.type)&&(o.value.trim().length?(l.removeAttribute("disabled"),l.classList.remove("disabled")):(l.setAttribute("disabled","disabled"),l.classList.add("disabled"))),r.addEventListener("keydown",a=>{a.key==="Tab"&&(o.tagName.toLowerCase()==="joomla-field-fancy-select"?(o.querySelector(".choices").click(),o.querySelector(".choices input").focus()):o.parentElement.tagName.toLowerCase()==="joomla-field-fancy-select"?(o.click(),o.querySelector("input").focus()):(o.focus(),a.preventDefault()))}),o.tagName.toLowerCase()==="iframe"?o.contentWindow.document.body.addEventListener("blur",a=>{sessionStorage.getItem("tourId")&&(setTimeout(()=>{setFocus(l,c,r)},1),a.preventDefault())}):o.tagName.toLowerCase()==="joomla-field-fancy-select"?o.querySelector(".choices input").addEventListener("blur",a=>{sessionStorage.getItem("tourId")&&(setFocus(l,c,r),a.preventDefault())}):o.parentElement.tagName.toLowerCase()==="joomla-field-fancy-select"?o.querySelector("input").addEventListener("blur",a=>{sessionStorage.getItem("tourId")&&(setFocus(l,c,r),a.preventDefault())}):o.addEventListener("blur",a=>{sessionStorage.getItem("tourId")&&(setFocus(l,c,r),a.preventDefault())})}}}});if(t.target?s.updateStepOptions({attachTo:{element:t.target,on:t.position,url:t.url,type:t.type,interactive_type:t.interactive_type}}):s.updateStepOptions({attachTo:{url:t.url,type:t.type,interactive_type:t.interactive_type}}),t.type!=="next"){const i=`${Joomla.getOptions("system.paths").root}/${t.url}`;sessionStorage.getItem(i)&&sessionStorage.removeItem(i)}e.addStep(s)}function showTourInfo(e,t){e.addStep({title:t.title,text:t.description,classes:"shepherd-theme-arrows",buttons:[{classes:"btn btn-primary shepherd-button-primary",action(){return this.next()},text:Joomla.Text._("PLG_SYSTEM_GUIDEDTOURS_START")}],id:"tourinfo",when:{show(){sessionStorage.setItem("currentStepId","tourinfo"),addProgressIndicator(this.getElement(),1,sessionStorage.getItem("stepCount"))}}})}function pushCompleteButton(e){e.push({text:Joomla.Text._("PLG_SYSTEM_GUIDEDTOURS_COMPLETE"),classes:"btn btn-primary shepherd-button-primary",action(){return this.cancel()}})}function pushNextButton(e,t,n=!1,s=""){e.push({text:Joomla.Text._("PLG_SYSTEM_GUIDEDTOURS_NEXT"),classes:`btn btn-primary shepherd-button-primary step-next-button-${t.id} ${s}`,action(){return this.next()},disabled:n})}function addBackButton(e,t){e.push({text:Joomla.Text._("PLG_SYSTEM_GUIDEDTOURS_BACK"),classes:"btn btn-secondary shepherd-button-secondary",action(){if(t.type==="redirect"){sessionStorage.setItem("currentStepId",t.id-1);const n=sessionStorage.getItem("previousStepUrl");n&&(sessionStorage.removeItem("previousStepUrl"),window.location.href=n)}return this.back()}})}function enableButton(e){const t=document.querySelector(`.step-next-button-${e.currentTarget.step_id}`);t.removeAttribute("disabled"),t.classList.remove("disabled")}function disableButton(e){const t=document.querySelector(`.step-next-button-${e.currentTarget.step_id}`);t.setAttribute("disabled","disabled"),t.classList.add("disabled")}function startTour(e){sessionStorage.setItem("tourId",e.id),sessionStorage.setItem("stepCount",String(e.steps.length));const t=sessionStorage.getItem("currentStepId");let n=null,s=-1;t!=null&&Number(t)>-1&&(s=typeof e.steps[t]<"u"?Number(t):-1,s>0&&(n=e.steps[s-1]));const i=getTourInstance();if(s<0){const l=Joomla.getOptions("system.paths").rootFull;if(window.location.href!==l+e.steps[0].url){window.location.href=l+e.steps[0].url;return}showTourInfo(i,e.steps[0]),s=1}const o=e.steps.length;let r;for(let l=s;l<o;l+=1){if(r=[],(n===null||l>s||e.steps[l].type==="redirect")&&addBackButton(r,e.steps[l]),e&&e.steps[l].target&&e.steps[l].type==="interactive"){const c=document.querySelector(e.steps[l].target);if(c&&e&&e.steps&&e.steps[l]&&e.steps[l].interactive_type)switch(e.steps[l].interactive_type){case"submit":c.addEventListener("click",()=>{sessionStorage.getItem("tourId")&&sessionStorage.setItem("currentStepId",e.steps[l].id+1)});break;case"text":c.step_id=l,c.hasAttribute("required")&&["email","password","search","tel","text","url"].includes(c.type)&&["input","focus"].forEach(a=>c.addEventListener(a,f=>{sessionStorage.getItem("tourId")&&(f.target.value.trim().length?enableButton(f):disableButton(f))}));break;case"button":c.addEventListener("click",()=>{sessionStorage.setItem("currentStepId",e.steps[l].id+1),i.next()});break}}l<o-1?(e&&e.steps[l].type!=="interactive"||e&&e.steps[l].interactive_type==="text"||e&&e.steps[l].interactive_type==="other")&&pushNextButton(r,e.steps[l]):pushCompleteButton(r),addStepToTourButton(i,e.steps[l],r),n=e.steps[l]}i.start()}function loadTour(e){if(e>0){const t=`${Joomla.getOptions("system.paths").rootFull}administrator/index.php?option=com_ajax&plugin=guidedtours&group=system&format=json&id=${e}`;fetch(t).then(n=>n.json()).then(n=>{n.success||(n.messages&&Joomla.renderMessages(n.messages),emptyStorage()),startTour(n.data)}).catch(n=>{emptyStorage();const s={error:[Joomla.Text._("PLG_SYSTEM_GUIDEDTOURS_TOUR_ERROR")]};throw Joomla.renderMessages(s),new Error(n)})}}document.querySelector("body").addEventListener("click",e=>{if(!(!e.target||!e.target.classList.contains("button-start-guidedtour"))){if(typeof e.target.getAttribute("data-id")>"u"||e.target.getAttribute("data-id")<=0){Joomla.renderMessages({error:[Joomla.Text._("PLG_SYSTEM_GUIDEDTOURS_COULD_NOT_LOAD_THE_TOUR")]});return}sessionStorage.setItem("tourToken",String(Joomla.getOptions("com_guidedtours.token"))),loadTour(e.target.getAttribute("data-id"))}});const tourId=sessionStorage.getItem("tourId");tourId>0&&sessionStorage.getItem("tourToken")===String(Joomla.getOptions("com_guidedtours.token"))?loadTour(tourId):emptyStorage();
Site is undergoing maintenance

PACJA Events

Maintenance mode is on

Site will be available soon. Thank you for your patience!