ahdjs 0.0.32 → 0.0.33
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 +2 -0
- package/package.json +1 -1
- package/testing.html +11 -8
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.33
|
|
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 __webpack_modules__={219:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Beacons});var _utils_domTemplate__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(95),_templates_beacon_html__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(398);function _typeof(t){return _typeof="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},_typeof(t)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){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 _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(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)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(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 _iterableToArrayLimit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){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}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function ownKeys(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 _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach((function(e){_defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(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 _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var Beacons=function(){function Beacons(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,Beacons),this.beacons=[],this.options={},this.observers={},"undefined"!=typeof ResizeObserver&&(this.observers.elementResizeObserver=new ResizeObserver((function(){return e.refresh()}))),this.cache=new Map,this.elements=new Map,this.setOptions(n),this.setBeacons(t),this.init()}return _createClass(Beacons,[{key:"init",value:function(){}},{key:"setOptions",value:function(t){return this.options=_objectSpread(_objectSpread({},this.constructor.getDefaultOptions()),t),this}},{key:"setBeacons",value:function(t){var e=this;return this.removeAll(),this.beacons=!t||"string"==typeof t||Array.isArray(t)&&t.every((function(t){return"string"==typeof t}))?this.getDataBeacons(t):this.getJsBeacons(t),this.beacons.length&&(this.beacons.forEach((function(t){var n=t.element;if(n){var r=e.getEl(n);if(r){var i=e.createBeaconEl(t);i.hidden=!0,e.constructor.isFixed(r)&&i.classList.add(e.constructor.getFixedClass()),(r.parentElement&&r.parentElement!==document.body?r.parentElement:document.body).append(i),e.elements.set(t,i),e.setBeaconPosition(r,i,t),e.observeResizing(r)}}})),this.addOnWindowResizeListener()),this}},{key:"getBeacons",value:function(){return this.beacons}},{key:"getBeacon",value:function(t,e){return _slicedToArray(t&&"object"===_typeof(t)?[t]:this.beacons.filter((function(e){return e.id===t})),1)[0]||e}},{key:"getDataBeacons",value:function getDataBeacons(ids){var _this3=this,beaconsIds="string"==typeof ids?ids.split(",").map((function(t){return t.trim()})):ids,beaconsSelector=["[".concat(this.constructor.getBeaconDataPrefix(),"]")];beaconsIds&&(beaconsSelector=[],beaconsIds.forEach((function(t){beaconsSelector.push("[".concat(_this3.constructor.getBeaconDataPrefix(),"*='").concat(t,"']"))})));var beaconsEl=Array.from(document.querySelectorAll(beaconsSelector.join(","))),dataGlobalRegExp=new RegExp("^".concat(this.constructor.getBeaconDataPrefix(),"-([^-]+)$")),beacons=[];return beaconsEl.forEach((function(el){var beaconsIdsAttrValue=el.attributes[_this3.constructor.getBeaconDataPrefix()].value;if(beaconsIdsAttrValue){var elBeaconsIds=beaconsIdsAttrValue.split(",");elBeaconsIds.forEach((function(id){if(!beaconsIds||beaconsIds.includes(id)){for(var globalBeaconAttrs={},beaconAttrs={},dataBeaconRegExp=new RegExp("^".concat(_this3.constructor.getBeaconDataPrefix(),"-").concat(id,"-([^-]+)$")),j=0;j<el.attributes.length;j++){var _el$attributes$j=el.attributes[j],attrName=_el$attributes$j.name,attrValue=_el$attributes$j.value,isGlobalAttr=dataGlobalRegExp.test(attrName),isBeaconAttr=dataBeaconRegExp.test(attrName);if(isGlobalAttr){var _attrName$match=attrName.match(dataGlobalRegExp),_attrName$match2=_slicedToArray(_attrName$match,2),shortAttrName=_attrName$match2[1];globalBeaconAttrs[shortAttrName]=attrValue}else if(isBeaconAttr){var _attrName$match3=attrName.match(dataBeaconRegExp),_attrName$match4=_slicedToArray(_attrName$match3,2),_shortAttrName=_attrName$match4[1];beaconAttrs[_shortAttrName]=attrValue}}var beacon=_objectSpread(_objectSpread(_objectSpread({id,position:_this3.options.position},globalBeaconAttrs),beaconAttrs),{},{element:el}),onClick=beacon.onclick||beacon.onClick;onClick&&(delete beacon.onclick,beacon.onClick=function(e){var onClickCode=eval(onClick);"function"==typeof onClickCode&&onClickCode.call(e,beacon)}),beacons.push(beacon)}}))}})),beacons}},{key:"getJsBeacons",value:function(t){return(Array.isArray(t)?t:[t]).map((function(t,e){return _objectSpread(_objectSpread({},t),{},{id:t.id||e})}))}},{key:"getBeaconTpl",value:function(){return _templates_beacon_html__WEBPACK_IMPORTED_MODULE_1__.Z}},{key:"createBeaconEl",value:function(t){var e=this,n=_objectSpread({},t);return n.onClick=function(n){n.stopPropagation(),t.onClick&&t.onClick.call(e,n,t)},(0,_utils_domTemplate__WEBPACK_IMPORTED_MODULE_0__.Z)(this.getBeaconTpl(),{beacon:n})}},{key:"getEl",value:function(t){return t instanceof HTMLElement?t:document.querySelector(t)}},{key:"setBeaconPosition",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.position,i=n.boundary;r=r||this.options.position,i="inner"===(i=i||this.options.boundary)?"inner":"outer";var o=t.offsetLeft,a=t.offsetTop,s=t.offsetWidth,c=t.offsetHeight,u=e.style,l=getComputedStyle(e),p=l.width,h=l.height;switch(p=parseInt(p,10),h=parseInt(h,10),e.removeAttribute("data-beacon-position"),e.removeAttribute("data-beacon-boundary"),e.setAttribute("data-beacon-position",r),e.setAttribute("data-beacon-boundary",i),r){case"top-left":"inner"===i?(u.left="".concat(o,"px"),u.top="".concat(a,"px")):(u.left="".concat(o-p,"px"),u.top="".concat(a-h,"px"));break;case"top":u.left="".concat(o+(s-p)/2,"px"),u.top="".concat("inner"===i?a:a-h,"px");break;case"top-right":"inner"===i?(u.left="".concat(s+o-p,"px"),u.top="".concat(a,"px")):(u.left="".concat(s+o,"px"),u.top="".concat(a-h,"px"));break;case"left":u.left="".concat("inner"===i?o:o-p,"px"),u.top="".concat(a+(c-h)/2,"px");break;case"right":u.left="".concat("inner"===i?o+s-p:o+s,"px"),u.top="".concat(a+(c-h)/2,"px");break;case"bottom-left":"inner"===i?(u.left="".concat(o,"px"),u.top="".concat(a+c-h,"px")):(u.left="".concat(o-p,"px"),u.top="".concat(a+c,"px"));break;case"bottom":u.left="".concat(o+(s-p)/2,"px"),u.top="".concat("inner"===i?a+c-h:a+c,"px");break;case"bottom-right":"inner"===i?(u.left="".concat(s+o-p,"px"),u.top="".concat(a+c-h,"px")):(u.left="".concat(s+o,"px"),u.top="".concat(a+c,"px"));break;default:e.setAttribute("data-beacon-position","center"),u.left="".concat(o+(s-p)/2,"px"),u.top="".concat(a+(c-h)/2,"px")}return this}},{key:"isCanShowBeacon",value:function(t){var e=t.canShow;return!(void 0!==e&&(!e||"function"==typeof e&&!1===e()))}},{key:"showAll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.beacons.forEach((function(n){t.show(n,e)})),this}},{key:"show",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getBeacon(t);if(n){var r=this.elements.get(n);r&&(e||this.isCanShowBeacon(n))&&(r.hidden=!1)}return this}},{key:"hideAll",value:function(){var t=this;return this.beacons.forEach((function(e){t.hide(e)})),this}},{key:"hide",value:function(t){var e=this.getBeacon(t);if(e){var n=this.elements.get(e);n&&(n.hidden=!0)}return this}},{key:"removeAll",value:function(){var t=this;return this.beacons.forEach((function(e){t.remove(e)})),this.beacons=[],this.unobserveResizeAllElements(),this.removeOnWindowResizeListener(),this}},{key:"remove",value:function(t){var e=this.getBeacon(t),n=this.elements.get(e);if(n){n.parentNode.removeChild(n),-1!==this.beacons.indexOf(e)&&this.beacons.splice(this.beacons.indexOf(e),1),this.elements.delete(e);var r=this.getEl(e.element);r&&this.unobserveResizing(r)}return this.beacons.length||this.removeOnWindowResizeListener(),this}},{key:"refresh",value:function(){var t=this;return this.beacons.forEach((function(e){var n=e.element;if(n){var r=t.getEl(n),i=t.elements.get(e);r&&i&&t.setBeaconPosition(r,i,e)}})),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:"observeResizing",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{box:"border-box"},n=this.observers.elementResizeObserver;return n&&n.observe(t,e),this}},{key:"unobserveResizing",value:function(t){var e=this.observers.elementResizeObserver;return e&&e.unobserve(t),this}},{key:"unobserveResizeAllElements",value:function(){var t=this.observers.elementResizeObserver;return t&&t.disconnect(),this}}],[{key:"getDefaultOptions",value:function(){return{position:"center",boundary:"inner"}}},{key:"getFixedClass",value:function(){return"gc-beacon-fixed"}},{key:"getBeaconDataPrefix",value:function(){return"data-beacon"}},{key:"isFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isFixed(e))}}]),Beacons}()},95:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var r=n(353),i=n.n(r),o=n(220),a=n.n(o),s=n(629);const c=function(t){return t instanceof SVGElement||/^\[object SVG(.+)Element\]$/.test("".concat(t))},u=function(t){return/^[object NodeList]$/.test("".concat(t))};function l(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(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 p(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 h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}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}function d(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)||v(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 v(t,e){if(t){if("string"==typeof t)return g(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)?g(t,e):void 0}}function g(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 y(t,e,n){return y=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&&b(i,n.prototype),i},y.apply(null,arguments)}function m(){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 b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}const x=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 o=n.parseFromString(r,"text/html"),p=document.implementation.createHTMLDocument(),v=/{{([^}}]+)?}}/gm,g=/^@(.+)$/,m=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]:p.body,o=r,b=Object.keys(n),x=Object.values(n),w=function(t){return y(Function,b.concat(["return ".concat(t,";")])).apply(void 0,x)};if(e){if(e.nodeType===Node.ELEMENT_NODE){if(e.hasAttribute("if")){if(m.set(e.parentNode,!1),!w(e.getAttribute("if")))return;m.set(e.parentNode,!0)}if(e.hasAttribute("elseif")){if(m.get(e.parentNode)||!w(e.getAttribute("elseif")))return;m.set(e.parentNode,!0)}if(e.hasAttribute("else")){if(m.get(e.parentNode))return;m.set(e.parentNode,!0)}if(e.hasAttribute("for")){var S=e.getAttribute("for").split(" in "),k=d(S,2),_=k[0],E=k[1];e.removeAttribute("for");var O=_.replace(/\(|\)/g,"").split(","),P=d(O,2),A=P[0],T=P[1];A=A.trim(),T=T?T.trim():"";var j=w(E.trim()),I=Array.isArray(j);return void Object.keys(j).forEach((function(r){var i=h(h({},n),{},f({},A,j[r]));T&&(i[T]=I?parseInt(r,10):r),t(e,i,o)}))}e!==e.ownerDocument.body&&"GC-TEMPLATE"!==e.tagName&&(o=e.cloneNode(),r.append(o)),l(e.attributes).forEach((function(t){var e=t.name,n=t.value,r=g.exec(e);if(r){var s=d(r,2)[1];return o.addEventListener(s,(function(t){return y(Function,[].concat(b,["$event"]).concat(["return ".concat(n).concat(/\(.+\)/.test(n)?"":"()",";")])).apply(void 0,[].concat(x,[t]))})),void o.removeAttribute(e)}for(var c=v.exec(n),u=0,l="";c;){l+=n.slice(u,c.index);var p=d(c,2),h=p[0],f=p[1];f=f.trim();try{h=w(f),(i()(h)||a()(h))&&(h="")}catch(t){console.error(t)}l+=h,u=c.index+c[0].length,c=v.exec(n)}l+=n.substr(u,n.length-u),"html"===e?(o.innerHTML=l,o.removeAttribute(e)):["if","else","elseif"].includes(e)?o.removeAttribute(e):o.setAttribute(e,l)}))}else if(e.nodeType===Node.TEXT_NODE){var L=v.exec(e.nodeValue);if(L){for(var C=0;L;){o.append(document.createTextNode(e.nodeValue.slice(C,L.index)));var D=L,R=d(D,2),N=R[0],B=R[1];B=B.trim();try{N=w(B),(i()(N)||a()(N))&&(N="")}catch(t){console.error(t)}(0,s.Z)(N)||c(N)?o.append(N):u(N)?N.forEach((function(t){o.append(t)})):o.append(document.createTextNode(N)),C=L.index+L[0].length,L=v.exec(e.nodeValue)}o.append(document.createTextNode(e.nodeValue.slice(C,e.nodeValue.length)))}else o.append(e.cloneNode())}var M=e.childNodes,$=void 0===M?[]:M;$.length&&$.forEach((function(e){t(e,n,o)}))}};return b(o.body,e,p.body),p.body.firstElementChild}},629:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){return t instanceof HTMLElement||/^\[object HTML(.+)Element\]$/.test("".concat(t))}},398:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r='<div class="gc-beacon {{ beacon.class }}" @click="beacon.onClick($event)"></div>'},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}},68:(t,e,n)=>{"use strict";function r(t,e){void 0===e&&(e={});for(var n=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var i=1,o="";if("?"===t[s=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<t.length;)if("\\"!==t[s]){if(")"===t[s]){if(0==--i){s++;break}}else if("("===t[s]&&(i++,"?"!==t[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));o+=t[s++]}else o+=t[s++]+t[s++];if(i)throw new TypeError("Unbalanced pattern at ".concat(n));if(!o)throw new TypeError("Missing pattern at ".concat(n));e.push({type:"PATTERN",index:n,value:o}),n=s}else{for(var a="",s=n+1;s<t.length;){var c=t.charCodeAt(s);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;a+=t[s++]}if(!a)throw new TypeError("Missing parameter name at ".concat(n));e.push({type:"NAME",index:n,value:a}),n=s}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(t),r=e.prefixes,i=void 0===r?"./":r,o="[^".concat(c(e.delimiter||"/#?"),"]+?"),a=[],s=0,u=0,l="",p=function(t){if(u<n.length&&n[u].type===t)return n[u++].value},h=function(t){var e=p(t);if(void 0!==e)return e;var r=n[u],i=r.type,o=r.index;throw new TypeError("Unexpected ".concat(i," at ").concat(o,", expected ").concat(t))},f=function(){for(var t,e="";t=p("CHAR")||p("ESCAPED_CHAR");)e+=t;return e};u<n.length;){var d=p("CHAR"),v=p("NAME"),g=p("PATTERN");if(v||g){var y=d||"";-1===i.indexOf(y)&&(l+=y,y=""),l&&(a.push(l),l=""),a.push({name:v||s++,prefix:y,suffix:"",pattern:g||o,modifier:p("MODIFIER")||""})}else{var m=d||p("ESCAPED_CHAR");if(m)l+=m;else if(l&&(a.push(l),l=""),p("OPEN")){y=f();var b=p("NAME")||"",x=p("PATTERN")||"",w=f();h("CLOSE"),a.push({name:b||(x?s++:""),pattern:b&&!x?o:x,prefix:y,suffix:w,modifier:p("MODIFIER")||""})}else h("END")}}return a}function i(t,e){return o(r(t,e),e)}function o(t,e){void 0===e&&(e={});var n=u(e),r=e.encode,i=void 0===r?function(t){return t}:r,o=e.validate,a=void 0===o||o,s=t.map((function(t){if("object"==typeof t)return new RegExp("^(?:".concat(t.pattern,")$"),n)}));return function(e){for(var n="",r=0;r<t.length;r++){var o=t[r];if("string"!=typeof o){var c=e?e[o.name]:void 0,u="?"===o.modifier||"*"===o.modifier,l="*"===o.modifier||"+"===o.modifier;if(Array.isArray(c)){if(!l)throw new TypeError('Expected "'.concat(o.name,'" to not repeat, but got an array'));if(0===c.length){if(u)continue;throw new TypeError('Expected "'.concat(o.name,'" to not be empty'))}for(var p=0;p<c.length;p++){var h=i(c[p],o);if(a&&!s[r].test(h))throw new TypeError('Expected all "'.concat(o.name,'" to match "').concat(o.pattern,'", but got "').concat(h,'"'));n+=o.prefix+h+o.suffix}}else if("string"!=typeof c&&"number"!=typeof c){if(!u){var f=l?"an array":"a string";throw new TypeError('Expected "'.concat(o.name,'" to be ').concat(f))}}else{h=i(String(c),o);if(a&&!s[r].test(h))throw new TypeError('Expected "'.concat(o.name,'" to match "').concat(o.pattern,'", but got "').concat(h,'"'));n+=o.prefix+h+o.suffix}}else n+=o}return n}}function a(t,e){var n=[];return s(p(t,n,e),n,e)}function s(t,e,n){void 0===n&&(n={});var r=n.decode,i=void 0===r?function(t){return t}:r;return function(n){var r=t.exec(n);if(!r)return!1;for(var o=r[0],a=r.index,s=Object.create(null),c=function(t){if(void 0===r[t])return"continue";var n=e[t-1];"*"===n.modifier||"+"===n.modifier?s[n.name]=r[t].split(n.prefix+n.suffix).map((function(t){return i(t,n)})):s[n.name]=i(r[t],n)},u=1;u<r.length;u++)c(u);return{path:o,index:a,params:s}}}function c(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function u(t){return t&&t.sensitive?"":"i"}function l(t,e,n){void 0===n&&(n={});for(var r=n.strict,i=void 0!==r&&r,o=n.start,a=void 0===o||o,s=n.end,l=void 0===s||s,p=n.encode,h=void 0===p?function(t){return t}:p,f=n.delimiter,d=void 0===f?"/#?":f,v=n.endsWith,g="[".concat(c(void 0===v?"":v),"]|$"),y="[".concat(c(d),"]"),m=a?"^":"",b=0,x=t;b<x.length;b++){var w=x[b];if("string"==typeof w)m+=c(h(w));else{var S=c(h(w.prefix)),k=c(h(w.suffix));if(w.pattern)if(e&&e.push(w),S||k)if("+"===w.modifier||"*"===w.modifier){var _="*"===w.modifier?"?":"";m+="(?:".concat(S,"((?:").concat(w.pattern,")(?:").concat(k).concat(S,"(?:").concat(w.pattern,"))*)").concat(k,")").concat(_)}else m+="(?:".concat(S,"(").concat(w.pattern,")").concat(k,")").concat(w.modifier);else"+"===w.modifier||"*"===w.modifier?m+="((?:".concat(w.pattern,")").concat(w.modifier,")"):m+="(".concat(w.pattern,")").concat(w.modifier);else m+="(?:".concat(S).concat(k,")").concat(w.modifier)}}if(l)i||(m+="".concat(y,"?")),m+=n.endsWith?"(?=".concat(g,")"):"$";else{var E=t[t.length-1],O="string"==typeof E?y.indexOf(E[E.length-1])>-1:void 0===E;i||(m+="(?:".concat(y,"(?=").concat(g,"))?")),O||(m+="(?=".concat(y,"|").concat(g,")"))}return new RegExp(m,u(n))}function p(t,e,n){return t instanceof RegExp?function(t,e){if(!e)return t;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,i=n.exec(t.source);i;)e.push({name:i[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),i=n.exec(t.source);return t}(t,e):Array.isArray(t)?function(t,e,n){var r=t.map((function(t){return p(t,e,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),u(n))}(t,e,n):function(t,e,n){return l(r(t,n),e,n)}(t,e,n)}n.r(e),n.d(e,{compile:()=>i,match:()=>a,parse:()=>r,pathToRegexp:()=>p,regexpToFunction:()=>s,tokensToFunction:()=>o,tokensToRegexp:()=>l})}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>it});var t=__webpack_require__(955),e=__webpack_require__.n(t),n=__webpack_require__(95),r=__webpack_require__(629);function i(t){return i="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},i(t)}function o(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)||s(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 a(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(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 s(t,e){if(t){if("string"==typeof t)return c(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)?c(t,e):void 0}}function c(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 u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(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=S(a,n);if(s){if(s===h)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=p(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)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 p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function f(){}function d(){}function v(){}var g={};c(g,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(O([])));m&&m!==e&&n.call(m,o)&&(g=m);var b=v.prototype=f.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,a,s,c){var u=p(t[o],t,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==i(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}}function S(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,S(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=p(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;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,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(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 _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=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 i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return d.prototype=v,c(b,"constructor",v),c(v,"constructor",d),d.displayName=c(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},x(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new w(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(b),c(b,s,"Generator"),c(b,o,(function(){return this})),c(b,"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,E.prototype={constructor:E,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(_),!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,h):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),h},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),_(n),h}},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;_(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),h}},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 p(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 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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(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 y,m=function(){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(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 i,s,c,l,h,d,y,m;return i=t,s=[{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=f(f({},this.constructor.getDefaultOptions()),t),this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(m=p(u().mark((function t(){var e,n,r,i,o,a,s=arguments;return u().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 m.apply(this,arguments)})},{key:"go",value:(y=p(u().mark((function t(e){var n,r,i,o,a,s,c,l,p,h,f,d,v,g,y,m,b,x=this,w=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=!(w.length>1&&void 0!==w[1])||w[1],r=w.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=w[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(p=this.steps.indexOf(l),f=p,d=(h=l).onBeforeChange,v=h.onAfterChange,this.startPreloader(),g=!1,!d){t.next=26;break}return t.next=23,Promise.resolve().then((function(){return d.call.apply(d,[x,h,s].concat(i))}));case 23:if(t.t0=t.sent,!1!==t.t0){t.next=26;break}g=!0;case 26:return t.next=28,this.emit.apply(this,["onBeforeChange",h,s].concat(i));case 28:if(!t.sent.some((function(t){return!1===t}))){t.next=30;break}g=!0;case 30:if(this.stopPreloader(),!g){t.next=33;break}return t.abrupt("return",!1);case 33:return this.beforeChangeStep({toStep:h,toStepIndex:f,currentStep:l,currentStepIndex:p,fromStep:s,fromStepIndex:c}),this.toStep=h,this.toStepIndex=f,this.currentStep=l,this.currentStepIndex=p,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,y=this.options.scrollBehavior,m=this.currentStep.scrollPadding,b=void 0===m?this.options.scrollPadding:m,this.scrollParentsToStepEl(),this.scrollTo(this.getStepEl(this.currentStep,!0),y,b),this.mountStep(),setTimeout((function(){x.getEl("tooltip")&&x.scrollTo(x.getEl("tooltip"),y,b)}),300),v&&v.call.apply(v,[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 y.apply(this,arguments)})},{key:"previous",value:(d=p(u().mark((function t(){var e,n,r,i,o=this,a=arguments;return u().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 d.apply(this,arguments)})},{key:"next",value:(h=p(u().mark((function t(){var e,n,r,i,o=this,a=arguments;return u().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 h.apply(this,arguments)})},{key:"stop",value:(l=p(u().mark((function t(){var e,n,r,i=arguments;return u().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 l.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 u=r.attributes[c],l=u.name,p=u.value,h=i.test(l),d=!h&&o.test(l);if(h||d){var v=h?l.replace("".concat(n,"-").concat(t,"-"),""):l.replace("".concat(n,"-"),"");"tour"!==v&&(h||d&&!s[v])&&(s[v]=p)}}return f(f({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 f(f({},t),{},{step:t.step||e})}))}},{key:"sortSteps",value:function(t){return a(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,u=c.innerWidth,l=c.innerHeight;return a>=0&&s<=u||window.scrollBy({behavior:e,left:a-n}),i>=0&&o<=l||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"),u=!this.fromStep||c||o?null:this.getOverlayStepPath(this.fromStep);u&&(i.setAttribute("from",u),i.setAttribute("to",a)),i.setAttribute("lock","true")}i.onend=function(){i.removeAttribute("lock")},i.beginElement()}}var l=getComputedStyle(e);return["absolute","relative","fixed"].includes(l.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,u=o.right,l=a+n,p=s-n/2,h=r<r+(c-n/2)?r:c-n/2,f=r+i>r+(u+n/2)?i:u+n/2;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(e)),t.style.cssText="width: ".concat(f,"px;\n height: ").concat(l,"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,a=this.options.padding;r=r||window;var s=(i=(i=i||this.currentStep.position)||this.options.position).split("-"),c=o(s,2),u=c[0],l=c[1],p=getComputedStyle(n);"floating"===p.getPropertyValue("position")&&(a=0);var h=t.style;h.top=null,h.right=null,h.bottom=null,h.left=null,h.transform=null;var f=n.getBoundingClientRect(),d=f.top,v=f.bottom,g=f.left,y=f.right,m=f.width,b=f.height,x=t.getBoundingClientRect(),w=x.height,S=x.width,k=t.cloneNode(!0);k.style.visibility="hidden",k.innerHTML="",t.parentElement.appendChild(k);var _=k.getBoundingClientRect(),E=_.width;k.parentElement.removeChild(k);var O=new DOMRect(0,0,window.innerWidth,window.innerHeight);if(!(r instanceof Window)){var P=r.getBoundingClientRect(),A=P.x,T=P.y;O=new DOMRect(A,T,r.scrollWidth,r.scrollHeight)}var j=O,I=j.top,L=j.bottom,C=j.left,D=j.right;if(this.isEl(n,"fakeStep"))u="floating";else{var R=["bottom","right","left","top"],N=getComputedStyle(t),B=N.marginTop,M=N.marginLeft,$=N.marginRight,H=N.marginBottom;if(B=parseInt(B,10),M=parseInt(M,10),$=parseInt($,10),w+B+(H=parseInt(H,10))>d-I&&R.splice(R.indexOf("top"),1),w+B+H>L-v&&R.splice(R.indexOf("bottom"),1),E+M+$>g-C&&R.splice(R.indexOf("left"),1),E+M+$>D-y&&R.splice(R.indexOf("right"),1),"top"===(u=R.length?R.includes(u)?u:R[0]:"floating")||"bottom"===u){var W=["left","right","middle"];D-g<E&&W.splice(W.indexOf("left"),1),y-C<E&&W.splice(W.indexOf("right"),1),(g+m/2-C<E/2||D-(y-m/2)<E/2)&&W.splice(W.indexOf("middle"),1),l=W.length?W.includes(l)?l:W[0]:"middle"}}t.setAttribute("data-guidechimp-position",u);var F=document.documentElement;switch(u){case"top":h.bottom="".concat(b+a,"px");break;case"right":h.left="".concat(y+a/2-F.clientLeft,"px");break;case"left":h.right="".concat(F.clientWidth-(g-a/2),"px");break;case"bottom":h.top="".concat(b+a,"px");break;default:h.left="50%",h.top="50%",h.transform="translate(-50%,-50%)"}if(t.removeAttribute("data-guidechimp-alignment"),l)switch(t.setAttribute("data-guidechimp-alignment",l),l){case"left":h.left="".concat(g-a/2,"px");break;case"right":h.right="".concat(F.clientWidth-y-a/2,"px");break;default:g+m/2<S/2||g+m/2+S/2>F.clientWidth?h.left="".concat(F.clientWidth/2-S/2,"px"):h.left="".concat(g+m/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 r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(0,n.Z)(e,r);return i&&i.setAttribute("data-quidechimp-".concat(this.uid),t),i}},{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(a(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(),f(f({},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=p(u().mark((function t(){var n=arguments;return u().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(),f(f({},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=f(f({},this.getDefaultTmplData()),{},{interaction:e});return this.createEl("interaction",this.getInteractionTmpl(),f(f({},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(),f(f({},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=f(f({},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(),f(f({},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(),f(f({},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=f(f({},this.getDefaultTmplData()),{},{showProgressbar:e,progressMax:n,progressMin:r,progress:i});return this.createEl("progressbar",this.getProgressbarTmpl(),f(f({},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(),f(f({},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(),f(f({},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 i=e;if(!(0,r.Z)(i)){var o=e.onClick,a=e.tagName,s=void 0===a?"button":a,c=e.title,u=void 0===c?"":c,l=e.class;(i=document.createElement(s)).innerHTML=u,l&&(i.className=l),o&&i.addEventListener("click",(function(e){o.call(t,e)}))}n.push(i)})),this.createEl("customButtons",this.getCustomButtonsTmpl(),f(f({},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(),f(f({},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(),f(f({},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(),f(f({},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(),f(f({},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(),f(f({},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=o(r,1),a=i[0];n.priority&&r.includes(n.priority)&&(a=n.priority);var s=t.trim();return this.listeners[s]=this.listeners[s]||{},this.listeners[s][a]=this.listeners[s][a]||[],this.listeners[s][a].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=a(this.constructor.getEventListenersPriorities()).reverse(),s=t.trim(),c=[],u=Promise.resolve(c);return this.listeners[s]&&o.forEach((function(t){var n=e.listeners[s][t];n&&(u=u.then((function(){return Promise.all(n.map((function(t){return Promise.resolve().then((function(){return t.apply(e,r)}))})))})).then((function(t){return c=[].concat(a(c),a(t))})))})),u}},{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=f(f({},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}}],c=[{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",apiHost:"https://ahd-be-jggub5n6qq-em.a.run.app",toursRefetchIntervalInSec:86400,helpRefetchIntervalInSec:86400,statsCacheIntervalInSec:86400}}},{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,u=s.right,l=s.bottom,p=s.left;return{right:u,bottom:l,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))}}],s&&g(i.prototype,s),c&&g(i,c),Object.defineProperty(i,"prototype",{writable:!1}),t}(),b=function(){function t(t){this.persistent=t,this._lootBag={},this._ttl=null}return Object.defineProperty(t.prototype,"timeoutInSeconds",{get:function(){return this._ttl},set:function(e){if(null!==e&&!t.isPositiveInteger(e))throw new Error("'".concat(e,"' is not a positive integer required when setting the top-level TTL"));this._ttl=e},enumerable:!1,configurable:!0}),t.prototype.put=function(e,n,r){if(void 0===r&&(r=null),null!==r&&!t.isPositiveInteger(r))throw new Error("'".concat(r,"' is not a positive integer required when setting a key-level TTL"));var i={v:n,t:this._getNow(),kt:r};this.persistent?localStorage.setItem(e,JSON.stringify(i)):this._lootBag[e]=i},t.prototype.get=function(t,e){if(void 0===e&&(e=null),!this.persistent){if(t in this._lootBag){r=this._lootBag[t];return null===this._ttl&&null===r.kt?r.v:this._isCacheStale(r)?(this.removeKey(t),e):r.v}return e}if(!(t in localStorage))return e;var n=localStorage.getItem(t);try{var r=JSON.parse(n);return null===this._ttl&&null===r.kt?r.v:this._isCacheStale(r)?(this.removeKey(t),e):r.v}catch(t){return null===e?n:e}},t.prototype.removeKey=function(t){this.persistent?t in localStorage&&localStorage.removeItem(t):t in this._lootBag&&delete this._lootBag[t]},t.prototype.keyExists=function(t){if(!this.persistent){if(t in this._lootBag){n=this._lootBag[t];return null===this._ttl&&null===n.kt||(!this._isCacheStale(n)||(this.removeKey(t),!1))}return!1}if(!(t in localStorage))return!1;var e=localStorage.getItem(t);try{var n=JSON.parse(e);return null===this._ttl&&null===n.kt||(!this._isCacheStale(n)||(this.removeKey(t),!1))}catch(t){return!0}},t.prototype.clear=function(){this.persistent?localStorage.clear():this._lootBag={}},t.prototype.keys=function(){return this.persistent?Object.keys(localStorage):Object.keys(this._lootBag)},t.prototype.runGarbageCollector=function(){var t=[];if(this.persistent)for(var e=0,n=Object.keys(localStorage);e<n.length;e++){var r=n[e],i=localStorage.getItem(r);try{var o=JSON.parse(i);if(!("v"in o&&"t"in o&&"kt"in o))continue;null===this._ttl&&null===o.kt||this._isCacheStale(o)&&(localStorage.removeItem(r),t.push(r))}catch(t){}}else for(var a=0,s=Object.keys(this._lootBag);a<s.length;a++){r=s[a];null===this._ttl&&null===this._lootBag[r].kt||this._isCacheStale(this._lootBag[r])&&(delete this._lootBag[r],t.push(r))}return t},t.prototype.isLocalStorageAvailable=function(){var t=(new Date).getTime().toString(),e=t;try{return localStorage.setItem(t,e),localStorage.removeItem(t),!0}catch(t){return!1}},t.prototype._getNow=function(){return Math.floor(Date.now()/1e3)},t.prototype._isCacheStale=function(t){var e=t.t,n=null===t.kt?this._ttl:t.kt;return this._getNow()-e>n},t.isPositiveInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&t>0},t}(),x=(y=function(t,e){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},y(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),w=(new(function(t){function e(){return t.call(this,false)||this}return x(e,t),e}(b)),function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),S=new(function(t){function e(){return t.call(this,true)||this}return w(e,t),e}(b)),k=__webpack_require__(219);function _(t){return _="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},_(t)}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(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 P(t,e,n){return e&&O(t.prototype,e),n&&O(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function A(){return A="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=T(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},A.apply(this,arguments)}function T(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=D(t)););return t}function j(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&I(t,e)}function I(t,e){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},I(t,e)}function L(t){var e=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}}();return function(){var n,r=D(t);if(e){var i=D(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}function C(t,e){if(e&&("object"===_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function D(t){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(t)}const R=function(t,e){e.beacons=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new(function(e){j(r,e);var n=L(r);function r(){return E(this,r),n.apply(this,arguments)}return P(r,[{key:"getDataBeacons",value:function(t){var e=this,n=A(D(r.prototype),"getDataBeacons",this).call(this,t);return n.forEach((function(t){var n=t.id,r=t.element,i="",o="".concat(e.constructor.getBeaconDataPrefix(),"-tour"),a="".concat(e.constructor.getBeaconDataPrefix(),"-").concat(n,"-tour");r.attributes[o]&&(i=r.attributes[o].value);r.attributes[a]&&(i=r.attributes[a].value);i&&(t.tour=i)})),n}},{key:"createBeaconEl",value:function(e){var n=A(D(r.prototype),"createBeaconEl",this).call(this,e);return e.tour&&n.addEventListener("click",(function(){var n=null;if("string"==typeof e.tour||Array.isArray(e.tour))n=new t(e.tour);else if(e.tour instanceof t)n=e.tour;else if("object"===_(e.tour)){var r=e.tour,i=r.steps,o=r.options;n=new t(i,o)}n&&n.start()})),n}}]),r}(k.Z))(e,n)}};function N(t){return N="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},N(t)}function B(t,e,n){return B=J()?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&&U(i,n.prototype),i},B.apply(null,arguments)}function M(t){return function(t){if(Array.isArray(t))return $(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return $(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(t,e)}(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 $(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 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 W(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){F(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 F(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function z(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */z=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 E()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===l)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=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)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 u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function p(){}function h(){}function f(){}var d={};s(d,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(_([])));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=u(t[i],t,o);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==N(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){l.value=t,a(l)}),(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 l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;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,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function _(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:E}}function E(){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=_,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(S),!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,l):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),l},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),S(n),l}},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;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function q(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 V(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){q(o,r,i,a,s,"next",t)}function s(t){q(o,r,i,a,s,"throw",t)}a(void 0)}))}}function K(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G(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 U(t,e){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},U(t,e)}function Z(t,e){if(e&&("object"===N(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function J(){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 Y(t){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Y(t)}var X=__webpack_require__(68).match,Q="AHD_TOUR_DATA",tt="AHD_HIGHLIGHTS_DATA",et="AHD_VISITOR_STATS",nt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&U(t,e)}(w,t);var e,n,r,i,o,a,s,c,u,l,p,h,f,d,v,g,y,m,b,x=(e=w,n=J(),function(){var t,r=Y(e);if(n){var i=Y(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return Z(this,t)});function w(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return K(this,w),(e=x.call(this,t,n)).attachPlugins(),e}return r=w,i=[{key:"attachPlugins",value:(b=V(z().mark((function t(){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:[R].forEach((function(t){rt.extend(t)}));case 2:case"end":return t.stop()}}),t)}))),function(){return b.apply(this,arguments)})},{key:"initializeSiteMap",value:(m=V(z().mark((function t(e){var n,r;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(S.get(tt),(n=S.get(Q))&&!e){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(n);case 6:n=t.sent;case 7:if((r=S.get(et))&&!e){t.next=12;break}return t.next=11,this.fetchAndCachePageVisitsData(r);case 11:r=t.sent;case 12:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"getHelpContent",value:(y=V(z().mark((function t(e,n){var r,i;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=S.get(Q))&&!n){t.next=5;break}return t.next=4,this.fetchAndCacheTourData(r);case 4:r=t.sent;case 5:return i=this.getApplicabeDataForUrl(r,e,"help",!0),t.abrupt("return",i);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e){return y.apply(this,arguments)})},{key:"showPageTour",value:(g=V(z().mark((function t(e,n){var r,i,o,a=this;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:if((r=S.get(Q))&&!n){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(r);case 6:r=t.sent;case 7:i=this.getApplicabeDataForUrl(r,e,"pageview"),o=i.map((function(t){return{element:t.selector,title:t.content.title,description:a.generateDescription(t.content),position:t.position}})),this.setTour(o),this.start();case 11:case"end":return t.stop()}}),t,this)}))),function(t,e){return g.apply(this,arguments)})},{key:"fetchFaqs",value:(v=V(z().mark((function t(e){var n;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/faq-group-list?filter[slug]=").concat(e,"&filter[status]=published&limit=10&orderBy=order_ASC")).then((function(t){return t.json()}));case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"showPageBeacons",value:(d=V(z().mark((function t(e,n){var r,i,o,a=this;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:if((r=S.get(Q))&&!n){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(r);case 6:r=t.sent;case 7:i=this.getApplicabeDataForUrl(r,e,"pageview",!0),o=i.map((function(t){return{element:t.selector,position:t.position,tour:[{element:t.selector,position:t.position,title:t.content.title,description:a.generateDescription(t.content)}]}})),rt.beacons(o,{boundary:"outer"}).showAll();case 10:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"showPageHighlights",value:(f=V(z().mark((function t(e,n){var r,i,o,a,s=this,c=arguments;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=c.length>2&&void 0!==c[2]&&c[2],t.next=3,this.stop();case 3:i=S.get(tt),o=this.getUnAcknowledgedHightlightsForUrl(i,e,"highlight",r),a=o.map((function(t){return{element:t.selector,position:t.position,onClick:(e=V(z().mark((function e(){return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.acknowledgeHighlight(t.id);case 1:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),tour:[{element:t.selector,position:t.position,title:t.content.title,description:s.generateDescription(t.content)}]};var e})),rt.beacons(a,{boundary:"outer"}).showAll();case 8:case"end":return t.stop()}}),t,this)}))),function(t,e){return f.apply(this,arguments)})},{key:"clearCachedData",value:(h=V(z().mark((function t(){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:S.removeKey(tt),S.removeKey("AHD_HELP_DATA"),S.removeKey(Q),S.removeKey(et);case 4:case"end":return t.stop()}}),t)}))),function(){return h.apply(this,arguments)})},{key:"acknowledgeHighlight",value:(p=V(z().mark((function t(e){var n,r,i;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=S.get(et)||{},r=(null==n?void 0:n.ack)||[],(i=new Set(r)).has(e)||i.add(e),S.put(et,W(W({},n),{},{ack:M(i)}),86400),this.updateVisitorStats({ack:[e]},"highlight");case 6:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"generateDescription",value:function(t){return t.content||""}},{key:"getUnAcknowledgedHightlightsForUrl",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=S.get(et)||{},o=(null==i?void 0:i.ack)||[];return t.filter((function(t){return!(!r&&o&&o.includes(t.id))&&X(t.slug,{decode:decodeURIComponent})(e)}))}},{key:"getApplicabeDataForUrl",value:function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=S.get(et)||{},a=(null==o?void 0:o.visited)||[],s=new Set(a);return t.filter((function(t){if(i||!a||!a.includes(t.slug)){var c=X(t.slug,{decode:decodeURIComponent})(e);return c&&!s.has(t.slug)&&(s.add(t.slug),S.put(et,W(W({},o),{},{visited:M(s)}),86400),r.markPageVisited(t.slug,n)),c}return!1}))}},{key:"fetchAndCacheHighlightsData",value:(l=V(z().mark((function t(e){var n;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/highlights?filter[isActive]=true")).then((function(t){return t.json()}));case 2:return(n=t.sent).rows&&(e=n.rows.filter((function(t){return!!t.content})),S.put(tt,e,this.options.highlightRefetchIntervalInSec)),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"fetchAndCacheTourData",value:(u=V(z().mark((function t(e){var n;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/context-tours?filter[isActive]=true")).then((function(t){return t.json()}));case 3:return(n=t.sent).rows&&(e=n.rows.filter((function(t){return!!t.content})),S.put(Q,e,this.options.toursRefetchIntervalInSec)),t.abrupt("return",e);case 6:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"fetchAndCachePageVisitsData",value:(c=V(z().mark((function t(e){var n;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/stats/").concat(this.options.visitorId,"?filter[device]=web")).then((function(t){return t.json()}));case 2:return(n=t.sent)&&S.put(et,n,this.options.statsCacheIntervalInSec),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"updateVisitorStats",value:(s=V(z().mark((function t(e,n){var r;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/visitor-stats"),{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify({data:{dataToPatch:e,visitorId:this.options.visitorId,channel:"web",type:n}})}).then((function(t){return t.json()}));case 2:return(r=t.sent)&&S.put(et,r,this.options.visitsCacheIntervalInSec),t.abrupt("return",void 0);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return s.apply(this,arguments)})},{key:"markPageVisited",value:(a=V(z().mark((function t(e,n){var r;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/visitor-stats"),{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify({data:{slug:e,visitorId:this.options.visitorId,channel:"web",type:n}})}).then((function(t){return t.json()}));case 2:return(r=t.sent)&&S.put(et,r,this.options.visitsCacheIntervalInSec),t.abrupt("return",void 0);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],i&&G(r.prototype,i),o&&G(r,o),Object.defineProperty(r,"prototype",{writable:!1}),w}(m),rt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return B(nt,e)};rt.prototype=nt.prototype,rt.plugins=new Set,rt.extend=function(t){if(!rt.plugins.has(t)){rt.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,[nt,rt].concat(n))}return rt};const it=rt})(),__webpack_exports__})()));
|
|
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 __webpack_modules__={219:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Beacons});var _utils_domTemplate__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(95),_templates_beacon_html__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(398);function _typeof(t){return _typeof="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},_typeof(t)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){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 _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(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)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(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 _iterableToArrayLimit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){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}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function ownKeys(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 _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach((function(e){_defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(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 _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var Beacons=function(){function Beacons(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_classCallCheck(this,Beacons),this.beacons=[],this.options={},this.observers={},"undefined"!=typeof ResizeObserver&&(this.observers.elementResizeObserver=new ResizeObserver((function(){return e.refresh()}))),this.cache=new Map,this.elements=new Map,this.setOptions(n),this.setBeacons(t),this.init()}return _createClass(Beacons,[{key:"init",value:function(){}},{key:"setOptions",value:function(t){return this.options=_objectSpread(_objectSpread({},this.constructor.getDefaultOptions()),t),this}},{key:"setBeacons",value:function(t){var e=this;return this.removeAll(),this.beacons=!t||"string"==typeof t||Array.isArray(t)&&t.every((function(t){return"string"==typeof t}))?this.getDataBeacons(t):this.getJsBeacons(t),this.beacons.length&&(this.beacons.forEach((function(t){var n=t.element;if(n){var r=e.getEl(n);if(r){var i=e.createBeaconEl(t);i.hidden=!0,e.constructor.isFixed(r)&&i.classList.add(e.constructor.getFixedClass()),(r.parentElement&&r.parentElement!==document.body?r.parentElement:document.body).append(i),e.elements.set(t,i),e.setBeaconPosition(r,i,t),e.observeResizing(r)}}})),this.addOnWindowResizeListener()),this}},{key:"getBeacons",value:function(){return this.beacons}},{key:"getBeacon",value:function(t,e){return _slicedToArray(t&&"object"===_typeof(t)?[t]:this.beacons.filter((function(e){return e.id===t})),1)[0]||e}},{key:"getDataBeacons",value:function getDataBeacons(ids){var _this3=this,beaconsIds="string"==typeof ids?ids.split(",").map((function(t){return t.trim()})):ids,beaconsSelector=["[".concat(this.constructor.getBeaconDataPrefix(),"]")];beaconsIds&&(beaconsSelector=[],beaconsIds.forEach((function(t){beaconsSelector.push("[".concat(_this3.constructor.getBeaconDataPrefix(),"*='").concat(t,"']"))})));var beaconsEl=Array.from(document.querySelectorAll(beaconsSelector.join(","))),dataGlobalRegExp=new RegExp("^".concat(this.constructor.getBeaconDataPrefix(),"-([^-]+)$")),beacons=[];return beaconsEl.forEach((function(el){var beaconsIdsAttrValue=el.attributes[_this3.constructor.getBeaconDataPrefix()].value;if(beaconsIdsAttrValue){var elBeaconsIds=beaconsIdsAttrValue.split(",");elBeaconsIds.forEach((function(id){if(!beaconsIds||beaconsIds.includes(id)){for(var globalBeaconAttrs={},beaconAttrs={},dataBeaconRegExp=new RegExp("^".concat(_this3.constructor.getBeaconDataPrefix(),"-").concat(id,"-([^-]+)$")),j=0;j<el.attributes.length;j++){var _el$attributes$j=el.attributes[j],attrName=_el$attributes$j.name,attrValue=_el$attributes$j.value,isGlobalAttr=dataGlobalRegExp.test(attrName),isBeaconAttr=dataBeaconRegExp.test(attrName);if(isGlobalAttr){var _attrName$match=attrName.match(dataGlobalRegExp),_attrName$match2=_slicedToArray(_attrName$match,2),shortAttrName=_attrName$match2[1];globalBeaconAttrs[shortAttrName]=attrValue}else if(isBeaconAttr){var _attrName$match3=attrName.match(dataBeaconRegExp),_attrName$match4=_slicedToArray(_attrName$match3,2),_shortAttrName=_attrName$match4[1];beaconAttrs[_shortAttrName]=attrValue}}var beacon=_objectSpread(_objectSpread(_objectSpread({id,position:_this3.options.position},globalBeaconAttrs),beaconAttrs),{},{element:el}),onClick=beacon.onclick||beacon.onClick;onClick&&(delete beacon.onclick,beacon.onClick=function(e){var onClickCode=eval(onClick);"function"==typeof onClickCode&&onClickCode.call(e,beacon)}),beacons.push(beacon)}}))}})),beacons}},{key:"getJsBeacons",value:function(t){return(Array.isArray(t)?t:[t]).map((function(t,e){return _objectSpread(_objectSpread({},t),{},{id:t.id||e})}))}},{key:"getBeaconTpl",value:function(){return _templates_beacon_html__WEBPACK_IMPORTED_MODULE_1__.Z}},{key:"createBeaconEl",value:function(t){var e=this,n=_objectSpread({},t);return n.onClick=function(n){n.stopPropagation(),t.onClick&&t.onClick.call(e,n,t)},(0,_utils_domTemplate__WEBPACK_IMPORTED_MODULE_0__.Z)(this.getBeaconTpl(),{beacon:n})}},{key:"getEl",value:function(t){return t instanceof HTMLElement?t:document.querySelector(t)}},{key:"setBeaconPosition",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.position,i=n.boundary;r=r||this.options.position,i="inner"===(i=i||this.options.boundary)?"inner":"outer";var o=t.offsetLeft,a=t.offsetTop,s=t.offsetWidth,c=t.offsetHeight,u=e.style,l=getComputedStyle(e),p=l.width,h=l.height;switch(p=parseInt(p,10),h=parseInt(h,10),e.removeAttribute("data-beacon-position"),e.removeAttribute("data-beacon-boundary"),e.setAttribute("data-beacon-position",r),e.setAttribute("data-beacon-boundary",i),r){case"top-left":"inner"===i?(u.left="".concat(o,"px"),u.top="".concat(a,"px")):(u.left="".concat(o-p,"px"),u.top="".concat(a-h,"px"));break;case"top":u.left="".concat(o+(s-p)/2,"px"),u.top="".concat("inner"===i?a:a-h,"px");break;case"top-right":"inner"===i?(u.left="".concat(s+o-p,"px"),u.top="".concat(a,"px")):(u.left="".concat(s+o,"px"),u.top="".concat(a-h,"px"));break;case"left":u.left="".concat("inner"===i?o:o-p,"px"),u.top="".concat(a+(c-h)/2,"px");break;case"right":u.left="".concat("inner"===i?o+s-p:o+s,"px"),u.top="".concat(a+(c-h)/2,"px");break;case"bottom-left":"inner"===i?(u.left="".concat(o,"px"),u.top="".concat(a+c-h,"px")):(u.left="".concat(o-p,"px"),u.top="".concat(a+c,"px"));break;case"bottom":u.left="".concat(o+(s-p)/2,"px"),u.top="".concat("inner"===i?a+c-h:a+c,"px");break;case"bottom-right":"inner"===i?(u.left="".concat(s+o-p,"px"),u.top="".concat(a+c-h,"px")):(u.left="".concat(s+o,"px"),u.top="".concat(a+c,"px"));break;default:e.setAttribute("data-beacon-position","center"),u.left="".concat(o+(s-p)/2,"px"),u.top="".concat(a+(c-h)/2,"px")}return this}},{key:"isCanShowBeacon",value:function(t){var e=t.canShow;return!(void 0!==e&&(!e||"function"==typeof e&&!1===e()))}},{key:"showAll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.beacons.forEach((function(n){t.show(n,e)})),this}},{key:"show",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getBeacon(t);if(n){var r=this.elements.get(n);r&&(e||this.isCanShowBeacon(n))&&(r.hidden=!1)}return this}},{key:"hideAll",value:function(){var t=this;return this.beacons.forEach((function(e){t.hide(e)})),this}},{key:"hide",value:function(t){var e=this.getBeacon(t);if(e){var n=this.elements.get(e);n&&(n.hidden=!0)}return this}},{key:"removeAll",value:function(){var t=this;return this.beacons.forEach((function(e){t.remove(e)})),this.beacons=[],this.unobserveResizeAllElements(),this.removeOnWindowResizeListener(),this}},{key:"remove",value:function(t){var e=this.getBeacon(t),n=this.elements.get(e);if(n){n.parentNode.removeChild(n),-1!==this.beacons.indexOf(e)&&this.beacons.splice(this.beacons.indexOf(e),1),this.elements.delete(e);var r=this.getEl(e.element);r&&this.unobserveResizing(r)}return this.beacons.length||this.removeOnWindowResizeListener(),this}},{key:"refresh",value:function(){var t=this;return this.beacons.forEach((function(e){var n=e.element;if(n){var r=t.getEl(n),i=t.elements.get(e);r&&i&&t.setBeaconPosition(r,i,e)}})),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:"observeResizing",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{box:"border-box"},n=this.observers.elementResizeObserver;return n&&n.observe(t,e),this}},{key:"unobserveResizing",value:function(t){var e=this.observers.elementResizeObserver;return e&&e.unobserve(t),this}},{key:"unobserveResizeAllElements",value:function(){var t=this.observers.elementResizeObserver;return t&&t.disconnect(),this}}],[{key:"getDefaultOptions",value:function(){return{position:"center",boundary:"inner"}}},{key:"getFixedClass",value:function(){return"gc-beacon-fixed"}},{key:"getBeaconDataPrefix",value:function(){return"data-beacon"}},{key:"isFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isFixed(e))}}]),Beacons}()},95:(t,e,n)=>{"use strict";n.d(e,{Z:()=>x});var r=n(353),i=n.n(r),o=n(220),a=n.n(o),s=n(629);const c=function(t){return t instanceof SVGElement||/^\[object SVG(.+)Element\]$/.test("".concat(t))},u=function(t){return/^[object NodeList]$/.test("".concat(t))};function l(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||v(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 p(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 h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?p(Object(n),!0).forEach((function(e){f(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}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}function d(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)||v(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 v(t,e){if(t){if("string"==typeof t)return g(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)?g(t,e):void 0}}function g(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 y(t,e,n){return y=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&&b(i,n.prototype),i},y.apply(null,arguments)}function m(){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 b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}const x=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 o=n.parseFromString(r,"text/html"),p=document.implementation.createHTMLDocument(),v=/{{([^}}]+)?}}/gm,g=/^@(.+)$/,m=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]:p.body,o=r,b=Object.keys(n),x=Object.values(n),w=function(t){return y(Function,b.concat(["return ".concat(t,";")])).apply(void 0,x)};if(e){if(e.nodeType===Node.ELEMENT_NODE){if(e.hasAttribute("if")){if(m.set(e.parentNode,!1),!w(e.getAttribute("if")))return;m.set(e.parentNode,!0)}if(e.hasAttribute("elseif")){if(m.get(e.parentNode)||!w(e.getAttribute("elseif")))return;m.set(e.parentNode,!0)}if(e.hasAttribute("else")){if(m.get(e.parentNode))return;m.set(e.parentNode,!0)}if(e.hasAttribute("for")){var S=e.getAttribute("for").split(" in "),k=d(S,2),_=k[0],E=k[1];e.removeAttribute("for");var O=_.replace(/\(|\)/g,"").split(","),P=d(O,2),A=P[0],T=P[1];A=A.trim(),T=T?T.trim():"";var j=w(E.trim()),I=Array.isArray(j);return void Object.keys(j).forEach((function(r){var i=h(h({},n),{},f({},A,j[r]));T&&(i[T]=I?parseInt(r,10):r),t(e,i,o)}))}e!==e.ownerDocument.body&&"GC-TEMPLATE"!==e.tagName&&(o=e.cloneNode(),r.append(o)),l(e.attributes).forEach((function(t){var e=t.name,n=t.value,r=g.exec(e);if(r){var s=d(r,2)[1];return o.addEventListener(s,(function(t){return y(Function,[].concat(b,["$event"]).concat(["return ".concat(n).concat(/\(.+\)/.test(n)?"":"()",";")])).apply(void 0,[].concat(x,[t]))})),void o.removeAttribute(e)}for(var c=v.exec(n),u=0,l="";c;){l+=n.slice(u,c.index);var p=d(c,2),h=p[0],f=p[1];f=f.trim();try{h=w(f),(i()(h)||a()(h))&&(h="")}catch(t){console.error(t)}l+=h,u=c.index+c[0].length,c=v.exec(n)}l+=n.substr(u,n.length-u),"html"===e?(o.innerHTML=l,o.removeAttribute(e)):["if","else","elseif"].includes(e)?o.removeAttribute(e):o.setAttribute(e,l)}))}else if(e.nodeType===Node.TEXT_NODE){var L=v.exec(e.nodeValue);if(L){for(var C=0;L;){o.append(document.createTextNode(e.nodeValue.slice(C,L.index)));var D=L,R=d(D,2),N=R[0],B=R[1];B=B.trim();try{N=w(B),(i()(N)||a()(N))&&(N="")}catch(t){console.error(t)}(0,s.Z)(N)||c(N)?o.append(N):u(N)?N.forEach((function(t){o.append(t)})):o.append(document.createTextNode(N)),C=L.index+L[0].length,L=v.exec(e.nodeValue)}o.append(document.createTextNode(e.nodeValue.slice(C,e.nodeValue.length)))}else o.append(e.cloneNode())}var M=e.childNodes,$=void 0===M?[]:M;$.length&&$.forEach((function(e){t(e,n,o)}))}};return b(o.body,e,p.body),p.body.firstElementChild}},629:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r=function(t){return t instanceof HTMLElement||/^\[object HTML(.+)Element\]$/.test("".concat(t))}},398:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r='<div class="gc-beacon {{ beacon.class }}" @click="beacon.onClick($event)"></div>'},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}},68:(t,e,n)=>{"use strict";function r(t,e){void 0===e&&(e={});for(var n=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var i=1,o="";if("?"===t[s=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(s));for(;s<t.length;)if("\\"!==t[s]){if(")"===t[s]){if(0==--i){s++;break}}else if("("===t[s]&&(i++,"?"!==t[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));o+=t[s++]}else o+=t[s++]+t[s++];if(i)throw new TypeError("Unbalanced pattern at ".concat(n));if(!o)throw new TypeError("Missing pattern at ".concat(n));e.push({type:"PATTERN",index:n,value:o}),n=s}else{for(var a="",s=n+1;s<t.length;){var c=t.charCodeAt(s);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;a+=t[s++]}if(!a)throw new TypeError("Missing parameter name at ".concat(n));e.push({type:"NAME",index:n,value:a}),n=s}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(t),r=e.prefixes,i=void 0===r?"./":r,o="[^".concat(c(e.delimiter||"/#?"),"]+?"),a=[],s=0,u=0,l="",p=function(t){if(u<n.length&&n[u].type===t)return n[u++].value},h=function(t){var e=p(t);if(void 0!==e)return e;var r=n[u],i=r.type,o=r.index;throw new TypeError("Unexpected ".concat(i," at ").concat(o,", expected ").concat(t))},f=function(){for(var t,e="";t=p("CHAR")||p("ESCAPED_CHAR");)e+=t;return e};u<n.length;){var d=p("CHAR"),v=p("NAME"),g=p("PATTERN");if(v||g){var y=d||"";-1===i.indexOf(y)&&(l+=y,y=""),l&&(a.push(l),l=""),a.push({name:v||s++,prefix:y,suffix:"",pattern:g||o,modifier:p("MODIFIER")||""})}else{var m=d||p("ESCAPED_CHAR");if(m)l+=m;else if(l&&(a.push(l),l=""),p("OPEN")){y=f();var b=p("NAME")||"",x=p("PATTERN")||"",w=f();h("CLOSE"),a.push({name:b||(x?s++:""),pattern:b&&!x?o:x,prefix:y,suffix:w,modifier:p("MODIFIER")||""})}else h("END")}}return a}function i(t,e){return o(r(t,e),e)}function o(t,e){void 0===e&&(e={});var n=u(e),r=e.encode,i=void 0===r?function(t){return t}:r,o=e.validate,a=void 0===o||o,s=t.map((function(t){if("object"==typeof t)return new RegExp("^(?:".concat(t.pattern,")$"),n)}));return function(e){for(var n="",r=0;r<t.length;r++){var o=t[r];if("string"!=typeof o){var c=e?e[o.name]:void 0,u="?"===o.modifier||"*"===o.modifier,l="*"===o.modifier||"+"===o.modifier;if(Array.isArray(c)){if(!l)throw new TypeError('Expected "'.concat(o.name,'" to not repeat, but got an array'));if(0===c.length){if(u)continue;throw new TypeError('Expected "'.concat(o.name,'" to not be empty'))}for(var p=0;p<c.length;p++){var h=i(c[p],o);if(a&&!s[r].test(h))throw new TypeError('Expected all "'.concat(o.name,'" to match "').concat(o.pattern,'", but got "').concat(h,'"'));n+=o.prefix+h+o.suffix}}else if("string"!=typeof c&&"number"!=typeof c){if(!u){var f=l?"an array":"a string";throw new TypeError('Expected "'.concat(o.name,'" to be ').concat(f))}}else{h=i(String(c),o);if(a&&!s[r].test(h))throw new TypeError('Expected "'.concat(o.name,'" to match "').concat(o.pattern,'", but got "').concat(h,'"'));n+=o.prefix+h+o.suffix}}else n+=o}return n}}function a(t,e){var n=[];return s(p(t,n,e),n,e)}function s(t,e,n){void 0===n&&(n={});var r=n.decode,i=void 0===r?function(t){return t}:r;return function(n){var r=t.exec(n);if(!r)return!1;for(var o=r[0],a=r.index,s=Object.create(null),c=function(t){if(void 0===r[t])return"continue";var n=e[t-1];"*"===n.modifier||"+"===n.modifier?s[n.name]=r[t].split(n.prefix+n.suffix).map((function(t){return i(t,n)})):s[n.name]=i(r[t],n)},u=1;u<r.length;u++)c(u);return{path:o,index:a,params:s}}}function c(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function u(t){return t&&t.sensitive?"":"i"}function l(t,e,n){void 0===n&&(n={});for(var r=n.strict,i=void 0!==r&&r,o=n.start,a=void 0===o||o,s=n.end,l=void 0===s||s,p=n.encode,h=void 0===p?function(t){return t}:p,f=n.delimiter,d=void 0===f?"/#?":f,v=n.endsWith,g="[".concat(c(void 0===v?"":v),"]|$"),y="[".concat(c(d),"]"),m=a?"^":"",b=0,x=t;b<x.length;b++){var w=x[b];if("string"==typeof w)m+=c(h(w));else{var S=c(h(w.prefix)),k=c(h(w.suffix));if(w.pattern)if(e&&e.push(w),S||k)if("+"===w.modifier||"*"===w.modifier){var _="*"===w.modifier?"?":"";m+="(?:".concat(S,"((?:").concat(w.pattern,")(?:").concat(k).concat(S,"(?:").concat(w.pattern,"))*)").concat(k,")").concat(_)}else m+="(?:".concat(S,"(").concat(w.pattern,")").concat(k,")").concat(w.modifier);else"+"===w.modifier||"*"===w.modifier?m+="((?:".concat(w.pattern,")").concat(w.modifier,")"):m+="(".concat(w.pattern,")").concat(w.modifier);else m+="(?:".concat(S).concat(k,")").concat(w.modifier)}}if(l)i||(m+="".concat(y,"?")),m+=n.endsWith?"(?=".concat(g,")"):"$";else{var E=t[t.length-1],O="string"==typeof E?y.indexOf(E[E.length-1])>-1:void 0===E;i||(m+="(?:".concat(y,"(?=").concat(g,"))?")),O||(m+="(?=".concat(y,"|").concat(g,")"))}return new RegExp(m,u(n))}function p(t,e,n){return t instanceof RegExp?function(t,e){if(!e)return t;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,i=n.exec(t.source);i;)e.push({name:i[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),i=n.exec(t.source);return t}(t,e):Array.isArray(t)?function(t,e,n){var r=t.map((function(t){return p(t,e,n).source}));return new RegExp("(?:".concat(r.join("|"),")"),u(n))}(t,e,n):function(t,e,n){return l(r(t,n),e,n)}(t,e,n)}n.r(e),n.d(e,{compile:()=>i,match:()=>a,parse:()=>r,pathToRegexp:()=>p,regexpToFunction:()=>s,tokensToFunction:()=>o,tokensToRegexp:()=>l})}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var n in e)__webpack_require__.o(e,n)&&!__webpack_require__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};return(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>ot});var t=__webpack_require__(955),e=__webpack_require__.n(t),n=__webpack_require__(95),r=__webpack_require__(629);function i(t){return i="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},i(t)}function o(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)||s(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 a(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||s(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 s(t,e){if(t){if("string"==typeof t)return c(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)?c(t,e):void 0}}function c(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 u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),a=new E(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=S(a,n);if(s){if(s===h)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=p(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)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 p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var h={};function f(){}function d(){}function v(){}var g={};c(g,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(O([])));m&&m!==e&&n.call(m,o)&&(g=m);var b=v.prototype=f.prototype=Object.create(g);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,a,s,c){var u=p(t[o],t,a);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==i(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(h).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return o=o?o.then(i,i):i()}}function S(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,S(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=p(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;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,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(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 _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=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 i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return d.prototype=v,c(b,"constructor",v),c(v,"constructor",d),d.displayName=c(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},x(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new w(l(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(b),c(b,s,"Generator"),c(b,o,(function(){return this})),c(b,"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,E.prototype={constructor:E,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(_),!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,h):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),h},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),_(n),h}},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;_(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),h}},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 p(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 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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(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 y,m=function(){function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(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 i,s,c,l,h,d,y,m;return i=t,s=[{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=f(f({},this.constructor.getDefaultOptions()),t),this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(m=p(u().mark((function t(){var e,n,r,i,o,a,s=arguments;return u().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 m.apply(this,arguments)})},{key:"go",value:(y=p(u().mark((function t(e){var n,r,i,o,a,s,c,l,p,h,f,d,v,g,y,m,b,x=this,w=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=!(w.length>1&&void 0!==w[1])||w[1],r=w.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=w[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(p=this.steps.indexOf(l),f=p,d=(h=l).onBeforeChange,v=h.onAfterChange,this.startPreloader(),g=!1,!d){t.next=26;break}return t.next=23,Promise.resolve().then((function(){return d.call.apply(d,[x,h,s].concat(i))}));case 23:if(t.t0=t.sent,!1!==t.t0){t.next=26;break}g=!0;case 26:return t.next=28,this.emit.apply(this,["onBeforeChange",h,s].concat(i));case 28:if(!t.sent.some((function(t){return!1===t}))){t.next=30;break}g=!0;case 30:if(this.stopPreloader(),!g){t.next=33;break}return t.abrupt("return",!1);case 33:return this.beforeChangeStep({toStep:h,toStepIndex:f,currentStep:l,currentStepIndex:p,fromStep:s,fromStepIndex:c}),this.toStep=h,this.toStepIndex=f,this.currentStep=l,this.currentStepIndex=p,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,y=this.options.scrollBehavior,m=this.currentStep.scrollPadding,b=void 0===m?this.options.scrollPadding:m,this.scrollParentsToStepEl(),this.scrollTo(this.getStepEl(this.currentStep,!0),y,b),this.mountStep(),setTimeout((function(){x.getEl("tooltip")&&x.scrollTo(x.getEl("tooltip"),y,b)}),300),v&&v.call.apply(v,[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 y.apply(this,arguments)})},{key:"previous",value:(d=p(u().mark((function t(){var e,n,r,i,o=this,a=arguments;return u().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 d.apply(this,arguments)})},{key:"next",value:(h=p(u().mark((function t(){var e,n,r,i,o=this,a=arguments;return u().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 h.apply(this,arguments)})},{key:"stop",value:(l=p(u().mark((function t(){var e,n,r,i=arguments;return u().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 l.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 u=r.attributes[c],l=u.name,p=u.value,h=i.test(l),d=!h&&o.test(l);if(h||d){var v=h?l.replace("".concat(n,"-").concat(t,"-"),""):l.replace("".concat(n,"-"),"");"tour"!==v&&(h||d&&!s[v])&&(s[v]=p)}}return f(f({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 f(f({},t),{},{step:t.step||e})}))}},{key:"sortSteps",value:function(t){return a(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,u=c.innerWidth,l=c.innerHeight;return a>=0&&s<=u||window.scrollBy({behavior:e,left:a-n}),i>=0&&o<=l||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"),u=!this.fromStep||c||o?null:this.getOverlayStepPath(this.fromStep);u&&(i.setAttribute("from",u),i.setAttribute("to",a)),i.setAttribute("lock","true")}i.onend=function(){i.removeAttribute("lock")},i.beginElement()}}var l=getComputedStyle(e);return["absolute","relative","fixed"].includes(l.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,u=o.right,l=a+n,p=s-n/2,h=r<r+(c-n/2)?r:c-n/2,f=r+i>r+(u+n/2)?i:u+n/2;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(e)),t.style.cssText="width: ".concat(f,"px;\n height: ").concat(l,"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,a=this.options.padding;r=r||window;var s=(i=(i=i||this.currentStep.position)||this.options.position).split("-"),c=o(s,2),u=c[0],l=c[1],p=getComputedStyle(n);"floating"===p.getPropertyValue("position")&&(a=0);var h=t.style;h.top=null,h.right=null,h.bottom=null,h.left=null,h.transform=null;var f=n.getBoundingClientRect(),d=f.top,v=f.bottom,g=f.left,y=f.right,m=f.width,b=f.height,x=t.getBoundingClientRect(),w=x.height,S=x.width,k=t.cloneNode(!0);k.style.visibility="hidden",k.innerHTML="",t.parentElement.appendChild(k);var _=k.getBoundingClientRect(),E=_.width;k.parentElement.removeChild(k);var O=new DOMRect(0,0,window.innerWidth,window.innerHeight);if(!(r instanceof Window)){var P=r.getBoundingClientRect(),A=P.x,T=P.y;O=new DOMRect(A,T,r.scrollWidth,r.scrollHeight)}var j=O,I=j.top,L=j.bottom,C=j.left,D=j.right;if(this.isEl(n,"fakeStep"))u="floating";else{var R=["bottom","right","left","top"],N=getComputedStyle(t),B=N.marginTop,M=N.marginLeft,$=N.marginRight,H=N.marginBottom;if(B=parseInt(B,10),M=parseInt(M,10),$=parseInt($,10),w+B+(H=parseInt(H,10))>d-I&&R.splice(R.indexOf("top"),1),w+B+H>L-v&&R.splice(R.indexOf("bottom"),1),E+M+$>g-C&&R.splice(R.indexOf("left"),1),E+M+$>D-y&&R.splice(R.indexOf("right"),1),"top"===(u=R.length?R.includes(u)?u:R[0]:"floating")||"bottom"===u){var W=["left","right","middle"];D-g<E&&W.splice(W.indexOf("left"),1),y-C<E&&W.splice(W.indexOf("right"),1),(g+m/2-C<E/2||D-(y-m/2)<E/2)&&W.splice(W.indexOf("middle"),1),l=W.length?W.includes(l)?l:W[0]:"middle"}}t.setAttribute("data-guidechimp-position",u);var F=document.documentElement;switch(u){case"top":h.bottom="".concat(b+a,"px");break;case"right":h.left="".concat(y+a/2-F.clientLeft,"px");break;case"left":h.right="".concat(F.clientWidth-(g-a/2),"px");break;case"bottom":h.top="".concat(b+a,"px");break;default:h.left="50%",h.top="50%",h.transform="translate(-50%,-50%)"}if(t.removeAttribute("data-guidechimp-alignment"),l)switch(t.setAttribute("data-guidechimp-alignment",l),l){case"left":h.left="".concat(g-a/2,"px");break;case"right":h.right="".concat(F.clientWidth-y-a/2,"px");break;default:g+m/2<S/2||g+m/2+S/2>F.clientWidth?h.left="".concat(F.clientWidth/2-S/2,"px"):h.left="".concat(g+m/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 r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(0,n.Z)(e,r);return i&&i.setAttribute("data-quidechimp-".concat(this.uid),t),i}},{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(a(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(),f(f({},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=p(u().mark((function t(){var n=arguments;return u().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(),f(f({},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=f(f({},this.getDefaultTmplData()),{},{interaction:e});return this.createEl("interaction",this.getInteractionTmpl(),f(f({},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(),f(f({},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=f(f({},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(),f(f({},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(),f(f({},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=f(f({},this.getDefaultTmplData()),{},{showProgressbar:e,progressMax:n,progressMin:r,progress:i});return this.createEl("progressbar",this.getProgressbarTmpl(),f(f({},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(),f(f({},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(),f(f({},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 i=e;if(!(0,r.Z)(i)){var o=e.onClick,a=e.tagName,s=void 0===a?"button":a,c=e.title,u=void 0===c?"":c,l=e.class;(i=document.createElement(s)).innerHTML=u,l&&(i.className=l),o&&i.addEventListener("click",(function(e){o.call(t,e)}))}n.push(i)})),this.createEl("customButtons",this.getCustomButtonsTmpl(),f(f({},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(),f(f({},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(),f(f({},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(),f(f({},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(),f(f({},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(),f(f({},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=o(r,1),a=i[0];n.priority&&r.includes(n.priority)&&(a=n.priority);var s=t.trim();return this.listeners[s]=this.listeners[s]||{},this.listeners[s][a]=this.listeners[s][a]||[],this.listeners[s][a].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=a(this.constructor.getEventListenersPriorities()).reverse(),s=t.trim(),c=[],u=Promise.resolve(c);return this.listeners[s]&&o.forEach((function(t){var n=e.listeners[s][t];n&&(u=u.then((function(){return Promise.all(n.map((function(t){return Promise.resolve().then((function(){return t.apply(e,r)}))})))})).then((function(t){return c=[].concat(a(c),a(t))})))})),u}},{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=f(f({},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}}],c=[{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",apiHost:"https://ahd-be-jggub5n6qq-em.a.run.app",toursRefetchIntervalInSec:86400,helpRefetchIntervalInSec:86400,statsCacheIntervalInSec:86400}}},{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,u=s.right,l=s.bottom,p=s.left;return{right:u,bottom:l,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))}}],s&&g(i.prototype,s),c&&g(i,c),Object.defineProperty(i,"prototype",{writable:!1}),t}(),b=function(){function t(t){this.persistent=t,this._lootBag={},this._ttl=null}return Object.defineProperty(t.prototype,"timeoutInSeconds",{get:function(){return this._ttl},set:function(e){if(null!==e&&!t.isPositiveInteger(e))throw new Error("'".concat(e,"' is not a positive integer required when setting the top-level TTL"));this._ttl=e},enumerable:!1,configurable:!0}),t.prototype.put=function(e,n,r){if(void 0===r&&(r=null),null!==r&&!t.isPositiveInteger(r))throw new Error("'".concat(r,"' is not a positive integer required when setting a key-level TTL"));var i={v:n,t:this._getNow(),kt:r};this.persistent?localStorage.setItem(e,JSON.stringify(i)):this._lootBag[e]=i},t.prototype.get=function(t,e){if(void 0===e&&(e=null),!this.persistent){if(t in this._lootBag){r=this._lootBag[t];return null===this._ttl&&null===r.kt?r.v:this._isCacheStale(r)?(this.removeKey(t),e):r.v}return e}if(!(t in localStorage))return e;var n=localStorage.getItem(t);try{var r=JSON.parse(n);return null===this._ttl&&null===r.kt?r.v:this._isCacheStale(r)?(this.removeKey(t),e):r.v}catch(t){return null===e?n:e}},t.prototype.removeKey=function(t){this.persistent?t in localStorage&&localStorage.removeItem(t):t in this._lootBag&&delete this._lootBag[t]},t.prototype.keyExists=function(t){if(!this.persistent){if(t in this._lootBag){n=this._lootBag[t];return null===this._ttl&&null===n.kt||(!this._isCacheStale(n)||(this.removeKey(t),!1))}return!1}if(!(t in localStorage))return!1;var e=localStorage.getItem(t);try{var n=JSON.parse(e);return null===this._ttl&&null===n.kt||(!this._isCacheStale(n)||(this.removeKey(t),!1))}catch(t){return!0}},t.prototype.clear=function(){this.persistent?localStorage.clear():this._lootBag={}},t.prototype.keys=function(){return this.persistent?Object.keys(localStorage):Object.keys(this._lootBag)},t.prototype.runGarbageCollector=function(){var t=[];if(this.persistent)for(var e=0,n=Object.keys(localStorage);e<n.length;e++){var r=n[e],i=localStorage.getItem(r);try{var o=JSON.parse(i);if(!("v"in o&&"t"in o&&"kt"in o))continue;null===this._ttl&&null===o.kt||this._isCacheStale(o)&&(localStorage.removeItem(r),t.push(r))}catch(t){}}else for(var a=0,s=Object.keys(this._lootBag);a<s.length;a++){r=s[a];null===this._ttl&&null===this._lootBag[r].kt||this._isCacheStale(this._lootBag[r])&&(delete this._lootBag[r],t.push(r))}return t},t.prototype.isLocalStorageAvailable=function(){var t=(new Date).getTime().toString(),e=t;try{return localStorage.setItem(t,e),localStorage.removeItem(t),!0}catch(t){return!1}},t.prototype._getNow=function(){return Math.floor(Date.now()/1e3)},t.prototype._isCacheStale=function(t){var e=t.t,n=null===t.kt?this._ttl:t.kt;return this._getNow()-e>n},t.isPositiveInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t&&t>0},t}(),x=(y=function(t,e){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},y(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),w=(new(function(t){function e(){return t.call(this,false)||this}return x(e,t),e}(b)),function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),S=new(function(t){function e(){return t.call(this,true)||this}return w(e,t),e}(b)),k=__webpack_require__(219);function _(t){return _="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},_(t)}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function O(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 P(t,e,n){return e&&O(t.prototype,e),n&&O(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function A(){return A="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=T(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},A.apply(this,arguments)}function T(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=D(t)););return t}function j(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&I(t,e)}function I(t,e){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},I(t,e)}function L(t){var e=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}}();return function(){var n,r=D(t);if(e){var i=D(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}function C(t,e){if(e&&("object"===_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function D(t){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(t)}const R=function(t,e){e.beacons=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new(function(e){j(r,e);var n=L(r);function r(){return E(this,r),n.apply(this,arguments)}return P(r,[{key:"getDataBeacons",value:function(t){var e=this,n=A(D(r.prototype),"getDataBeacons",this).call(this,t);return n.forEach((function(t){var n=t.id,r=t.element,i="",o="".concat(e.constructor.getBeaconDataPrefix(),"-tour"),a="".concat(e.constructor.getBeaconDataPrefix(),"-").concat(n,"-tour");r.attributes[o]&&(i=r.attributes[o].value);r.attributes[a]&&(i=r.attributes[a].value);i&&(t.tour=i)})),n}},{key:"createBeaconEl",value:function(e){var n=A(D(r.prototype),"createBeaconEl",this).call(this,e);return e.tour&&n.addEventListener("click",(function(){var n=null;if("string"==typeof e.tour||Array.isArray(e.tour))n=new t(e.tour);else if(e.tour instanceof t)n=e.tour;else if("object"===_(e.tour)){var r=e.tour,i=r.steps,o=r.options;n=new t(i,o)}n&&n.start()})),n}}]),r}(k.Z))(e,n)}};function N(t){return N="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},N(t)}function B(t,e,n){return B=J()?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&&U(i,n.prototype),i},B.apply(null,arguments)}function M(t){return function(t){if(Array.isArray(t))return $(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return $(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $(t,e)}(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 $(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 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 W(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){F(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 F(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function z(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */z=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 E()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===l)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=u(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)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 u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function p(){}function h(){}function f(){}var d={};s(d,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(_([])));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=u(t[i],t,o);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==N(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){l.value=t,a(l)}),(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 l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;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,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function w(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function _(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:E}}function E(){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=_,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(S),!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,l):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),l},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),S(n),l}},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;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function q(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 V(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){q(o,r,i,a,s,"next",t)}function s(t){q(o,r,i,a,s,"throw",t)}a(void 0)}))}}function K(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G(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 U(t,e){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},U(t,e)}function Z(t,e){if(e&&("object"===N(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function J(){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 Y(t){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Y(t)}var X=__webpack_require__(68).match,Q="AHD_TOUR_DATA",tt="APP_BANNER_DATA",et="AHD_HIGHLIGHTS_DATA",nt="AHD_VISITOR_STATS",rt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&U(t,e)}(_,t);var e,n,r,i,o,a,s,c,u,l,p,h,f,d,v,g,y,m,b,x,w,k=(e=_,n=J(),function(){var t,r=Y(e);if(n){var i=Y(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return Z(this,t)});function _(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return K(this,_),(e=k.call(this,t,n)).attachPlugins(),e}return r=_,i=[{key:"attachPlugins",value:(w=V(z().mark((function t(){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:[R].forEach((function(t){it.extend(t)}));case 2:case"end":return t.stop()}}),t)}))),function(){return w.apply(this,arguments)})},{key:"initializeSiteMap",value:(x=V(z().mark((function t(e){var n,r;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(S.get(et),(n=S.get(Q))&&!e){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(n);case 6:n=t.sent;case 7:if((r=S.get(nt))&&!e){t.next=12;break}return t.next=11,this.fetchAndCachePageVisitsData(r);case 11:r=t.sent;case 12:case"end":return t.stop()}}),t,this)}))),function(t){return x.apply(this,arguments)})},{key:"getHelpContent",value:(b=V(z().mark((function t(e,n){var r,i;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=S.get(Q))&&!n){t.next=5;break}return t.next=4,this.fetchAndCacheTourData(r);case 4:r=t.sent;case 5:return i=this.getApplicabeDataForUrl(r,e,"help",!0),t.abrupt("return",i);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e){return b.apply(this,arguments)})},{key:"showPageTour",value:(m=V(z().mark((function t(e,n){var r,i,o,a=this;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:if((r=S.get(Q))&&!n){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(r);case 6:r=t.sent;case 7:i=this.getApplicabeDataForUrl(r,e,"pageview"),o=i.map((function(t){return{element:t.selector,title:t.content.title,description:a.generateDescription(t.content),position:t.position}})),this.setTour(o),this.start();case 11:case"end":return t.stop()}}),t,this)}))),function(t,e){return m.apply(this,arguments)})},{key:"showAppBanner",value:(y=V(z().mark((function t(e,n){var r;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=S.get(tt))&&!n){t.next=5;break}return t.next=4,this.fetchAndCacheBannerData(r);case 4:r=t.sent;case 5:return t.abrupt("return",r);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return y.apply(this,arguments)})},{key:"fetchFaqs",value:(g=V(z().mark((function t(e){var n;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/faq-group-list?filter[slug]=").concat(e,"&filter[status]=published&limit=10&orderBy=order_ASC")).then((function(t){return t.json()}));case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}}),t,this)}))),function(t){return g.apply(this,arguments)})},{key:"showPageBeacons",value:(v=V(z().mark((function t(e,n){var r,i,o,a=this;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:if((r=S.get(Q))&&!n){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(r);case 6:r=t.sent;case 7:i=this.getApplicabeDataForUrl(r,e,"pageview",!0),o=i.map((function(t){return{element:t.selector,position:t.position,tour:[{element:t.selector,position:t.position,title:t.content.title,description:a.generateDescription(t.content)}]}})),it.beacons(o,{boundary:"outer"}).showAll();case 10:case"end":return t.stop()}}),t,this)}))),function(t,e){return v.apply(this,arguments)})},{key:"showPageHighlights",value:(d=V(z().mark((function t(e,n){var r,i,o,a,s=this,c=arguments;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=c.length>2&&void 0!==c[2]&&c[2],t.next=3,this.stop();case 3:i=S.get(et),o=this.getUnAcknowledgedHightlightsForUrl(i,e,"highlight",r),a=o.map((function(t){return{element:t.selector,position:t.position,onClick:(e=V(z().mark((function e(){return z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:s.acknowledgeHighlight(t.id);case 1:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)}),tour:[{element:t.selector,position:t.position,title:t.content.title,description:s.generateDescription(t.content)}]};var e})),it.beacons(a,{boundary:"outer"}).showAll();case 8:case"end":return t.stop()}}),t,this)}))),function(t,e){return d.apply(this,arguments)})},{key:"clearCachedData",value:(f=V(z().mark((function t(){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:S.removeKey(et),S.removeKey("AHD_HELP_DATA"),S.removeKey(Q),S.removeKey(nt);case 4:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"acknowledgeHighlight",value:(h=V(z().mark((function t(e){var n,r,i;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=S.get(nt)||{},r=(null==n?void 0:n.ack)||[],(i=new Set(r)).has(e)||i.add(e),S.put(nt,W(W({},n),{},{ack:M(i)}),86400),this.updateVisitorStats({ack:[e]},"highlight");case 6:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"generateDescription",value:function(t){return t.content||""}},{key:"getUnAcknowledgedHightlightsForUrl",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=S.get(nt)||{},o=(null==i?void 0:i.ack)||[];return t.filter((function(t){return!(!r&&o&&o.includes(t.id))&&X(t.slug,{decode:decodeURIComponent})(e)}))}},{key:"getApplicabeDataForUrl",value:function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=S.get(nt)||{},a=(null==o?void 0:o.visited)||[],s=new Set(a);return t.filter((function(t){if(i||!a||!a.includes(t.slug)){var c=X(t.slug,{decode:decodeURIComponent})(e);return c&&!s.has(t.slug)&&(s.add(t.slug),S.put(nt,W(W({},o),{},{visited:M(s)}),86400),r.markPageVisited(t.slug,n)),c}return!1}))}},{key:"fetchAndCacheHighlightsData",value:(p=V(z().mark((function t(e){var n;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/highlights?filter[isActive]=true")).then((function(t){return t.json()}));case 2:return(n=t.sent).rows&&(e=n.rows.filter((function(t){return!!t.content})),S.put(et,e,this.options.highlightRefetchIntervalInSec)),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"fetchAndCacheTourData",value:(l=V(z().mark((function t(e){var n;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/context-tours?filter[isActive]=true")).then((function(t){return t.json()}));case 2:return(n=t.sent).rows&&(e=n.rows.filter((function(t){return!!t.content})),S.put(Q,e,this.options.toursRefetchIntervalInSec)),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"fetchAndCacheBannerData",value:(u=V(z().mark((function t(e){var n;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/app-banners?filter[isActive]=true")).then((function(t){return t.json()}));case 2:return(n=t.sent).rows&&(e=n.rows.filter((function(t){return!!t.content})),S.put(tt,e,this.options.appBannerRefetchIntervalInSec)),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return u.apply(this,arguments)})},{key:"fetchAndCachePageVisitsData",value:(c=V(z().mark((function t(e){var n;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/stats/").concat(this.options.visitorId,"?filter[device]=web")).then((function(t){return t.json()}));case 2:return(n=t.sent)&&S.put(nt,n,this.options.statsCacheIntervalInSec),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return c.apply(this,arguments)})},{key:"updateVisitorStats",value:(s=V(z().mark((function t(e,n){var r;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/visitor-stats"),{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify({data:{dataToPatch:e,visitorId:this.options.visitorId,channel:"web",type:n}})}).then((function(t){return t.json()}));case 2:return(r=t.sent)&&S.put(nt,r,this.options.visitsCacheIntervalInSec),t.abrupt("return",void 0);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return s.apply(this,arguments)})},{key:"markPageVisited",value:(a=V(z().mark((function t(e,n){var r;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/visitor-stats"),{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:{"Content-Type":"application/json"},redirect:"follow",referrerPolicy:"no-referrer",body:JSON.stringify({data:{slug:e,visitorId:this.options.visitorId,channel:"web",type:n}})}).then((function(t){return t.json()}));case 2:return(r=t.sent)&&S.put(nt,r,this.options.visitsCacheIntervalInSec),t.abrupt("return",void 0);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return a.apply(this,arguments)})}],i&&G(r.prototype,i),o&&G(r,o),Object.defineProperty(r,"prototype",{writable:!1}),_}(m),it=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return B(rt,e)};it.prototype=rt.prototype,it.plugins=new Set,it.extend=function(t){if(!it.plugins.has(t)){it.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,[rt,it].concat(n))}return it};const ot=it})(),__webpack_exports__})()));
|
|
13
13
|
//# sourceMappingURL=index.js.map
|