ahdjs 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/css/index.css +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/types/index.d.ts +13 -5
- package/package.json +1 -1
package/build/css/index.css
CHANGED
package/build/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* ahdjs v0.0.
|
|
3
|
+
* ahdjs v0.0.11
|
|
4
4
|
*
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) Ishaan Puniani (https://github.com/ishaan-puniani) and project contributors.
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AHDjs=e():t.AHDjs=e()}(self,(()=>(()=>{var t={705:(t,e,n)=>{var r=n(639).Symbol;t.exports=r},932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},239:(t,e,n)=>{var r=n(705),i=n(607),o=n(333),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},531:(t,e,n)=>{var r=n(705),i=n(932),o=n(469),a=n(448),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n}},957:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},607:(t,e,n)=>{var r=n(705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},639:(t,e,n)=>{var r=n(957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},469:t=>{var e=Array.isArray;t.exports=e},220:t=>{t.exports=function(t){return null===t}},5:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},448:(t,e,n)=>{var r=n(239),i=n(5);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},353:t=>{t.exports=function(t){return void 0===t}},833:(t,e,n)=>{var r=n(531);t.exports=function(t){return null==t?"":r(t)}},955:(t,e,n)=>{var r=n(833),i=0;t.exports=function(t){var e=++i;return r(t)+e}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{default:()=>H});var t=n(955),e=n.n(t),i=n(353),o=n.n(i),a=n(220),s=n.n(a);const c=function(t){return t instanceof HTMLElement||/^\[object HTML(.+)Element\]$/.test("".concat(t))},l=function(t){return t instanceof SVGElement||/^\[object SVG(.+)Element\]$/.test("".concat(t))},u=function(t){return/^[object NodeList]$/.test("".concat(t))};function p(t){return function(t){if(Array.isArray(t))return y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||g(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||g(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function m(t,e,n){return m=b()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&x(i,n.prototype),i},m.apply(null,arguments)}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function x(t,e){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},x(t,e)}const S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new DOMParser,r=t.replace(/<template/g,"<gc-template");r=r.replace(/<\/template/g,"</gc-template");var i=n.parseFromString(r,"text/html"),a=document.implementation.createHTMLDocument(),h=/{{([^}}]+)?}}/gm,g=/^@(.+)$/,y=new Map,b=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.body,i=r,b=Object.keys(n),x=Object.values(n),S=function(t){return m(Function,b.concat(["return ".concat(t,";")])).apply(void 0,x)};if(e){if(e.nodeType===Node.ELEMENT_NODE){if(e.hasAttribute("if")){if(y.set(e.parentNode,!1),!S(e.getAttribute("if")))return;y.set(e.parentNode,!0)}if(e.hasAttribute("elseif")){if(y.get(e.parentNode)||!S(e.getAttribute("elseif")))return;y.set(e.parentNode,!0)}if(e.hasAttribute("else")){if(y.get(e.parentNode))return;y.set(e.parentNode,!0)}if(e.hasAttribute("for")){var w=e.getAttribute("for").split(" in "),E=v(w,2),k=E[0],O=E[1];e.removeAttribute("for");var P=k.replace(/\(|\)/g,"").split(","),T=v(P,2),L=T[0],I=T[1];L=L.trim(),I=I?I.trim():"";var C=S(O.trim()),j=Array.isArray(C);return void Object.keys(C).forEach((function(r){var o=f(f({},n),{},d({},L,C[r]));I&&(o[I]=j?parseInt(r,10):r),t(e,o,i)}))}e!==e.ownerDocument.body&&"GC-TEMPLATE"!==e.tagName&&(i=e.cloneNode(),r.append(i)),p(e.attributes).forEach((function(t){var e=t.name,n=t.value,r=g.exec(e);if(r){var a=v(r,2)[1];return i.addEventListener(a,(function(t){return m(Function,[].concat(b,["$event"]).concat(["return ".concat(n).concat(/\(.+\)/.test(n)?"":"()",";")])).apply(void 0,[].concat(x,[t]))})),void i.removeAttribute(e)}for(var c=h.exec(n),l=0,u="";c;){u+=n.slice(l,c.index);var p=v(c,2),f=p[0],d=p[1];d=d.trim();try{f=S(d),(o()(f)||s()(f))&&(f="")}catch(t){console.error(t)}u+=f,l=c.index+c[0].length,c=h.exec(n)}u+=n.substr(l,n.length-l),"html"===e?(i.innerHTML=u,i.removeAttribute(e)):["if","else","elseif"].includes(e)?i.removeAttribute(e):i.setAttribute(e,u)}))}else if(e.nodeType===Node.TEXT_NODE){var A=h.exec(e.nodeValue);if(A){for(var D=0;A;){i.append(document.createTextNode(e.nodeValue.slice(D,A.index)));var N=A,R=v(N,2),M=R[0],$=R[1];$=$.trim();try{M=S($),(o()(M)||s()(M))&&(M="")}catch(t){console.error(t)}c(M)||l(M)?i.append(M):u(M)?M.forEach((function(t){i.append(t)})):i.append(document.createTextNode(M)),D=A.index+A[0].length,A=h.exec(e.nodeValue)}i.append(document.createTextNode(e.nodeValue.slice(D,e.nodeValue.length)))}else i.append(e.cloneNode())}var W=e.childNodes,B=void 0===W?[]:W;B.length&&B.forEach((function(e){t(e,n,i)}))}};return b(i.body,e,a.body),a.body.firstElementChild};function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function E(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||O(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t){return function(t){if(Array.isArray(t))return P(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){if(t){if("string"==typeof t)return P(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(t,e):void 0}}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function T(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */T=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,o=Object.create(i.prototype),a=new k(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var u={};function p(){}function h(){}function f(){}var d={};s(d,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(O([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=f.prototype=p.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var c=l(t[i],t,o);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==w(p)&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(p).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,u;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=f,s(y,"constructor",f),s(f,"constructor",h),h.displayName=s(f,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}function L(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function I(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){L(o,r,i,a,s,"next",t)}function s(t){L(o,r,i,a,s,"throw",t)}a(void 0)}))}}function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){A(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function A(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function D(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var R=function(){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,t),Object.defineProperty(this,"uid",{value:e()(),enumerable:!1,configurable:!1,writable:!1}),this.setDefaults(),this.cache=new Map,this.listeners={},this.observers={},this.options={},this.setOptions(r),this.tour=null,this.setTour(n),this.notifications=[],this.elements=new Map,this.init()}var n,r,i,o,a,s,l,u;return n=t,r=[{key:"init",value:function(){}},{key:"setDefaults",value:function(){return this.previousStep=null,this.currentStep=null,this.nextStep=null,this.fromStep=null,this.toStep=null,this.previousStepIndex=-1,this.currentStepIndex=-1,this.nextStepIndex=-1,this.fromStepIndex=-1,this.toStepIndex=-1,this.steps=[],this.isDisplayed=!1,this}},{key:"setTour",value:function(t){return this.tour=t,this}},{key:"getTour",value:function(){return this.tour}},{key:"setOptions",value:function(t){return this.options=j(j({},this.constructor.getDefaultOptions()),t),this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(u=I(T().mark((function t(){var e,n,r,i,o,a,s=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=s.length>0&&void 0!==s[0]?s[0]:0,n=!(s.length>1&&void 0!==s[1])||s[1],this.isDisplayed=!0,this.mountOverlayEl(),this.startPreloader(),r=s.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=s[o];return t.next=8,this.emit.apply(this,["onStart"].concat(i));case 8:if(this.stopPreloader(),this.tour&&this.tour.length){t.next=13;break}return this.removeOverlayEl(),this.isDisplayed=!1,t.abrupt("return",!1);case 13:if(this.steps=this.sortSteps(this.getSteps(this.tour)),this.steps.length){t.next=18;break}return this.removeOverlayEl(),this.isDisplayed=!1,t.abrupt("return",!1);case 18:return document.body.classList.add(this.constructor.getBodyClass()),t.next=21,this.go.apply(this,[e,n].concat(i));case 21:return a=t.sent,this.isDisplayed=a,document.body.classList.toggle(this.constructor.getBodyClass(),a),a&&(this.options.useKeyboard&&this.addOnKeydownListener(),this.addOnWindowResizeListener(),this.addOnWindowScrollListener()),t.abrupt("return",a);case 26:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"go",value:(l=I(T().mark((function t(e){var n,r,i,o,a,s,c,l,u,p,h,f,d,v,g,y,m,b=this,x=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=!(x.length>1&&void 0!==x[1])||x[1],r=x.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=x[o];if(this.isDisplayed&&this.steps.length){t.next=4;break}return t.abrupt("return",!1);case 4:if(a=n?parseInt(e,10):e,!this.currentStep){t.next=9;break}if(!(n?this.currentStepIndex===a:this.currentStep.step===a)){t.next=9;break}return t.abrupt("return",!1);case 9:if(s=this.currentStep,c=this.currentStepIndex,l=n?this.steps[a]:this.steps.filter((function(t){return t.step===a}))[0]){t.next=14;break}return t.abrupt("return",!1);case 14:if(u=this.steps.indexOf(l),h=u,f=(p=l).onBeforeChange,d=p.onAfterChange,this.startPreloader(),v=!1,!f){t.next=26;break}return t.next=23,Promise.resolve().then((function(){return f.call.apply(f,[b,p,s].concat(i))}));case 23:if(t.t0=t.sent,!1!==t.t0){t.next=26;break}v=!0;case 26:return t.next=28,this.emit.apply(this,["onBeforeChange",p,s].concat(i));case 28:if(!t.sent.some((function(t){return!1===t}))){t.next=30;break}v=!0;case 30:if(this.stopPreloader(),!v){t.next=33;break}return t.abrupt("return",!1);case 33:return this.beforeChangeStep({toStep:p,toStepIndex:h,currentStep:l,currentStepIndex:u,fromStep:s,fromStepIndex:c}),this.toStep=p,this.toStepIndex=h,this.currentStep=l,this.currentStepIndex=u,this.fromStep=s,this.fromStepIndex=c,this.previousStep=this.steps[this.currentStepIndex-1]||null,this.previousStepIndex=this.previousStep?this.currentStepIndex-1:-1,this.nextStep=this.steps[this.currentStepIndex+1]||null,this.nextStepIndex=this.nextStep?this.currentStepIndex+1:-1,g=this.options.scrollBehavior,y=this.currentStep.scrollPadding,m=void 0===y?this.options.scrollPadding:y,this.scrollParentsToStepEl(),this.scrollTo(this.getStepEl(this.currentStep,!0),g,m),this.mountStep(),setTimeout((function(){b.getEl("tooltip")&&b.scrollTo(b.getEl("tooltip"),g,m)}),300),d&&d.call.apply(d,[this,this.toStep,this.fromStep].concat(i)),this.emit.apply(this,["onAfterChange",this.toStep,this.fromStep].concat(i)),t.abrupt("return",!0);case 53:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"previous",value:(s=I(T().mark((function t(){var e,n,r,i,o=this,a=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=a.length,n=new Array(e),r=0;r<e;r++)n[r]=a[r];if(this.isDisplayed&&this.currentStep&&this.previousStep){t.next=3;break}return t.abrupt("return",!1);case 3:if(i=this.currentStep.onPrevious,this.startPreloader(),!i){t.next=12;break}return t.next=8,Promise.resolve().then((function(){return i.call.apply(i,[o,o.previousStep,o.currentStep].concat(n))}));case 8:if(t.t0=t.sent,!1!==t.t0){t.next=12;break}return this.stopPreloader(),t.abrupt("return",!1);case 12:return t.next=14,this.emit.apply(this,["onPrevious",this.previousStep,this.currentStep].concat(n));case 14:if(!t.sent.some((function(t){return!1===t}))){t.next=17;break}return this.stopPreloader(),t.abrupt("return",!1);case 17:return this.stopPreloader(),t.abrupt("return",this.go.apply(this,[this.previousStepIndex,!0].concat(n)));case 19:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"next",value:(a=I(T().mark((function t(){var e,n,r,i,o=this,a=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=a.length,n=new Array(e),r=0;r<e;r++)n[r]=a[r];if(this.isDisplayed&&this.currentStep&&this.nextStep){t.next=3;break}return t.abrupt("return",!1);case 3:if(i=this.currentStep.onNext,this.startPreloader(),!i){t.next=12;break}return t.next=8,Promise.resolve().then((function(){return i.call.apply(i,[o,o.nextStep,o.currentStep].concat(n))}));case 8:if(t.t0=t.sent,!1!==t.t0){t.next=12;break}return this.stopPreloader(),t.abrupt("return",!1);case 12:return t.next=14,this.emit.apply(this,["onNext",this.nextStep,this.currentStep].concat(n));case 14:if(!t.sent.some((function(t){return!1===t}))){t.next=17;break}return this.stopPreloader(),t.abrupt("return",!1);case 17:return this.stopPreloader(),t.abrupt("return",this.go.apply(this,[this.nextStepIndex,!0].concat(n)));case 19:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"stop",value:(o=I(T().mark((function t(){var e,n,r,i=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.isDisplayed){t.next=2;break}return t.abrupt("return",this);case 2:for(e=i.length,n=new Array(e),r=0;r<e;r++)n[r]=i[r];if(this.currentStepIndex!==this.steps.length-1){t.next=8;break}return this.startPreloader(),t.next=7,this.emit.apply(this,["onComplete"].concat(n));case 7:this.stopPreloader();case 8:return this.startPreloader(),t.next=11,this.emit.apply(this,["onStop"].concat(n));case 11:return this.stopPreloader(),document.body.classList.remove(this.constructor.getBodyClass()),this.removeListeners(),this.unobserveStep(),this.unmountStep(),this.removeOverlayEl(),this.cache.clear(),this.elements.clear(),this.setDefaults(),t.abrupt("return",this);case 21:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"getSteps",value:function(t){return t&&t.length?"string"==typeof t?this.getDataSteps(t):this.getJsSteps(t):[]}},{key:"getDataSteps",value:function(t){var e=this,n="data-guidechimp",r=Array.from(document.querySelectorAll("[".concat(n,"-tour*='").concat(t,"']")));r=r.filter((function(t){return t.getAttribute("".concat(n,"-tour")).split(",").includes(e.tour)}));var i=new RegExp("^".concat(n,"-").concat(t,"-[^-]+$")),o=new RegExp("^".concat(n,"-[^-]+$"));return r.map((function(r,a){for(var s={},c=0;c<r.attributes.length;c++){var l=r.attributes[c],u=l.name,p=l.value,h=i.test(u),f=!h&&o.test(u);if(h||f){var d=h?u.replace("".concat(n,"-").concat(t,"-"),""):u.replace("".concat(n,"-"),"");"tour"!==d&&(h||f&&!s[d])&&(s[d]=p)}}return j(j({step:a,title:"",description:"",position:e.options.position,interaction:e.options.interaction},s),{},{element:r})}))}},{key:"getJsSteps",value:function(t){return t.map((function(t,e){return j(j({},t),{},{step:t.step||e})}))}},{key:"sortSteps",value:function(t){return k(t).sort((function(t,e){return t.step<e.step?-1:t.step>e.step?1:0}))}},{key:"getStepEl",value:function(t){var e=(t||{}).element;if(!e)return this.mountFakeStepEl();var n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="string"==typeof t?document.querySelector(t):t;return n||e}(e);return n&&"none"!==n.style.display&&"hidden"!==n.style.visibility||(n=this.getEl("fakeStep")?this.getEl("fakeStep"):this.mountFakeStepEl()),n}},{key:"scrollParentsToStepEl",value:function(){var t=this.currentStep.scrollPadding,e=void 0===t?this.options.scrollPadding:t;return this.scrollParentsToEl(this.getStepEl(this.currentStep),e)}},{key:"getScrollableParentsEls",value:function(t){for(var e=[],n=t;n&&n!==n.ownerDocument.body;)n=this.getScrollableParentEl(n),e.push(n);return e}},{key:"getScrollableParentEl",value:function(t){var e=/(auto|scroll)/,n=getComputedStyle(t),r=t.ownerDocument;return"fixed"===n.getPropertyValue("position")?r.body:function t(i){if(!i||i===r.body)return r.body;var o=getComputedStyle(i);if("fixed"===n.getPropertyValue("position")&&"static"===o.getPropertyValue("position"))return t(i.parentElement);var a=o.getPropertyValue("overflow-x"),s=o.getPropertyValue("overflow-y");return e.test(a)||e.test(s)?i:t(i.parentElement)}(t.parentElement)}},{key:"scrollParentsToEl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.getScrollableParentsEls(t);return n.forEach((function(n){n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop-e,n.scrollLeft=t.offsetLeft-n.offsetLeft-e)})),this}},{key:"scrollTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.getBoundingClientRect(),i=r.top,o=r.bottom,a=r.left,s=r.right,c=window,l=c.innerWidth,u=c.innerHeight;return a>=0&&s<=l||window.scrollBy({behavior:e,left:a-n}),i>=0&&o<=u||window.scrollBy({behavior:e,top:i-n}),this}},{key:"highlightStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.getStepEl(this.currentStep),n=this.getEl("overlay");if(n){var r=n.querySelector("path"),i=r.querySelector("animate"),o=this.isEl(e,"fakeStep"),a=o?this.getOverlayDocumentPath():this.getOverlayStepPath(this.currentStep);if(r.setAttribute("d",a),i){var s=i.getAttribute("lock");if(s||(i.setAttribute("from",a),i.setAttribute("to",a)),t){var c=this.isEl(this.getStepEl(this.fromStep),"fakeStep"),l=!this.fromStep||c||o?null:this.getOverlayStepPath(this.fromStep);l&&(i.setAttribute("from",l),i.setAttribute("to",a)),i.setAttribute("lock","true")}i.onend=function(){i.removeAttribute("lock")},i.beginElement()}}var u=getComputedStyle(e);return["absolute","relative","fixed"].includes(u.getPropertyValue("position"))||e.classList.add(this.constructor.getRelativePositionClass()),e.classList.add(this.constructor.getHighlightClass()),e.setAttribute("data-guidechimp-".concat(this.uid),"highlight"),this.elements.set("highlight",e),this}},{key:"resetHighlightStepEl",value:function(){var t=this.getEl("overlay");if(t){var e=t.querySelector("path"),n=t.querySelector("animate");e.setAttribute("d",this.getOverlayDocumentPath()),n&&(n.removeAttribute("from"),n.removeAttribute("to"))}var r=this.getStepEl(this.currentStep);return r.classList.remove(this.constructor.getRelativePositionClass()),r.classList.remove(this.constructor.getHighlightClass()),r.removeAttribute("data-guidechimp-".concat(this.uid)),this.elements.delete("highlight"),this}},{key:"setInteractionPosition",value:function(t){var e=this.getStepEl(this.currentStep);if(!t||!e)return this;var n=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(n=0);var r=this.constructor.getOffset(e),i=r.width,o=r.height,a=r.top,s=r.left;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(e)),t.style.cssText="width: ".concat(i+n,"px;\n height: ").concat(o+n,"px;\n top: ").concat(a-n/2,"px;\n left: ").concat(s-n/2,"px;"),this}},{key:"setControlPosition",value:function(t){var e=this.getStepEl(this.currentStep);if(!t||!e)return this;var n=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(n=0);var r=e.ownerDocument.defaultView.pageXOffset,i=e.ownerDocument.documentElement.getBoundingClientRect().width,o=this.constructor.getOffset(e),a=o.height,s=o.top,c=o.left,l=o.right,u=a+n,p=s-n/2,h=r<r+(c-n/2)?r:c-n/2,f=r+i>r+(l+n/2)?i:l+n/2;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(e)),t.style.cssText="width: ".concat(f,"px;\n height: ").concat(u,"px;\n top: ").concat(p,"px;\n left: ").concat(h,"px;"),this}},{key:"setTooltipPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.currentStep)return this;var n=this.getStepEl(this.currentStep);if(!t||!n)return this;var r=e.boundary,i=e.position,o=this.options.padding;r=r||window;var a=(i=(i=i||this.currentStep.position)||this.options.position).split("-"),s=E(a,2),c=s[0],l=s[1],u=getComputedStyle(n);"floating"===u.getPropertyValue("position")&&(o=0);var p=t.style;p.top=null,p.right=null,p.bottom=null,p.left=null,p.transform=null;var h=n.getBoundingClientRect(),f=h.top,d=h.bottom,v=h.left,g=h.right,y=h.width,m=h.height,b=t.getBoundingClientRect(),x=b.height,S=b.width,w=t.cloneNode(!0);w.style.visibility="hidden",w.innerHTML="",t.parentElement.appendChild(w);var k=w.getBoundingClientRect(),O=k.width;w.parentElement.removeChild(w);var P=new DOMRect(0,0,window.innerWidth,window.innerHeight);if(!(r instanceof Window)){var T=r.getBoundingClientRect(),L=T.x,I=T.y;P=new DOMRect(L,I,r.scrollWidth,r.scrollHeight)}var C=P,j=C.top,A=C.bottom,D=C.left,N=C.right;if(this.isEl(n,"fakeStep"))c="floating";else{var R=["bottom","right","left","top"],M=getComputedStyle(t),$=M.marginTop,W=M.marginLeft,B=M.marginRight,_=M.marginBottom;if($=parseInt($,10),W=parseInt(W,10),B=parseInt(B,10),x+$+(_=parseInt(_,10))>f-j&&R.splice(R.indexOf("top"),1),x+$+_>A-d&&R.splice(R.indexOf("bottom"),1),O+W+B>v-D&&R.splice(R.indexOf("left"),1),O+W+B>N-g&&R.splice(R.indexOf("right"),1),"top"===(c=R.length?R.includes(c)?c:R[0]:"floating")||"bottom"===c){var F=["left","right","middle"];N-v<O&&F.splice(F.indexOf("left"),1),g-D<O&&F.splice(F.indexOf("right"),1),(v+y/2-D<O/2||N-(g-y/2)<O/2)&&F.splice(F.indexOf("middle"),1),l=F.length?F.includes(l)?l:F[0]:"middle"}}t.setAttribute("data-guidechimp-position",c);var H=document.documentElement;switch(c){case"top":p.bottom="".concat(m+o,"px");break;case"right":p.left="".concat(g+o/2-H.clientLeft,"px");break;case"left":p.right="".concat(H.clientWidth-(v-o/2),"px");break;case"bottom":p.top="".concat(m+o,"px");break;default:p.left="50%",p.top="50%",p.transform="translate(-50%,-50%)"}if(t.removeAttribute("data-guidechimp-alignment"),l)switch(t.setAttribute("data-guidechimp-alignment",l),l){case"left":p.left="".concat(v-o/2,"px");break;case"right":p.right="".concat(H.clientWidth-g-o/2,"px");break;default:v+y/2<S/2||v+y/2+S/2>H.clientWidth?p.left="".concat(H.clientWidth/2-S/2,"px"):p.left="".concat(v+y/2-S/2,"px")}return this}},{key:"startPreloader",value:function(){document.body.classList.add(this.constructor.getLoadingClass());var t=this.getEl("overlay");if(t){var e=t.querySelector("path"),n=t.querySelector("animate"),r=new Map;r.set("d",e.getAttribute("d")),e.setAttribute("d",this.getOverlayDocumentPath()),n&&(r.set("from",n.getAttribute("from")),r.set("to",n.getAttribute("to")),n.removeAttribute("from"),n.removeAttribute("to")),this.cache.set("preloaderCache",r)}var i=this.mountPreloaderEl();return i.hidden=!0,setTimeout((function(){i.hidden=!1}),100),this}},{key:"stopPreloader",value:function(){document.body.classList.remove(this.constructor.getLoadingClass());var t=this.getEl("overlay");if(t){var e=t.querySelector("path"),n=t.querySelector("animate"),r=this.cache.get("preloaderCache")||new Map;r.has("d")&&e.setAttribute("d",r.get("d")),n&&(r.has("from")&&n.setAttribute("from",r.get("from")),r.has("to")&&n.setAttribute("to",r.get("to"))),this.cache.delete("preloaderCache")}return this.removePreloaderEl(),this}},{key:"getDefaultTmplData",value:function(){var t=this;return{previousStep:this.previousStep,currentStep:this.currentStep,nextStep:this.nextStep,fromStep:this.fromStep,toStep:this.toStep,previousStepIndex:this.previousStepIndex,currentStepIndex:this.currentStepIndex,nextStepIndex:this.nextStepIndex,fromStepIndex:this.fromStepIndex,toStepIndex:this.toStepIndex,steps:this.steps,go:function(){return t.go.apply(t,arguments)},previous:function(){return t.previous.apply(t,arguments)},next:function(){return t.next.apply(t,arguments)},stop:function(){return t.stop.apply(t,arguments)}}}},{key:"mountStep",value:function(){var t=this.mountInteractionEl(),e=this.mountControlEl();return this.setInteractionPosition(t),this.setControlPosition(e),this.setTooltipPosition(this.getEl("tooltip")),this.observeStep(),this.highlightStepEl(!0),this}},{key:"unmountStep",value:function(){return this.resetHighlightStepEl(),this.removeInteractionEl(),this.removeControlEl(),this.removePreloaderEl(),this.removeFakeStepEl(),this}},{key:"createEl",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=S(e,n);return r&&r.setAttribute("data-quidechimp-".concat(this.uid),t),r}},{key:"getEl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.elements.get(t);return n||(n=document.querySelector("[data-quidechimp-".concat(this.uid,'="').concat(t,'"]'))),n||e}},{key:"mountEl",value:function(t,e){var n=this;if(t){var r=t.querySelectorAll("[data-quidechimp-".concat(this.uid,"]"));[t].concat(k(r)).forEach((function(t){var e=t.getAttribute("data-quidechimp-".concat(n.uid));e&&(n.removeEl(e),n.elements.set(e,t))})),e.appendChild(t)}return t}},{key:"removeEl",value:function(t){var e=this.getEl(t);return e&&e.parentElement.removeChild(e),this.elements.delete(t),this}},{key:"isEl",value:function(t,e){return this.getEl(e)?t===this.getEl(e):t.getAttribute("data-quidechimp-".concat(this.uid))===e}},{key:"getFakeStepTmpl",value:function(){return'<div class="gc-fake-step"></div>'}},{key:"createFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("fakeStep",this.getFakeStepTmpl(),j(j({},this.getDefaultTmplData()),t))}},{key:"mountFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createFakeStepEl(t),document.body)}},{key:"removeFakeStepEl",value:function(){return this.removeEl("fakeStep")}},{key:"getPreloaderTmpl",value:function(){return'<div class="gc-preloader"></div>'}},{key:"createPreloaderEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("preloader",this.getPreloaderTmpl(),t)}},{key:"mountPreloaderEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createPreloaderEl(t),document.body)}},{key:"removePreloaderEl",value:function(){return this.removeEl("preloader")}},{key:"getOverlayDocumentPath",value:function(){var t=window,e=t.innerWidth,n=t.innerHeight,r=document.body,i=r.scrollWidth,o=r.scrollHeight,a=n>o?n:o;return"M 0 0 H ".concat(e>i?e:i," V ").concat(a," H 0 V 0 Z")}},{key:"getOverlayStepPath",value:function(t){return this.getOverlayElPath(this.getStepEl(t))}},{key:"getOverlayElPath",value:function(t){var e=this.options.padding;e=e?e/2:0;var n=t.getBoundingClientRect(),r=n.left,i=n.top,o=n.width,a=n.height,s=this.getOverlayDocumentPath();return s+="M ".concat(r-e+4," ").concat(i-e,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",").concat(4,"\n V ").concat(a+i+e-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",").concat(4,"\n H ").concat(o+r+e-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",-").concat(4,"\n V ").concat(i-e+4,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",-").concat(4,"Z")}},{key:"getOverlayTmpl",value:function(){return'<div class="gc-overlay" @click="stop({ event: $event })"> <svg class="svg-overlay"> <path d="{{path}}"> <animate attributeName="d" dur="200ms"/> </path> </svg> </div>'}},{key:"createOverlayEl",value:function(){var t,e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={stop:(t=I(T().mark((function t(){var n=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.options.exitOverlay){t.next=3;break}return t.next=3,e.stop.apply(e,n);case 3:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)}),path:this.getOverlayDocumentPath()};return this.createEl("overlay",this.getOverlayTmpl(),j(j({},r),n))}},{key:"mountOverlayEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createOverlayEl(t),document.body)}},{key:"removeOverlayEl",value:function(){return this.removeEl("overlay")}},{key:"getInteractionTmpl",value:function(){return'<div if="!interaction" class="gc-interaction gc-disable"> </div>'}},{key:"createInteractionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.interaction;"boolean"==typeof this.currentStep.interaction&&(e=this.currentStep.interaction);var n=j(j({},this.getDefaultTmplData()),{},{interaction:e});return this.createEl("interaction",this.getInteractionTmpl(),j(j({},n),t))}},{key:"mountInteractionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createInteractionEl(t),document.body)}},{key:"removeInteractionEl",value:function(){return this.removeEl("interaction")}},{key:"getControlTmpl",value:function(){return'<div class="gc-control"> {{ tooltipEl }} </div>'}},{key:"createControlEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("control",this.getControlTmpl(),j(j({},this.getDefaultTmplData()),{},{tooltipEl:this.createTooltipEl(t)},t))}},{key:"mountControlEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createControlEl(t),document.body)}},{key:"removeControlEl",value:function(){return this.removeEl("control")}},{key:"getTooltipTmpl",value:function(){return'<div class="gc-tooltip"> <div class="gc-tooltip-tail"></div> {{ progressbar }} {{ title }} {{ description }} {{ close }} {{ customButtons }} <div if="previous || pagination || next" class="gc-navigation"> {{ previous }} {{ pagination }} {{ next }} </div> {{ copyright }} {{ notification }} </div>'}},{key:"createTooltipEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=j(j({},this.getDefaultTmplData()),{},{progressbar:this.createProgressbarEl(t),title:this.createTitleEl(t),description:this.createDescriptionEl(t),close:this.createCloseEl(t),customButtons:this.createCustomButtonsEl(t),previous:this.createPreviousEl(t),pagination:this.createPaginationEl(t),next:this.createNextEl(t),copyright:this.createCopyrightEl(t),notification:this.createNotificationEl(t)});return this.createEl("tooltip",this.getTooltipTmpl(),j(j({},e),t))}},{key:"getCloseTmpl",value:function(){return'<div class="gc-close" @click="stop({ event: $event })"></div>'}},{key:"createCloseEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("close",this.getCloseTmpl(),j(j({},this.getDefaultTmplData()),t))}},{key:"getProgressbarTmpl",value:function(){return'<div if="showProgressbar" class="gc-progressbar" role="progressbar" aria-valuemin="{{ progressMin }}" aria-valuemax="{{ progressMax }}" aria-valuenow="{{ progress }}" style="width:{{ progress }}%;"></div>'}},{key:"createProgressbarEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showProgressbar;"boolean"==typeof this.currentStep.showProgressbar&&(e=this.currentStep.showProgressbar);var n=100,r=0,i=(this.currentStepIndex+1)/this.steps.length*100,o=j(j({},this.getDefaultTmplData()),{},{showProgressbar:e,progressMax:n,progressMin:r,progress:i});return this.createEl("progressbar",this.getProgressbarTmpl(),j(j({},o),t))}},{key:"getTitleTmpl",value:function(){return'<div if="title" html="{{ title }}" class="gc-title"> </div>'}},{key:"createTitleEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep.title,n=void 0===e?"":e;return this.createEl("title",this.getTitleTmpl(),j(j({},this.getDefaultTmplData()),{},{title:n},t))}},{key:"getDescriptionTmpl",value:function(){return'<div if="description" html="{{ description }}" class="gc-description"></div>'}},{key:"createDescriptionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep.description,n=void 0===e?"":e;return this.createEl("description",this.getDescriptionTmpl(),j(j({},this.getDefaultTmplData()),{},{description:n},t))}},{key:"getCustomButtonsTmpl",value:function(){return'<div if="buttons.length" class="gc-custom-buttons"> <template for="button in buttons"> {{ button }} </template> </div>'}},{key:"createCustomButtonsEl",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[];return this.currentStep.buttons&&this.currentStep.buttons.forEach((function(e){var r=e;if(!c(r)){var i=e.onClick,o=e.tagName,a=void 0===o?"button":o,s=e.title,l=void 0===s?"":s,u=e.class;(r=document.createElement(a)).innerHTML=l,u&&(r.className=u),i&&r.addEventListener("click",(function(e){i.call(t,e)}))}n.push(r)})),this.createEl("customButtons",this.getCustomButtonsTmpl(),j(j({},this.getDefaultTmplData()),{},{buttons:n},e))}},{key:"getPaginationTmpl",value:function(){return'<div if="showPagination && steps.length > 1" class="gc-pagination"> <template if="paginationTheme === \'numbers\' || steps.length >= paginationCirclesMaxItems"> <ul class="gc-pagination-theme-numbers"> <template for="(step, index) in steps"> <template if="index === 0"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <template if="currentStepIndex < 3"> <template if="index > 0 && index < 5"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="index === 5 && index !== steps.length - 1" class="gc-pagination-dots"> ... </li> </template> <template elseif="steps.length - currentStepIndex < 5"> <template if="steps.length - index < 6 && steps.length - 1 !== index"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="steps.length - index === 6 && index !== 0" class="gc-pagination-dots"> ... </li> </template> <template else> <li if="currentStepIndex - index === 3 && index !== 0" class="gc-pagination-dots"> ... </li> <template elseif="(currentStepIndex - index >= 0 && currentStepIndex - index < 3)\n || ( index - currentStepIndex >= 0 && index - currentStepIndex < 3)"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="index - currentStepIndex === 3 && steps.length -1 !== index" class="gc-pagination-dots"> ... </li> </template> <template if="index + 1 === steps.length"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> </template> </ul> </template> <template else> <div class="gc-pagination-theme-circles"> <template for="(step, index) in steps"> <div if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active"></div> <div elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"></div> <div elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"></div> <div else class="gc-pagination-item" @click="go(index, true, { event: $event })"></div> </template> </div> </template> </div> '}},{key:"createPaginationEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep,n=e.paginationTheme,r=void 0===n?this.options.paginationTheme:n,i=e.paginationCirclesMaxItems,o=void 0===i?this.options.paginationCirclesMaxItems:i,a=this.options.showPagination;return"boolean"==typeof this.currentStep.showPagination&&(a=this.currentStep.showPagination),this.createEl("pagination",this.getPaginationTmpl(),j(j({},this.getDefaultTmplData()),{},{showPagination:a,paginationTheme:r,paginationCirclesMaxItems:o},t))}},{key:"getPreviousTmpl",value:function(){return"<div class=\"gc-navigation-prev {{ (!previousStep || !showNavigation) ? 'gc-hidden': '' }}\" @click=\"previous({ event: $event })\"></div>"}},{key:"createPreviousEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showNavigation;return"boolean"==typeof this.currentStep.showNavigation&&(e=this.currentStep.showNavigation),this.createEl("previous",this.getPreviousTmpl(),j(j({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"getNextTmpl",value:function(){return"<div class=\"gc-navigation-next {{ (!nextStep || !showNavigation) ? 'gc-hidden': '' }}\" @click=\"next({ event: $event })\"></div>"}},{key:"createNextEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showNavigation;return"boolean"==typeof this.currentStep.showNavigation&&(e=this.currentStep.showNavigation),this.createEl("next",this.getNextTmpl(),j(j({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"getCopyrightTmpl",value:function(){return'<div class="gc-copyright">Made with AHD.JS</div> '}},{key:"createCopyrightEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("copyright",this.getCopyrightTmpl(),j(j({},this.getDefaultTmplData()),t))}},{key:"getNotificationTmpl",value:function(){return'<div html="{{ messages[0] }}" class="gc-notification"></div>'}},{key:"createNotificationEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("notification",this.getNotificationTmpl(),j(j({},this.getDefaultTmplData()),{},{messages:this.notifications},t))}},{key:"notify",value:function(t){this.notifications.push(t);var e=this.getEl("notification");return e&&this.mountEl(this.createNotificationEl(),e.parentElement),this}},{key:"on",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.constructor.getEventListenersPriorities(),i=E(r,1),o=i[0];n.priority&&r.includes(n.priority)&&(o=n.priority);var a=t.trim();return this.listeners[a]=this.listeners[a]||{},this.listeners[a][o]=this.listeners[a][o]||[],this.listeners[a][o].push(e),this}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=k(this.constructor.getEventListenersPriorities()).reverse(),a=t.trim(),s=[],c=Promise.resolve(s);return this.listeners[a]&&o.forEach((function(t){var n=e.listeners[a][t];n&&(c=c.then((function(){return Promise.all(n.map((function(t){return Promise.resolve().then((function(){return t.apply(e,r)}))})))})).then((function(t){return s=[].concat(k(s),k(t))})))})),c}},{key:"addOnKeydownListener",value:function(){return this.cache.set("onKeydownListener",this.getOnKeydownListener()),window.addEventListener("keydown",this.cache.get("onKeydownListener"),!0),this}},{key:"getOnKeydownListener",value:function(){var t=this;return function(e){var n=e.keyCode,r=j(j({},t.constructor.getDefaultKeyboardCodes()),t.options.useKeyboard),i=r.previous,o=r.next,a=r.stop;a&&a.includes(n)?t.stop({event:e}):i&&i.includes(n)?t.previous({event:e}):o&&o.includes(n)&&t.next({event:e})}}},{key:"removeOnKeydownListener",value:function(){return this.cache.has("onKeydownListener")&&(window.removeEventListener("keydown",this.cache.get("onKeydownListener"),!0),this.cache.delete("onKeydownListener")),this}},{key:"addOnWindowResizeListener",value:function(){return this.cache.set("onWindowResizeListener",this.getOnWindowResizeListener()),window.addEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this}},{key:"getOnWindowResizeListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnWindowResizeListener",value:function(){return this.cache.has("onWindowResizeListener")&&(window.removeEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this.cache.delete("onWindowResizeListener")),this}},{key:"addOnWindowScrollListener",value:function(){return this.cache.set("onWindowScrollListener",this.getOnWindowScrollListener()),window.addEventListener("scroll",this.cache.get("onWindowScrollListener"),!0),this}},{key:"getOnWindowScrollListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnWindowScrollListener",value:function(){return this.cache.has("onWindowScrollListener")&&(window.removeEventListener("scroll",this.cache.get("onWindowScrollListener"),!0),this.cache.delete("onWindowScrollListener")),this}},{key:"removeListeners",value:function(){this.removeOnKeydownListener(),this.removeOnWindowResizeListener(),this.removeOnWindowScrollListener()}},{key:"observeStep",value:function(){this.observeResizing(),this.observeMutation()}},{key:"observeResizing",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{box:"border-box"},n=this.observers.resizingObserver;return n||"undefined"==typeof ResizeObserver||(n=new ResizeObserver((function(){(t||t.currentStep)&&t.refresh()})),this.observers.resizingObserver=n),!!n&&(n.observe(this.getStepEl(this.currentStep),e),!0)}},{key:"unobserveResizing",value:function(){var t=this.observers.resizingObserver;return!!t&&(t.disconnect(),!0)}},{key:"observeMutation",value:function(){var t=this,e=this.observers.mutationObserver;return e||(e=new MutationObserver((function(e){if((t||t.currentStep)&&t.currentStep.element){var n=t.getStepEl(t.currentStep),r=function(){return n&&!t.isEl(n,"fakeStep")};e.forEach((function(e){r()?"childList"===e.type&&e.removedNodes.length&&e.removedNodes.forEach((function(e){(e===n||e.contains(n))&&(n=t.getStepEl(t.currentStep),t.scrollParentsToStepEl(),t.refresh())})):"childList"===e.type&&e.addedNodes.length&&(n=t.getStepEl(t.currentStep),r()&&(t.scrollParentsToStepEl(),t.refresh()))}))}})),this.observers.mutationObserver=e),e.observe(this.getStepEl(this.currentStep).ownerDocument.body,{childList:!0,subtree:!0}),!0}},{key:"unobserveMutation",value:function(){var t=this.observers.mutationObserver;return!!t&&(t.disconnect(),!0)}},{key:"unobserveStep",value:function(){this.unobserveResizing(),this.unobserveMutation()}},{key:"beforeChangeStep",value:function(){this.unmountStep(),this.unobserveStep()}},{key:"refresh",value:function(){return this.currentStep?(this.highlightStepEl(),this.setControlPosition(this.getEl("control")),this.setInteractionPosition(this.getEl("interaction")),this.setTooltipPosition(this.getEl("tooltip")),this):this}}],i=[{key:"getDefaultOptions",value:function(){return{position:"bottom",useKeyboard:!0,exitEscape:!0,exitOverlay:!0,showPagination:!0,showNavigation:!0,showProgressbar:!0,paginationTheme:"circles",paginationCirclesMaxItems:10,interaction:!0,padding:8,scrollPadding:10,scrollBehavior:"auto"}}},{key:"getDefaultKeyboardCodes",value:function(){return{previous:[37],next:[39,13,32],stop:[27]}}},{key:"getEventListenersPriorities",value:function(){return["low","medium","high","critical"]}},{key:"getBodyClass",value:function(){return"gc"}},{key:"getLoadingClass",value:function(){return"gc-loading"}},{key:"getHighlightClass",value:function(){return"gc-highlight"}},{key:"getFixedClass",value:function(){return"gc-fixed"}},{key:"getRelativePositionClass",value:function(){return"gc-relative"}},{key:"getOffset",value:function(t){var e=t.ownerDocument,n=e.body,r=e.documentElement,i=e.defaultView,o=i.pageYOffset||r.scrollTop||n.scrollTop,a=i.pageXOffset||r.scrollLeft||n.scrollLeft,s=t.getBoundingClientRect(),c=s.top,l=s.right,u=s.bottom,p=s.left;return{right:l,bottom:u,width:s.width,height:s.height,x:s.x,y:s.y,top:c+o,left:p+a}}},{key:"isFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isFixed(e))}}],r&&N(n.prototype,r),i&&N(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}();function M(t,e,n){return M=$()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&W(i,n.prototype),i},M.apply(null,arguments)}function $(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function W(t,e){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},W(t,e)}function B(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function F(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const H=function(){function t(){B(this,t),F(this,"guideChimp",void 0);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];this.guideChimp=M(R,n)}var e,n,r;return e=t,n=[{key:"start",value:function(){var t;(t=this.guideChimp).start.apply(t,arguments)}}],n&&_(e.prototype,n),r&&_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()})(),r})()));
|
|
12
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AHDjs=e():t.AHDjs=e()}(self,(()=>(()=>{var t={705:(t,e,n)=>{var r=n(639).Symbol;t.exports=r},932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},239:(t,e,n)=>{var r=n(705),i=n(607),o=n(333),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},531:(t,e,n)=>{var r=n(705),i=n(932),o=n(469),a=n(448),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n}},957:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},607:(t,e,n)=>{var r=n(705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[s]=n:delete t[s]),i}},333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},639:(t,e,n)=>{var r=n(957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},469:t=>{var e=Array.isArray;t.exports=e},220:t=>{t.exports=function(t){return null===t}},5:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},448:(t,e,n)=>{var r=n(239),i=n(5);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},353:t=>{t.exports=function(t){return void 0===t}},833:(t,e,n)=>{var r=n(531);t.exports=function(t){return null==t?"":r(t)}},955:(t,e,n)=>{var r=n(833),i=0;t.exports=function(t){var e=++i;return r(t)+e}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{default:()=>_});var t=n(955),e=n.n(t),i=n(353),o=n.n(i),a=n(220),s=n.n(a);const c=function(t){return t instanceof HTMLElement||/^\[object HTML(.+)Element\]$/.test("".concat(t))},l=function(t){return t instanceof SVGElement||/^\[object SVG(.+)Element\]$/.test("".concat(t))},u=function(t){return/^[object NodeList]$/.test("".concat(t))};function p(t){return function(t){if(Array.isArray(t))return y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||g(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||g(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){if(t){if("string"==typeof t)return y(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function m(t,e,n){return m=b()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&x(i,n.prototype),i},m.apply(null,arguments)}function b(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function x(t,e){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},x(t,e)}const S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new DOMParser,r=t.replace(/<template/g,"<gc-template");r=r.replace(/<\/template/g,"</gc-template");var i=n.parseFromString(r,"text/html"),a=document.implementation.createHTMLDocument(),h=/{{([^}}]+)?}}/gm,g=/^@(.+)$/,y=new Map,b=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.body,i=r,b=Object.keys(n),x=Object.values(n),S=function(t){return m(Function,b.concat(["return ".concat(t,";")])).apply(void 0,x)};if(e){if(e.nodeType===Node.ELEMENT_NODE){if(e.hasAttribute("if")){if(y.set(e.parentNode,!1),!S(e.getAttribute("if")))return;y.set(e.parentNode,!0)}if(e.hasAttribute("elseif")){if(y.get(e.parentNode)||!S(e.getAttribute("elseif")))return;y.set(e.parentNode,!0)}if(e.hasAttribute("else")){if(y.get(e.parentNode))return;y.set(e.parentNode,!0)}if(e.hasAttribute("for")){var w=e.getAttribute("for").split(" in "),E=v(w,2),k=E[0],O=E[1];e.removeAttribute("for");var P=k.replace(/\(|\)/g,"").split(","),T=v(P,2),L=T[0],I=T[1];L=L.trim(),I=I?I.trim():"";var A=S(O.trim()),C=Array.isArray(A);return void Object.keys(A).forEach((function(r){var o=f(f({},n),{},d({},L,A[r]));I&&(o[I]=C?parseInt(r,10):r),t(e,o,i)}))}e!==e.ownerDocument.body&&"GC-TEMPLATE"!==e.tagName&&(i=e.cloneNode(),r.append(i)),p(e.attributes).forEach((function(t){var e=t.name,n=t.value,r=g.exec(e);if(r){var a=v(r,2)[1];return i.addEventListener(a,(function(t){return m(Function,[].concat(b,["$event"]).concat(["return ".concat(n).concat(/\(.+\)/.test(n)?"":"()",";")])).apply(void 0,[].concat(x,[t]))})),void i.removeAttribute(e)}for(var c=h.exec(n),l=0,u="";c;){u+=n.slice(l,c.index);var p=v(c,2),f=p[0],d=p[1];d=d.trim();try{f=S(d),(o()(f)||s()(f))&&(f="")}catch(t){console.error(t)}u+=f,l=c.index+c[0].length,c=h.exec(n)}u+=n.substr(l,n.length-l),"html"===e?(i.innerHTML=u,i.removeAttribute(e)):["if","else","elseif"].includes(e)?i.removeAttribute(e):i.setAttribute(e,u)}))}else if(e.nodeType===Node.TEXT_NODE){var D=h.exec(e.nodeValue);if(D){for(var j=0;D;){i.append(document.createTextNode(e.nodeValue.slice(j,D.index)));var N=D,R=v(N,2),M=R[0],$=R[1];$=$.trim();try{M=S($),(o()(M)||s()(M))&&(M="")}catch(t){console.error(t)}c(M)||l(M)?i.append(M):u(M)?M.forEach((function(t){i.append(t)})):i.append(document.createTextNode(M)),j=D.index+D[0].length,D=h.exec(e.nodeValue)}i.append(document.createTextNode(e.nodeValue.slice(j,e.nodeValue.length)))}else i.append(e.cloneNode())}var W=e.childNodes,B=void 0===W?[]:W;B.length&&B.forEach((function(e){t(e,n,i)}))}};return b(i.body,e,a.body),a.body.firstElementChild};function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function E(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(t,e)||O(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t){return function(t){if(Array.isArray(t))return P(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){if(t){if("string"==typeof t)return P(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?P(t,e):void 0}}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function T(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */T=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,o=Object.create(i.prototype),a=new k(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var u={};function p(){}function h(){}function f(){}var d={};s(d,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(O([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=f.prototype=p.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var c=l(t[i],t,o);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==w(p)&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(p).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,u;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=f,s(y,"constructor",f),s(f,"constructor",h),h.displayName=s(f,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(b.prototype),s(b.prototype,o,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new b(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),s(y,a,"Generator"),s(y,i,(function(){return this})),s(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}function L(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function I(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){L(o,r,i,a,s,"next",t)}function s(t){L(o,r,i,a,s,"throw",t)}a(void 0)}))}}function A(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?A(Object(n),!0).forEach((function(e){D(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function D(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function j(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var R=function(){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};j(this,t),Object.defineProperty(this,"uid",{value:e()(),enumerable:!1,configurable:!1,writable:!1}),this.setDefaults(),this.cache=new Map,this.listeners={},this.observers={},this.options={},this.setOptions(r),this.tour=null,this.setTour(n),this.notifications=[],this.elements=new Map,this.init()}var n,r,i,o,a,s,l,u;return n=t,r=[{key:"init",value:function(){}},{key:"setDefaults",value:function(){return this.previousStep=null,this.currentStep=null,this.nextStep=null,this.fromStep=null,this.toStep=null,this.previousStepIndex=-1,this.currentStepIndex=-1,this.nextStepIndex=-1,this.fromStepIndex=-1,this.toStepIndex=-1,this.steps=[],this.isDisplayed=!1,this}},{key:"setTour",value:function(t){return this.tour=t,this}},{key:"getTour",value:function(){return this.tour}},{key:"setOptions",value:function(t){return this.options=C(C({},this.constructor.getDefaultOptions()),t),this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(u=I(T().mark((function t(){var e,n,r,i,o,a,s=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=s.length>0&&void 0!==s[0]?s[0]:0,n=!(s.length>1&&void 0!==s[1])||s[1],this.isDisplayed=!0,this.mountOverlayEl(),this.startPreloader(),r=s.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=s[o];return t.next=8,this.emit.apply(this,["onStart"].concat(i));case 8:if(this.stopPreloader(),this.tour&&this.tour.length){t.next=13;break}return this.removeOverlayEl(),this.isDisplayed=!1,t.abrupt("return",!1);case 13:if(this.steps=this.sortSteps(this.getSteps(this.tour)),this.steps.length){t.next=18;break}return this.removeOverlayEl(),this.isDisplayed=!1,t.abrupt("return",!1);case 18:return document.body.classList.add(this.constructor.getBodyClass()),t.next=21,this.go.apply(this,[e,n].concat(i));case 21:return a=t.sent,this.isDisplayed=a,document.body.classList.toggle(this.constructor.getBodyClass(),a),a&&(this.options.useKeyboard&&this.addOnKeydownListener(),this.addOnWindowResizeListener(),this.addOnWindowScrollListener()),t.abrupt("return",a);case 26:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})},{key:"go",value:(l=I(T().mark((function t(e){var n,r,i,o,a,s,c,l,u,p,h,f,d,v,g,y,m,b=this,x=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=!(x.length>1&&void 0!==x[1])||x[1],r=x.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=x[o];if(this.isDisplayed&&this.steps.length){t.next=4;break}return t.abrupt("return",!1);case 4:if(a=n?parseInt(e,10):e,!this.currentStep){t.next=9;break}if(!(n?this.currentStepIndex===a:this.currentStep.step===a)){t.next=9;break}return t.abrupt("return",!1);case 9:if(s=this.currentStep,c=this.currentStepIndex,l=n?this.steps[a]:this.steps.filter((function(t){return t.step===a}))[0]){t.next=14;break}return t.abrupt("return",!1);case 14:if(u=this.steps.indexOf(l),h=u,f=(p=l).onBeforeChange,d=p.onAfterChange,this.startPreloader(),v=!1,!f){t.next=26;break}return t.next=23,Promise.resolve().then((function(){return f.call.apply(f,[b,p,s].concat(i))}));case 23:if(t.t0=t.sent,!1!==t.t0){t.next=26;break}v=!0;case 26:return t.next=28,this.emit.apply(this,["onBeforeChange",p,s].concat(i));case 28:if(!t.sent.some((function(t){return!1===t}))){t.next=30;break}v=!0;case 30:if(this.stopPreloader(),!v){t.next=33;break}return t.abrupt("return",!1);case 33:return this.beforeChangeStep({toStep:p,toStepIndex:h,currentStep:l,currentStepIndex:u,fromStep:s,fromStepIndex:c}),this.toStep=p,this.toStepIndex=h,this.currentStep=l,this.currentStepIndex=u,this.fromStep=s,this.fromStepIndex=c,this.previousStep=this.steps[this.currentStepIndex-1]||null,this.previousStepIndex=this.previousStep?this.currentStepIndex-1:-1,this.nextStep=this.steps[this.currentStepIndex+1]||null,this.nextStepIndex=this.nextStep?this.currentStepIndex+1:-1,g=this.options.scrollBehavior,y=this.currentStep.scrollPadding,m=void 0===y?this.options.scrollPadding:y,this.scrollParentsToStepEl(),this.scrollTo(this.getStepEl(this.currentStep,!0),g,m),this.mountStep(),setTimeout((function(){b.getEl("tooltip")&&b.scrollTo(b.getEl("tooltip"),g,m)}),300),d&&d.call.apply(d,[this,this.toStep,this.fromStep].concat(i)),this.emit.apply(this,["onAfterChange",this.toStep,this.fromStep].concat(i)),t.abrupt("return",!0);case 53:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"previous",value:(s=I(T().mark((function t(){var e,n,r,i,o=this,a=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=a.length,n=new Array(e),r=0;r<e;r++)n[r]=a[r];if(this.isDisplayed&&this.currentStep&&this.previousStep){t.next=3;break}return t.abrupt("return",!1);case 3:if(i=this.currentStep.onPrevious,this.startPreloader(),!i){t.next=12;break}return t.next=8,Promise.resolve().then((function(){return i.call.apply(i,[o,o.previousStep,o.currentStep].concat(n))}));case 8:if(t.t0=t.sent,!1!==t.t0){t.next=12;break}return this.stopPreloader(),t.abrupt("return",!1);case 12:return t.next=14,this.emit.apply(this,["onPrevious",this.previousStep,this.currentStep].concat(n));case 14:if(!t.sent.some((function(t){return!1===t}))){t.next=17;break}return this.stopPreloader(),t.abrupt("return",!1);case 17:return this.stopPreloader(),t.abrupt("return",this.go.apply(this,[this.previousStepIndex,!0].concat(n)));case 19:case"end":return t.stop()}}),t,this)}))),function(){return s.apply(this,arguments)})},{key:"next",value:(a=I(T().mark((function t(){var e,n,r,i,o=this,a=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=a.length,n=new Array(e),r=0;r<e;r++)n[r]=a[r];if(this.isDisplayed&&this.currentStep&&this.nextStep){t.next=3;break}return t.abrupt("return",!1);case 3:if(i=this.currentStep.onNext,this.startPreloader(),!i){t.next=12;break}return t.next=8,Promise.resolve().then((function(){return i.call.apply(i,[o,o.nextStep,o.currentStep].concat(n))}));case 8:if(t.t0=t.sent,!1!==t.t0){t.next=12;break}return this.stopPreloader(),t.abrupt("return",!1);case 12:return t.next=14,this.emit.apply(this,["onNext",this.nextStep,this.currentStep].concat(n));case 14:if(!t.sent.some((function(t){return!1===t}))){t.next=17;break}return this.stopPreloader(),t.abrupt("return",!1);case 17:return this.stopPreloader(),t.abrupt("return",this.go.apply(this,[this.nextStepIndex,!0].concat(n)));case 19:case"end":return t.stop()}}),t,this)}))),function(){return a.apply(this,arguments)})},{key:"stop",value:(o=I(T().mark((function t(){var e,n,r,i=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.isDisplayed){t.next=2;break}return t.abrupt("return",this);case 2:for(e=i.length,n=new Array(e),r=0;r<e;r++)n[r]=i[r];if(this.currentStepIndex!==this.steps.length-1){t.next=8;break}return this.startPreloader(),t.next=7,this.emit.apply(this,["onComplete"].concat(n));case 7:this.stopPreloader();case 8:return this.startPreloader(),t.next=11,this.emit.apply(this,["onStop"].concat(n));case 11:return this.stopPreloader(),document.body.classList.remove(this.constructor.getBodyClass()),this.removeListeners(),this.unobserveStep(),this.unmountStep(),this.removeOverlayEl(),this.cache.clear(),this.elements.clear(),this.setDefaults(),t.abrupt("return",this);case 21:case"end":return t.stop()}}),t,this)}))),function(){return o.apply(this,arguments)})},{key:"getSteps",value:function(t){return t&&t.length?"string"==typeof t?this.getDataSteps(t):this.getJsSteps(t):[]}},{key:"getDataSteps",value:function(t){var e=this,n="data-guidechimp",r=Array.from(document.querySelectorAll("[".concat(n,"-tour*='").concat(t,"']")));r=r.filter((function(t){return t.getAttribute("".concat(n,"-tour")).split(",").includes(e.tour)}));var i=new RegExp("^".concat(n,"-").concat(t,"-[^-]+$")),o=new RegExp("^".concat(n,"-[^-]+$"));return r.map((function(r,a){for(var s={},c=0;c<r.attributes.length;c++){var l=r.attributes[c],u=l.name,p=l.value,h=i.test(u),f=!h&&o.test(u);if(h||f){var d=h?u.replace("".concat(n,"-").concat(t,"-"),""):u.replace("".concat(n,"-"),"");"tour"!==d&&(h||f&&!s[d])&&(s[d]=p)}}return C(C({step:a,title:"",description:"",position:e.options.position,interaction:e.options.interaction},s),{},{element:r})}))}},{key:"getJsSteps",value:function(t){return t.map((function(t,e){return C(C({},t),{},{step:t.step||e})}))}},{key:"sortSteps",value:function(t){return k(t).sort((function(t,e){return t.step<e.step?-1:t.step>e.step?1:0}))}},{key:"getStepEl",value:function(t){var e=(t||{}).element;if(!e)return this.mountFakeStepEl();var n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n="string"==typeof t?document.querySelector(t):t;return n||e}(e);return n&&"none"!==n.style.display&&"hidden"!==n.style.visibility||(n=this.getEl("fakeStep")?this.getEl("fakeStep"):this.mountFakeStepEl()),n}},{key:"scrollParentsToStepEl",value:function(){var t=this.currentStep.scrollPadding,e=void 0===t?this.options.scrollPadding:t;return this.scrollParentsToEl(this.getStepEl(this.currentStep),e)}},{key:"getScrollableParentsEls",value:function(t){for(var e=[],n=t;n&&n!==n.ownerDocument.body;)n=this.getScrollableParentEl(n),e.push(n);return e}},{key:"getScrollableParentEl",value:function(t){var e=/(auto|scroll)/,n=getComputedStyle(t),r=t.ownerDocument;return"fixed"===n.getPropertyValue("position")?r.body:function t(i){if(!i||i===r.body)return r.body;var o=getComputedStyle(i);if("fixed"===n.getPropertyValue("position")&&"static"===o.getPropertyValue("position"))return t(i.parentElement);var a=o.getPropertyValue("overflow-x"),s=o.getPropertyValue("overflow-y");return e.test(a)||e.test(s)?i:t(i.parentElement)}(t.parentElement)}},{key:"scrollParentsToEl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.getScrollableParentsEls(t);return n.forEach((function(n){n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop-e,n.scrollLeft=t.offsetLeft-n.offsetLeft-e)})),this}},{key:"scrollTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.getBoundingClientRect(),i=r.top,o=r.bottom,a=r.left,s=r.right,c=window,l=c.innerWidth,u=c.innerHeight;return a>=0&&s<=l||window.scrollBy({behavior:e,left:a-n}),i>=0&&o<=u||window.scrollBy({behavior:e,top:i-n}),this}},{key:"highlightStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.getStepEl(this.currentStep),n=this.getEl("overlay");if(n){var r=n.querySelector("path"),i=r.querySelector("animate"),o=this.isEl(e,"fakeStep"),a=o?this.getOverlayDocumentPath():this.getOverlayStepPath(this.currentStep);if(r.setAttribute("d",a),i){var s=i.getAttribute("lock");if(s||(i.setAttribute("from",a),i.setAttribute("to",a)),t){var c=this.isEl(this.getStepEl(this.fromStep),"fakeStep"),l=!this.fromStep||c||o?null:this.getOverlayStepPath(this.fromStep);l&&(i.setAttribute("from",l),i.setAttribute("to",a)),i.setAttribute("lock","true")}i.onend=function(){i.removeAttribute("lock")},i.beginElement()}}var u=getComputedStyle(e);return["absolute","relative","fixed"].includes(u.getPropertyValue("position"))||e.classList.add(this.constructor.getRelativePositionClass()),e.classList.add(this.constructor.getHighlightClass()),e.setAttribute("data-guidechimp-".concat(this.uid),"highlight"),this.elements.set("highlight",e),this}},{key:"resetHighlightStepEl",value:function(){var t=this.getEl("overlay");if(t){var e=t.querySelector("path"),n=t.querySelector("animate");e.setAttribute("d",this.getOverlayDocumentPath()),n&&(n.removeAttribute("from"),n.removeAttribute("to"))}var r=this.getStepEl(this.currentStep);return r.classList.remove(this.constructor.getRelativePositionClass()),r.classList.remove(this.constructor.getHighlightClass()),r.removeAttribute("data-guidechimp-".concat(this.uid)),this.elements.delete("highlight"),this}},{key:"setInteractionPosition",value:function(t){var e=this.getStepEl(this.currentStep);if(!t||!e)return this;var n=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(n=0);var r=this.constructor.getOffset(e),i=r.width,o=r.height,a=r.top,s=r.left;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(e)),t.style.cssText="width: ".concat(i+n,"px;\n height: ").concat(o+n,"px;\n top: ").concat(a-n/2,"px;\n left: ").concat(s-n/2,"px;"),this}},{key:"setControlPosition",value:function(t){var e=this.getStepEl(this.currentStep);if(!t||!e)return this;var n=this.options.padding;"floating"===getComputedStyle(e).getPropertyValue("position")&&(n=0);var r=e.ownerDocument.defaultView.pageXOffset,i=e.ownerDocument.documentElement.getBoundingClientRect().width,o=this.constructor.getOffset(e),a=o.height,s=o.top,c=o.left,l=o.right,u=a+n,p=s-n/2,h=r<r+(c-n/2)?r:c-n/2,f=r+i>r+(l+n/2)?i:l+n/2;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(e)),t.style.cssText="width: ".concat(f,"px;\n height: ").concat(u,"px;\n top: ").concat(p,"px;\n left: ").concat(h,"px;"),this}},{key:"setTooltipPosition",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.currentStep)return this;var n=this.getStepEl(this.currentStep);if(!t||!n)return this;var r=e.boundary,i=e.position,o=this.options.padding;r=r||window;var a=(i=(i=i||this.currentStep.position)||this.options.position).split("-"),s=E(a,2),c=s[0],l=s[1],u=getComputedStyle(n);"floating"===u.getPropertyValue("position")&&(o=0);var p=t.style;p.top=null,p.right=null,p.bottom=null,p.left=null,p.transform=null;var h=n.getBoundingClientRect(),f=h.top,d=h.bottom,v=h.left,g=h.right,y=h.width,m=h.height,b=t.getBoundingClientRect(),x=b.height,S=b.width,w=t.cloneNode(!0);w.style.visibility="hidden",w.innerHTML="",t.parentElement.appendChild(w);var k=w.getBoundingClientRect(),O=k.width;w.parentElement.removeChild(w);var P=new DOMRect(0,0,window.innerWidth,window.innerHeight);if(!(r instanceof Window)){var T=r.getBoundingClientRect(),L=T.x,I=T.y;P=new DOMRect(L,I,r.scrollWidth,r.scrollHeight)}var A=P,C=A.top,D=A.bottom,j=A.left,N=A.right;if(this.isEl(n,"fakeStep"))c="floating";else{var R=["bottom","right","left","top"],M=getComputedStyle(t),$=M.marginTop,W=M.marginLeft,B=M.marginRight,_=M.marginBottom;if($=parseInt($,10),W=parseInt(W,10),B=parseInt(B,10),x+$+(_=parseInt(_,10))>f-C&&R.splice(R.indexOf("top"),1),x+$+_>D-d&&R.splice(R.indexOf("bottom"),1),O+W+B>v-j&&R.splice(R.indexOf("left"),1),O+W+B>N-g&&R.splice(R.indexOf("right"),1),"top"===(c=R.length?R.includes(c)?c:R[0]:"floating")||"bottom"===c){var F=["left","right","middle"];N-v<O&&F.splice(F.indexOf("left"),1),g-j<O&&F.splice(F.indexOf("right"),1),(v+y/2-j<O/2||N-(g-y/2)<O/2)&&F.splice(F.indexOf("middle"),1),l=F.length?F.includes(l)?l:F[0]:"middle"}}t.setAttribute("data-guidechimp-position",c);var H=document.documentElement;switch(c){case"top":p.bottom="".concat(m+o,"px");break;case"right":p.left="".concat(g+o/2-H.clientLeft,"px");break;case"left":p.right="".concat(H.clientWidth-(v-o/2),"px");break;case"bottom":p.top="".concat(m+o,"px");break;default:p.left="50%",p.top="50%",p.transform="translate(-50%,-50%)"}if(t.removeAttribute("data-guidechimp-alignment"),l)switch(t.setAttribute("data-guidechimp-alignment",l),l){case"left":p.left="".concat(v-o/2,"px");break;case"right":p.right="".concat(H.clientWidth-g-o/2,"px");break;default:v+y/2<S/2||v+y/2+S/2>H.clientWidth?p.left="".concat(H.clientWidth/2-S/2,"px"):p.left="".concat(v+y/2-S/2,"px")}return this}},{key:"startPreloader",value:function(){document.body.classList.add(this.constructor.getLoadingClass());var t=this.getEl("overlay");if(t){var e=t.querySelector("path"),n=t.querySelector("animate"),r=new Map;r.set("d",e.getAttribute("d")),e.setAttribute("d",this.getOverlayDocumentPath()),n&&(r.set("from",n.getAttribute("from")),r.set("to",n.getAttribute("to")),n.removeAttribute("from"),n.removeAttribute("to")),this.cache.set("preloaderCache",r)}var i=this.mountPreloaderEl();return i.hidden=!0,setTimeout((function(){i.hidden=!1}),100),this}},{key:"stopPreloader",value:function(){document.body.classList.remove(this.constructor.getLoadingClass());var t=this.getEl("overlay");if(t){var e=t.querySelector("path"),n=t.querySelector("animate"),r=this.cache.get("preloaderCache")||new Map;r.has("d")&&e.setAttribute("d",r.get("d")),n&&(r.has("from")&&n.setAttribute("from",r.get("from")),r.has("to")&&n.setAttribute("to",r.get("to"))),this.cache.delete("preloaderCache")}return this.removePreloaderEl(),this}},{key:"getDefaultTmplData",value:function(){var t=this;return{previousStep:this.previousStep,currentStep:this.currentStep,nextStep:this.nextStep,fromStep:this.fromStep,toStep:this.toStep,previousStepIndex:this.previousStepIndex,currentStepIndex:this.currentStepIndex,nextStepIndex:this.nextStepIndex,fromStepIndex:this.fromStepIndex,toStepIndex:this.toStepIndex,steps:this.steps,go:function(){return t.go.apply(t,arguments)},previous:function(){return t.previous.apply(t,arguments)},next:function(){return t.next.apply(t,arguments)},stop:function(){return t.stop.apply(t,arguments)}}}},{key:"mountStep",value:function(){var t=this.mountInteractionEl(),e=this.mountControlEl();return this.setInteractionPosition(t),this.setControlPosition(e),this.setTooltipPosition(this.getEl("tooltip")),this.observeStep(),this.highlightStepEl(!0),this}},{key:"unmountStep",value:function(){return this.resetHighlightStepEl(),this.removeInteractionEl(),this.removeControlEl(),this.removePreloaderEl(),this.removeFakeStepEl(),this}},{key:"createEl",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=S(e,n);return r&&r.setAttribute("data-quidechimp-".concat(this.uid),t),r}},{key:"getEl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this.elements.get(t);return n||(n=document.querySelector("[data-quidechimp-".concat(this.uid,'="').concat(t,'"]'))),n||e}},{key:"mountEl",value:function(t,e){var n=this;if(t){var r=t.querySelectorAll("[data-quidechimp-".concat(this.uid,"]"));[t].concat(k(r)).forEach((function(t){var e=t.getAttribute("data-quidechimp-".concat(n.uid));e&&(n.removeEl(e),n.elements.set(e,t))})),e.appendChild(t)}return t}},{key:"removeEl",value:function(t){var e=this.getEl(t);return e&&e.parentElement.removeChild(e),this.elements.delete(t),this}},{key:"isEl",value:function(t,e){return this.getEl(e)?t===this.getEl(e):t.getAttribute("data-quidechimp-".concat(this.uid))===e}},{key:"getFakeStepTmpl",value:function(){return'<div class="gc-fake-step"></div>'}},{key:"createFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("fakeStep",this.getFakeStepTmpl(),C(C({},this.getDefaultTmplData()),t))}},{key:"mountFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createFakeStepEl(t),document.body)}},{key:"removeFakeStepEl",value:function(){return this.removeEl("fakeStep")}},{key:"getPreloaderTmpl",value:function(){return'<div class="gc-preloader"></div>'}},{key:"createPreloaderEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("preloader",this.getPreloaderTmpl(),t)}},{key:"mountPreloaderEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createPreloaderEl(t),document.body)}},{key:"removePreloaderEl",value:function(){return this.removeEl("preloader")}},{key:"getOverlayDocumentPath",value:function(){var t=window,e=t.innerWidth,n=t.innerHeight,r=document.body,i=r.scrollWidth,o=r.scrollHeight,a=n>o?n:o;return"M 0 0 H ".concat(e>i?e:i," V ").concat(a," H 0 V 0 Z")}},{key:"getOverlayStepPath",value:function(t){return this.getOverlayElPath(this.getStepEl(t))}},{key:"getOverlayElPath",value:function(t){var e=this.options.padding;e=e?e/2:0;var n=t.getBoundingClientRect(),r=n.left,i=n.top,o=n.width,a=n.height,s=this.getOverlayDocumentPath();return s+="M ".concat(r-e+4," ").concat(i-e,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",").concat(4,"\n V ").concat(a+i+e-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",").concat(4,"\n H ").concat(o+r+e-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",-").concat(4,"\n V ").concat(i-e+4,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",-").concat(4,"Z")}},{key:"getOverlayTmpl",value:function(){return'<div class="gc-overlay" @click="stop({ event: $event })"> <svg class="svg-overlay"> <path d="{{path}}"> <animate attributeName="d" dur="200ms"/> </path> </svg> </div>'}},{key:"createOverlayEl",value:function(){var t,e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={stop:(t=I(T().mark((function t(){var n=arguments;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.options.exitOverlay){t.next=3;break}return t.next=3,e.stop.apply(e,n);case 3:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)}),path:this.getOverlayDocumentPath()};return this.createEl("overlay",this.getOverlayTmpl(),C(C({},r),n))}},{key:"mountOverlayEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createOverlayEl(t),document.body)}},{key:"removeOverlayEl",value:function(){return this.removeEl("overlay")}},{key:"getInteractionTmpl",value:function(){return'<div if="!interaction" class="gc-interaction gc-disable"> </div>'}},{key:"createInteractionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.interaction;"boolean"==typeof this.currentStep.interaction&&(e=this.currentStep.interaction);var n=C(C({},this.getDefaultTmplData()),{},{interaction:e});return this.createEl("interaction",this.getInteractionTmpl(),C(C({},n),t))}},{key:"mountInteractionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createInteractionEl(t),document.body)}},{key:"removeInteractionEl",value:function(){return this.removeEl("interaction")}},{key:"getControlTmpl",value:function(){return'<div class="gc-control"> {{ tooltipEl }} </div>'}},{key:"createControlEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("control",this.getControlTmpl(),C(C({},this.getDefaultTmplData()),{},{tooltipEl:this.createTooltipEl(t)},t))}},{key:"mountControlEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createControlEl(t),document.body)}},{key:"removeControlEl",value:function(){return this.removeEl("control")}},{key:"getTooltipTmpl",value:function(){return'<div class="gc-tooltip"> <div class="gc-tooltip-tail"></div> {{ progressbar }} {{ title }} {{ description }} {{ close }} {{ customButtons }} <div if="previous || pagination || next" class="gc-navigation"> {{ previous }} {{ pagination }} {{ next }} </div> {{ copyright }} {{ notification }} </div>'}},{key:"createTooltipEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=C(C({},this.getDefaultTmplData()),{},{progressbar:this.createProgressbarEl(t),title:this.createTitleEl(t),description:this.createDescriptionEl(t),close:this.createCloseEl(t),customButtons:this.createCustomButtonsEl(t),previous:this.createPreviousEl(t),pagination:this.createPaginationEl(t),next:this.createNextEl(t),copyright:this.createCopyrightEl(t),notification:this.createNotificationEl(t)});return this.createEl("tooltip",this.getTooltipTmpl(),C(C({},e),t))}},{key:"getCloseTmpl",value:function(){return'<div class="gc-close" @click="stop({ event: $event })"></div>'}},{key:"createCloseEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("close",this.getCloseTmpl(),C(C({},this.getDefaultTmplData()),t))}},{key:"getProgressbarTmpl",value:function(){return'<div if="showProgressbar" class="gc-progressbar" role="progressbar" aria-valuemin="{{ progressMin }}" aria-valuemax="{{ progressMax }}" aria-valuenow="{{ progress }}" style="width:{{ progress }}%;"></div>'}},{key:"createProgressbarEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showProgressbar;"boolean"==typeof this.currentStep.showProgressbar&&(e=this.currentStep.showProgressbar);var n=100,r=0,i=(this.currentStepIndex+1)/this.steps.length*100,o=C(C({},this.getDefaultTmplData()),{},{showProgressbar:e,progressMax:n,progressMin:r,progress:i});return this.createEl("progressbar",this.getProgressbarTmpl(),C(C({},o),t))}},{key:"getTitleTmpl",value:function(){return'<div if="title" html="{{ title }}" class="gc-title"> </div>'}},{key:"createTitleEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep.title,n=void 0===e?"":e;return this.createEl("title",this.getTitleTmpl(),C(C({},this.getDefaultTmplData()),{},{title:n},t))}},{key:"getDescriptionTmpl",value:function(){return'<div if="description" html="{{ description }}" class="gc-description"></div>'}},{key:"createDescriptionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep.description,n=void 0===e?"":e;return this.createEl("description",this.getDescriptionTmpl(),C(C({},this.getDefaultTmplData()),{},{description:n},t))}},{key:"getCustomButtonsTmpl",value:function(){return'<div if="buttons.length" class="gc-custom-buttons"> <template for="button in buttons"> {{ button }} </template> </div>'}},{key:"createCustomButtonsEl",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[];return this.currentStep.buttons&&this.currentStep.buttons.forEach((function(e){var r=e;if(!c(r)){var i=e.onClick,o=e.tagName,a=void 0===o?"button":o,s=e.title,l=void 0===s?"":s,u=e.class;(r=document.createElement(a)).innerHTML=l,u&&(r.className=u),i&&r.addEventListener("click",(function(e){i.call(t,e)}))}n.push(r)})),this.createEl("customButtons",this.getCustomButtonsTmpl(),C(C({},this.getDefaultTmplData()),{},{buttons:n},e))}},{key:"getPaginationTmpl",value:function(){return'<div if="showPagination && steps.length > 1" class="gc-pagination"> <template if="paginationTheme === \'numbers\' || steps.length >= paginationCirclesMaxItems"> <ul class="gc-pagination-theme-numbers"> <template for="(step, index) in steps"> <template if="index === 0"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <template if="currentStepIndex < 3"> <template if="index > 0 && index < 5"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="index === 5 && index !== steps.length - 1" class="gc-pagination-dots"> ... </li> </template> <template elseif="steps.length - currentStepIndex < 5"> <template if="steps.length - index < 6 && steps.length - 1 !== index"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="steps.length - index === 6 && index !== 0" class="gc-pagination-dots"> ... </li> </template> <template else> <li if="currentStepIndex - index === 3 && index !== 0" class="gc-pagination-dots"> ... </li> <template elseif="(currentStepIndex - index >= 0 && currentStepIndex - index < 3)\n || ( index - currentStepIndex >= 0 && index - currentStepIndex < 3)"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="index - currentStepIndex === 3 && steps.length -1 !== index" class="gc-pagination-dots"> ... </li> </template> <template if="index + 1 === steps.length"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> </template> </ul> </template> <template else> <div class="gc-pagination-theme-circles"> <template for="(step, index) in steps"> <div if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active"></div> <div elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"></div> <div elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"></div> <div else class="gc-pagination-item" @click="go(index, true, { event: $event })"></div> </template> </div> </template> </div> '}},{key:"createPaginationEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep,n=e.paginationTheme,r=void 0===n?this.options.paginationTheme:n,i=e.paginationCirclesMaxItems,o=void 0===i?this.options.paginationCirclesMaxItems:i,a=this.options.showPagination;return"boolean"==typeof this.currentStep.showPagination&&(a=this.currentStep.showPagination),this.createEl("pagination",this.getPaginationTmpl(),C(C({},this.getDefaultTmplData()),{},{showPagination:a,paginationTheme:r,paginationCirclesMaxItems:o},t))}},{key:"getPreviousTmpl",value:function(){return"<div class=\"gc-navigation-prev {{ (!previousStep || !showNavigation) ? 'gc-hidden': '' }}\" @click=\"previous({ event: $event })\"></div>"}},{key:"createPreviousEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showNavigation;return"boolean"==typeof this.currentStep.showNavigation&&(e=this.currentStep.showNavigation),this.createEl("previous",this.getPreviousTmpl(),C(C({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"getNextTmpl",value:function(){return"<div class=\"gc-navigation-next {{ (!nextStep || !showNavigation) ? 'gc-hidden': '' }}\" @click=\"next({ event: $event })\"></div>"}},{key:"createNextEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showNavigation;return"boolean"==typeof this.currentStep.showNavigation&&(e=this.currentStep.showNavigation),this.createEl("next",this.getNextTmpl(),C(C({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"getCopyrightTmpl",value:function(){return'<div class="gc-copyright">Made with AHD.JS</div> '}},{key:"createCopyrightEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("copyright",this.getCopyrightTmpl(),C(C({},this.getDefaultTmplData()),t))}},{key:"getNotificationTmpl",value:function(){return'<div html="{{ messages[0] }}" class="gc-notification"></div>'}},{key:"createNotificationEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("notification",this.getNotificationTmpl(),C(C({},this.getDefaultTmplData()),{},{messages:this.notifications},t))}},{key:"notify",value:function(t){this.notifications.push(t);var e=this.getEl("notification");return e&&this.mountEl(this.createNotificationEl(),e.parentElement),this}},{key:"on",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.constructor.getEventListenersPriorities(),i=E(r,1),o=i[0];n.priority&&r.includes(n.priority)&&(o=n.priority);var a=t.trim();return this.listeners[a]=this.listeners[a]||{},this.listeners[a][o]=this.listeners[a][o]||[],this.listeners[a][o].push(e),this}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=k(this.constructor.getEventListenersPriorities()).reverse(),a=t.trim(),s=[],c=Promise.resolve(s);return this.listeners[a]&&o.forEach((function(t){var n=e.listeners[a][t];n&&(c=c.then((function(){return Promise.all(n.map((function(t){return Promise.resolve().then((function(){return t.apply(e,r)}))})))})).then((function(t){return s=[].concat(k(s),k(t))})))})),c}},{key:"addOnKeydownListener",value:function(){return this.cache.set("onKeydownListener",this.getOnKeydownListener()),window.addEventListener("keydown",this.cache.get("onKeydownListener"),!0),this}},{key:"getOnKeydownListener",value:function(){var t=this;return function(e){var n=e.keyCode,r=C(C({},t.constructor.getDefaultKeyboardCodes()),t.options.useKeyboard),i=r.previous,o=r.next,a=r.stop;a&&a.includes(n)?t.stop({event:e}):i&&i.includes(n)?t.previous({event:e}):o&&o.includes(n)&&t.next({event:e})}}},{key:"removeOnKeydownListener",value:function(){return this.cache.has("onKeydownListener")&&(window.removeEventListener("keydown",this.cache.get("onKeydownListener"),!0),this.cache.delete("onKeydownListener")),this}},{key:"addOnWindowResizeListener",value:function(){return this.cache.set("onWindowResizeListener",this.getOnWindowResizeListener()),window.addEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this}},{key:"getOnWindowResizeListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnWindowResizeListener",value:function(){return this.cache.has("onWindowResizeListener")&&(window.removeEventListener("resize",this.cache.get("onWindowResizeListener"),!0),this.cache.delete("onWindowResizeListener")),this}},{key:"addOnWindowScrollListener",value:function(){return this.cache.set("onWindowScrollListener",this.getOnWindowScrollListener()),window.addEventListener("scroll",this.cache.get("onWindowScrollListener"),!0),this}},{key:"getOnWindowScrollListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnWindowScrollListener",value:function(){return this.cache.has("onWindowScrollListener")&&(window.removeEventListener("scroll",this.cache.get("onWindowScrollListener"),!0),this.cache.delete("onWindowScrollListener")),this}},{key:"removeListeners",value:function(){this.removeOnKeydownListener(),this.removeOnWindowResizeListener(),this.removeOnWindowScrollListener()}},{key:"observeStep",value:function(){this.observeResizing(),this.observeMutation()}},{key:"observeResizing",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{box:"border-box"},n=this.observers.resizingObserver;return n||"undefined"==typeof ResizeObserver||(n=new ResizeObserver((function(){(t||t.currentStep)&&t.refresh()})),this.observers.resizingObserver=n),!!n&&(n.observe(this.getStepEl(this.currentStep),e),!0)}},{key:"unobserveResizing",value:function(){var t=this.observers.resizingObserver;return!!t&&(t.disconnect(),!0)}},{key:"observeMutation",value:function(){var t=this,e=this.observers.mutationObserver;return e||(e=new MutationObserver((function(e){if((t||t.currentStep)&&t.currentStep.element){var n=t.getStepEl(t.currentStep),r=function(){return n&&!t.isEl(n,"fakeStep")};e.forEach((function(e){r()?"childList"===e.type&&e.removedNodes.length&&e.removedNodes.forEach((function(e){(e===n||e.contains(n))&&(n=t.getStepEl(t.currentStep),t.scrollParentsToStepEl(),t.refresh())})):"childList"===e.type&&e.addedNodes.length&&(n=t.getStepEl(t.currentStep),r()&&(t.scrollParentsToStepEl(),t.refresh()))}))}})),this.observers.mutationObserver=e),e.observe(this.getStepEl(this.currentStep).ownerDocument.body,{childList:!0,subtree:!0}),!0}},{key:"unobserveMutation",value:function(){var t=this.observers.mutationObserver;return!!t&&(t.disconnect(),!0)}},{key:"unobserveStep",value:function(){this.unobserveResizing(),this.unobserveMutation()}},{key:"beforeChangeStep",value:function(){this.unmountStep(),this.unobserveStep()}},{key:"refresh",value:function(){return this.currentStep?(this.highlightStepEl(),this.setControlPosition(this.getEl("control")),this.setInteractionPosition(this.getEl("interaction")),this.setTooltipPosition(this.getEl("tooltip")),this):this}}],i=[{key:"getDefaultOptions",value:function(){return{position:"bottom",useKeyboard:!0,exitEscape:!0,exitOverlay:!0,showPagination:!0,showNavigation:!0,showProgressbar:!0,paginationTheme:"circles",paginationCirclesMaxItems:10,interaction:!0,padding:8,scrollPadding:10,scrollBehavior:"auto"}}},{key:"getDefaultKeyboardCodes",value:function(){return{previous:[37],next:[39,13,32],stop:[27]}}},{key:"getEventListenersPriorities",value:function(){return["low","medium","high","critical"]}},{key:"getBodyClass",value:function(){return"gc"}},{key:"getLoadingClass",value:function(){return"gc-loading"}},{key:"getHighlightClass",value:function(){return"gc-highlight"}},{key:"getFixedClass",value:function(){return"gc-fixed"}},{key:"getRelativePositionClass",value:function(){return"gc-relative"}},{key:"getOffset",value:function(t){var e=t.ownerDocument,n=e.body,r=e.documentElement,i=e.defaultView,o=i.pageYOffset||r.scrollTop||n.scrollTop,a=i.pageXOffset||r.scrollLeft||n.scrollLeft,s=t.getBoundingClientRect(),c=s.top,l=s.right,u=s.bottom,p=s.left;return{right:l,bottom:u,width:s.width,height:s.height,x:s.x,y:s.y,top:c+o,left:p+a}}},{key:"isFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isFixed(e))}}],r&&N(n.prototype,r),i&&N(n,i),Object.defineProperty(n,"prototype",{writable:!1}),t}();function M(t,e,n){return M=$()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&W(i,n.prototype),i},M.apply(null,arguments)}function $(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function W(t,e){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},W(t,e)}var B=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return M(R,e)};B.prototype=R.prototype,B.plugins=new Set,B.extend=function(t){if(!B.plugins.has(t)){B.plugins.add(t);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];t.apply(void 0,[R,B].concat(n))}return B};const _=B})(),r})()));
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","mappings":";;;;;;;;;;;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAe,MAAID,IAEnBD,EAAY,MAAIC,GACjB,CATD,CASGK,MAAM,IACT,M,qBCVA,IAGIC,EAHO,EAAQ,KAGDA,OAElBJ,EAAOD,QAAUK,C,UCejBJ,EAAOD,QAXP,SAAkBM,EAAOC,GAKvB,IAJA,IAAIC,GAAS,EACTC,EAAkB,MAATH,EAAgB,EAAIA,EAAMG,OACnCC,EAASC,MAAMF,KAEVD,EAAQC,GACfC,EAAOF,GAASD,EAASD,EAAME,GAAQA,EAAOF,GAEhD,OAAOI,CACT,C,gBClBA,IAAIL,EAAS,EAAQ,KACjBO,EAAY,EAAQ,KACpBC,EAAiB,EAAQ,KAOzBC,EAAiBT,EAASA,EAAOU,iBAAcC,EAkBnDf,EAAOD,QATP,SAAoBiB,GAClB,OAAa,MAATA,OACeD,IAAVC,EAdQ,qBADL,gBAiBJH,GAAkBA,KAAkBI,OAAOD,GAC/CL,EAAUK,GACV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ATM,IAWpB,GAAC,yCAED,WACI,MAAO,CAAC,MAAO,SAAU,OAAQ,WACrC,GAAC,0BAED,WACI,MAAO,IACX,GAAC,6BAED,WACI,MAAO,YACX,GAAC,+BAED,WACI,MAAO,cACX,GAAC,2BAED,WACI,MAAO,UACX,GAAC,sCAED,WACI,MAAO,aACX,GAEA,uBAKA,SAAiBzS,GACb,MAAqDA,EAAGgD,cAAhDxB,EAAI,EAAJA,KAAM6N,EAAe,EAAfA,gBAA8B8K,EAAI,EAAjBhL,YACzBvC,EAAYuN,EAAKC,aAAe/K,EAAgBzC,WAAapL,EAAKoL,UAClEE,EAAaqN,EAAKjL,aAAeG,EAAgBvC,YAActL,EAAKsL,WAC1E,EAA0D9M,EAAGiN,wBAArDC,EAAG,EAAHA,IAAKG,EAAK,EAALA,MAAOF,EAAM,EAANA,OAAQC,EAAI,EAAJA,KAC5B,MAAO,CAAEC,MAAAA,EAAOF,OAAAA,EAAQyB,MADe,EAALA,MACHC,OADgB,EAANA,OACF8B,EADW,EAADA,EACPC,EADW,EAADA,EACP1D,IAAKA,EAAMN,EAAWQ,KAAMA,EAAON,EACpF,GAEA,qBAKA,SAAe9M,GACX,IAAQkC,EAAelC,EAAfkC,WAER,SAAKA,GAAsC,SAAxBA,EAAWmY,YAMe,UAF7BlO,iBAAiBnM,GAErBqM,iBAAiB,aAItB1M,KAAKoP,QAAQ7M,GACxB,IA1KJ,iFA0KK,EAvI0B,G,q7BiBqG/B,QAVW,WAET,aAA0B,iEAAX+E,EAAI,yBAAJA,EAAI,gBAEjBtH,KAAK2a,WAAa,EAAItV,EAAciC,EACtC,C,UAGC,O,EAHA,E,EAAA,oBACD,WAA2B,OACzB,EAAAtH,KAAK2a,YAAWC,MAAK,kBACvB,I,iFAAC,EARQ,E,Q3CrHX","sources":["webpack://AHDjs/webpack/universalModuleDefinition","webpack://AHDjs/./node_modules/lodash/_Symbol.js","webpack://AHDjs/./node_modules/lodash/_arrayMap.js","webpack://AHDjs/./node_modules/lodash/_baseGetTag.js","webpack://AHDjs/./node_modules/lodash/_baseToString.js","webpack://AHDjs/./node_modules/lodash/_freeGlobal.js","webpack://AHDjs/./node_modules/lodash/_getRawTag.js","webpack://AHDjs/./node_modules/lodash/_objectToString.js","webpack://AHDjs/./node_modules/lodash/_root.js","webpack://AHDjs/./node_modules/lodash/isArray.js","webpack://AHDjs/./node_modules/lodash/isNull.js","webpack://AHDjs/./node_modules/lodash/isObjectLike.js","webpack://AHDjs/./node_modules/lodash/isSymbol.js","webpack://AHDjs/./node_modules/lodash/isUndefined.js","webpack://AHDjs/./node_modules/lodash/toString.js","webpack://AHDjs/./node_modules/lodash/uniqueId.js","webpack://AHDjs/webpack/bootstrap","webpack://AHDjs/webpack/runtime/compat get default export","webpack://AHDjs/webpack/runtime/define property getters","webpack://AHDjs/webpack/runtime/global","webpack://AHDjs/webpack/runtime/hasOwnProperty shorthand","webpack://AHDjs/webpack/runtime/make namespace object","webpack://AHDjs/./src/lib/utils/isHtmlElement.js","webpack://AHDjs/./src/lib/utils/isSvgElement.js","webpack://AHDjs/./src/lib/utils/isNodeList.js","webpack://AHDjs/./src/lib/utils/domTemplate.js","webpack://AHDjs/./src/lib/GuideChimp.js","webpack://AHDjs/./src/lib/templates/fake-step.html","webpack://AHDjs/./src/lib/templates/preloader.html","webpack://AHDjs/./src/lib/templates/overlay.html","webpack://AHDjs/./src/lib/templates/interaction.html","webpack://AHDjs/./src/lib/templates/control.html","webpack://AHDjs/./src/lib/templates/tooltip.html","webpack://AHDjs/./src/lib/templates/close.html","webpack://AHDjs/./src/lib/templates/progressbar.html","webpack://AHDjs/./src/lib/templates/title.html","webpack://AHDjs/./src/lib/templates/description.html","webpack://AHDjs/./src/lib/templates/custom-buttons.html","webpack://AHDjs/./src/lib/templates/pagination.html","webpack://AHDjs/./src/lib/templates/previous.html","webpack://AHDjs/./src/lib/templates/next.html","webpack://AHDjs/./src/lib/templates/copyright.html","webpack://AHDjs/./src/lib/templates/notification.html","webpack://AHDjs/./src/lib/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"AHDjs\"] = factory();\n\telse\n\t\troot[\"AHDjs\"] = factory();\n})(self, () => {\nreturn ","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\nfunction isNull(value) {\n return value === null;\n}\n\nmodule.exports = isNull;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value) {\n return value === undefined;\n}\n\nmodule.exports = isUndefined;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var toString = require('./toString');\n\n/** Used to generate unique IDs. */\nvar idCounter = 0;\n\n/**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\nfunction uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n}\n\nmodule.exports = uniqueId;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default (el) => (el instanceof HTMLElement || /^\\[object HTML(.+)Element\\]$/.test(`${el}`));\r\n","export default (el) => (el instanceof SVGElement || /^\\[object SVG(.+)Element\\]$/.test(`${el}`));\r\n","export default (el) => /^[object NodeList]$/.test(`${el}`);\n","/**\r\n * Lodash\r\n * @see https://lodash.com/docs\r\n */\r\nimport _isUndefined from 'lodash/isUndefined';\r\nimport _isNull from 'lodash/isNull';\r\n\r\n// utils\r\nimport isHtmlElement from './isHtmlElement';\r\nimport isSvgElement from './isSvgElement';\r\nimport isNodeList from './isNodeList';\r\n\r\nexport default (tpl, data = {}) => {\r\n const parser = new DOMParser();\r\n\r\n let template = tpl.replace(/<template/g, '<gc-template');\r\n template = template.replace(/<\\/template/g, '</gc-template');\r\n\r\n const sourceDoc = parser.parseFromString(template, 'text/html');\r\n const renderedDoc = document.implementation.createHTMLDocument();\r\n\r\n const pattern = /{{([^}}]+)?}}/gm;\r\n const eventPattern = /^@(.+)$/;\r\n\r\n const ifEnded = new Map();\r\n\r\n const render = (node, replacements = {}, parent = renderedDoc.body) => {\r\n let handler = parent;\r\n\r\n const keys = Object.keys(replacements);\r\n const values = Object.values(replacements);\r\n\r\n // eslint-disable-next-line no-new-func\r\n const getValue = (key) => (new Function(...keys, `return ${key};`))(...values);\r\n\r\n if (node) {\r\n if (node.nodeType === Node.ELEMENT_NODE) {\r\n if (node.hasAttribute('if')) {\r\n ifEnded.set(node.parentNode, false);\r\n\r\n if (!getValue(node.getAttribute('if'))) {\r\n return;\r\n }\r\n\r\n ifEnded.set(node.parentNode, true);\r\n }\r\n\r\n if (node.hasAttribute('elseif')) {\r\n if (ifEnded.get(node.parentNode) || !getValue(node.getAttribute('elseif'))) {\r\n return;\r\n }\r\n\r\n ifEnded.set(node.parentNode, true);\r\n }\r\n\r\n if (node.hasAttribute('else')) {\r\n if (ifEnded.get(node.parentNode)) {\r\n return;\r\n }\r\n\r\n ifEnded.set(node.parentNode, true);\r\n }\r\n\r\n if (node.hasAttribute('for')) {\r\n const forPieces = node.getAttribute('for').split(' in ');\r\n const [firstPiece, secondPiece] = forPieces;\r\n\r\n node.removeAttribute('for');\r\n\r\n let [param, index] = firstPiece.replace(/\\(|\\)/g, '').split(',');\r\n param = param.trim();\r\n index = (index) ? index.trim() : '';\r\n\r\n const source = getValue(secondPiece.trim());\r\n\r\n const isSourceArray = Array.isArray(source);\r\n\r\n Object.keys(source).forEach((k) => {\r\n const r = { ...replacements, [param]: source[k] };\r\n\r\n if (index) {\r\n r[index] = (isSourceArray) ? parseInt(k, 10) : k;\r\n }\r\n\r\n render(node, r, handler);\r\n });\r\n\r\n return;\r\n }\r\n\r\n if (node !== node.ownerDocument.body && node.tagName !== 'GC-TEMPLATE') {\r\n handler = node.cloneNode();\r\n parent.append(handler);\r\n }\r\n\r\n [...node.attributes].forEach((attr) => {\r\n const { name, value } = attr;\r\n\r\n const eventMatch = eventPattern.exec(name);\r\n\r\n if (eventMatch) {\r\n const [, eventName] = eventMatch;\r\n\r\n // eslint-disable-next-line no-new-func\r\n handler.addEventListener(eventName, (e) => new Function(\r\n ...[...keys, '$event'],\r\n `return ${value}${(/\\(.+\\)/.test(value)) ? '' : '()'};`,\r\n )(...[...values, e]));\r\n\r\n handler.removeAttribute(name);\r\n\r\n return;\r\n }\r\n\r\n let match = pattern.exec(value);\r\n let index = 0;\r\n let rValue = '';\r\n\r\n while (match) {\r\n rValue += value.slice(index, match.index);\r\n\r\n let [replacement, key] = match;\r\n key = key.trim();\r\n\r\n try {\r\n replacement = getValue(key);\r\n\r\n if (_isUndefined(replacement) || _isNull(replacement)) {\r\n replacement = '';\r\n }\r\n } catch (e) {\r\n // eslint-disable-next-line no-console\r\n console.error(e);\r\n }\r\n\r\n rValue += replacement;\r\n\r\n index = match.index + match[0].length;\r\n match = pattern.exec(value);\r\n }\r\n\r\n rValue += value.substr(index, value.length - index);\r\n\r\n if (name === 'html') {\r\n handler.innerHTML = rValue;\r\n handler.removeAttribute(name);\r\n } else if (['if', 'else', 'elseif'].includes(name)) {\r\n handler.removeAttribute(name);\r\n } else {\r\n handler.setAttribute(name, rValue);\r\n }\r\n });\r\n } else if (node.nodeType === Node.TEXT_NODE) {\r\n let match = pattern.exec(node.nodeValue);\r\n\r\n if (match) {\r\n let index = 0;\r\n while (match) {\r\n handler.append(document.createTextNode(node.nodeValue.slice(index, match.index)));\r\n\r\n let [replacement, key] = match;\r\n key = key.trim();\r\n\r\n try {\r\n replacement = getValue(key);\r\n\r\n if (_isUndefined(replacement) || _isNull(replacement)) {\r\n replacement = '';\r\n }\r\n } catch (e) {\r\n // eslint-disable-next-line no-console\r\n console.error(e);\r\n }\r\n\r\n if (isHtmlElement(replacement) || isSvgElement(replacement)) {\r\n handler.append(replacement);\r\n } else if (isNodeList(replacement)) {\r\n replacement.forEach((v) => {\r\n handler.append(v);\r\n });\r\n } else {\r\n handler.append(document.createTextNode(replacement));\r\n }\r\n\r\n index = match.index + match[0].length;\r\n match = pattern.exec(node.nodeValue);\r\n }\r\n\r\n handler.append(document.createTextNode(node.nodeValue.slice(index, node.nodeValue.length)));\r\n } else {\r\n handler.append(node.cloneNode());\r\n }\r\n }\r\n\r\n const { childNodes = [] } = node;\r\n\r\n if (childNodes.length) {\r\n childNodes.forEach((v) => {\r\n render(v, replacements, handler);\r\n });\r\n }\r\n }\r\n };\r\n\r\n render(sourceDoc.body, data, renderedDoc.body);\r\n\r\n return renderedDoc.body.firstElementChild;\r\n};\r\n","/* eslint-disable class-methods-use-this */\n/**\n * Copyright (C) 2020 Labs64 GmbH\n *\n * This source code is licensed under the European Union Public License, version 1.2\n * located in the LICENSE file\n */\n\n/**\n * Lodash functions\n * @see https://lodash.com/docs\n */\nimport _uniqueId from 'lodash/uniqueId';\n\n// utils\nimport domTemplate from './utils/domTemplate';\nimport isHtmlElement from './utils/isHtmlElement';\n\n// templates\nimport overlayTmpl from './templates/overlay.html';\nimport preloaderTmpl from './templates/preloader.html';\nimport interactionTmpl from './templates/interaction.html';\nimport controlTmpl from './templates/control.html';\nimport tooltipTmpl from './templates/tooltip.html';\nimport progressbarTmpl from './templates/progressbar.html';\nimport titleTmpl from './templates/title.html';\nimport descriptionTmpl from './templates/description.html';\nimport customButtonsTmpl from './templates/custom-buttons.html';\nimport previousTmpl from './templates/previous.html';\nimport paginationTmpl from './templates/pagination.html';\nimport nextTmpl from './templates/next.html';\nimport closeTmpl from './templates/close.html';\nimport copyrightTmpl from './templates/copyright.html';\nimport notificationTmpl from './templates/notification.html';\nimport fakeStepTmpl from './templates/fake-step.html';\n\nexport default class GuideChimp {\n /**\n * GuideChimp constructor\n * @param tour\n * @param options\n */\n constructor(tour, options = {}) {\n Object.defineProperty(this, 'uid', {\n value: _uniqueId(),\n enumerable: false,\n configurable: false,\n writable: false,\n });\n\n this.setDefaults();\n\n this.cache = new Map();\n\n this.listeners = {};\n\n this.observers = {};\n\n this.options = {};\n this.setOptions(options);\n\n this.tour = null;\n this.setTour(tour);\n\n this.notifications = [];\n\n this.elements = new Map();\n\n this.init();\n }\n\n /**\n * Called after construction, this hook allows you to add some extra setup\n * logic without having to override the constructor.\n */\n init() {\n\n }\n\n /**\n * Default options\n * @return {Object}\n */\n static getDefaultOptions() {\n return {\n position: 'bottom',\n useKeyboard: true,\n exitEscape: true,\n exitOverlay: true,\n showPagination: true,\n showNavigation: true,\n showProgressbar: true,\n paginationTheme: 'circles',\n paginationCirclesMaxItems: 10,\n interaction: true,\n padding: 8,\n scrollPadding: 10,\n scrollBehavior: 'auto',\n };\n }\n\n static getDefaultKeyboardCodes() {\n const escCode = 27;\n const arrowLeftCode = 37;\n const arrowRightCode = 39;\n const enterCode = 13;\n const spaceCode = 32;\n\n return {\n previous: [arrowLeftCode],\n next: [arrowRightCode, enterCode, spaceCode],\n stop: [escCode],\n };\n }\n\n static getEventListenersPriorities() {\n return ['low', 'medium', 'high', 'critical'];\n }\n\n static getBodyClass() {\n return 'gc';\n }\n\n static getLoadingClass() {\n return 'gc-loading';\n }\n\n static getHighlightClass() {\n return 'gc-highlight';\n }\n\n static getFixedClass() {\n return 'gc-fixed';\n }\n\n static getRelativePositionClass() {\n return 'gc-relative';\n }\n\n /**\n * Get element offset\n * @param el\n * @return {{top: number, left: number, width: number, height: number}}\n */\n static getOffset(el) {\n const { body, documentElement, defaultView: view } = el.ownerDocument;\n const scrollTop = view.pageYOffset || documentElement.scrollTop || body.scrollTop;\n const scrollLeft = view.pageXOffset || documentElement.scrollLeft || body.scrollLeft;\n const { top, right, bottom, left, width, height, x, y } = el.getBoundingClientRect();\n return { right, bottom, width, height, x, y, top: top + scrollTop, left: left + scrollLeft };\n }\n\n /**\n * Check if el or his parent has fixed position\n * @param el\n * @return {boolean}\n */\n static isFixed(el) {\n const { parentNode } = el;\n\n if (!parentNode || parentNode.nodeName === 'HTML') {\n return false;\n }\n\n const elStyle = getComputedStyle(el);\n\n if (elStyle.getPropertyValue('position') === 'fixed') {\n return true;\n }\n\n return this.isFixed(parentNode);\n }\n\n setDefaults() {\n this.previousStep = null;\n this.currentStep = null;\n this.nextStep = null;\n this.fromStep = null;\n this.toStep = null;\n\n this.previousStepIndex = -1;\n this.currentStepIndex = -1;\n this.nextStepIndex = -1;\n this.fromStepIndex = -1;\n this.toStepIndex = -1;\n\n this.steps = [];\n\n this.isDisplayed = false;\n\n return this;\n }\n\n /**\n * Set tour name or steps\n * @param tour\n * @return {this}\n */\n setTour(tour) {\n this.tour = tour;\n return this;\n }\n\n /**\n * Get tour name or steps\n */\n getTour() {\n return this.tour;\n }\n\n /**\n * Set tour options\n * @param options\n * @return {this}\n */\n setOptions(options) {\n this.options = { ...this.constructor.getDefaultOptions(), ...options };\n return this;\n }\n\n /**\n * Get tour options\n */\n getOptions() {\n return this.options;\n }\n\n /**\n * Start tour\n * @param number step number or it index\n * @param useIndex whether to use step number or index\n * @return {Promise<boolean>}\n */\n async start(number = 0, useIndex = true, ...args) {\n this.isDisplayed = true;\n\n this.mountOverlayEl();\n\n this.startPreloader();\n\n // emit start event\n await this.emit('onStart', ...args);\n\n this.stopPreloader();\n\n if (!this.tour || !this.tour.length) {\n this.removeOverlayEl();\n this.isDisplayed = false;\n return false;\n }\n\n this.steps = this.sortSteps(this.getSteps(this.tour));\n\n if (!this.steps.length) {\n this.removeOverlayEl();\n this.isDisplayed = false;\n return false;\n }\n\n // add a class that increase the specificity of the classes\n document.body.classList.add(this.constructor.getBodyClass());\n\n const isStarted = await this.go(number, useIndex, ...args);\n\n this.isDisplayed = isStarted;\n\n document.body.classList.toggle(this.constructor.getBodyClass(), isStarted);\n\n if (isStarted) {\n // turn on keyboard navigation\n if (this.options.useKeyboard) {\n this.addOnKeydownListener();\n }\n\n // on window resize\n this.addOnWindowResizeListener();\n\n // on window scroll\n this.addOnWindowScrollListener();\n }\n\n return isStarted;\n }\n\n /**\n * Go to step\n * @param number step number or it index\n * @param useIndex whether to use step number or index\n * @param args\n * @return {Promise<boolean>}\n */\n async go(number, useIndex = true, ...args) {\n if (!this.isDisplayed || !this.steps.length) {\n return false;\n }\n\n const stepNumber = (useIndex) ? parseInt(number, 10) : number;\n\n if (this.currentStep) {\n // skip if this step is already displayed\n const isSameStep = (useIndex)\n ? (this.currentStepIndex === stepNumber)\n : (this.currentStep.step === stepNumber);\n\n if (isSameStep) {\n return false;\n }\n }\n\n const fromStep = this.currentStep;\n const fromStepIndex = this.currentStepIndex;\n\n const currentStep = (useIndex)\n ? this.steps[stepNumber]\n : this.steps.filter(({ step }) => step === stepNumber)[0];\n\n if (!currentStep) {\n return false;\n }\n\n const currentStepIndex = this.steps.indexOf(currentStep);\n\n const toStep = currentStep;\n const toStepIndex = currentStepIndex;\n\n const { onBeforeChange, onAfterChange } = toStep;\n\n this.startPreloader();\n\n let abort = false;\n\n if (onBeforeChange) {\n if (await Promise.resolve().then(() => onBeforeChange.call(this, toStep, fromStep, ...args)) === false) {\n abort = true;\n }\n }\n\n if ((await this.emit('onBeforeChange', toStep, fromStep, ...args)).some((r) => r === false)) {\n abort = true;\n }\n\n this.stopPreloader();\n\n if (abort) {\n return false;\n }\n\n this.beforeChangeStep({ toStep, toStepIndex, currentStep, currentStepIndex, fromStep, fromStepIndex });\n\n this.toStep = toStep;\n this.toStepIndex = toStepIndex;\n\n this.currentStep = currentStep;\n this.currentStepIndex = currentStepIndex;\n\n this.fromStep = fromStep;\n this.fromStepIndex = fromStepIndex;\n\n this.previousStep = this.steps[this.currentStepIndex - 1] || null;\n this.previousStepIndex = (this.previousStep) ? this.currentStepIndex - 1 : -1;\n\n this.nextStep = this.steps[this.currentStepIndex + 1] || null;\n this.nextStepIndex = (this.nextStep) ? this.currentStepIndex + 1 : -1;\n\n const { scrollBehavior } = this.options;\n const { scrollPadding = this.options.scrollPadding } = this.currentStep;\n\n // scroll to element\n this.scrollParentsToStepEl();\n this.scrollTo(this.getStepEl(this.currentStep, true), scrollBehavior, scrollPadding);\n\n this.mountStep();\n\n setTimeout(() => {\n if (this.getEl('tooltip')) {\n this.scrollTo(this.getEl('tooltip'), scrollBehavior, scrollPadding);\n }\n }, 300);\n\n if (onAfterChange) {\n onAfterChange.call(this, this.toStep, this.fromStep, ...args);\n }\n\n this.emit('onAfterChange', this.toStep, this.fromStep, ...args);\n\n return true;\n }\n\n async previous(...args) {\n if (!this.isDisplayed || !this.currentStep || !this.previousStep) {\n return false;\n }\n\n const { onPrevious } = this.currentStep;\n\n this.startPreloader();\n\n if (onPrevious) {\n if (await Promise.resolve()\n .then(() => onPrevious.call(this, this.previousStep, this.currentStep, ...args)) === false) {\n this.stopPreloader();\n return false;\n }\n }\n\n if ((await this.emit('onPrevious', this.previousStep, this.currentStep, ...args)).some((r) => r === false)) {\n this.stopPreloader();\n return false;\n }\n\n this.stopPreloader();\n\n return this.go(this.previousStepIndex, true, ...args);\n }\n\n async next(...args) {\n if (!this.isDisplayed || !this.currentStep || !this.nextStep) {\n return false;\n }\n\n const { onNext } = this.currentStep;\n\n this.startPreloader();\n\n if (onNext) {\n if (await Promise.resolve()\n .then(() => onNext.call(this, this.nextStep, this.currentStep, ...args)) === false) {\n this.stopPreloader();\n return false;\n }\n }\n\n if ((await this.emit('onNext', this.nextStep, this.currentStep, ...args)).some((r) => r === false)) {\n this.stopPreloader();\n return false;\n }\n\n this.stopPreloader();\n\n return this.go(this.nextStepIndex, true, ...args);\n }\n\n async stop(...args) {\n if (!this.isDisplayed) {\n return this;\n }\n\n if (this.currentStepIndex === this.steps.length - 1) {\n this.startPreloader();\n await this.emit('onComplete', ...args);\n this.stopPreloader();\n }\n\n this.startPreloader();\n\n // emit stop event\n await this.emit('onStop', ...args);\n\n this.stopPreloader();\n\n // remove the class that increase the specificity of the classes\n document.body.classList.remove(this.constructor.getBodyClass());\n\n // remove events listeners\n this.removeListeners();\n\n // disconnect observers\n this.unobserveStep();\n\n // remove all layers and keys\n this.unmountStep();\n\n // remove overlay\n this.removeOverlayEl();\n\n this.cache.clear();\n this.elements.clear();\n\n // set step variables to defaults\n this.setDefaults();\n\n return this;\n }\n\n getSteps(tour) {\n if (!tour || !tour.length) {\n return [];\n }\n\n return (typeof tour === 'string')\n ? this.getDataSteps(tour)\n : this.getJsSteps(tour);\n }\n\n getDataSteps(tour) {\n const dataPrefix = 'data-guidechimp';\n let tourStepsEl = Array.from(document.querySelectorAll(`[${dataPrefix}-tour*='${tour}']`));\n\n // filter steps by tour name\n tourStepsEl = tourStepsEl.filter((v) => {\n const tours = v.getAttribute(`${dataPrefix}-tour`).split(',');\n return tours.includes(this.tour);\n });\n\n const dataTourRegExp = new RegExp(`^${dataPrefix}-${tour}-[^-]+$`);\n const dataGlobalRegExp = new RegExp(`^${dataPrefix}-[^-]+$`);\n\n return tourStepsEl.map((el, i) => {\n const stepAttrs = {};\n\n for (let j = 0; j < el.attributes.length; j++) {\n const { name: attrName, value: attrValue } = el.attributes[j];\n\n const isTourAttr = dataTourRegExp.test(attrName);\n const isGlobalAttr = (isTourAttr) ? false : dataGlobalRegExp.test(attrName);\n\n if (isTourAttr || isGlobalAttr) {\n const attrShortName = (isTourAttr)\n ? attrName.replace(`${dataPrefix}-${tour}-`, '')\n : attrName.replace(`${dataPrefix}-`, '');\n\n if (attrShortName !== 'tour') {\n if (isTourAttr || (isGlobalAttr && !stepAttrs[attrShortName])) {\n stepAttrs[attrShortName] = attrValue;\n }\n }\n }\n }\n\n return {\n step: i,\n title: '',\n description: '',\n position: this.options.position,\n interaction: this.options.interaction,\n ...stepAttrs,\n element: el,\n };\n });\n }\n\n getJsSteps(tour) {\n return tour.map((v, i) => ({ ...v, step: v.step || i }));\n }\n\n sortSteps(steps) {\n const copy = [...steps];\n\n return copy.sort((a, b) => {\n if (a.step < b.step) {\n return -1;\n }\n if (a.step > b.step) {\n return 1;\n }\n return 0;\n });\n }\n\n getStepEl(step) {\n const { element } = step || {};\n\n if (!element) {\n return this.mountFakeStepEl();\n }\n\n const getEl = (selector, def = null) => {\n const el = (typeof selector === 'string')\n ? document.querySelector(selector)\n : selector;\n return el || def;\n };\n\n let el = getEl(element);\n\n if (!el || el.style.display === 'none' || el.style.visibility === 'hidden') {\n el = this.getEl('fakeStep') ? this.getEl('fakeStep') : this.mountFakeStepEl();\n }\n\n return el;\n }\n\n scrollParentsToStepEl() {\n const { scrollPadding = this.options.scrollPadding } = this.currentStep;\n return this.scrollParentsToEl(this.getStepEl(this.currentStep), scrollPadding);\n }\n\n getScrollableParentsEls(el) {\n const parents = [];\n let htmlEl = el;\n\n while (htmlEl && htmlEl !== htmlEl.ownerDocument.body) {\n htmlEl = this.getScrollableParentEl(htmlEl);\n parents.push(htmlEl);\n }\n\n return parents;\n }\n\n getScrollableParentEl(el) {\n const regex = /(auto|scroll)/;\n const elStyle = getComputedStyle(el);\n const elDocument = el.ownerDocument;\n\n const getClosestScrollableParent = (parent) => {\n if (!parent || parent === elDocument.body) {\n return elDocument.body;\n }\n\n const parentStyle = getComputedStyle(parent);\n\n if (elStyle.getPropertyValue('position') === 'fixed'\n && parentStyle.getPropertyValue('position') === 'static') {\n return getClosestScrollableParent(parent.parentElement);\n }\n\n const overflowX = parentStyle.getPropertyValue('overflow-x');\n const overflowY = parentStyle.getPropertyValue('overflow-y');\n\n if (regex.test(overflowX) || regex.test(overflowY)) {\n return parent;\n }\n\n return getClosestScrollableParent(parent.parentElement);\n };\n\n return (elStyle.getPropertyValue('position') === 'fixed')\n ? elDocument.body\n : getClosestScrollableParent(el.parentElement);\n }\n\n scrollParentsToEl(el, scrollPadding = 0) {\n // get all scrollable parents\n const parents = this.getScrollableParentsEls(el);\n\n parents.forEach((parent) => {\n if (parent !== document.body) {\n // eslint-disable-next-line no-param-reassign\n parent.scrollTop = el.offsetTop - parent.offsetTop - scrollPadding;\n // eslint-disable-next-line no-param-reassign\n parent.scrollLeft = el.offsetLeft - parent.offsetLeft - scrollPadding;\n }\n });\n\n return this;\n }\n\n scrollTo(el, behavior = 'auto', scrollPadding = 0) {\n const { top, bottom, left, right } = el.getBoundingClientRect();\n const { innerWidth, innerHeight } = window;\n\n if (!(left >= 0 && right <= innerWidth)) {\n window.scrollBy({ behavior, left: left - scrollPadding });\n }\n\n if (!(top >= 0 && bottom <= innerHeight)) {\n window.scrollBy({ behavior, top: top - scrollPadding });\n }\n\n return this;\n }\n\n highlightStepEl(animation = false) {\n const el = this.getStepEl(this.currentStep);\n\n const overlay = this.getEl('overlay');\n\n if (overlay) {\n const path = overlay.querySelector('path');\n const animate = path.querySelector('animate');\n\n const isCurrentElFake = this.isEl(el, 'fakeStep');\n\n const to = (isCurrentElFake)\n ? this.getOverlayDocumentPath()\n : this.getOverlayStepPath(this.currentStep);\n\n path.setAttribute('d', to);\n\n if (animate) {\n const lock = animate.getAttribute('lock');\n\n if (!lock) {\n animate.setAttribute('from', to);\n animate.setAttribute('to', to);\n }\n\n if (animation) {\n const isFromElFake = this.isEl(this.getStepEl(this.fromStep), 'fakeStep');\n\n const from = (this.fromStep && !isFromElFake && !isCurrentElFake)\n ? this.getOverlayStepPath(this.fromStep)\n : null;\n\n if (from) {\n animate.setAttribute('from', from);\n animate.setAttribute('to', to);\n }\n\n animate.setAttribute('lock', 'true');\n }\n\n animate.onend = () => {\n animate.removeAttribute('lock');\n };\n\n animate.beginElement();\n }\n }\n\n const elStyle = getComputedStyle(el);\n\n if (!['absolute', 'relative', 'fixed'].includes(elStyle.getPropertyValue('position'))) {\n el.classList.add(this.constructor.getRelativePositionClass());\n }\n\n el.classList.add(this.constructor.getHighlightClass());\n\n el.setAttribute(`data-guidechimp-${this.uid}`, 'highlight');\n this.elements.set('highlight', el);\n\n return this;\n }\n\n resetHighlightStepEl() {\n const overlay = this.getEl('overlay');\n\n if (overlay) {\n const path = overlay.querySelector('path');\n const animate = overlay.querySelector('animate');\n\n path.setAttribute('d', this.getOverlayDocumentPath());\n\n if (animate) {\n animate.removeAttribute('from');\n animate.removeAttribute('to');\n }\n }\n\n const el = this.getStepEl(this.currentStep);\n\n el.classList.remove(this.constructor.getRelativePositionClass());\n el.classList.remove(this.constructor.getHighlightClass());\n\n el.removeAttribute(`data-guidechimp-${this.uid}`);\n this.elements.delete('highlight');\n\n return this;\n }\n\n setInteractionPosition(interactionEl) {\n const el = this.getStepEl(this.currentStep);\n\n if (!interactionEl || !el) {\n return this;\n }\n\n let { padding } = this.options;\n\n const elStyle = getComputedStyle(el);\n\n if (elStyle.getPropertyValue('position') === 'floating') {\n padding = 0;\n }\n\n const { width, height, top, left } = this.constructor.getOffset(el);\n\n interactionEl.classList.toggle(this.constructor.getFixedClass(), this.constructor.isFixed(el));\n\n const { style } = interactionEl;\n\n // set new position\n style.cssText = `width: ${width + padding}px;\n height: ${height + padding}px;\n top: ${top - (padding / 2)}px;\n left: ${left - (padding / 2)}px;`;\n\n return this;\n }\n\n setControlPosition(controlEl) {\n const el = this.getStepEl(this.currentStep);\n\n if (!controlEl || !el) {\n return this;\n }\n\n let { padding } = this.options;\n\n const elStyle = getComputedStyle(el);\n\n if (elStyle.getPropertyValue('position') === 'floating') {\n padding = 0;\n }\n\n const { pageXOffset } = el.ownerDocument.defaultView;\n const { width: docElWidth } = el.ownerDocument.documentElement.getBoundingClientRect();\n const { height: elHeight, top: elTop, left: elLeft, right: elRight } = this.constructor.getOffset(el);\n\n const height = elHeight + padding;\n const top = elTop - (padding / 2);\n const left = (pageXOffset < pageXOffset + (elLeft - (padding / 2))) ? pageXOffset : (elLeft - (padding / 2));\n const width = (pageXOffset + docElWidth > pageXOffset + (elRight + (padding / 2)))\n ? docElWidth\n : (elRight + (padding / 2));\n\n controlEl.classList.toggle(this.constructor.getFixedClass(), this.constructor.isFixed(el));\n\n const { style } = controlEl;\n\n // set new position\n style.cssText = `width: ${width}px;\n height: ${height}px;\n top: ${top}px;\n left: ${left}px;`;\n\n return this;\n }\n\n setTooltipPosition(tooltipEl, options = {}) {\n if (!this.currentStep) {\n return this;\n }\n\n const el = this.getStepEl(this.currentStep);\n\n if (!tooltipEl || !el) {\n return this;\n }\n\n let { boundary, position: pos } = options;\n let { padding } = this.options;\n\n boundary = boundary || window;\n\n pos = pos || this.currentStep.position;\n pos = pos || this.options.position;\n\n let [position, alignment] = pos.split('-');\n\n const elStyle = getComputedStyle(el);\n\n if (elStyle.getPropertyValue('position') === 'floating') {\n padding = 0;\n }\n\n const { style: tooltipStyle } = tooltipEl;\n\n // reset tooltip styles\n tooltipStyle.top = null;\n tooltipStyle.right = null;\n tooltipStyle.bottom = null;\n tooltipStyle.left = null;\n tooltipStyle.transform = null;\n\n const {\n top: elTop,\n bottom: elBottom,\n left: elLeft,\n right: elRight,\n width: elWidth,\n height: elHeight,\n } = el.getBoundingClientRect();\n\n const { height: tooltipHeight, width: tooltipWith } = tooltipEl.getBoundingClientRect();\n\n // find out min tooltip width\n const cloneTooltip = tooltipEl.cloneNode(true);\n cloneTooltip.style.visibility = 'hidden';\n cloneTooltip.innerHTML = '';\n\n tooltipEl.parentElement.appendChild(cloneTooltip);\n\n const { width: minTooltipWidth } = cloneTooltip.getBoundingClientRect();\n\n cloneTooltip.parentElement.removeChild(cloneTooltip);\n\n let boundaryRect = new DOMRect(0, 0, window.innerWidth, window.innerHeight);\n\n if (!(boundary instanceof Window)) {\n const { x, y } = boundary.getBoundingClientRect();\n boundaryRect = new DOMRect(x, y, boundary.scrollWidth, boundary.scrollHeight);\n }\n\n const {\n top: boundaryTop,\n bottom: boundaryBottom,\n left: boundaryLeft,\n right: boundaryRight,\n } = boundaryRect;\n\n // if the element is default element, skip position and alignment calculation\n if (this.isEl(el, 'fakeStep')) {\n position = 'floating';\n } else {\n // calculate position\n const positions = ['bottom', 'right', 'left', 'top'];\n\n let {\n marginTop: tooltipMarginTop,\n marginLeft: tooltipMarginLeft,\n marginRight: tooltipMarginRight,\n marginBottom: tooltipMarginBottom,\n } = getComputedStyle(tooltipEl);\n\n tooltipMarginTop = parseInt(tooltipMarginTop, 10);\n tooltipMarginLeft = parseInt(tooltipMarginLeft, 10);\n tooltipMarginRight = parseInt(tooltipMarginRight, 10);\n tooltipMarginBottom = parseInt(tooltipMarginBottom, 10);\n\n // check if the tooltip can be placed on top\n if (tooltipHeight + tooltipMarginTop + tooltipMarginBottom > (elTop - boundaryTop)) {\n positions.splice(positions.indexOf('top'), 1);\n }\n\n // check if the tooltip can be placed on bottom\n if (tooltipHeight + tooltipMarginTop + tooltipMarginBottom > boundaryBottom - elBottom) {\n positions.splice(positions.indexOf('bottom'), 1);\n }\n\n // check if the tooltip can be placed on left\n if (minTooltipWidth + tooltipMarginLeft + tooltipMarginRight > elLeft - boundaryLeft) {\n positions.splice(positions.indexOf('left'), 1);\n }\n\n // check if the tooltip can be placed on right\n if (minTooltipWidth + tooltipMarginLeft + tooltipMarginRight > boundaryRight - elRight) {\n positions.splice(positions.indexOf('right'), 1);\n }\n\n if (positions.length) {\n position = positions.includes(position) ? position : positions[0];\n } else {\n position = 'floating';\n }\n\n if (position === 'top' || position === 'bottom') {\n const alignments = ['left', 'right', 'middle'];\n\n // valid left space must be at least tooltip width\n if (boundaryRight - elLeft < minTooltipWidth) {\n alignments.splice(alignments.indexOf('left'), 1);\n }\n\n // valid right space must be at least tooltip width\n if (elRight - boundaryLeft < minTooltipWidth) {\n alignments.splice(alignments.indexOf('right'), 1);\n }\n\n // valid middle space must be at least half width from both sides\n if (((elLeft + (elWidth / 2)) - boundaryLeft) < (minTooltipWidth / 2)\n || (boundaryRight - (elRight - (elWidth / 2))) < (minTooltipWidth / 2)) {\n alignments.splice(alignments.indexOf('middle'), 1);\n }\n\n if (alignments.length) {\n alignment = alignments.includes(alignment) ? alignment : alignments[0];\n } else {\n alignment = 'middle';\n }\n }\n }\n\n tooltipEl.setAttribute('data-guidechimp-position', position);\n\n const root = document.documentElement;\n\n switch (position) {\n case 'top':\n tooltipStyle.bottom = `${elHeight + padding}px`;\n break;\n case 'right':\n tooltipStyle.left = `${(elRight + (padding / 2)) - root.clientLeft}px`;\n break;\n case 'left':\n tooltipStyle.right = `${root.clientWidth - (elLeft - (padding / 2))}px`;\n break;\n case 'bottom':\n tooltipStyle.top = `${elHeight + padding}px`;\n break;\n default: {\n tooltipStyle.left = '50%';\n tooltipStyle.top = '50%';\n tooltipStyle.transform = 'translate(-50%,-50%)';\n }\n }\n\n tooltipEl.removeAttribute('data-guidechimp-alignment');\n\n if (alignment) {\n tooltipEl.setAttribute('data-guidechimp-alignment', alignment);\n\n switch (alignment) {\n case 'left': {\n tooltipStyle.left = `${elLeft - (padding / 2)}px`;\n break;\n }\n case 'right': {\n tooltipStyle.right = `${root.clientWidth - elRight - (padding / 2)}px`;\n break;\n }\n default: {\n if ((elLeft + (elWidth / 2)) < (tooltipWith / 2)\n || (elLeft + (elWidth / 2) + (tooltipWith / 2)) > root.clientWidth) {\n tooltipStyle.left = `${((root.clientWidth) / 2) - (tooltipWith / 2)}px`;\n } else {\n tooltipStyle.left = `${elLeft + (elWidth / 2) - (tooltipWith / 2)}px`;\n }\n }\n }\n }\n\n return this;\n }\n\n startPreloader() {\n document.body.classList.add(this.constructor.getLoadingClass());\n\n const overlay = this.getEl('overlay');\n\n if (overlay) {\n const path = overlay.querySelector('path');\n const animate = overlay.querySelector('animate');\n\n const preloaderCache = new Map();\n preloaderCache.set('d', path.getAttribute('d'));\n\n path.setAttribute('d', this.getOverlayDocumentPath());\n\n if (animate) {\n preloaderCache.set('from', animate.getAttribute('from'));\n preloaderCache.set('to', animate.getAttribute('to'));\n\n animate.removeAttribute('from');\n animate.removeAttribute('to');\n }\n\n this.cache.set('preloaderCache', preloaderCache);\n }\n\n const preloader = this.mountPreloaderEl();\n preloader.hidden = true;\n\n setTimeout(() => {\n preloader.hidden = false;\n }, 100);\n\n return this;\n }\n\n stopPreloader() {\n document.body.classList.remove(this.constructor.getLoadingClass());\n\n const overlay = this.getEl('overlay');\n\n if (overlay) {\n const path = overlay.querySelector('path');\n const animate = overlay.querySelector('animate');\n\n const preloaderCache = this.cache.get('preloaderCache') || new Map();\n\n if (preloaderCache.has('d')) {\n path.setAttribute('d', preloaderCache.get('d'));\n }\n\n if (animate) {\n if (preloaderCache.has('from')) {\n animate.setAttribute('from', preloaderCache.get('from'));\n }\n\n if (preloaderCache.has('to')) {\n animate.setAttribute('to', preloaderCache.get('to'));\n }\n }\n\n this.cache.delete('preloaderCache');\n }\n\n this.removePreloaderEl();\n return this;\n }\n\n getDefaultTmplData() {\n return {\n previousStep: this.previousStep,\n currentStep: this.currentStep,\n nextStep: this.nextStep,\n fromStep: this.fromStep,\n toStep: this.toStep,\n\n previousStepIndex: this.previousStepIndex,\n currentStepIndex: this.currentStepIndex,\n nextStepIndex: this.nextStepIndex,\n fromStepIndex: this.fromStepIndex,\n toStepIndex: this.toStepIndex,\n\n steps: this.steps,\n\n go: (...args) => this.go(...args),\n previous: (...args) => this.previous(...args),\n next: (...args) => this.next(...args),\n stop: (...args) => this.stop(...args),\n };\n }\n\n mountStep() {\n const interactionEl = this.mountInteractionEl();\n const controlEl = this.mountControlEl();\n\n this.setInteractionPosition(interactionEl);\n this.setControlPosition(controlEl);\n this.setTooltipPosition(this.getEl('tooltip'));\n\n this.observeStep();\n\n this.highlightStepEl(true);\n\n return this;\n }\n\n unmountStep() {\n this.resetHighlightStepEl();\n\n this.removeInteractionEl();\n this.removeControlEl();\n this.removePreloaderEl();\n this.removeFakeStepEl();\n\n return this;\n }\n\n createEl(name, tmpl, data = {}) {\n const el = domTemplate(tmpl, data);\n\n if (el) {\n el.setAttribute(`data-quidechimp-${this.uid}`, name);\n }\n\n return el;\n }\n\n getEl(key, def = null) {\n let el = this.elements.get(key);\n\n if (!el) {\n el = document.querySelector(`[data-quidechimp-${this.uid}=\"${key}\"]`);\n }\n\n return el || def;\n }\n\n mountEl(el, parent) {\n if (el) {\n const els = el.querySelectorAll(`[data-quidechimp-${this.uid}]`);\n\n [el, ...els].forEach((v) => {\n const key = v.getAttribute(`data-quidechimp-${this.uid}`);\n if (key) {\n this.removeEl(key);\n this.elements.set(key, v);\n }\n });\n\n parent.appendChild(el);\n }\n\n return el;\n }\n\n removeEl(key) {\n const el = this.getEl(key);\n\n if (el) {\n el.parentElement.removeChild(el);\n }\n\n this.elements.delete(key);\n\n return this;\n }\n\n isEl(el, key) {\n return (this.getEl(key))\n ? el === this.getEl(key)\n : el.getAttribute(`data-quidechimp-${this.uid}`) === key;\n }\n\n getFakeStepTmpl() {\n return fakeStepTmpl;\n }\n\n createFakeStepEl(data = {}) {\n return this.createEl('fakeStep', this.getFakeStepTmpl(), { ...this.getDefaultTmplData(), ...data });\n }\n\n mountFakeStepEl(data = {}) {\n return this.mountEl(this.createFakeStepEl(data), document.body);\n }\n\n removeFakeStepEl() {\n return this.removeEl('fakeStep');\n }\n\n getPreloaderTmpl() {\n return preloaderTmpl;\n }\n\n createPreloaderEl(data = {}) {\n return this.createEl('preloader', this.getPreloaderTmpl(), data);\n }\n\n mountPreloaderEl(data = {}) {\n return this.mountEl(this.createPreloaderEl(data), document.body);\n }\n\n removePreloaderEl() {\n return this.removeEl('preloader');\n }\n\n getOverlayDocumentPath() {\n const { innerWidth, innerHeight } = window;\n const { body: { scrollWidth, scrollHeight } } = document;\n\n const width = (innerWidth > scrollWidth) ? innerWidth : scrollWidth;\n const height = (innerHeight > scrollHeight) ? innerHeight : scrollHeight;\n\n return `M 0 0 H ${width} V ${height} H 0 V 0 Z`;\n }\n\n getOverlayStepPath(step) {\n return this.getOverlayElPath(this.getStepEl(step));\n }\n\n getOverlayElPath(el) {\n let { padding } = this.options;\n padding = (padding) ? padding / 2 : 0;\n\n const { left, top, width, height } = el.getBoundingClientRect();\n const r = 4;\n\n let path = this.getOverlayDocumentPath();\n\n path += `M ${left - padding + r} ${top - padding}\n a ${r},${r} 0 0 0 -${r},${r}\n V ${height + top + padding - r}\n a ${r},${r} 0 0 0 ${r},${r}\n H ${width + left + padding - r}\n a ${r},${r} 0 0 0 ${r},-${r}\n V ${top - padding + r}\n a ${r},${r} 0 0 0 -${r},-${r}Z`;\n\n return path;\n }\n\n getOverlayTmpl() {\n return overlayTmpl;\n }\n\n createOverlayEl(data = {}) {\n const defaults = {\n stop: async (...args) => {\n if (this.options.exitOverlay) {\n await this.stop(...args);\n }\n },\n path: this.getOverlayDocumentPath(),\n };\n\n return this.createEl('overlay', this.getOverlayTmpl(), { ...defaults, ...data });\n }\n\n mountOverlayEl(data = {}) {\n return this.mountEl(this.createOverlayEl(data), document.body);\n }\n\n removeOverlayEl() {\n return this.removeEl('overlay');\n }\n\n getInteractionTmpl() {\n return interactionTmpl;\n }\n\n createInteractionEl(data = {}) {\n let { interaction } = this.options;\n\n if (typeof this.currentStep.interaction === 'boolean') {\n interaction = this.currentStep.interaction;\n }\n\n const defaults = {\n ...this.getDefaultTmplData(),\n interaction,\n };\n\n return this.createEl('interaction', this.getInteractionTmpl(), { ...defaults, ...data });\n }\n\n mountInteractionEl(data = {}) {\n return this.mountEl(this.createInteractionEl(data), document.body);\n }\n\n removeInteractionEl() {\n return this.removeEl('interaction');\n }\n\n getControlTmpl() {\n return controlTmpl;\n }\n\n createControlEl(data = {}) {\n return this.createEl(\n 'control',\n this.getControlTmpl(),\n { ...this.getDefaultTmplData(), tooltipEl: this.createTooltipEl(data), ...data },\n );\n }\n\n mountControlEl(data = {}) {\n return this.mountEl(this.createControlEl(data), document.body);\n }\n\n removeControlEl() {\n return this.removeEl('control');\n }\n\n getTooltipTmpl() {\n return tooltipTmpl;\n }\n\n createTooltipEl(data = {}) {\n const defaults = {\n ...this.getDefaultTmplData(),\n progressbar: this.createProgressbarEl(data),\n title: this.createTitleEl(data),\n description: this.createDescriptionEl(data),\n close: this.createCloseEl(data),\n customButtons: this.createCustomButtonsEl(data),\n previous: this.createPreviousEl(data),\n pagination: this.createPaginationEl(data),\n next: this.createNextEl(data),\n copyright: this.createCopyrightEl(data),\n notification: this.createNotificationEl(data),\n };\n\n return this.createEl('tooltip', this.getTooltipTmpl(), { ...defaults, ...data });\n }\n\n getCloseTmpl() {\n return closeTmpl;\n }\n\n createCloseEl(data = {}) {\n return this.createEl('close', this.getCloseTmpl(), { ...this.getDefaultTmplData(), ...data });\n }\n\n getProgressbarTmpl() {\n return progressbarTmpl;\n }\n\n createProgressbarEl(data = {}) {\n let { showProgressbar } = this.options;\n\n if (typeof this.currentStep.showProgressbar === 'boolean') {\n showProgressbar = this.currentStep.showProgressbar;\n }\n\n const progressMax = 100;\n const progressMin = 0;\n const progress = ((this.currentStepIndex + 1) / this.steps.length) * 100;\n\n const defaults = {\n ...this.getDefaultTmplData(),\n showProgressbar,\n progressMax,\n progressMin,\n progress,\n };\n\n return this.createEl('progressbar', this.getProgressbarTmpl(), { ...defaults, ...data });\n }\n\n getTitleTmpl() {\n return titleTmpl;\n }\n\n createTitleEl(data = {}) {\n const { title = '' } = this.currentStep;\n return this.createEl('title', this.getTitleTmpl(), { ...this.getDefaultTmplData(), title, ...data });\n }\n\n getDescriptionTmpl() {\n return descriptionTmpl;\n }\n\n createDescriptionEl(data = {}) {\n const { description = '' } = this.currentStep;\n\n return this.createEl(\n 'description',\n this.getDescriptionTmpl(),\n { ...this.getDefaultTmplData(), description, ...data },\n );\n }\n\n getCustomButtonsTmpl() {\n return customButtonsTmpl;\n }\n\n createCustomButtonsEl(data = {}) {\n const buttons = [];\n\n if (this.currentStep.buttons) {\n this.currentStep.buttons.forEach((button) => {\n let buttonEl = button;\n\n if (!isHtmlElement(buttonEl)) {\n const { onClick, tagName = 'button', title = '', class: className } = button;\n\n buttonEl = document.createElement(tagName);\n buttonEl.innerHTML = title;\n\n if (className) {\n buttonEl.className = className;\n }\n\n if (onClick) {\n buttonEl.addEventListener('click', (e) => {\n onClick.call(this, e);\n });\n }\n }\n\n buttons.push(buttonEl);\n });\n }\n\n return this.createEl(\n 'customButtons',\n this.getCustomButtonsTmpl(),\n { ...this.getDefaultTmplData(), buttons, ...data },\n );\n }\n\n getPaginationTmpl() {\n return paginationTmpl;\n }\n\n createPaginationEl(data = {}) {\n const {\n paginationTheme = this.options.paginationTheme,\n paginationCirclesMaxItems = this.options.paginationCirclesMaxItems,\n } = this.currentStep;\n\n let { showPagination } = this.options;\n\n if (typeof this.currentStep.showPagination === 'boolean') {\n showPagination = this.currentStep.showPagination;\n }\n\n return this.createEl(\n 'pagination',\n this.getPaginationTmpl(),\n {\n ...this.getDefaultTmplData(),\n showPagination,\n paginationTheme,\n paginationCirclesMaxItems,\n ...data,\n },\n );\n }\n\n getPreviousTmpl() {\n return previousTmpl;\n }\n\n createPreviousEl(data = {}) {\n let { showNavigation } = this.options;\n\n if (typeof this.currentStep.showNavigation === 'boolean') {\n showNavigation = this.currentStep.showNavigation;\n }\n\n return this.createEl(\n 'previous',\n this.getPreviousTmpl(),\n { ...this.getDefaultTmplData(), showNavigation, ...data },\n );\n }\n\n getNextTmpl() {\n return nextTmpl;\n }\n\n createNextEl(data = {}) {\n let { showNavigation } = this.options;\n\n if (typeof this.currentStep.showNavigation === 'boolean') {\n showNavigation = this.currentStep.showNavigation;\n }\n\n return this.createEl(\n 'next',\n this.getNextTmpl(),\n { ...this.getDefaultTmplData(), showNavigation, ...data },\n );\n }\n\n getCopyrightTmpl() {\n return copyrightTmpl;\n }\n\n createCopyrightEl(data = {}) {\n return this.createEl('copyright', this.getCopyrightTmpl(), { ...this.getDefaultTmplData(), ...data });\n }\n\n getNotificationTmpl() {\n return notificationTmpl;\n }\n\n createNotificationEl(data = {}) {\n return this.createEl(\n 'notification',\n this.getNotificationTmpl(),\n { ...this.getDefaultTmplData(), messages: this.notifications, ...data },\n );\n }\n\n notify(message) {\n this.notifications.push(message);\n\n const notificationEl = this.getEl('notification');\n\n if (notificationEl) {\n this.mountEl(this.createNotificationEl(), notificationEl.parentElement);\n }\n\n return this;\n }\n\n /**\n * Register an event listener for a tour event.\n *\n * Event names can be comma-separated to register multiple events.\n *\n * @param {string} event The name of the event to listen for.\n * @param {function} listener The event listener, accepts context.\n * @param {object} options Listener options\n * @return {this}\n */\n on(event, listener, options = {}) {\n // priorities from low to high\n const priorities = this.constructor.getEventListenersPriorities();\n\n let [priority] = priorities;\n\n if (options.priority && priorities.includes(options.priority)) {\n priority = options.priority;\n }\n\n const e = event.trim();\n\n this.listeners[e] = this.listeners[e] || {};\n this.listeners[e][priority] = this.listeners[e][priority] || [];\n this.listeners[e][priority].push(listener);\n\n return this;\n }\n\n /**\n * Emits an event by name to all registered listeners on that event.\n * Listeners will be called in the order that they were added. If a listener\n * returns `false`, no other listeners will be called.\n *\n * @param {string} event The name of the event to emit.\n * @param args The context args of the event, passed to listeners.\n * @returns {Promise}\n */\n emit(event, ...args) {\n // from high to low\n const priorities = [...this.constructor.getEventListenersPriorities()].reverse();\n\n const e = event.trim();\n\n let result = [];\n let promise = Promise.resolve(result);\n\n if (this.listeners[e]) {\n priorities.forEach((priority) => {\n const { [priority]: listeners } = this.listeners[e];\n\n if (listeners) {\n promise = promise\n .then(() => Promise.all(\n listeners.map((f) => Promise.resolve().then(() => f.apply(this, args))),\n ))\n .then((r) => {\n result = [...result, ...r];\n return result;\n });\n }\n });\n }\n\n return promise;\n }\n\n /**\n * Add keydown event listener\n * @return {this}\n */\n addOnKeydownListener() {\n // turn on keyboard navigation\n this.cache.set('onKeydownListener', this.getOnKeydownListener());\n window.addEventListener('keydown', this.cache.get('onKeydownListener'), true);\n\n return this;\n }\n\n /**\n * Return on key down event listener function\n * @returns {function}\n */\n getOnKeydownListener() {\n return (event) => {\n const { keyCode } = event;\n\n const { previous: previousCodes, next: nextCodes, stop: stopCodes } = {\n ...this.constructor.getDefaultKeyboardCodes(),\n ...this.options.useKeyboard,\n };\n\n // stop tour\n if (stopCodes && stopCodes.includes(keyCode)) {\n this.stop({ event });\n return;\n }\n\n // go to the previous step\n if (previousCodes && previousCodes.includes(keyCode)) {\n this.previous({ event });\n return;\n }\n\n // go to the next step\n if (nextCodes && nextCodes.includes(keyCode)) {\n this.next({ event });\n }\n };\n }\n\n /**\n * Remove keydown event listener\n * @return {this}\n */\n removeOnKeydownListener() {\n if (this.cache.has('onKeydownListener')) {\n window.removeEventListener('keydown', this.cache.get('onKeydownListener'), true);\n this.cache.delete('onKeydownListener');\n }\n\n return this;\n }\n\n /**\n * Add window resize event listener\n * @return {this}\n */\n addOnWindowResizeListener() {\n // turn on keyboard navigation\n this.cache.set('onWindowResizeListener', this.getOnWindowResizeListener());\n window.addEventListener('resize', this.cache.get('onWindowResizeListener'), true);\n\n return this;\n }\n\n /**\n * Return on window resize event listener function\n * @returns {function}\n */\n getOnWindowResizeListener() {\n return () => this.refresh();\n }\n\n /**\n * Remove window resize event listener\n * @return {this}\n */\n removeOnWindowResizeListener() {\n if (this.cache.has('onWindowResizeListener')) {\n window.removeEventListener('resize', this.cache.get('onWindowResizeListener'), true);\n this.cache.delete('onWindowResizeListener');\n }\n\n return this;\n }\n\n /**\n * Add window scroll event listener\n * @returns {GuideChimp}\n */\n addOnWindowScrollListener() {\n this.cache.set('onWindowScrollListener', this.getOnWindowScrollListener());\n window.addEventListener('scroll', this.cache.get('onWindowScrollListener'), true);\n\n return this;\n }\n\n /**\n * Return on window scroll event listener function\n * @returns {function}\n */\n getOnWindowScrollListener() {\n return () => this.refresh();\n }\n\n /**\n * Remove window resize event listener\n * @return {this}\n */\n removeOnWindowScrollListener() {\n if (this.cache.has('onWindowScrollListener')) {\n window.removeEventListener('scroll', this.cache.get('onWindowScrollListener'), true);\n this.cache.delete('onWindowScrollListener');\n }\n\n return this;\n }\n\n removeListeners() {\n this.removeOnKeydownListener();\n this.removeOnWindowResizeListener();\n this.removeOnWindowScrollListener();\n }\n\n observeStep() {\n this.observeResizing();\n this.observeMutation();\n }\n\n observeResizing(options = { box: 'border-box' }) {\n let { resizingObserver: observer } = this.observers;\n\n if (!observer && typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n if (!this && !this.currentStep) {\n return;\n }\n this.refresh();\n });\n\n this.observers.resizingObserver = observer;\n }\n\n if (observer) {\n // observe elements\n observer.observe(this.getStepEl(this.currentStep), options);\n return true;\n }\n\n return false;\n }\n\n unobserveResizing() {\n const { resizingObserver: observer } = this.observers;\n\n if (observer) {\n observer.disconnect();\n return true;\n }\n\n return false;\n }\n\n observeMutation() {\n let { mutationObserver: observer } = this.observers;\n\n if (!observer) {\n observer = new MutationObserver((mutations) => {\n if (!this && !this.currentStep) {\n return;\n }\n\n const { element } = this.currentStep;\n\n if (!element) {\n return;\n }\n\n let el = this.getStepEl(this.currentStep);\n\n const isElExists = () => el && !this.isEl(el, 'fakeStep');\n\n mutations.forEach((record) => {\n if (isElExists()) {\n if (record.type === 'childList' && record.removedNodes.length) {\n record.removedNodes.forEach((node) => {\n if (node === el || node.contains(el)) {\n el = this.getStepEl(this.currentStep);\n this.scrollParentsToStepEl();\n this.refresh();\n }\n });\n }\n } else if (record.type === 'childList' && record.addedNodes.length) {\n el = this.getStepEl(this.currentStep);\n\n if (isElExists()) {\n this.scrollParentsToStepEl();\n this.refresh();\n }\n }\n });\n });\n\n this.observers.mutationObserver = observer;\n }\n\n observer.observe(this.getStepEl(this.currentStep).ownerDocument.body, {\n childList: true,\n subtree: true,\n });\n\n return true;\n }\n\n unobserveMutation() {\n const { mutationObserver: observer } = this.observers;\n\n if (observer) {\n observer.disconnect();\n return true;\n }\n\n return false;\n }\n\n unobserveStep() {\n this.unobserveResizing();\n this.unobserveMutation();\n }\n\n beforeChangeStep() {\n this.unmountStep();\n this.unobserveStep();\n }\n\n /**\n * Refresh layers position\n * @returns {this}\n */\n refresh() {\n if (!this.currentStep) {\n return this;\n }\n\n this.highlightStepEl();\n\n this.setControlPosition(this.getEl('control'));\n this.setInteractionPosition(this.getEl('interaction'));\n this.setTooltipPosition(this.getEl('tooltip'));\n\n return this;\n }\n}","// Module\nvar code = \"<div class=\\\"gc-fake-step\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-preloader\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-overlay\\\" @click=\\\"stop({ event: $event })\\\"> <svg class=\\\"svg-overlay\\\"> <path d=\\\"{{path}}\\\"> <animate attributeName=\\\"d\\\" dur=\\\"200ms\\\"/> </path> </svg> </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"!interaction\\\" class=\\\"gc-interaction gc-disable\\\"> </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-control\\\"> {{ tooltipEl }} </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-tooltip\\\"> <div class=\\\"gc-tooltip-tail\\\"></div> {{ progressbar }} {{ title }} {{ description }} {{ close }} {{ customButtons }} <div if=\\\"previous || pagination || next\\\" class=\\\"gc-navigation\\\"> {{ previous }} {{ pagination }} {{ next }} </div> {{ copyright }} {{ notification }} </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-close\\\" @click=\\\"stop({ event: $event })\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"showProgressbar\\\" class=\\\"gc-progressbar\\\" role=\\\"progressbar\\\" aria-valuemin=\\\"{{ progressMin }}\\\" aria-valuemax=\\\"{{ progressMax }}\\\" aria-valuenow=\\\"{{ progress }}\\\" style=\\\"width:{{ progress }}%;\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"title\\\" html=\\\"{{ title }}\\\" class=\\\"gc-title\\\"> </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"description\\\" html=\\\"{{ description }}\\\" class=\\\"gc-description\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"buttons.length\\\" class=\\\"gc-custom-buttons\\\"> <template for=\\\"button in buttons\\\"> {{ button }} </template> </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"showPagination && steps.length > 1\\\" class=\\\"gc-pagination\\\"> <template if=\\\"paginationTheme === 'numbers' || steps.length >= paginationCirclesMaxItems\\\"> <ul class=\\\"gc-pagination-theme-numbers\\\"> <template for=\\\"(step, index) in steps\\\"> <template if=\\\"index === 0\\\"> <li if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"> {{ index + 1 }} </li> <li else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> </template> <template if=\\\"currentStepIndex < 3\\\"> <template if=\\\"index > 0 && index < 5\\\"> <li if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"> {{ index + 1 }} </li> <li else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> </template> <li elseif=\\\"index === 5 && index !== steps.length - 1\\\" class=\\\"gc-pagination-dots\\\"> ... </li> </template> <template elseif=\\\"steps.length - currentStepIndex < 5\\\"> <template if=\\\"steps.length - index < 6 && steps.length - 1 !== index\\\"> <li if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"> {{ index + 1 }} </li> <li else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> </template> <li elseif=\\\"steps.length - index === 6 && index !== 0\\\" class=\\\"gc-pagination-dots\\\"> ... </li> </template> <template else> <li if=\\\"currentStepIndex - index === 3 && index !== 0\\\" class=\\\"gc-pagination-dots\\\"> ... </li> <template elseif=\\\"(currentStepIndex - index >= 0 && currentStepIndex - index < 3)\\n || ( index - currentStepIndex >= 0 && index - currentStepIndex < 3)\\\"> <li if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"> {{ index + 1 }} </li> <li else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> </template> <li elseif=\\\"index - currentStepIndex === 3 && steps.length -1 !== index\\\" class=\\\"gc-pagination-dots\\\"> ... </li> </template> <template if=\\\"index + 1 === steps.length\\\"> <li if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"> {{ index + 1 }} </li> <li else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> </template> </template> </ul> </template> <template else> <div class=\\\"gc-pagination-theme-circles\\\"> <template for=\\\"(step, index) in steps\\\"> <div if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\"></div> <div elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"></div> <div elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"></div> <div else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"></div> </template> </div> </template> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-navigation-prev {{ (!previousStep || !showNavigation) ? 'gc-hidden': '' }}\\\" @click=\\\"previous({ event: $event })\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-navigation-next {{ (!nextStep || !showNavigation) ? 'gc-hidden': '' }}\\\" @click=\\\"next({ event: $event })\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-copyright\\\">Made with AHD.JS</div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div html=\\\"{{ messages[0] }}\\\" class=\\\"gc-notification\\\"></div>\";\n// Exports\nexport default code;","import GuideChimp from \"./GuideChimp\";\n//import Beacons from \"./plugins/beacons\";\nimport \"./index.scss\";\n// import Information from \"./plugins/information\";\n// import Beacons from \"./plugins/beacons\";\n// class AHDjs {\n// private guideChimp: any;\n// private appId: string;\n// private contextToursMapData: any;\n// constructor(applicationId: any, tour: any, options: any) {\n// this.appId = applicationId;\n// //@ts-ignore\n// this.guideChimp = new GuideChimp(tour, options);\n\n// this.guideChimp.prototype = GuideChimp.prototype;\n// this.guideChimp.plugins = new Set();\n\n// //@ts-ignore\n// // this.guideChimp.extend = (plugin, ...args) => {\n// // if (!this.guideChimp.plugins.has(plugin)) {\n// // this.guideChimp.plugins.add(plugin);\n// // plugin(GuideChimp, this.guideChimp, ...args);\n// // }\n// // return this.guideChimp;\n// // };\n\n// // test beacon extension\n// // @ts-ignore\n// const pluginsToLoad = [Beacons, Information];\n// pluginsToLoad.forEach((pluginClass) => {\n// const plugin = pluginClass;\n// if (!this.guideChimp.plugins.has(plugin)) {\n// this.guideChimp.plugins.add(plugin);\n// // @ts-ignore\n// plugin(GuideChimp, this.guideChimp, tour, options);\n// }\n// });\n// }\n\n// updatePageUrl = async (url: string, refetch: boolean) => {\n// await this.stop();\n// // todo: local caching and use https://github.com/pillarjs/path-to-regexp to find exact match\n// const respons: any = await fetch(\n// `https://ahd-be-jggub5n6qq-em.a.run.app/api/tenant/${this.appId}/contexttour?filter[isActive]=true`\n// ).then((res) => res.json());\n\n// this.contextToursMapData = respons.rows;\n// //if there is anything to open onload\n// const onboardTour = respons.rows\n// .filter((row: any) => !!row.content)\n// .map((row: any) => {\n// return {\n// element: row.selector,\n// title: row.content.title,\n// description: row.content.content,\n// tour: [\n// {\n// title: \"Multi Feature\",\n// description: \"Multi Feature beacon clicked.\",\n// },\n// ],\n// };\n// });\n// this.setTour(onboardTour);\n// this.start();\n// };\n\n// setTour = (tour: any) => {\n// this.guideChimp.setTour(tour);\n// };\n// beacons = (...args: any) => {\n// // @ts-ignore\n// // this.guideChimp.beacon = new Beacons(...args);\n\n// const tourBeacons = this.contextToursMapData\n// .filter((row: any) => !!row.content)\n// .map((row: any) => {\n// return {\n// element: row.selector,\n// title: row.content.title,\n// description: row.content.content,\n// tour: [\n// {\n// title: \"BC Multi Feature\",\n// description: \"BC Multi Feature beacon clicked.\",\n// },\n// {\n// title: \"B2C Multi Feature\",\n// description: \"B2C Multi Feature beacon clicked.\",\n// },\n// ],\n// };\n// });\n\n// const b = this.guideChimp.beacons(tourBeacons);\n// setTimeout(() => {\n// b.showAll();\n// }, 1000);\n// };\n// start = (...args: any) => {\n// this.guideChimp.start(...args);\n// };\n// stop = async (...args: any) => {\n// await this.guideChimp.stop(...args);\n// };\n// showInformation = (...args: any) => {\n// // @ts-ignore\n// // this.guideChimp.beacon = new Beacons(...args);\n// const b = this.guideChimp.information(...args);\n// setTimeout(() => {\n// b.showAll();\n// }, 1000);\n// };\n// // guideChimp.prototype = GuideChimp.prototype;\n// // guideChimp.plugins = new Set();\n\n// // guideChimp.extend = (plugin, ...args) => {\n// // if (!guideChimp.plugins.has(plugin)) {\n// // guideChimp.plugins.add(plugin);\n// // plugin(GuideChimp, guideChimp, ...args);\n// // }\n// // return guideChimp;\n// // };\n\n// // module.exports = guideChimp;\n// }\n\nclass AHDjs {\n private guideChimp;\n constructor(...args: any) {\n // @ts-ignore\n this.guideChimp = new GuideChimp(...args);\n }\n public start(...args: any) {\n this.guideChimp.start(...args);\n }\n}\nexport default AHDjs;\n"],"names":["root","factory","exports","module","define","amd","self","Symbol","array","iteratee","index","length","result","Array","getRawTag","objectToString","symToStringTag","toStringTag","undefined","value","Object","arrayMap","isArray","isSymbol","symbolProto","prototype","symbolToString","toString","baseToString","call","freeGlobal","g","objectProto","hasOwnProperty","nativeObjectToString","isOwn","tag","unmasked","e","freeSelf","Function","baseGetTag","isObjectLike","idCounter","prefix","id","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","defineProperty","enumerable","get","globalThis","this","window","obj","prop","r","el","HTMLElement","test","SVGElement","tpl","data","parser","DOMParser","template","replace","sourceDoc","parseFromString","renderedDoc","document","implementation","createHTMLDocument","pattern","eventPattern","ifEnded","Map","render","node","replacements","parent","body","handler","keys","values","getValue","nodeType","Node","ELEMENT_NODE","hasAttribute","set","parentNode","getAttribute","forPieces","split","firstPiece","secondPiece","removeAttribute","param","trim","source","isSourceArray","forEach","k","parseInt","ownerDocument","tagName","cloneNode","append","attributes","attr","name","eventMatch","exec","eventName","addEventListener","match","rValue","slice","replacement","_isUndefined","_isNull","console","error","substr","innerHTML","includes","setAttribute","TEXT_NODE","nodeValue","createTextNode","isHtmlElement","isSvgElement","isNodeList","v","childNodes","firstElementChild","GuideChimp","tour","options","_uniqueId","configurable","writable","setDefaults","cache","listeners","observers","setOptions","setTour","notifications","elements","init","previousStep","currentStep","nextStep","fromStep","toStep","previousStepIndex","currentStepIndex","nextStepIndex","fromStepIndex","toStepIndex","steps","isDisplayed","constructor","getDefaultOptions","number","useIndex","mountOverlayEl","startPreloader","args","emit","stopPreloader","removeOverlayEl","sortSteps","getSteps","classList","add","getBodyClass","go","isStarted","toggle","useKeyboard","addOnKeydownListener","addOnWindowResizeListener","addOnWindowScrollListener","stepNumber","step","filter","indexOf","onBeforeChange","onAfterChange","abort","Promise","resolve","then","some","beforeChangeStep","scrollBehavior","scrollPadding","scrollParentsToStepEl","scrollTo","getStepEl","mountStep","setTimeout","getEl","onPrevious","onNext","remove","removeListeners","unobserveStep","unmountStep","clear","getDataSteps","getJsSteps","dataPrefix","tourStepsEl","from","querySelectorAll","dataTourRegExp","RegExp","dataGlobalRegExp","map","i","stepAttrs","j","attrName","attrValue","isTourAttr","isGlobalAttr","attrShortName","title","description","position","interaction","element","sort","b","mountFakeStepEl","selector","def","querySelector","style","display","visibility","scrollParentsToEl","parents","htmlEl","getScrollableParentEl","push","regex","elStyle","getComputedStyle","elDocument","getPropertyValue","getClosestScrollableParent","parentStyle","parentElement","overflowX","overflowY","getScrollableParentsEls","scrollTop","offsetTop","scrollLeft","offsetLeft","behavior","getBoundingClientRect","top","bottom","left","right","innerWidth","innerHeight","scrollBy","animation","overlay","path","animate","isCurrentElFake","isEl","to","getOverlayDocumentPath","getOverlayStepPath","lock","isFromElFake","onend","beginElement","getRelativePositionClass","getHighlightClass","uid","interactionEl","padding","getOffset","width","height","getFixedClass","isFixed","cssText","controlEl","pageXOffset","defaultView","docElWidth","documentElement","elHeight","elTop","elLeft","elRight","tooltipEl","boundary","pos","alignment","tooltipStyle","transform","elBottom","elWidth","tooltipHeight","tooltipWith","cloneTooltip","appendChild","minTooltipWidth","removeChild","boundaryRect","DOMRect","Window","x","y","scrollWidth","scrollHeight","boundaryTop","boundaryBottom","boundaryLeft","boundaryRight","positions","tooltipMarginTop","marginTop","tooltipMarginLeft","marginLeft","tooltipMarginRight","marginRight","tooltipMarginBottom","marginBottom","splice","alignments","clientLeft","clientWidth","getLoadingClass","preloaderCache","preloader","mountPreloaderEl","hidden","has","removePreloaderEl","previous","next","stop","mountInteractionEl","mountControlEl","setInteractionPosition","setControlPosition","setTooltipPosition","observeStep","highlightStepEl","resetHighlightStepEl","removeInteractionEl","removeControlEl","removeFakeStepEl","tmpl","domTemplate","els","removeEl","createEl","getFakeStepTmpl","getDefaultTmplData","mountEl","createFakeStepEl","getPreloaderTmpl","createPreloaderEl","getOverlayElPath","defaults","exitOverlay","getOverlayTmpl","createOverlayEl","getInteractionTmpl","createInteractionEl","getControlTmpl","createTooltipEl","createControlEl","progressbar","createProgressbarEl","createTitleEl","createDescriptionEl","close","createCloseEl","customButtons","createCustomButtonsEl","createPreviousEl","pagination","createPaginationEl","createNextEl","copyright","createCopyrightEl","notification","createNotificationEl","getTooltipTmpl","getCloseTmpl","showProgressbar","progressMax","progressMin","progress","getProgressbarTmpl","getTitleTmpl","getDescriptionTmpl","buttons","button","buttonEl","onClick","className","createElement","getCustomButtonsTmpl","paginationTheme","paginationCirclesMaxItems","showPagination","getPaginationTmpl","showNavigation","getPreviousTmpl","getNextTmpl","getCopyrightTmpl","getNotificationTmpl","messages","message","notificationEl","event","listener","priorities","getEventListenersPriorities","priority","reverse","promise","all","f","apply","getOnKeydownListener","keyCode","getDefaultKeyboardCodes","previousCodes","nextCodes","stopCodes","removeEventListener","getOnWindowResizeListener","refresh","getOnWindowScrollListener","removeOnKeydownListener","removeOnWindowResizeListener","removeOnWindowScrollListener","observeResizing","observeMutation","box","observer","resizingObserver","ResizeObserver","observe","disconnect","mutationObserver","MutationObserver","mutations","isElExists","record","type","removedNodes","contains","addedNodes","childList","subtree","unobserveResizing","unobserveMutation","exitEscape","view","pageYOffset","nodeName","guideChimp","start"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"index.js","mappings":";;;;;;;;;;;CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAe,MAAID,IAEnBD,EAAY,MAAIC,GACjB,CATD,CASGK,MAAM,IACT,M,qBCVA,IAGIC,EAHO,EAAQ,KAGDA,OAElBJ,EAAOD,QAAUK,C,UCejBJ,EAAOD,QAXP,SAAkBM,EAAOC,GAKvB,IAJA,IAAIC,GAAS,EACTC,EAAkB,MAATH,EAAgB,EAAIA,EAAMG,OACnCC,EAASC,MAAMF,KAEVD,EAAQC,GACfC,EAAOF,GAASD,EAASD,EAAME,GAAQA,EAAOF,GAEhD,OAAOI,CACT,C,gBClBA,IAAIL,EAAS,EAAQ,KACjBO,EAAY,EAAQ,KACpBC,EAAiB,EAAQ,KAOzBC,EAAiBT,EAASA,EAAOU,iBAAcC,EAkBnDf,EAAOD,QATP,SAAoBiB,GAClB,OAAa,MAATA,OACeD,IAAVC,EAdQ,qBADL,gBAiBJH,GAAkBA,KAAkBI,OAAOD,GAC/CL,EAAUK,GACVJ,EAAeI,EACrB,C,gBCzBA,IAAIZ,EAAS,EAAQ,KACjBc,EAAW,EAAQ,KACnBC,EAAU,EAAQ,KAClBC,EAAW,EAAQ,KAMnBC,EAAcjB,EAASA,EAAOkB,eAAYP,EAC1CQ,EAAiBF,EAAcA,EAAYG,cAAWT,EA0B1Df,EAAOD,QAhBP,SAAS0B,EAAaT,GAEp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AqDA,EAAGgD,cAAhDxB,EAAI,EAAJA,KAAM6N,EAAe,EAAfA,gBAA8B8K,EAAI,EAAjBhL,YACzBvC,EAAYuN,EAAKC,aAAe/K,EAAgBzC,WAAapL,EAAKoL,UAClEE,EAAaqN,EAAKjL,aAAeG,EAAgBvC,YAActL,EAAKsL,WAC1E,EAA0D9M,EAAGiN,wBAArDC,EAAG,EAAHA,IAAKG,EAAK,EAALA,MAAOF,EAAM,EAANA,OAAQC,EAAI,EAAJA,KAC5B,MAAO,CAAEC,MAAAA,EAAOF,OAAAA,EAAQyB,MADe,EAALA,MACHC,OADgB,EAANA,OACF8B,EADW,EAADA,EACPC,EADW,EAADA,EACP1D,IAAKA,EAAMN,EAAWQ,KAAMA,EAAON,EACpF,GAEA,qBAKA,SAAe9M,GACX,IAAQkC,EAAelC,EAAfkC,WAER,SAAKA,GAAsC,SAAxBA,EAAWmY,YAMe,UAF7BlO,iBAAiBnM,GAErBqM,iBAAiB,aAItB1M,KAAKoP,QAAQ7M,GACxB,IA1KJ,iFA0KK,EAvI0B,G,yjBiByH/B,IAAMoY,EAAQ,WAAH,2BAAOrT,EAAI,yBAAJA,EAAI,yBAASjC,EAAciC,EAAI,EAEjDqT,EAAMjd,UAAY2H,EAAW3H,UAC7Bid,EAAMC,QAAU,IAAIC,IAEpBF,EAAMG,OAAS,SAACC,GACd,IAAKJ,EAAMC,QAAQlI,IAAIqI,GAAS,CAC9BJ,EAAMC,QAAQ/S,IAAIkT,GAAQ,2BAFHzT,EAAI,iCAAJA,EAAI,kBAG3ByT,EAAM,cAAC1V,EAAYsV,GAAK,OAAKrT,GAC/B,CACA,OAAOqT,CACT,EAEA,S,Q3ChKA","sources":["webpack://AHDjs/webpack/universalModuleDefinition","webpack://AHDjs/./node_modules/lodash/_Symbol.js","webpack://AHDjs/./node_modules/lodash/_arrayMap.js","webpack://AHDjs/./node_modules/lodash/_baseGetTag.js","webpack://AHDjs/./node_modules/lodash/_baseToString.js","webpack://AHDjs/./node_modules/lodash/_freeGlobal.js","webpack://AHDjs/./node_modules/lodash/_getRawTag.js","webpack://AHDjs/./node_modules/lodash/_objectToString.js","webpack://AHDjs/./node_modules/lodash/_root.js","webpack://AHDjs/./node_modules/lodash/isArray.js","webpack://AHDjs/./node_modules/lodash/isNull.js","webpack://AHDjs/./node_modules/lodash/isObjectLike.js","webpack://AHDjs/./node_modules/lodash/isSymbol.js","webpack://AHDjs/./node_modules/lodash/isUndefined.js","webpack://AHDjs/./node_modules/lodash/toString.js","webpack://AHDjs/./node_modules/lodash/uniqueId.js","webpack://AHDjs/webpack/bootstrap","webpack://AHDjs/webpack/runtime/compat get default export","webpack://AHDjs/webpack/runtime/define property getters","webpack://AHDjs/webpack/runtime/global","webpack://AHDjs/webpack/runtime/hasOwnProperty shorthand","webpack://AHDjs/webpack/runtime/make namespace object","webpack://AHDjs/./src/lib/utils/isHtmlElement.js","webpack://AHDjs/./src/lib/utils/isSvgElement.js","webpack://AHDjs/./src/lib/utils/isNodeList.js","webpack://AHDjs/./src/lib/utils/domTemplate.js","webpack://AHDjs/./src/lib/GuideChimp.js","webpack://AHDjs/./src/lib/templates/fake-step.html","webpack://AHDjs/./src/lib/templates/preloader.html","webpack://AHDjs/./src/lib/templates/overlay.html","webpack://AHDjs/./src/lib/templates/interaction.html","webpack://AHDjs/./src/lib/templates/control.html","webpack://AHDjs/./src/lib/templates/tooltip.html","webpack://AHDjs/./src/lib/templates/close.html","webpack://AHDjs/./src/lib/templates/progressbar.html","webpack://AHDjs/./src/lib/templates/title.html","webpack://AHDjs/./src/lib/templates/description.html","webpack://AHDjs/./src/lib/templates/custom-buttons.html","webpack://AHDjs/./src/lib/templates/pagination.html","webpack://AHDjs/./src/lib/templates/previous.html","webpack://AHDjs/./src/lib/templates/next.html","webpack://AHDjs/./src/lib/templates/copyright.html","webpack://AHDjs/./src/lib/templates/notification.html","webpack://AHDjs/./src/lib/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"AHDjs\"] = factory();\n\telse\n\t\troot[\"AHDjs\"] = factory();\n})(self, () => {\nreturn ","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/**\n * Checks if `value` is `null`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\n * @example\n *\n * _.isNull(null);\n * // => true\n *\n * _.isNull(void 0);\n * // => false\n */\nfunction isNull(value) {\n return value === null;\n}\n\nmodule.exports = isNull;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","/**\n * Checks if `value` is `undefined`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\n * @example\n *\n * _.isUndefined(void 0);\n * // => true\n *\n * _.isUndefined(null);\n * // => false\n */\nfunction isUndefined(value) {\n return value === undefined;\n}\n\nmodule.exports = isUndefined;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var toString = require('./toString');\n\n/** Used to generate unique IDs. */\nvar idCounter = 0;\n\n/**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\nfunction uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n}\n\nmodule.exports = uniqueId;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export default (el) => (el instanceof HTMLElement || /^\\[object HTML(.+)Element\\]$/.test(`${el}`));\r\n","export default (el) => (el instanceof SVGElement || /^\\[object SVG(.+)Element\\]$/.test(`${el}`));\r\n","export default (el) => /^[object NodeList]$/.test(`${el}`);\n","/**\r\n * Lodash\r\n * @see https://lodash.com/docs\r\n */\r\nimport _isUndefined from 'lodash/isUndefined';\r\nimport _isNull from 'lodash/isNull';\r\n\r\n// utils\r\nimport isHtmlElement from './isHtmlElement';\r\nimport isSvgElement from './isSvgElement';\r\nimport isNodeList from './isNodeList';\r\n\r\nexport default (tpl, data = {}) => {\r\n const parser = new DOMParser();\r\n\r\n let template = tpl.replace(/<template/g, '<gc-template');\r\n template = template.replace(/<\\/template/g, '</gc-template');\r\n\r\n const sourceDoc = parser.parseFromString(template, 'text/html');\r\n const renderedDoc = document.implementation.createHTMLDocument();\r\n\r\n const pattern = /{{([^}}]+)?}}/gm;\r\n const eventPattern = /^@(.+)$/;\r\n\r\n const ifEnded = new Map();\r\n\r\n const render = (node, replacements = {}, parent = renderedDoc.body) => {\r\n let handler = parent;\r\n\r\n const keys = Object.keys(replacements);\r\n const values = Object.values(replacements);\r\n\r\n // eslint-disable-next-line no-new-func\r\n const getValue = (key) => (new Function(...keys, `return ${key};`))(...values);\r\n\r\n if (node) {\r\n if (node.nodeType === Node.ELEMENT_NODE) {\r\n if (node.hasAttribute('if')) {\r\n ifEnded.set(node.parentNode, false);\r\n\r\n if (!getValue(node.getAttribute('if'))) {\r\n return;\r\n }\r\n\r\n ifEnded.set(node.parentNode, true);\r\n }\r\n\r\n if (node.hasAttribute('elseif')) {\r\n if (ifEnded.get(node.parentNode) || !getValue(node.getAttribute('elseif'))) {\r\n return;\r\n }\r\n\r\n ifEnded.set(node.parentNode, true);\r\n }\r\n\r\n if (node.hasAttribute('else')) {\r\n if (ifEnded.get(node.parentNode)) {\r\n return;\r\n }\r\n\r\n ifEnded.set(node.parentNode, true);\r\n }\r\n\r\n if (node.hasAttribute('for')) {\r\n const forPieces = node.getAttribute('for').split(' in ');\r\n const [firstPiece, secondPiece] = forPieces;\r\n\r\n node.removeAttribute('for');\r\n\r\n let [param, index] = firstPiece.replace(/\\(|\\)/g, '').split(',');\r\n param = param.trim();\r\n index = (index) ? index.trim() : '';\r\n\r\n const source = getValue(secondPiece.trim());\r\n\r\n const isSourceArray = Array.isArray(source);\r\n\r\n Object.keys(source).forEach((k) => {\r\n const r = { ...replacements, [param]: source[k] };\r\n\r\n if (index) {\r\n r[index] = (isSourceArray) ? parseInt(k, 10) : k;\r\n }\r\n\r\n render(node, r, handler);\r\n });\r\n\r\n return;\r\n }\r\n\r\n if (node !== node.ownerDocument.body && node.tagName !== 'GC-TEMPLATE') {\r\n handler = node.cloneNode();\r\n parent.append(handler);\r\n }\r\n\r\n [...node.attributes].forEach((attr) => {\r\n const { name, value } = attr;\r\n\r\n const eventMatch = eventPattern.exec(name);\r\n\r\n if (eventMatch) {\r\n const [, eventName] = eventMatch;\r\n\r\n // eslint-disable-next-line no-new-func\r\n handler.addEventListener(eventName, (e) => new Function(\r\n ...[...keys, '$event'],\r\n `return ${value}${(/\\(.+\\)/.test(value)) ? '' : '()'};`,\r\n )(...[...values, e]));\r\n\r\n handler.removeAttribute(name);\r\n\r\n return;\r\n }\r\n\r\n let match = pattern.exec(value);\r\n let index = 0;\r\n let rValue = '';\r\n\r\n while (match) {\r\n rValue += value.slice(index, match.index);\r\n\r\n let [replacement, key] = match;\r\n key = key.trim();\r\n\r\n try {\r\n replacement = getValue(key);\r\n\r\n if (_isUndefined(replacement) || _isNull(replacement)) {\r\n replacement = '';\r\n }\r\n } catch (e) {\r\n // eslint-disable-next-line no-console\r\n console.error(e);\r\n }\r\n\r\n rValue += replacement;\r\n\r\n index = match.index + match[0].length;\r\n match = pattern.exec(value);\r\n }\r\n\r\n rValue += value.substr(index, value.length - index);\r\n\r\n if (name === 'html') {\r\n handler.innerHTML = rValue;\r\n handler.removeAttribute(name);\r\n } else if (['if', 'else', 'elseif'].includes(name)) {\r\n handler.removeAttribute(name);\r\n } else {\r\n handler.setAttribute(name, rValue);\r\n }\r\n });\r\n } else if (node.nodeType === Node.TEXT_NODE) {\r\n let match = pattern.exec(node.nodeValue);\r\n\r\n if (match) {\r\n let index = 0;\r\n while (match) {\r\n handler.append(document.createTextNode(node.nodeValue.slice(index, match.index)));\r\n\r\n let [replacement, key] = match;\r\n key = key.trim();\r\n\r\n try {\r\n replacement = getValue(key);\r\n\r\n if (_isUndefined(replacement) || _isNull(replacement)) {\r\n replacement = '';\r\n }\r\n } catch (e) {\r\n // eslint-disable-next-line no-console\r\n console.error(e);\r\n }\r\n\r\n if (isHtmlElement(replacement) || isSvgElement(replacement)) {\r\n handler.append(replacement);\r\n } else if (isNodeList(replacement)) {\r\n replacement.forEach((v) => {\r\n handler.append(v);\r\n });\r\n } else {\r\n handler.append(document.createTextNode(replacement));\r\n }\r\n\r\n index = match.index + match[0].length;\r\n match = pattern.exec(node.nodeValue);\r\n }\r\n\r\n handler.append(document.createTextNode(node.nodeValue.slice(index, node.nodeValue.length)));\r\n } else {\r\n handler.append(node.cloneNode());\r\n }\r\n }\r\n\r\n const { childNodes = [] } = node;\r\n\r\n if (childNodes.length) {\r\n childNodes.forEach((v) => {\r\n render(v, replacements, handler);\r\n });\r\n }\r\n }\r\n };\r\n\r\n render(sourceDoc.body, data, renderedDoc.body);\r\n\r\n return renderedDoc.body.firstElementChild;\r\n};\r\n","/* eslint-disable class-methods-use-this */\n/**\n * Copyright (C) 2020 Labs64 GmbH\n *\n * This source code is licensed under the European Union Public License, version 1.2\n * located in the LICENSE file\n */\n\n/**\n * Lodash functions\n * @see https://lodash.com/docs\n */\nimport _uniqueId from 'lodash/uniqueId';\n\n// utils\nimport domTemplate from './utils/domTemplate';\nimport isHtmlElement from './utils/isHtmlElement';\n\n// templates\nimport overlayTmpl from './templates/overlay.html';\nimport preloaderTmpl from './templates/preloader.html';\nimport interactionTmpl from './templates/interaction.html';\nimport controlTmpl from './templates/control.html';\nimport tooltipTmpl from './templates/tooltip.html';\nimport progressbarTmpl from './templates/progressbar.html';\nimport titleTmpl from './templates/title.html';\nimport descriptionTmpl from './templates/description.html';\nimport customButtonsTmpl from './templates/custom-buttons.html';\nimport previousTmpl from './templates/previous.html';\nimport paginationTmpl from './templates/pagination.html';\nimport nextTmpl from './templates/next.html';\nimport closeTmpl from './templates/close.html';\nimport copyrightTmpl from './templates/copyright.html';\nimport notificationTmpl from './templates/notification.html';\nimport fakeStepTmpl from './templates/fake-step.html';\n\nexport default class GuideChimp {\n /**\n * GuideChimp constructor\n * @param tour\n * @param options\n */\n constructor(tour, options = {}) {\n Object.defineProperty(this, 'uid', {\n value: _uniqueId(),\n enumerable: false,\n configurable: false,\n writable: false,\n });\n\n this.setDefaults();\n\n this.cache = new Map();\n\n this.listeners = {};\n\n this.observers = {};\n\n this.options = {};\n this.setOptions(options);\n\n this.tour = null;\n this.setTour(tour);\n\n this.notifications = [];\n\n this.elements = new Map();\n\n this.init();\n }\n\n /**\n * Called after construction, this hook allows you to add some extra setup\n * logic without having to override the constructor.\n */\n init() {\n\n }\n\n /**\n * Default options\n * @return {Object}\n */\n static getDefaultOptions() {\n return {\n position: 'bottom',\n useKeyboard: true,\n exitEscape: true,\n exitOverlay: true,\n showPagination: true,\n showNavigation: true,\n showProgressbar: true,\n paginationTheme: 'circles',\n paginationCirclesMaxItems: 10,\n interaction: true,\n padding: 8,\n scrollPadding: 10,\n scrollBehavior: 'auto',\n };\n }\n\n static getDefaultKeyboardCodes() {\n const escCode = 27;\n const arrowLeftCode = 37;\n const arrowRightCode = 39;\n const enterCode = 13;\n const spaceCode = 32;\n\n return {\n previous: [arrowLeftCode],\n next: [arrowRightCode, enterCode, spaceCode],\n stop: [escCode],\n };\n }\n\n static getEventListenersPriorities() {\n return ['low', 'medium', 'high', 'critical'];\n }\n\n static getBodyClass() {\n return 'gc';\n }\n\n static getLoadingClass() {\n return 'gc-loading';\n }\n\n static getHighlightClass() {\n return 'gc-highlight';\n }\n\n static getFixedClass() {\n return 'gc-fixed';\n }\n\n static getRelativePositionClass() {\n return 'gc-relative';\n }\n\n /**\n * Get element offset\n * @param el\n * @return {{top: number, left: number, width: number, height: number}}\n */\n static getOffset(el) {\n const { body, documentElement, defaultView: view } = el.ownerDocument;\n const scrollTop = view.pageYOffset || documentElement.scrollTop || body.scrollTop;\n const scrollLeft = view.pageXOffset || documentElement.scrollLeft || body.scrollLeft;\n const { top, right, bottom, left, width, height, x, y } = el.getBoundingClientRect();\n return { right, bottom, width, height, x, y, top: top + scrollTop, left: left + scrollLeft };\n }\n\n /**\n * Check if el or his parent has fixed position\n * @param el\n * @return {boolean}\n */\n static isFixed(el) {\n const { parentNode } = el;\n\n if (!parentNode || parentNode.nodeName === 'HTML') {\n return false;\n }\n\n const elStyle = getComputedStyle(el);\n\n if (elStyle.getPropertyValue('position') === 'fixed') {\n return true;\n }\n\n return this.isFixed(parentNode);\n }\n\n setDefaults() {\n this.previousStep = null;\n this.currentStep = null;\n this.nextStep = null;\n this.fromStep = null;\n this.toStep = null;\n\n this.previousStepIndex = -1;\n this.currentStepIndex = -1;\n this.nextStepIndex = -1;\n this.fromStepIndex = -1;\n this.toStepIndex = -1;\n\n this.steps = [];\n\n this.isDisplayed = false;\n\n return this;\n }\n\n /**\n * Set tour name or steps\n * @param tour\n * @return {this}\n */\n setTour(tour) {\n this.tour = tour;\n return this;\n }\n\n /**\n * Get tour name or steps\n */\n getTour() {\n return this.tour;\n }\n\n /**\n * Set tour options\n * @param options\n * @return {this}\n */\n setOptions(options) {\n this.options = { ...this.constructor.getDefaultOptions(), ...options };\n return this;\n }\n\n /**\n * Get tour options\n */\n getOptions() {\n return this.options;\n }\n\n /**\n * Start tour\n * @param number step number or it index\n * @param useIndex whether to use step number or index\n * @return {Promise<boolean>}\n */\n async start(number = 0, useIndex = true, ...args) {\n this.isDisplayed = true;\n\n this.mountOverlayEl();\n\n this.startPreloader();\n\n // emit start event\n await this.emit('onStart', ...args);\n\n this.stopPreloader();\n\n if (!this.tour || !this.tour.length) {\n this.removeOverlayEl();\n this.isDisplayed = false;\n return false;\n }\n\n this.steps = this.sortSteps(this.getSteps(this.tour));\n\n if (!this.steps.length) {\n this.removeOverlayEl();\n this.isDisplayed = false;\n return false;\n }\n\n // add a class that increase the specificity of the classes\n document.body.classList.add(this.constructor.getBodyClass());\n\n const isStarted = await this.go(number, useIndex, ...args);\n\n this.isDisplayed = isStarted;\n\n document.body.classList.toggle(this.constructor.getBodyClass(), isStarted);\n\n if (isStarted) {\n // turn on keyboard navigation\n if (this.options.useKeyboard) {\n this.addOnKeydownListener();\n }\n\n // on window resize\n this.addOnWindowResizeListener();\n\n // on window scroll\n this.addOnWindowScrollListener();\n }\n\n return isStarted;\n }\n\n /**\n * Go to step\n * @param number step number or it index\n * @param useIndex whether to use step number or index\n * @param args\n * @return {Promise<boolean>}\n */\n async go(number, useIndex = true, ...args) {\n if (!this.isDisplayed || !this.steps.length) {\n return false;\n }\n\n const stepNumber = (useIndex) ? parseInt(number, 10) : number;\n\n if (this.currentStep) {\n // skip if this step is already displayed\n const isSameStep = (useIndex)\n ? (this.currentStepIndex === stepNumber)\n : (this.currentStep.step === stepNumber);\n\n if (isSameStep) {\n return false;\n }\n }\n\n const fromStep = this.currentStep;\n const fromStepIndex = this.currentStepIndex;\n\n const currentStep = (useIndex)\n ? this.steps[stepNumber]\n : this.steps.filter(({ step }) => step === stepNumber)[0];\n\n if (!currentStep) {\n return false;\n }\n\n const currentStepIndex = this.steps.indexOf(currentStep);\n\n const toStep = currentStep;\n const toStepIndex = currentStepIndex;\n\n const { onBeforeChange, onAfterChange } = toStep;\n\n this.startPreloader();\n\n let abort = false;\n\n if (onBeforeChange) {\n if (await Promise.resolve().then(() => onBeforeChange.call(this, toStep, fromStep, ...args)) === false) {\n abort = true;\n }\n }\n\n if ((await this.emit('onBeforeChange', toStep, fromStep, ...args)).some((r) => r === false)) {\n abort = true;\n }\n\n this.stopPreloader();\n\n if (abort) {\n return false;\n }\n\n this.beforeChangeStep({ toStep, toStepIndex, currentStep, currentStepIndex, fromStep, fromStepIndex });\n\n this.toStep = toStep;\n this.toStepIndex = toStepIndex;\n\n this.currentStep = currentStep;\n this.currentStepIndex = currentStepIndex;\n\n this.fromStep = fromStep;\n this.fromStepIndex = fromStepIndex;\n\n this.previousStep = this.steps[this.currentStepIndex - 1] || null;\n this.previousStepIndex = (this.previousStep) ? this.currentStepIndex - 1 : -1;\n\n this.nextStep = this.steps[this.currentStepIndex + 1] || null;\n this.nextStepIndex = (this.nextStep) ? this.currentStepIndex + 1 : -1;\n\n const { scrollBehavior } = this.options;\n const { scrollPadding = this.options.scrollPadding } = this.currentStep;\n\n // scroll to element\n this.scrollParentsToStepEl();\n this.scrollTo(this.getStepEl(this.currentStep, true), scrollBehavior, scrollPadding);\n\n this.mountStep();\n\n setTimeout(() => {\n if (this.getEl('tooltip')) {\n this.scrollTo(this.getEl('tooltip'), scrollBehavior, scrollPadding);\n }\n }, 300);\n\n if (onAfterChange) {\n onAfterChange.call(this, this.toStep, this.fromStep, ...args);\n }\n\n this.emit('onAfterChange', this.toStep, this.fromStep, ...args);\n\n return true;\n }\n\n async previous(...args) {\n if (!this.isDisplayed || !this.currentStep || !this.previousStep) {\n return false;\n }\n\n const { onPrevious } = this.currentStep;\n\n this.startPreloader();\n\n if (onPrevious) {\n if (await Promise.resolve()\n .then(() => onPrevious.call(this, this.previousStep, this.currentStep, ...args)) === false) {\n this.stopPreloader();\n return false;\n }\n }\n\n if ((await this.emit('onPrevious', this.previousStep, this.currentStep, ...args)).some((r) => r === false)) {\n this.stopPreloader();\n return false;\n }\n\n this.stopPreloader();\n\n return this.go(this.previousStepIndex, true, ...args);\n }\n\n async next(...args) {\n if (!this.isDisplayed || !this.currentStep || !this.nextStep) {\n return false;\n }\n\n const { onNext } = this.currentStep;\n\n this.startPreloader();\n\n if (onNext) {\n if (await Promise.resolve()\n .then(() => onNext.call(this, this.nextStep, this.currentStep, ...args)) === false) {\n this.stopPreloader();\n return false;\n }\n }\n\n if ((await this.emit('onNext', this.nextStep, this.currentStep, ...args)).some((r) => r === false)) {\n this.stopPreloader();\n return false;\n }\n\n this.stopPreloader();\n\n return this.go(this.nextStepIndex, true, ...args);\n }\n\n async stop(...args) {\n if (!this.isDisplayed) {\n return this;\n }\n\n if (this.currentStepIndex === this.steps.length - 1) {\n this.startPreloader();\n await this.emit('onComplete', ...args);\n this.stopPreloader();\n }\n\n this.startPreloader();\n\n // emit stop event\n await this.emit('onStop', ...args);\n\n this.stopPreloader();\n\n // remove the class that increase the specificity of the classes\n document.body.classList.remove(this.constructor.getBodyClass());\n\n // remove events listeners\n this.removeListeners();\n\n // disconnect observers\n this.unobserveStep();\n\n // remove all layers and keys\n this.unmountStep();\n\n // remove overlay\n this.removeOverlayEl();\n\n this.cache.clear();\n this.elements.clear();\n\n // set step variables to defaults\n this.setDefaults();\n\n return this;\n }\n\n getSteps(tour) {\n if (!tour || !tour.length) {\n return [];\n }\n\n return (typeof tour === 'string')\n ? this.getDataSteps(tour)\n : this.getJsSteps(tour);\n }\n\n getDataSteps(tour) {\n const dataPrefix = 'data-guidechimp';\n let tourStepsEl = Array.from(document.querySelectorAll(`[${dataPrefix}-tour*='${tour}']`));\n\n // filter steps by tour name\n tourStepsEl = tourStepsEl.filter((v) => {\n const tours = v.getAttribute(`${dataPrefix}-tour`).split(',');\n return tours.includes(this.tour);\n });\n\n const dataTourRegExp = new RegExp(`^${dataPrefix}-${tour}-[^-]+$`);\n const dataGlobalRegExp = new RegExp(`^${dataPrefix}-[^-]+$`);\n\n return tourStepsEl.map((el, i) => {\n const stepAttrs = {};\n\n for (let j = 0; j < el.attributes.length; j++) {\n const { name: attrName, value: attrValue } = el.attributes[j];\n\n const isTourAttr = dataTourRegExp.test(attrName);\n const isGlobalAttr = (isTourAttr) ? false : dataGlobalRegExp.test(attrName);\n\n if (isTourAttr || isGlobalAttr) {\n const attrShortName = (isTourAttr)\n ? attrName.replace(`${dataPrefix}-${tour}-`, '')\n : attrName.replace(`${dataPrefix}-`, '');\n\n if (attrShortName !== 'tour') {\n if (isTourAttr || (isGlobalAttr && !stepAttrs[attrShortName])) {\n stepAttrs[attrShortName] = attrValue;\n }\n }\n }\n }\n\n return {\n step: i,\n title: '',\n description: '',\n position: this.options.position,\n interaction: this.options.interaction,\n ...stepAttrs,\n element: el,\n };\n });\n }\n\n getJsSteps(tour) {\n return tour.map((v, i) => ({ ...v, step: v.step || i }));\n }\n\n sortSteps(steps) {\n const copy = [...steps];\n\n return copy.sort((a, b) => {\n if (a.step < b.step) {\n return -1;\n }\n if (a.step > b.step) {\n return 1;\n }\n return 0;\n });\n }\n\n getStepEl(step) {\n const { element } = step || {};\n\n if (!element) {\n return this.mountFakeStepEl();\n }\n\n const getEl = (selector, def = null) => {\n const el = (typeof selector === 'string')\n ? document.querySelector(selector)\n : selector;\n return el || def;\n };\n\n let el = getEl(element);\n\n if (!el || el.style.display === 'none' || el.style.visibility === 'hidden') {\n el = this.getEl('fakeStep') ? this.getEl('fakeStep') : this.mountFakeStepEl();\n }\n\n return el;\n }\n\n scrollParentsToStepEl() {\n const { scrollPadding = this.options.scrollPadding } = this.currentStep;\n return this.scrollParentsToEl(this.getStepEl(this.currentStep), scrollPadding);\n }\n\n getScrollableParentsEls(el) {\n const parents = [];\n let htmlEl = el;\n\n while (htmlEl && htmlEl !== htmlEl.ownerDocument.body) {\n htmlEl = this.getScrollableParentEl(htmlEl);\n parents.push(htmlEl);\n }\n\n return parents;\n }\n\n getScrollableParentEl(el) {\n const regex = /(auto|scroll)/;\n const elStyle = getComputedStyle(el);\n const elDocument = el.ownerDocument;\n\n const getClosestScrollableParent = (parent) => {\n if (!parent || parent === elDocument.body) {\n return elDocument.body;\n }\n\n const parentStyle = getComputedStyle(parent);\n\n if (elStyle.getPropertyValue('position') === 'fixed'\n && parentStyle.getPropertyValue('position') === 'static') {\n return getClosestScrollableParent(parent.parentElement);\n }\n\n const overflowX = parentStyle.getPropertyValue('overflow-x');\n const overflowY = parentStyle.getPropertyValue('overflow-y');\n\n if (regex.test(overflowX) || regex.test(overflowY)) {\n return parent;\n }\n\n return getClosestScrollableParent(parent.parentElement);\n };\n\n return (elStyle.getPropertyValue('position') === 'fixed')\n ? elDocument.body\n : getClosestScrollableParent(el.parentElement);\n }\n\n scrollParentsToEl(el, scrollPadding = 0) {\n // get all scrollable parents\n const parents = this.getScrollableParentsEls(el);\n\n parents.forEach((parent) => {\n if (parent !== document.body) {\n // eslint-disable-next-line no-param-reassign\n parent.scrollTop = el.offsetTop - parent.offsetTop - scrollPadding;\n // eslint-disable-next-line no-param-reassign\n parent.scrollLeft = el.offsetLeft - parent.offsetLeft - scrollPadding;\n }\n });\n\n return this;\n }\n\n scrollTo(el, behavior = 'auto', scrollPadding = 0) {\n const { top, bottom, left, right } = el.getBoundingClientRect();\n const { innerWidth, innerHeight } = window;\n\n if (!(left >= 0 && right <= innerWidth)) {\n window.scrollBy({ behavior, left: left - scrollPadding });\n }\n\n if (!(top >= 0 && bottom <= innerHeight)) {\n window.scrollBy({ behavior, top: top - scrollPadding });\n }\n\n return this;\n }\n\n highlightStepEl(animation = false) {\n const el = this.getStepEl(this.currentStep);\n\n const overlay = this.getEl('overlay');\n\n if (overlay) {\n const path = overlay.querySelector('path');\n const animate = path.querySelector('animate');\n\n const isCurrentElFake = this.isEl(el, 'fakeStep');\n\n const to = (isCurrentElFake)\n ? this.getOverlayDocumentPath()\n : this.getOverlayStepPath(this.currentStep);\n\n path.setAttribute('d', to);\n\n if (animate) {\n const lock = animate.getAttribute('lock');\n\n if (!lock) {\n animate.setAttribute('from', to);\n animate.setAttribute('to', to);\n }\n\n if (animation) {\n const isFromElFake = this.isEl(this.getStepEl(this.fromStep), 'fakeStep');\n\n const from = (this.fromStep && !isFromElFake && !isCurrentElFake)\n ? this.getOverlayStepPath(this.fromStep)\n : null;\n\n if (from) {\n animate.setAttribute('from', from);\n animate.setAttribute('to', to);\n }\n\n animate.setAttribute('lock', 'true');\n }\n\n animate.onend = () => {\n animate.removeAttribute('lock');\n };\n\n animate.beginElement();\n }\n }\n\n const elStyle = getComputedStyle(el);\n\n if (!['absolute', 'relative', 'fixed'].includes(elStyle.getPropertyValue('position'))) {\n el.classList.add(this.constructor.getRelativePositionClass());\n }\n\n el.classList.add(this.constructor.getHighlightClass());\n\n el.setAttribute(`data-guidechimp-${this.uid}`, 'highlight');\n this.elements.set('highlight', el);\n\n return this;\n }\n\n resetHighlightStepEl() {\n const overlay = this.getEl('overlay');\n\n if (overlay) {\n const path = overlay.querySelector('path');\n const animate = overlay.querySelector('animate');\n\n path.setAttribute('d', this.getOverlayDocumentPath());\n\n if (animate) {\n animate.removeAttribute('from');\n animate.removeAttribute('to');\n }\n }\n\n const el = this.getStepEl(this.currentStep);\n\n el.classList.remove(this.constructor.getRelativePositionClass());\n el.classList.remove(this.constructor.getHighlightClass());\n\n el.removeAttribute(`data-guidechimp-${this.uid}`);\n this.elements.delete('highlight');\n\n return this;\n }\n\n setInteractionPosition(interactionEl) {\n const el = this.getStepEl(this.currentStep);\n\n if (!interactionEl || !el) {\n return this;\n }\n\n let { padding } = this.options;\n\n const elStyle = getComputedStyle(el);\n\n if (elStyle.getPropertyValue('position') === 'floating') {\n padding = 0;\n }\n\n const { width, height, top, left } = this.constructor.getOffset(el);\n\n interactionEl.classList.toggle(this.constructor.getFixedClass(), this.constructor.isFixed(el));\n\n const { style } = interactionEl;\n\n // set new position\n style.cssText = `width: ${width + padding}px;\n height: ${height + padding}px;\n top: ${top - (padding / 2)}px;\n left: ${left - (padding / 2)}px;`;\n\n return this;\n }\n\n setControlPosition(controlEl) {\n const el = this.getStepEl(this.currentStep);\n\n if (!controlEl || !el) {\n return this;\n }\n\n let { padding } = this.options;\n\n const elStyle = getComputedStyle(el);\n\n if (elStyle.getPropertyValue('position') === 'floating') {\n padding = 0;\n }\n\n const { pageXOffset } = el.ownerDocument.defaultView;\n const { width: docElWidth } = el.ownerDocument.documentElement.getBoundingClientRect();\n const { height: elHeight, top: elTop, left: elLeft, right: elRight } = this.constructor.getOffset(el);\n\n const height = elHeight + padding;\n const top = elTop - (padding / 2);\n const left = (pageXOffset < pageXOffset + (elLeft - (padding / 2))) ? pageXOffset : (elLeft - (padding / 2));\n const width = (pageXOffset + docElWidth > pageXOffset + (elRight + (padding / 2)))\n ? docElWidth\n : (elRight + (padding / 2));\n\n controlEl.classList.toggle(this.constructor.getFixedClass(), this.constructor.isFixed(el));\n\n const { style } = controlEl;\n\n // set new position\n style.cssText = `width: ${width}px;\n height: ${height}px;\n top: ${top}px;\n left: ${left}px;`;\n\n return this;\n }\n\n setTooltipPosition(tooltipEl, options = {}) {\n if (!this.currentStep) {\n return this;\n }\n\n const el = this.getStepEl(this.currentStep);\n\n if (!tooltipEl || !el) {\n return this;\n }\n\n let { boundary, position: pos } = options;\n let { padding } = this.options;\n\n boundary = boundary || window;\n\n pos = pos || this.currentStep.position;\n pos = pos || this.options.position;\n\n let [position, alignment] = pos.split('-');\n\n const elStyle = getComputedStyle(el);\n\n if (elStyle.getPropertyValue('position') === 'floating') {\n padding = 0;\n }\n\n const { style: tooltipStyle } = tooltipEl;\n\n // reset tooltip styles\n tooltipStyle.top = null;\n tooltipStyle.right = null;\n tooltipStyle.bottom = null;\n tooltipStyle.left = null;\n tooltipStyle.transform = null;\n\n const {\n top: elTop,\n bottom: elBottom,\n left: elLeft,\n right: elRight,\n width: elWidth,\n height: elHeight,\n } = el.getBoundingClientRect();\n\n const { height: tooltipHeight, width: tooltipWith } = tooltipEl.getBoundingClientRect();\n\n // find out min tooltip width\n const cloneTooltip = tooltipEl.cloneNode(true);\n cloneTooltip.style.visibility = 'hidden';\n cloneTooltip.innerHTML = '';\n\n tooltipEl.parentElement.appendChild(cloneTooltip);\n\n const { width: minTooltipWidth } = cloneTooltip.getBoundingClientRect();\n\n cloneTooltip.parentElement.removeChild(cloneTooltip);\n\n let boundaryRect = new DOMRect(0, 0, window.innerWidth, window.innerHeight);\n\n if (!(boundary instanceof Window)) {\n const { x, y } = boundary.getBoundingClientRect();\n boundaryRect = new DOMRect(x, y, boundary.scrollWidth, boundary.scrollHeight);\n }\n\n const {\n top: boundaryTop,\n bottom: boundaryBottom,\n left: boundaryLeft,\n right: boundaryRight,\n } = boundaryRect;\n\n // if the element is default element, skip position and alignment calculation\n if (this.isEl(el, 'fakeStep')) {\n position = 'floating';\n } else {\n // calculate position\n const positions = ['bottom', 'right', 'left', 'top'];\n\n let {\n marginTop: tooltipMarginTop,\n marginLeft: tooltipMarginLeft,\n marginRight: tooltipMarginRight,\n marginBottom: tooltipMarginBottom,\n } = getComputedStyle(tooltipEl);\n\n tooltipMarginTop = parseInt(tooltipMarginTop, 10);\n tooltipMarginLeft = parseInt(tooltipMarginLeft, 10);\n tooltipMarginRight = parseInt(tooltipMarginRight, 10);\n tooltipMarginBottom = parseInt(tooltipMarginBottom, 10);\n\n // check if the tooltip can be placed on top\n if (tooltipHeight + tooltipMarginTop + tooltipMarginBottom > (elTop - boundaryTop)) {\n positions.splice(positions.indexOf('top'), 1);\n }\n\n // check if the tooltip can be placed on bottom\n if (tooltipHeight + tooltipMarginTop + tooltipMarginBottom > boundaryBottom - elBottom) {\n positions.splice(positions.indexOf('bottom'), 1);\n }\n\n // check if the tooltip can be placed on left\n if (minTooltipWidth + tooltipMarginLeft + tooltipMarginRight > elLeft - boundaryLeft) {\n positions.splice(positions.indexOf('left'), 1);\n }\n\n // check if the tooltip can be placed on right\n if (minTooltipWidth + tooltipMarginLeft + tooltipMarginRight > boundaryRight - elRight) {\n positions.splice(positions.indexOf('right'), 1);\n }\n\n if (positions.length) {\n position = positions.includes(position) ? position : positions[0];\n } else {\n position = 'floating';\n }\n\n if (position === 'top' || position === 'bottom') {\n const alignments = ['left', 'right', 'middle'];\n\n // valid left space must be at least tooltip width\n if (boundaryRight - elLeft < minTooltipWidth) {\n alignments.splice(alignments.indexOf('left'), 1);\n }\n\n // valid right space must be at least tooltip width\n if (elRight - boundaryLeft < minTooltipWidth) {\n alignments.splice(alignments.indexOf('right'), 1);\n }\n\n // valid middle space must be at least half width from both sides\n if (((elLeft + (elWidth / 2)) - boundaryLeft) < (minTooltipWidth / 2)\n || (boundaryRight - (elRight - (elWidth / 2))) < (minTooltipWidth / 2)) {\n alignments.splice(alignments.indexOf('middle'), 1);\n }\n\n if (alignments.length) {\n alignment = alignments.includes(alignment) ? alignment : alignments[0];\n } else {\n alignment = 'middle';\n }\n }\n }\n\n tooltipEl.setAttribute('data-guidechimp-position', position);\n\n const root = document.documentElement;\n\n switch (position) {\n case 'top':\n tooltipStyle.bottom = `${elHeight + padding}px`;\n break;\n case 'right':\n tooltipStyle.left = `${(elRight + (padding / 2)) - root.clientLeft}px`;\n break;\n case 'left':\n tooltipStyle.right = `${root.clientWidth - (elLeft - (padding / 2))}px`;\n break;\n case 'bottom':\n tooltipStyle.top = `${elHeight + padding}px`;\n break;\n default: {\n tooltipStyle.left = '50%';\n tooltipStyle.top = '50%';\n tooltipStyle.transform = 'translate(-50%,-50%)';\n }\n }\n\n tooltipEl.removeAttribute('data-guidechimp-alignment');\n\n if (alignment) {\n tooltipEl.setAttribute('data-guidechimp-alignment', alignment);\n\n switch (alignment) {\n case 'left': {\n tooltipStyle.left = `${elLeft - (padding / 2)}px`;\n break;\n }\n case 'right': {\n tooltipStyle.right = `${root.clientWidth - elRight - (padding / 2)}px`;\n break;\n }\n default: {\n if ((elLeft + (elWidth / 2)) < (tooltipWith / 2)\n || (elLeft + (elWidth / 2) + (tooltipWith / 2)) > root.clientWidth) {\n tooltipStyle.left = `${((root.clientWidth) / 2) - (tooltipWith / 2)}px`;\n } else {\n tooltipStyle.left = `${elLeft + (elWidth / 2) - (tooltipWith / 2)}px`;\n }\n }\n }\n }\n\n return this;\n }\n\n startPreloader() {\n document.body.classList.add(this.constructor.getLoadingClass());\n\n const overlay = this.getEl('overlay');\n\n if (overlay) {\n const path = overlay.querySelector('path');\n const animate = overlay.querySelector('animate');\n\n const preloaderCache = new Map();\n preloaderCache.set('d', path.getAttribute('d'));\n\n path.setAttribute('d', this.getOverlayDocumentPath());\n\n if (animate) {\n preloaderCache.set('from', animate.getAttribute('from'));\n preloaderCache.set('to', animate.getAttribute('to'));\n\n animate.removeAttribute('from');\n animate.removeAttribute('to');\n }\n\n this.cache.set('preloaderCache', preloaderCache);\n }\n\n const preloader = this.mountPreloaderEl();\n preloader.hidden = true;\n\n setTimeout(() => {\n preloader.hidden = false;\n }, 100);\n\n return this;\n }\n\n stopPreloader() {\n document.body.classList.remove(this.constructor.getLoadingClass());\n\n const overlay = this.getEl('overlay');\n\n if (overlay) {\n const path = overlay.querySelector('path');\n const animate = overlay.querySelector('animate');\n\n const preloaderCache = this.cache.get('preloaderCache') || new Map();\n\n if (preloaderCache.has('d')) {\n path.setAttribute('d', preloaderCache.get('d'));\n }\n\n if (animate) {\n if (preloaderCache.has('from')) {\n animate.setAttribute('from', preloaderCache.get('from'));\n }\n\n if (preloaderCache.has('to')) {\n animate.setAttribute('to', preloaderCache.get('to'));\n }\n }\n\n this.cache.delete('preloaderCache');\n }\n\n this.removePreloaderEl();\n return this;\n }\n\n getDefaultTmplData() {\n return {\n previousStep: this.previousStep,\n currentStep: this.currentStep,\n nextStep: this.nextStep,\n fromStep: this.fromStep,\n toStep: this.toStep,\n\n previousStepIndex: this.previousStepIndex,\n currentStepIndex: this.currentStepIndex,\n nextStepIndex: this.nextStepIndex,\n fromStepIndex: this.fromStepIndex,\n toStepIndex: this.toStepIndex,\n\n steps: this.steps,\n\n go: (...args) => this.go(...args),\n previous: (...args) => this.previous(...args),\n next: (...args) => this.next(...args),\n stop: (...args) => this.stop(...args),\n };\n }\n\n mountStep() {\n const interactionEl = this.mountInteractionEl();\n const controlEl = this.mountControlEl();\n\n this.setInteractionPosition(interactionEl);\n this.setControlPosition(controlEl);\n this.setTooltipPosition(this.getEl('tooltip'));\n\n this.observeStep();\n\n this.highlightStepEl(true);\n\n return this;\n }\n\n unmountStep() {\n this.resetHighlightStepEl();\n\n this.removeInteractionEl();\n this.removeControlEl();\n this.removePreloaderEl();\n this.removeFakeStepEl();\n\n return this;\n }\n\n createEl(name, tmpl, data = {}) {\n const el = domTemplate(tmpl, data);\n\n if (el) {\n el.setAttribute(`data-quidechimp-${this.uid}`, name);\n }\n\n return el;\n }\n\n getEl(key, def = null) {\n let el = this.elements.get(key);\n\n if (!el) {\n el = document.querySelector(`[data-quidechimp-${this.uid}=\"${key}\"]`);\n }\n\n return el || def;\n }\n\n mountEl(el, parent) {\n if (el) {\n const els = el.querySelectorAll(`[data-quidechimp-${this.uid}]`);\n\n [el, ...els].forEach((v) => {\n const key = v.getAttribute(`data-quidechimp-${this.uid}`);\n if (key) {\n this.removeEl(key);\n this.elements.set(key, v);\n }\n });\n\n parent.appendChild(el);\n }\n\n return el;\n }\n\n removeEl(key) {\n const el = this.getEl(key);\n\n if (el) {\n el.parentElement.removeChild(el);\n }\n\n this.elements.delete(key);\n\n return this;\n }\n\n isEl(el, key) {\n return (this.getEl(key))\n ? el === this.getEl(key)\n : el.getAttribute(`data-quidechimp-${this.uid}`) === key;\n }\n\n getFakeStepTmpl() {\n return fakeStepTmpl;\n }\n\n createFakeStepEl(data = {}) {\n return this.createEl('fakeStep', this.getFakeStepTmpl(), { ...this.getDefaultTmplData(), ...data });\n }\n\n mountFakeStepEl(data = {}) {\n return this.mountEl(this.createFakeStepEl(data), document.body);\n }\n\n removeFakeStepEl() {\n return this.removeEl('fakeStep');\n }\n\n getPreloaderTmpl() {\n return preloaderTmpl;\n }\n\n createPreloaderEl(data = {}) {\n return this.createEl('preloader', this.getPreloaderTmpl(), data);\n }\n\n mountPreloaderEl(data = {}) {\n return this.mountEl(this.createPreloaderEl(data), document.body);\n }\n\n removePreloaderEl() {\n return this.removeEl('preloader');\n }\n\n getOverlayDocumentPath() {\n const { innerWidth, innerHeight } = window;\n const { body: { scrollWidth, scrollHeight } } = document;\n\n const width = (innerWidth > scrollWidth) ? innerWidth : scrollWidth;\n const height = (innerHeight > scrollHeight) ? innerHeight : scrollHeight;\n\n return `M 0 0 H ${width} V ${height} H 0 V 0 Z`;\n }\n\n getOverlayStepPath(step) {\n return this.getOverlayElPath(this.getStepEl(step));\n }\n\n getOverlayElPath(el) {\n let { padding } = this.options;\n padding = (padding) ? padding / 2 : 0;\n\n const { left, top, width, height } = el.getBoundingClientRect();\n const r = 4;\n\n let path = this.getOverlayDocumentPath();\n\n path += `M ${left - padding + r} ${top - padding}\n a ${r},${r} 0 0 0 -${r},${r}\n V ${height + top + padding - r}\n a ${r},${r} 0 0 0 ${r},${r}\n H ${width + left + padding - r}\n a ${r},${r} 0 0 0 ${r},-${r}\n V ${top - padding + r}\n a ${r},${r} 0 0 0 -${r},-${r}Z`;\n\n return path;\n }\n\n getOverlayTmpl() {\n return overlayTmpl;\n }\n\n createOverlayEl(data = {}) {\n const defaults = {\n stop: async (...args) => {\n if (this.options.exitOverlay) {\n await this.stop(...args);\n }\n },\n path: this.getOverlayDocumentPath(),\n };\n\n return this.createEl('overlay', this.getOverlayTmpl(), { ...defaults, ...data });\n }\n\n mountOverlayEl(data = {}) {\n return this.mountEl(this.createOverlayEl(data), document.body);\n }\n\n removeOverlayEl() {\n return this.removeEl('overlay');\n }\n\n getInteractionTmpl() {\n return interactionTmpl;\n }\n\n createInteractionEl(data = {}) {\n let { interaction } = this.options;\n\n if (typeof this.currentStep.interaction === 'boolean') {\n interaction = this.currentStep.interaction;\n }\n\n const defaults = {\n ...this.getDefaultTmplData(),\n interaction,\n };\n\n return this.createEl('interaction', this.getInteractionTmpl(), { ...defaults, ...data });\n }\n\n mountInteractionEl(data = {}) {\n return this.mountEl(this.createInteractionEl(data), document.body);\n }\n\n removeInteractionEl() {\n return this.removeEl('interaction');\n }\n\n getControlTmpl() {\n return controlTmpl;\n }\n\n createControlEl(data = {}) {\n return this.createEl(\n 'control',\n this.getControlTmpl(),\n { ...this.getDefaultTmplData(), tooltipEl: this.createTooltipEl(data), ...data },\n );\n }\n\n mountControlEl(data = {}) {\n return this.mountEl(this.createControlEl(data), document.body);\n }\n\n removeControlEl() {\n return this.removeEl('control');\n }\n\n getTooltipTmpl() {\n return tooltipTmpl;\n }\n\n createTooltipEl(data = {}) {\n const defaults = {\n ...this.getDefaultTmplData(),\n progressbar: this.createProgressbarEl(data),\n title: this.createTitleEl(data),\n description: this.createDescriptionEl(data),\n close: this.createCloseEl(data),\n customButtons: this.createCustomButtonsEl(data),\n previous: this.createPreviousEl(data),\n pagination: this.createPaginationEl(data),\n next: this.createNextEl(data),\n copyright: this.createCopyrightEl(data),\n notification: this.createNotificationEl(data),\n };\n\n return this.createEl('tooltip', this.getTooltipTmpl(), { ...defaults, ...data });\n }\n\n getCloseTmpl() {\n return closeTmpl;\n }\n\n createCloseEl(data = {}) {\n return this.createEl('close', this.getCloseTmpl(), { ...this.getDefaultTmplData(), ...data });\n }\n\n getProgressbarTmpl() {\n return progressbarTmpl;\n }\n\n createProgressbarEl(data = {}) {\n let { showProgressbar } = this.options;\n\n if (typeof this.currentStep.showProgressbar === 'boolean') {\n showProgressbar = this.currentStep.showProgressbar;\n }\n\n const progressMax = 100;\n const progressMin = 0;\n const progress = ((this.currentStepIndex + 1) / this.steps.length) * 100;\n\n const defaults = {\n ...this.getDefaultTmplData(),\n showProgressbar,\n progressMax,\n progressMin,\n progress,\n };\n\n return this.createEl('progressbar', this.getProgressbarTmpl(), { ...defaults, ...data });\n }\n\n getTitleTmpl() {\n return titleTmpl;\n }\n\n createTitleEl(data = {}) {\n const { title = '' } = this.currentStep;\n return this.createEl('title', this.getTitleTmpl(), { ...this.getDefaultTmplData(), title, ...data });\n }\n\n getDescriptionTmpl() {\n return descriptionTmpl;\n }\n\n createDescriptionEl(data = {}) {\n const { description = '' } = this.currentStep;\n\n return this.createEl(\n 'description',\n this.getDescriptionTmpl(),\n { ...this.getDefaultTmplData(), description, ...data },\n );\n }\n\n getCustomButtonsTmpl() {\n return customButtonsTmpl;\n }\n\n createCustomButtonsEl(data = {}) {\n const buttons = [];\n\n if (this.currentStep.buttons) {\n this.currentStep.buttons.forEach((button) => {\n let buttonEl = button;\n\n if (!isHtmlElement(buttonEl)) {\n const { onClick, tagName = 'button', title = '', class: className } = button;\n\n buttonEl = document.createElement(tagName);\n buttonEl.innerHTML = title;\n\n if (className) {\n buttonEl.className = className;\n }\n\n if (onClick) {\n buttonEl.addEventListener('click', (e) => {\n onClick.call(this, e);\n });\n }\n }\n\n buttons.push(buttonEl);\n });\n }\n\n return this.createEl(\n 'customButtons',\n this.getCustomButtonsTmpl(),\n { ...this.getDefaultTmplData(), buttons, ...data },\n );\n }\n\n getPaginationTmpl() {\n return paginationTmpl;\n }\n\n createPaginationEl(data = {}) {\n const {\n paginationTheme = this.options.paginationTheme,\n paginationCirclesMaxItems = this.options.paginationCirclesMaxItems,\n } = this.currentStep;\n\n let { showPagination } = this.options;\n\n if (typeof this.currentStep.showPagination === 'boolean') {\n showPagination = this.currentStep.showPagination;\n }\n\n return this.createEl(\n 'pagination',\n this.getPaginationTmpl(),\n {\n ...this.getDefaultTmplData(),\n showPagination,\n paginationTheme,\n paginationCirclesMaxItems,\n ...data,\n },\n );\n }\n\n getPreviousTmpl() {\n return previousTmpl;\n }\n\n createPreviousEl(data = {}) {\n let { showNavigation } = this.options;\n\n if (typeof this.currentStep.showNavigation === 'boolean') {\n showNavigation = this.currentStep.showNavigation;\n }\n\n return this.createEl(\n 'previous',\n this.getPreviousTmpl(),\n { ...this.getDefaultTmplData(), showNavigation, ...data },\n );\n }\n\n getNextTmpl() {\n return nextTmpl;\n }\n\n createNextEl(data = {}) {\n let { showNavigation } = this.options;\n\n if (typeof this.currentStep.showNavigation === 'boolean') {\n showNavigation = this.currentStep.showNavigation;\n }\n\n return this.createEl(\n 'next',\n this.getNextTmpl(),\n { ...this.getDefaultTmplData(), showNavigation, ...data },\n );\n }\n\n getCopyrightTmpl() {\n return copyrightTmpl;\n }\n\n createCopyrightEl(data = {}) {\n return this.createEl('copyright', this.getCopyrightTmpl(), { ...this.getDefaultTmplData(), ...data });\n }\n\n getNotificationTmpl() {\n return notificationTmpl;\n }\n\n createNotificationEl(data = {}) {\n return this.createEl(\n 'notification',\n this.getNotificationTmpl(),\n { ...this.getDefaultTmplData(), messages: this.notifications, ...data },\n );\n }\n\n notify(message) {\n this.notifications.push(message);\n\n const notificationEl = this.getEl('notification');\n\n if (notificationEl) {\n this.mountEl(this.createNotificationEl(), notificationEl.parentElement);\n }\n\n return this;\n }\n\n /**\n * Register an event listener for a tour event.\n *\n * Event names can be comma-separated to register multiple events.\n *\n * @param {string} event The name of the event to listen for.\n * @param {function} listener The event listener, accepts context.\n * @param {object} options Listener options\n * @return {this}\n */\n on(event, listener, options = {}) {\n // priorities from low to high\n const priorities = this.constructor.getEventListenersPriorities();\n\n let [priority] = priorities;\n\n if (options.priority && priorities.includes(options.priority)) {\n priority = options.priority;\n }\n\n const e = event.trim();\n\n this.listeners[e] = this.listeners[e] || {};\n this.listeners[e][priority] = this.listeners[e][priority] || [];\n this.listeners[e][priority].push(listener);\n\n return this;\n }\n\n /**\n * Emits an event by name to all registered listeners on that event.\n * Listeners will be called in the order that they were added. If a listener\n * returns `false`, no other listeners will be called.\n *\n * @param {string} event The name of the event to emit.\n * @param args The context args of the event, passed to listeners.\n * @returns {Promise}\n */\n emit(event, ...args) {\n // from high to low\n const priorities = [...this.constructor.getEventListenersPriorities()].reverse();\n\n const e = event.trim();\n\n let result = [];\n let promise = Promise.resolve(result);\n\n if (this.listeners[e]) {\n priorities.forEach((priority) => {\n const { [priority]: listeners } = this.listeners[e];\n\n if (listeners) {\n promise = promise\n .then(() => Promise.all(\n listeners.map((f) => Promise.resolve().then(() => f.apply(this, args))),\n ))\n .then((r) => {\n result = [...result, ...r];\n return result;\n });\n }\n });\n }\n\n return promise;\n }\n\n /**\n * Add keydown event listener\n * @return {this}\n */\n addOnKeydownListener() {\n // turn on keyboard navigation\n this.cache.set('onKeydownListener', this.getOnKeydownListener());\n window.addEventListener('keydown', this.cache.get('onKeydownListener'), true);\n\n return this;\n }\n\n /**\n * Return on key down event listener function\n * @returns {function}\n */\n getOnKeydownListener() {\n return (event) => {\n const { keyCode } = event;\n\n const { previous: previousCodes, next: nextCodes, stop: stopCodes } = {\n ...this.constructor.getDefaultKeyboardCodes(),\n ...this.options.useKeyboard,\n };\n\n // stop tour\n if (stopCodes && stopCodes.includes(keyCode)) {\n this.stop({ event });\n return;\n }\n\n // go to the previous step\n if (previousCodes && previousCodes.includes(keyCode)) {\n this.previous({ event });\n return;\n }\n\n // go to the next step\n if (nextCodes && nextCodes.includes(keyCode)) {\n this.next({ event });\n }\n };\n }\n\n /**\n * Remove keydown event listener\n * @return {this}\n */\n removeOnKeydownListener() {\n if (this.cache.has('onKeydownListener')) {\n window.removeEventListener('keydown', this.cache.get('onKeydownListener'), true);\n this.cache.delete('onKeydownListener');\n }\n\n return this;\n }\n\n /**\n * Add window resize event listener\n * @return {this}\n */\n addOnWindowResizeListener() {\n // turn on keyboard navigation\n this.cache.set('onWindowResizeListener', this.getOnWindowResizeListener());\n window.addEventListener('resize', this.cache.get('onWindowResizeListener'), true);\n\n return this;\n }\n\n /**\n * Return on window resize event listener function\n * @returns {function}\n */\n getOnWindowResizeListener() {\n return () => this.refresh();\n }\n\n /**\n * Remove window resize event listener\n * @return {this}\n */\n removeOnWindowResizeListener() {\n if (this.cache.has('onWindowResizeListener')) {\n window.removeEventListener('resize', this.cache.get('onWindowResizeListener'), true);\n this.cache.delete('onWindowResizeListener');\n }\n\n return this;\n }\n\n /**\n * Add window scroll event listener\n * @returns {GuideChimp}\n */\n addOnWindowScrollListener() {\n this.cache.set('onWindowScrollListener', this.getOnWindowScrollListener());\n window.addEventListener('scroll', this.cache.get('onWindowScrollListener'), true);\n\n return this;\n }\n\n /**\n * Return on window scroll event listener function\n * @returns {function}\n */\n getOnWindowScrollListener() {\n return () => this.refresh();\n }\n\n /**\n * Remove window resize event listener\n * @return {this}\n */\n removeOnWindowScrollListener() {\n if (this.cache.has('onWindowScrollListener')) {\n window.removeEventListener('scroll', this.cache.get('onWindowScrollListener'), true);\n this.cache.delete('onWindowScrollListener');\n }\n\n return this;\n }\n\n removeListeners() {\n this.removeOnKeydownListener();\n this.removeOnWindowResizeListener();\n this.removeOnWindowScrollListener();\n }\n\n observeStep() {\n this.observeResizing();\n this.observeMutation();\n }\n\n observeResizing(options = { box: 'border-box' }) {\n let { resizingObserver: observer } = this.observers;\n\n if (!observer && typeof ResizeObserver !== 'undefined') {\n observer = new ResizeObserver(() => {\n if (!this && !this.currentStep) {\n return;\n }\n this.refresh();\n });\n\n this.observers.resizingObserver = observer;\n }\n\n if (observer) {\n // observe elements\n observer.observe(this.getStepEl(this.currentStep), options);\n return true;\n }\n\n return false;\n }\n\n unobserveResizing() {\n const { resizingObserver: observer } = this.observers;\n\n if (observer) {\n observer.disconnect();\n return true;\n }\n\n return false;\n }\n\n observeMutation() {\n let { mutationObserver: observer } = this.observers;\n\n if (!observer) {\n observer = new MutationObserver((mutations) => {\n if (!this && !this.currentStep) {\n return;\n }\n\n const { element } = this.currentStep;\n\n if (!element) {\n return;\n }\n\n let el = this.getStepEl(this.currentStep);\n\n const isElExists = () => el && !this.isEl(el, 'fakeStep');\n\n mutations.forEach((record) => {\n if (isElExists()) {\n if (record.type === 'childList' && record.removedNodes.length) {\n record.removedNodes.forEach((node) => {\n if (node === el || node.contains(el)) {\n el = this.getStepEl(this.currentStep);\n this.scrollParentsToStepEl();\n this.refresh();\n }\n });\n }\n } else if (record.type === 'childList' && record.addedNodes.length) {\n el = this.getStepEl(this.currentStep);\n\n if (isElExists()) {\n this.scrollParentsToStepEl();\n this.refresh();\n }\n }\n });\n });\n\n this.observers.mutationObserver = observer;\n }\n\n observer.observe(this.getStepEl(this.currentStep).ownerDocument.body, {\n childList: true,\n subtree: true,\n });\n\n return true;\n }\n\n unobserveMutation() {\n const { mutationObserver: observer } = this.observers;\n\n if (observer) {\n observer.disconnect();\n return true;\n }\n\n return false;\n }\n\n unobserveStep() {\n this.unobserveResizing();\n this.unobserveMutation();\n }\n\n beforeChangeStep() {\n this.unmountStep();\n this.unobserveStep();\n }\n\n /**\n * Refresh layers position\n * @returns {this}\n */\n refresh() {\n if (!this.currentStep) {\n return this;\n }\n\n this.highlightStepEl();\n\n this.setControlPosition(this.getEl('control'));\n this.setInteractionPosition(this.getEl('interaction'));\n this.setTooltipPosition(this.getEl('tooltip'));\n\n return this;\n }\n}","// Module\nvar code = \"<div class=\\\"gc-fake-step\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-preloader\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-overlay\\\" @click=\\\"stop({ event: $event })\\\"> <svg class=\\\"svg-overlay\\\"> <path d=\\\"{{path}}\\\"> <animate attributeName=\\\"d\\\" dur=\\\"200ms\\\"/> </path> </svg> </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"!interaction\\\" class=\\\"gc-interaction gc-disable\\\"> </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-control\\\"> {{ tooltipEl }} </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-tooltip\\\"> <div class=\\\"gc-tooltip-tail\\\"></div> {{ progressbar }} {{ title }} {{ description }} {{ close }} {{ customButtons }} <div if=\\\"previous || pagination || next\\\" class=\\\"gc-navigation\\\"> {{ previous }} {{ pagination }} {{ next }} </div> {{ copyright }} {{ notification }} </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-close\\\" @click=\\\"stop({ event: $event })\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"showProgressbar\\\" class=\\\"gc-progressbar\\\" role=\\\"progressbar\\\" aria-valuemin=\\\"{{ progressMin }}\\\" aria-valuemax=\\\"{{ progressMax }}\\\" aria-valuenow=\\\"{{ progress }}\\\" style=\\\"width:{{ progress }}%;\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"title\\\" html=\\\"{{ title }}\\\" class=\\\"gc-title\\\"> </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"description\\\" html=\\\"{{ description }}\\\" class=\\\"gc-description\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"buttons.length\\\" class=\\\"gc-custom-buttons\\\"> <template for=\\\"button in buttons\\\"> {{ button }} </template> </div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div if=\\\"showPagination && steps.length > 1\\\" class=\\\"gc-pagination\\\"> <template if=\\\"paginationTheme === 'numbers' || steps.length >= paginationCirclesMaxItems\\\"> <ul class=\\\"gc-pagination-theme-numbers\\\"> <template for=\\\"(step, index) in steps\\\"> <template if=\\\"index === 0\\\"> <li if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"> {{ index + 1 }} </li> <li else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> </template> <template if=\\\"currentStepIndex < 3\\\"> <template if=\\\"index > 0 && index < 5\\\"> <li if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"> {{ index + 1 }} </li> <li else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> </template> <li elseif=\\\"index === 5 && index !== steps.length - 1\\\" class=\\\"gc-pagination-dots\\\"> ... </li> </template> <template elseif=\\\"steps.length - currentStepIndex < 5\\\"> <template if=\\\"steps.length - index < 6 && steps.length - 1 !== index\\\"> <li if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"> {{ index + 1 }} </li> <li else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> </template> <li elseif=\\\"steps.length - index === 6 && index !== 0\\\" class=\\\"gc-pagination-dots\\\"> ... </li> </template> <template else> <li if=\\\"currentStepIndex - index === 3 && index !== 0\\\" class=\\\"gc-pagination-dots\\\"> ... </li> <template elseif=\\\"(currentStepIndex - index >= 0 && currentStepIndex - index < 3)\\n || ( index - currentStepIndex >= 0 && index - currentStepIndex < 3)\\\"> <li if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"> {{ index + 1 }} </li> <li else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> </template> <li elseif=\\\"index - currentStepIndex === 3 && steps.length -1 !== index\\\" class=\\\"gc-pagination-dots\\\"> ... </li> </template> <template if=\\\"index + 1 === steps.length\\\"> <li if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"> {{ index + 1 }} </li> <li elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"> {{ index + 1 }} </li> <li else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"> {{ index + 1 }} </li> </template> </template> </ul> </template> <template else> <div class=\\\"gc-pagination-theme-circles\\\"> <template for=\\\"(step, index) in steps\\\"> <div if=\\\"index === currentStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-current gc-pagination-active\\\"></div> <div elseif=\\\"index === previousStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-previous\\\" @click=\\\"previous({ event: $event })\\\"></div> <div elseif=\\\"index === nextStepIndex\\\" class=\\\"gc-pagination-item gc-pagination-item-next\\\" @click=\\\"next({ event: $event })\\\"></div> <div else class=\\\"gc-pagination-item\\\" @click=\\\"go(index, true, { event: $event })\\\"></div> </template> </div> </template> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-navigation-prev {{ (!previousStep || !showNavigation) ? 'gc-hidden': '' }}\\\" @click=\\\"previous({ event: $event })\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-navigation-next {{ (!nextStep || !showNavigation) ? 'gc-hidden': '' }}\\\" @click=\\\"next({ event: $event })\\\"></div>\";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"gc-copyright\\\">Made with AHD.JS</div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div html=\\\"{{ messages[0] }}\\\" class=\\\"gc-notification\\\"></div>\";\n// Exports\nexport default code;","// @ts-nocheck\n// import GuideChimp from \"./GuideChimp\";\n// //import Beacons from \"./plugins/beacons\";\n// import \"./index.scss\";\n// // import Information from \"./plugins/information\";\n// // import Beacons from \"./plugins/beacons\";\n// // class AHDjs {\n// // private guideChimp: any;\n// // private appId: string;\n// // private contextToursMapData: any;\n// // constructor(applicationId: any, tour: any, options: any) {\n// // this.appId = applicationId;\n// // //@ts-ignore\n// // this.guideChimp = new GuideChimp(tour, options);\n\n// // this.guideChimp.prototype = GuideChimp.prototype;\n// // this.guideChimp.plugins = new Set();\n\n// // //@ts-ignore\n// // // this.guideChimp.extend = (plugin, ...args) => {\n// // // if (!this.guideChimp.plugins.has(plugin)) {\n// // // this.guideChimp.plugins.add(plugin);\n// // // plugin(GuideChimp, this.guideChimp, ...args);\n// // // }\n// // // return this.guideChimp;\n// // // };\n\n// // // test beacon extension\n// // // @ts-ignore\n// // const pluginsToLoad = [Beacons, Information];\n// // pluginsToLoad.forEach((pluginClass) => {\n// // const plugin = pluginClass;\n// // if (!this.guideChimp.plugins.has(plugin)) {\n// // this.guideChimp.plugins.add(plugin);\n// // // @ts-ignore\n// // plugin(GuideChimp, this.guideChimp, tour, options);\n// // }\n// // });\n// // }\n\n// // updatePageUrl = async (url: string, refetch: boolean) => {\n// // await this.stop();\n// // // todo: local caching and use https://github.com/pillarjs/path-to-regexp to find exact match\n// // const respons: any = await fetch(\n// // `https://ahd-be-jggub5n6qq-em.a.run.app/api/tenant/${this.appId}/contexttour?filter[isActive]=true`\n// // ).then((res) => res.json());\n\n// // this.contextToursMapData = respons.rows;\n// // //if there is anything to open onload\n// // const onboardTour = respons.rows\n// // .filter((row: any) => !!row.content)\n// // .map((row: any) => {\n// // return {\n// // element: row.selector,\n// // title: row.content.title,\n// // description: row.content.content,\n// // tour: [\n// // {\n// // title: \"Multi Feature\",\n// // description: \"Multi Feature beacon clicked.\",\n// // },\n// // ],\n// // };\n// // });\n// // this.setTour(onboardTour);\n// // this.start();\n// // };\n\n// // setTour = (tour: any) => {\n// // this.guideChimp.setTour(tour);\n// // };\n// // beacons = (...args: any) => {\n// // // @ts-ignore\n// // // this.guideChimp.beacon = new Beacons(...args);\n\n// // const tourBeacons = this.contextToursMapData\n// // .filter((row: any) => !!row.content)\n// // .map((row: any) => {\n// // return {\n// // element: row.selector,\n// // title: row.content.title,\n// // description: row.content.content,\n// // tour: [\n// // {\n// // title: \"BC Multi Feature\",\n// // description: \"BC Multi Feature beacon clicked.\",\n// // },\n// // {\n// // title: \"B2C Multi Feature\",\n// // description: \"B2C Multi Feature beacon clicked.\",\n// // },\n// // ],\n// // };\n// // });\n\n// // const b = this.guideChimp.beacons(tourBeacons);\n// // setTimeout(() => {\n// // b.showAll();\n// // }, 1000);\n// // };\n// // start = (...args: any) => {\n// // this.guideChimp.start(...args);\n// // };\n// // stop = async (...args: any) => {\n// // await this.guideChimp.stop(...args);\n// // };\n// // showInformation = (...args: any) => {\n// // // @ts-ignore\n// // // this.guideChimp.beacon = new Beacons(...args);\n// // const b = this.guideChimp.information(...args);\n// // setTimeout(() => {\n// // b.showAll();\n// // }, 1000);\n// // };\n// // // guideChimp.prototype = GuideChimp.prototype;\n// // // guideChimp.plugins = new Set();\n\n// // // guideChimp.extend = (plugin, ...args) => {\n// // // if (!guideChimp.plugins.has(plugin)) {\n// // // guideChimp.plugins.add(plugin);\n// // // plugin(GuideChimp, guideChimp, ...args);\n// // // }\n// // // return guideChimp;\n// // // };\n\n// // // module.exports = guideChimp;\n// // }\n\n// class AHDjs {\n// private guideChimp;\n// constructor(...args: any) {\n// // @ts-ignore\n// this.guideChimp = new GuideChimp(...args);\n// }\n// public start(...args: any) {\n// this.guideChimp.start(...args);\n// }\n// }\n// export default AHDjs;\n\n/**\n * Copyright (C) 2020 Labs64 GmbH\n *\n * This source code is licensed under the European Union Public License, version 1.2\n * located in the LICENSE file\n */\n\nimport GuideChimp from \"./GuideChimp\";\n\n/* ============\n * Styling\n * ============\n *\n * Import the library styling.\n */\nimport \"./index.scss\";\n\nconst AHDjs = (...args) => new GuideChimp(...args);\n\nAHDjs.prototype = GuideChimp.prototype;\nAHDjs.plugins = new Set();\n\nAHDjs.extend = (plugin, ...args) => {\n if (!AHDjs.plugins.has(plugin)) {\n AHDjs.plugins.add(plugin);\n plugin(GuideChimp, AHDjs, ...args);\n }\n return AHDjs;\n};\n\nexport default AHDjs;\n"],"names":["root","factory","exports","module","define","amd","self","Symbol","array","iteratee","index","length","result","Array","getRawTag","objectToString","symToStringTag","toStringTag","undefined","value","Object","arrayMap","isArray","isSymbol","symbolProto","prototype","symbolToString","toString","baseToString","call","freeGlobal","g","objectProto","hasOwnProperty","nativeObjectToString","isOwn","tag","unmasked","e","freeSelf","Function","baseGetTag","isObjectLike","idCounter","prefix","id","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","defineProperty","enumerable","get","globalThis","this","window","obj","prop","r","el","HTMLElement","test","SVGElement","tpl","data","parser","DOMParser","template","replace","sourceDoc","parseFromString","renderedDoc","document","implementation","createHTMLDocument","pattern","eventPattern","ifEnded","Map","render","node","replacements","parent","body","handler","keys","values","getValue","nodeType","Node","ELEMENT_NODE","hasAttribute","set","parentNode","getAttribute","forPieces","split","firstPiece","secondPiece","removeAttribute","param","trim","source","isSourceArray","forEach","k","parseInt","ownerDocument","tagName","cloneNode","append","attributes","attr","name","eventMatch","exec","eventName","addEventListener","match","rValue","slice","replacement","_isUndefined","_isNull","console","error","substr","innerHTML","includes","setAttribute","TEXT_NODE","nodeValue","createTextNode","isHtmlElement","isSvgElement","isNodeList","v","childNodes","firstElementChild","GuideChimp","tour","options","_uniqueId","configurable","writable","setDefaults","cache","listeners","observers","setOptions","setTour","notifications","elements","init","previousStep","currentStep","nextStep","fromStep","toStep","previousStepIndex","currentStepIndex","nextStepIndex","fromStepIndex","toStepIndex","steps","isDisplayed","constructor","getDefaultOptions","number","useIndex","mountOverlayEl","startPreloader","args","emit","stopPreloader","removeOverlayEl","sortSteps","getSteps","classList","add","getBodyClass","go","isStarted","toggle","useKeyboard","addOnKeydownListener","addOnWindowResizeListener","addOnWindowScrollListener","stepNumber","step","filter","indexOf","onBeforeChange","onAfterChange","abort","Promise","resolve","then","some","beforeChangeStep","scrollBehavior","scrollPadding","scrollParentsToStepEl","scrollTo","getStepEl","mountStep","setTimeout","getEl","onPrevious","onNext","remove","removeListeners","unobserveStep","unmountStep","clear","getDataSteps","getJsSteps","dataPrefix","tourStepsEl","from","querySelectorAll","dataTourRegExp","RegExp","dataGlobalRegExp","map","i","stepAttrs","j","attrName","attrValue","isTourAttr","isGlobalAttr","attrShortName","title","description","position","interaction","element","sort","b","mountFakeStepEl","selector","def","querySelector","style","display","visibility","scrollParentsToEl","parents","htmlEl","getScrollableParentEl","push","regex","elStyle","getComputedStyle","elDocument","getPropertyValue","getClosestScrollableParent","parentStyle","parentElement","overflowX","overflowY","getScrollableParentsEls","scrollTop","offsetTop","scrollLeft","offsetLeft","behavior","getBoundingClientRect","top","bottom","left","right","innerWidth","innerHeight","scrollBy","animation","overlay","path","animate","isCurrentElFake","isEl","to","getOverlayDocumentPath","getOverlayStepPath","lock","isFromElFake","onend","beginElement","getRelativePositionClass","getHighlightClass","uid","interactionEl","padding","getOffset","width","height","getFixedClass","isFixed","cssText","controlEl","pageXOffset","defaultView","docElWidth","documentElement","elHeight","elTop","elLeft","elRight","tooltipEl","boundary","pos","alignment","tooltipStyle","transform","elBottom","elWidth","tooltipHeight","tooltipWith","cloneTooltip","appendChild","minTooltipWidth","removeChild","boundaryRect","DOMRect","Window","x","y","scrollWidth","scrollHeight","boundaryTop","boundaryBottom","boundaryLeft","boundaryRight","positions","tooltipMarginTop","marginTop","tooltipMarginLeft","marginLeft","tooltipMarginRight","marginRight","tooltipMarginBottom","marginBottom","splice","alignments","clientLeft","clientWidth","getLoadingClass","preloaderCache","preloader","mountPreloaderEl","hidden","has","removePreloaderEl","previous","next","stop","mountInteractionEl","mountControlEl","setInteractionPosition","setControlPosition","setTooltipPosition","observeStep","highlightStepEl","resetHighlightStepEl","removeInteractionEl","removeControlEl","removeFakeStepEl","tmpl","domTemplate","els","removeEl","createEl","getFakeStepTmpl","getDefaultTmplData","mountEl","createFakeStepEl","getPreloaderTmpl","createPreloaderEl","getOverlayElPath","defaults","exitOverlay","getOverlayTmpl","createOverlayEl","getInteractionTmpl","createInteractionEl","getControlTmpl","createTooltipEl","createControlEl","progressbar","createProgressbarEl","createTitleEl","createDescriptionEl","close","createCloseEl","customButtons","createCustomButtonsEl","createPreviousEl","pagination","createPaginationEl","createNextEl","copyright","createCopyrightEl","notification","createNotificationEl","getTooltipTmpl","getCloseTmpl","showProgressbar","progressMax","progressMin","progress","getProgressbarTmpl","getTitleTmpl","getDescriptionTmpl","buttons","button","buttonEl","onClick","className","createElement","getCustomButtonsTmpl","paginationTheme","paginationCirclesMaxItems","showPagination","getPaginationTmpl","showNavigation","getPreviousTmpl","getNextTmpl","getCopyrightTmpl","getNotificationTmpl","messages","message","notificationEl","event","listener","priorities","getEventListenersPriorities","priority","reverse","promise","all","f","apply","getOnKeydownListener","keyCode","getDefaultKeyboardCodes","previousCodes","nextCodes","stopCodes","removeEventListener","getOnWindowResizeListener","refresh","getOnWindowScrollListener","removeOnKeydownListener","removeOnWindowResizeListener","removeOnWindowScrollListener","observeResizing","observeMutation","box","observer","resizingObserver","ResizeObserver","observe","disconnect","mutationObserver","MutationObserver","mutations","isElExists","record","type","removedNodes","contains","addedNodes","childList","subtree","unobserveResizing","unobserveMutation","exitEscape","view","pageYOffset","nodeName","AHDjs","plugins","Set","extend","plugin"],"sourceRoot":""}
|
package/build/types/index.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2020 Labs64 GmbH
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the European Union Public License, version 1.2
|
|
5
|
+
* located in the LICENSE file
|
|
6
|
+
*/
|
|
7
|
+
import GuideChimp from "./GuideChimp";
|
|
1
8
|
import "./index.scss";
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
9
|
+
declare const AHDjs: {
|
|
10
|
+
(...args: any[]): GuideChimp;
|
|
11
|
+
prototype: GuideChimp;
|
|
12
|
+
plugins: Set<unknown>;
|
|
13
|
+
extend(plugin: any, ...args: any[]): any;
|
|
14
|
+
};
|
|
7
15
|
export default AHDjs;
|