ahdjs 0.0.132 → 0.0.134
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 +2 -2
- package/build/css/index.css.map +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* ahdjs v0.0.
|
|
3
|
+
* ahdjs v0.0.134
|
|
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_3__=__webpack_require__(398),_templates_beaconWithLabel_html__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(290),_utils_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(102);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()),"info-tooltip"===t.class&&i.classList.remove("gc-beacon"),"help-tooltip"===t.class&&i.classList.remove("gc-beacon"),(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(t){return(null==t?void 0:t.triggerMode)===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.label||(null==t?void 0:t.triggerMode)===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.noIcon?_templates_beaconWithLabel_html__WEBPACK_IMPORTED_MODULE_2__.Z:_templates_beacon_html__WEBPACK_IMPORTED_MODULE_3__.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(n),{beacon:n})}},{key:"getEl",value:function(t){return t instanceof HTMLElement?t:document.querySelector(t)}},{key:"iconType",value:function(t){switch(t){case"help":return"url(https://i.ibb.co/1tTctTQP/helpIcon.png)";case"info":return"url(https://i.ibb.co/g20HNY0/infoIcon.png)";case"warning":return"url(https://i.ibb.co/XrbmwHFp/warning-Icon.png)";default:return"url(https://i.ibb.co/ccYMGHZR/beacon-Icon.png)"}}},{key:"setBeaconPosition",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.position,i=n.boundary,o=n.triggerIcon,a=n.triggerLabel,s=n.triggerMode;r=r||this.options.position,i="inner"===(i=i||this.options.boundary)?"inner":"outer";var c,l,u=t.getBoundingClientRect(),p=e.classList.contains(this.constructor.getFixedClass());if(p)c=u.left,l=u.top;else{var h=e.parentElement.getBoundingClientRect();c=u.left-h.left,l=u.top-h.top}var f,d,v=u.width,g=u.height,y=e.style,m=getComputedStyle(e),b=m.width,x=m.height;(b=parseInt(b,10),x=parseInt(x,10),e.removeAttribute("data-beacon-position"),e.removeAttribute("data-beacon-boundary"),e.setAttribute("data-beacon-position",r),e.setAttribute("data-beacon-boundary",i),s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.icon)&&(y.backgroundImage=this.iconType(null==o?void 0:o.type),y.opacity=null!==(f=null==o?void 0:o.opacity)&&void 0!==f?f:1,y.backgroundColor=null!==(d=null==o?void 0:o.color)&&void 0!==d?d:"white",null!=o&&o.isAnimated||e.classList.add("gc-beacon-no-anim"));if(s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.label||s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.noIcon){var w,S,_,k;y.opacity=null!==(w=null==a?void 0:a.opacity)&&void 0!==w?w:1,y.backgroundColor=null!==(S=null==a?void 0:a.background)&&void 0!==S?S:"#fff",y.color=null!==(_=null==a?void 0:a.color)&&void 0!==_?_:"#000";var E=s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.label&&null!==(k=null==a?void 0:a.text)&&void 0!==k?k:"";e.setAttribute("data-beacon-label",E)}switch(r){case"top-left":"inner"===i?(y.left="".concat(c,"px"),y.top="".concat(l,"px")):(y.left="".concat(c-b,"px"),y.top="".concat(l-x,"px"));break;case"top":y.left="".concat(c+(v-b)/2,"px"),y.top="".concat("inner"===i?l:l-x,"px");break;case"top-right":"inner"===i?(y.left="".concat(v+c-b,"px"),y.top="".concat(l,"px")):(y.left="".concat(v+c,"px"),y.top="".concat(l-x,"px"));break;case"left":y.left="".concat("inner"===i?c:c-b,"px"),y.top="".concat(l+(g-x)/2,"px");break;case"right":y.left="".concat("inner"===i?c+v-b:c+v,"px"),y.top="".concat(l+(g-x)/2,"px");break;case"bottom-left":"inner"===i?(y.left="".concat(c,"px"),y.top="".concat(l+g-x,"px")):(y.left="".concat(c-b,"px"),y.top="".concat(l+g,"px"));break;case"bottom":y.left="".concat(c+(v-b)/2,"px"),y.top="".concat("inner"===i?l+g-x:l+g,"px");break;case"bottom-right":"inner"===i?(y.left="".concat(v+c-b,"px"),y.top="".concat(l+g-x,"px")):(y.left="".concat(v+c,"px"),y.top="".concat(l+g,"px"));break;default:e.setAttribute("data-beacon-position","center"),y.left="".concat(c+(v-b)/2,"px"),y.top="".concat(l+(g-x)/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}()},102:(t,e,n)=>{"use strict";n.d(e,{$h:()=>r,nL:()=>s,ti:()=>c,zm:()=>l});var r={onClick:"onClick",onHover:"onHover",onPageLoad:"onPageLoad",onLongPress:"onLongPress"},i="instant",o="fadeIn",a="slide",s={onOutsideClick:"onOutsideClick",dismissButtonClickOnly:"dismissButtonClickOnly",buttonClickOnly:"buttonClickOnly"},c=function(t){switch(t){case i:return"none";case o:return"fadeIn 1s ease-in";case a:return"slideUp 1s forwards";default:return"none"}},l={icon:"icon",noIcon:"noIcon",label:"label"}},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))},l=function(t){return/^[object NodeList]$/.test("".concat(t))};function u(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 "),_=d(S,2),k=_[0],E=_[1];e.removeAttribute("for");var O=k.replace(/\(|\)/g,"").split(","),P=d(O,2),T=P[0],A=P[1];T=T.trim(),A=A?A.trim():"";var I=w(E.trim()),C=Array.isArray(I);return void Object.keys(I).forEach((function(r){var i=h(h({},n),{},f({},T,I[r]));A&&(i[A]=C?parseInt(r,10):r),t(e,i,o)}))}e!==e.ownerDocument.body&&"GC-TEMPLATE"!==e.tagName&&(o=e.cloneNode(),r.append(o)),u(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),l=0,u="";c;){u+=n.slice(l,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)}u+=h,l=c.index+c[0].length,c=v.exec(n)}u+=n.substr(l,n.length-l),"html"===e?(o.innerHTML=u,o.removeAttribute(e)):["if","else","elseif"].includes(e)?o.removeAttribute(e):o.setAttribute(e,u)}))}else if(e.nodeType===Node.TEXT_NODE){var L=v.exec(e.nodeValue);if(L){for(var j=0;L;){o.append(document.createTextNode(e.nodeValue.slice(j,L.index)));var D=L,B=d(D,2),R=B[0],N=B[1];N=N.trim();try{R=w(N),(i()(R)||a()(R))&&(R="")}catch(t){console.error(t)}(0,s.Z)(R)||c(R)?o.append(R):l(R)?R.forEach((function(t){o.append(t)})):o.append(document.createTextNode(R)),j=L.index+L[0].length,L=v.exec(e.nodeValue)}o.append(document.createTextNode(e.nodeValue.slice(j,e.nodeValue.length)))}else o.append(e.cloneNode())}var M=e.childNodes,W=void 0===M?[]:M;W.length&&W.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>'},290:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r='<div class="gc-beacon--label {{ 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,l=0,u="",p=function(t){if(l<n.length&&n[l].type===t)return n[l++].value},h=function(t){var e=p(t);if(void 0!==e)return e;var r=n[l],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};l<n.length;){var d=p("CHAR"),v=p("NAME"),g=p("PATTERN");if(v||g){var y=d||"";-1===i.indexOf(y)&&(u+=y,y=""),u&&(a.push(u),u=""),a.push({name:v||s++,prefix:y,suffix:"",pattern:g||o,modifier:p("MODIFIER")||""})}else{var m=d||p("ESCAPED_CHAR");if(m)u+=m;else if(u&&(a.push(u),u=""),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=l(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,l="?"===o.modifier||"*"===o.modifier,u="*"===o.modifier||"+"===o.modifier;if(Array.isArray(c)){if(!u)throw new TypeError('Expected "'.concat(o.name,'" to not repeat, but got an array'));if(0===c.length){if(l)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(!l){var f=u?"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)},l=1;l<r.length;l++)c(l);return{path:o,index:a,params:s}}}function c(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function l(t){return t&&t.sensitive?"":"i"}function u(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,u=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)),_=c(h(w.suffix));if(w.pattern)if(e&&e.push(w),S||_)if("+"===w.modifier||"*"===w.modifier){var k="*"===w.modifier?"?":"";m+="(?:".concat(S,"((?:").concat(w.pattern,")(?:").concat(_).concat(S,"(?:").concat(w.pattern,"))*)").concat(_,")").concat(k)}else m+="(?:".concat(S,"(").concat(w.pattern,")").concat(_,")").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(_,")").concat(w.modifier)}}if(u)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,l(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("|"),")"),l(n))}(t,e,n):function(t,e,n){return u(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:()=>u})}},__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:()=>at});var t=__webpack_require__(955),e=__webpack_require__.n(t),n=__webpack_require__(95),r=__webpack_require__(629);var i=__webpack_require__(102);function o(t){return o="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},o(t)}function a(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)||c(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 s(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(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 c(t,e){if(t){if("string"==typeof t)return l(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)?l(t,e):void 0}}function l(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:{},i=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,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(O([])));m&&m!==e&&n.call(m,i)&&(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(i,a,s,c){var l=p(t[i],t,a);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==o(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){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(l.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 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 _(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return 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,i,(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(k),!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),k(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;k(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 p(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 h(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){p(o,r,i,a,s,"next",t)}function s(t){p(o,r,i,a,s,"throw",t)}a(void 0)}))}}function f(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 d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){v(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(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 m,b=function(){function t(n){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g(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(i),this.tour=null,this.setTour(n),this.notifications=[],this.elements=new Map,this.init(),this.actions={onNextStep:this.onNextStep.bind(this),onPrevStep:this.onPrevStep.bind(this),onCloseStep:this.onCloseStep.bind(this),onGotoStep:this.onGotoStep.bind(this)},document&&document.addEventListener("click",(function(t){return r.handleClick(t)}))}var o,c,l,p,f,v,m,b;return o=t,c=[{key:"init",value:function(){}},{key:"handleClick",value:function(t){var e=t.target.getAttribute("data-action");e&&this.actions[e]&&this.actions[e]()}},{key:"onNextStep",value:function(){this.next({event:"change"})}},{key:"onPrevStep",value:function(){this.previous({event:"change"})}},{key:"onCloseStep",value:function(){this.stop({event:"change"})}},{key:"onGotoStep",value:function(t){this.unobserveStep(),this.unmountStep(),this.go(t,!0,{event:"change"})}},{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&&0!==Object.keys(this.options).length?this.options=d(d({},this.options),t):this.options=d(d({},this.constructor.getDefaultOptions()),t),this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(b=h(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 b.apply(this,arguments)})},{key:"go",value:(m=h(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 s&&(this.unmountStep(),this.unobserveStep()),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 54:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"previous",value:(v=h(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 v.apply(this,arguments)})},{key:"next",value:(f=h(u().mark((function t(){var e,n,r,i,o,a,s,c,l=this,p=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=p.length,n=new Array(e),r=0;r<e;r++)n[r]=p[r];if(this.isDisplayed&&this.currentStep&&this.nextStep){t.next=3;break}return t.abrupt("return",!1);case 3:if(i=this.currentStep,o=i.type,a=i.id,s=i.onNext,c=i.stepId,this.startPreloader(),!s){t.next=12;break}return t.next=8,Promise.resolve().then((function(){return s.call.apply(s,[l,l.nextStep,l.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(),this.acknowledgeStep(o,a,c),t.abrupt("return",this.go.apply(this,[this.nextStepIndex,!0].concat(n)));case 20:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"stop",value:(p=h(u().mark((function t(){var e,n,r,i,o,a,s,c=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=this.currentStep,n=e.type,r=e.id,i=e.stepId,o=c.length,a=new Array(o),s=0;s<o;s++)a[s]=c[s];if(this.currentStepIndex!==this.steps.length-1){t.next=9;break}return this.startPreloader(),t.next=8,this.emit.apply(this,["onComplete"].concat(a));case 8:this.stopPreloader();case 9:return this.startPreloader(),t.next=12,this.emit.apply(this,["onStop"].concat(a));case 12: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(),this.acknowledgeStep(n,r,i),t.abrupt("return",this);case 23:case"end":return t.stop()}}),t,this)}))),function(){return p.apply(this,arguments)})},{key:"getSteps",value:function(t){return t&&t.length?"string"==typeof t?this.getDataSteps(t):this.getJsSteps(t):[]}},{key:"getDataSteps",value:function(t){var e=this,n="data-guidechimp",r=Array.from(document.querySelectorAll("[".concat(n,"-tour*='").concat(t,"']")));r=r.filter((function(t){return t.getAttribute("".concat(n,"-tour")).split(",").includes(e.tour)}));var i=new RegExp("^".concat(n,"-").concat(t,"-[^-]+$")),o=new RegExp("^".concat(n,"-[^-]+$"));return r.map((function(r,a){for(var s={},c=0;c<r.attributes.length;c++){var l=r.attributes[c],u=l.name,p=l.value,h=i.test(u),f=!h&&o.test(u);if(h||f){var v=h?u.replace("".concat(n,"-").concat(t,"-"),""):u.replace("".concat(n,"-"),"");"tour"!==v&&(h||f&&!s[v])&&(s[v]=p)}}return d(d({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 d(d({},t),{},{step:t.step||e})}))}},{key:"sortSteps",value:function(t){return s(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||{},n=e.element,r=e.top,i=e.left,o=e.width,a=e.height,s=e.canvasWidth,c=e.canvasHeight;if(n){var l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n="string"==typeof t?document.querySelector(t):t;return n||e}catch(t){return e}}(n);return(!l||"none"===l.style.display||"hidden"===l.style.visibility||0===l.offsetWidth&&0===l.offsetHeight)&&(l=this.getEl("fakeStep")?this.getEl("fakeStep"):this.mountFakeStepEl()),l}return void 0!==r&&void 0!==i&&o&&a?this.mountOffsetFakeStepEl({top:r,left:i,width:o,height:a,canvasWidth:s,canvasHeight:c}):this.mountFakeStepEl()}},{key:"scrollParentsToStepEl",value:function(){var t=this.currentStep.scrollPadding,e=void 0===t?this.options.scrollPadding:t;return this.scrollParentsToEl(this.getStepEl(this.currentStep),e)}},{key:"getScrollableParentsEls",value:function(t){for(var e=[],n=t;n&&n!==n.ownerDocument.body;)n=this.getScrollableParentEl(n),e.push(n);return e}},{key:"getScrollableParentEl",value:function(t){var e=/(auto|scroll)/,n=getComputedStyle(t),r=t.ownerDocument;return"fixed"===n.getPropertyValue("position")?r.body:function t(i){if(!i||i===r.body)return r.body;var o=getComputedStyle(i);if("fixed"===n.getPropertyValue("position")&&"static"===o.getPropertyValue("position"))return t(i.parentElement);var a=o.getPropertyValue("overflow-x"),s=o.getPropertyValue("overflow-y");return e.test(a)||e.test(s)?i:t(i.parentElement)}(t.parentElement)}},{key:"scrollParentsToEl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.getScrollableParentsEls(t);return n.forEach((function(n){n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop-e,n.scrollLeft=t.offsetLeft-n.offsetLeft-e)})),this}},{key:"scrollTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.getBoundingClientRect(),i=r.top,o=r.bottom,a=r.left,s=r.right,c=window,l=c.innerWidth,u=c.innerHeight;return a>=0&&s<=l||window.scrollBy({behavior:e,left:a-n}),i>=0&&o<=u||window.scrollBy({behavior:e,top:i-n}),this}},{key:"highlightStepEl",value:function(){var t,e,n,r,i,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=this.getStepEl(this.currentStep),s=this.getEl("overlay");if(s){var c,l,u,p,h,f=s.querySelector("path"),d=f.querySelector("animate"),v=null===(c=this.currentStep)||void 0===c?void 0:c.element,g=void 0!==(null===(l=this.currentStep)||void 0===l?void 0:l.top),y=void 0!==(null===(u=this.currentStep)||void 0===u?void 0:u.left),m=null===(p=this.currentStep)||void 0===p?void 0:p.width,b=null===(h=this.currentStep)||void 0===h?void 0:h.height,x=this.isEl(a,"fakeStep"),w=!v&&g&&y&&m&&b,S=x&&!w?this.getOverlayDocumentPath():this.getOverlayStepPath(this.currentStep);if(f.setAttribute("d",S),d){var _=d.getAttribute("lock");if(_||(d.setAttribute("from",S),d.setAttribute("to",S)),o){var k=this.isEl(this.getStepEl(this.fromStep),"fakeStep"),E=!this.fromStep||k||x?null:this.getOverlayStepPath(this.fromStep);E&&(d.setAttribute("from",E),d.setAttribute("to",S)),d.setAttribute("lock","true")}d.onend=function(){d.removeAttribute("lock")},d.beginElement()}}var O=null===(t=this.currentStep)||void 0===t?void 0:t.element,P=!O&&void 0!==(null===(e=this.currentStep)||void 0===e?void 0:e.top)&&void 0!==(null===(n=this.currentStep)||void 0===n?void 0:n.left)&&(null===(r=this.currentStep)||void 0===r?void 0:r.width)&&(null===(i=this.currentStep)||void 0===i?void 0:i.height);if(!P){var T=getComputedStyle(a);["absolute","relative","fixed"].includes(T.getPropertyValue("position"))||a.classList.add(this.constructor.getRelativePositionClass()),a.classList.add(this.constructor.getHighlightClass())}return a.setAttribute("data-guidechimp-".concat(this.uid),"highlight"),this.elements.set("highlight",a),this}},{key:"resetHighlightStepEl",value:function(){var t,e,n,r,i,o=this.getEl("overlay");if(o){var a=o.querySelector("path"),s=o.querySelector("animate");a.setAttribute("d",this.getOverlayDocumentPath()),s&&(s.removeAttribute("from"),s.removeAttribute("to"))}var c=this.getStepEl(this.currentStep);return!(null===(t=this.currentStep)||void 0===t?void 0:t.element)&&void 0!==(null===(e=this.currentStep)||void 0===e?void 0:e.top)&&void 0!==(null===(n=this.currentStep)||void 0===n?void 0:n.left)&&(null===(r=this.currentStep)||void 0===r?void 0:r.width)&&(null===(i=this.currentStep)||void 0===i?void 0:i.height)||(c.classList.remove(this.constructor.getRelativePositionClass()),c.classList.remove(this.constructor.getHighlightClass())),c.removeAttribute("data-guidechimp-".concat(this.uid)),this.elements.delete("highlight"),this}},{key:"setInteractionPosition",value:function(t){var e,n,r,i,o,a=null===(e=this.currentStep)||void 0===e?void 0:e.element,s=void 0!==(null===(n=this.currentStep)||void 0===n?void 0:n.top),c=void 0!==(null===(r=this.currentStep)||void 0===r?void 0:r.left),l=null===(i=this.currentStep)||void 0===i?void 0:i.width,u=null===(o=this.currentStep)||void 0===o?void 0:o.height;if(!a&&s&&c&&l&&u){if(!t)return this;var p=this.options.padding,h=function(t,e){if("string"==typeof t&&t.trim().endsWith("%")){var n=parseFloat(t)||0;return"x"===e?n/100*window.innerWidth:n/100*window.innerHeight}return"number"==typeof t?t:parseFloat(t)||0},f=h(this.currentStep.top,"y"),d=h(this.currentStep.left,"x"),v=h(this.currentStep.width,"x"),g=h(this.currentStep.height,"y");return t.style.cssText="position: fixed;\n width: ".concat(v+p,"px;\n height: ").concat(g+p,"px;\n top: ").concat(f-p/2,"px;\n left: ").concat(d-p/2,"px;\n z-index: 6403;"),this}var y=this.getStepEl(this.currentStep);if(!t||!y)return this;var m=this.options.padding;"floating"===getComputedStyle(y).getPropertyValue("position")&&(m=0);var b=this.constructor.getOffset(y),x=b.width,w=b.height,S=b.top,_=b.left;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(y)),t.style.cssText="width: ".concat(x+m,"px;\n height: ").concat(w+m,"px;\n top: ").concat(S-m/2,"px;\n left: ").concat(_-m/2,"px;"),this}},{key:"setControlPosition",value:function(t){var e,n,r,i,o,a=null===(e=this.currentStep)||void 0===e?void 0:e.element,s=void 0!==(null===(n=this.currentStep)||void 0===n?void 0:n.top),c=void 0!==(null===(r=this.currentStep)||void 0===r?void 0:r.left),l=null===(i=this.currentStep)||void 0===i?void 0:i.width,u=null===(o=this.currentStep)||void 0===o?void 0:o.height;if(!a&&s&&c&&l&&u){if(!t)return this;var p=t.style;return p.position="fixed",p.width="auto",p.height="auto",p.top="0",p.left="0",p.right="0",p.bottom="0",p.pointerEvents="auto",p.visibility="visible",this}var h=this.getStepEl(this.currentStep);if("snackbar"===this.options.type)switch(this.currentStep.position){case"top":h.style.top=0;break;case"topRight":h.style.top="100px",h.style.left="400px",t.style.top="100px",t.style.left="400px"}if(!t||!h)return this;var f=this.options.padding;"floating"===getComputedStyle(h).getPropertyValue("position")&&(f=0);var d=h.ownerDocument.defaultView.pageXOffset,v=h.ownerDocument.documentElement.getBoundingClientRect().width,g=this.constructor.getOffset(h),y=g.height,m=g.top,b=g.left,x=g.right,w=y+f,S=m-f/2,_=d<d+(b-f/2)?d:b-f/2,k=d+v>d+(x+f/2)?v:x+f/2;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(h)),t.style.cssText="width: ".concat(k,"px;\n height: ").concat(w,"px;\n top: ").concat(S,"px;\n left: ").concat(_,"px;"),this}},{key:"setTooltipPosition",value:function(t){var e,n,r,o,s,c,l,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.currentStep)return this;if(!t)return this;var p=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e){try{var i=e.style||{};if(i.transform&&-1!==i.transform.indexOf("translate(-50%"))return}catch(t){console.log(t)}var o=Math.max(n,12),a=window,s=a.innerWidth,c=a.innerHeight,l=e.getBoundingClientRect(),u=l.width,p=l.height,h=l.left,f=l.top,d=h,v=f,g=!1;h<o?(d=o,g=!0):h+u>s-o&&(d=Math.max(o,s-o-u),g=!0),f<o?(v=o,g=!0):f+p>c-o&&(v=Math.max(o,c-o-p),g=!0);var y=e.style;y.top&&"auto"!==y.top||(y.top="".concat(f,"px"),g=!0),y.left&&"auto"!==y.left||(y.left="".concat(h,"px"),g=!0),g&&(y.right="auto",y.bottom="auto",y.transform="none",y.left="".concat(d,"px"),y.top="".concat(v,"px")),r<2&&(requestAnimationFrame((function(){var n=e.getBoundingClientRect(),i=n.width,a=n.height,l=n.left,u=n.top;(l<o||l+i>s-o||u<o||u+a>c-o)&&t(e,o,r+1)})),setTimeout((function(){return t(e,o,r+1)}),50))}},h=u.boundary,f=u.position,d=this.options.padding;h=h||window;var v=(f=(f=f||this.currentStep.position)||this.options.position).split("-"),g=a(v,2),y=g[0],m=g[1],b=t.style;b.top=null,b.right=null,b.bottom=null,b.left=null,b.transform=null,b.animation=null,b.position=null,b.visibility="hidden",setTimeout((function(){b.visibility="visible"}),this.currentStep.delay||100);var x=document.getElementsByClassName("gc-overlay");if(x.length>0){var w=x[0];this.currentStep&&!this.currentStep.isBackdrop?w.classList.remove("gc-overlay-hidden"):w.classList.add("gc-overlay-hidden")}(null===(e=this.currentStep)||void 0===e?void 0:e.dismissalSetting)===i.nL.dismissButtonClickOnly||(null===(n=this.currentStep)||void 0===n?void 0:n.dismissalSetting)===i.nL.buttonClickOnly?this.setOptions({exitOverlay:!1}):this.setOptions({exitOverlay:!0}),(null===(r=this.currentStep)||void 0===r?void 0:r.dismissalSetting)===i.nL.onOutsideClick&&this.setOptions({exitOverlay:!0});var S=this.currentStep.element,_=void 0!==(null===(o=this.currentStep)||void 0===o?void 0:o.top),k=void 0!==(null===(s=this.currentStep)||void 0===s?void 0:s.left),E=null===(c=this.currentStep)||void 0===c?void 0:c.width,O=null===(l=this.currentStep)||void 0===l?void 0:l.height;if(!S&&_&&k&&E&&O){t.setAttribute("data-guidechimp-position","top-left-with-highlight"),b.position="fixed",b.zIndex="10000",b.visibility="visible",b.pointerEvents="auto";var P=function(t,e){if("string"==typeof t&&t.trim().endsWith("%")){var n=parseFloat(t)||0;return{isPct:!0,pct:n,px:"x"===e?n/100*window.innerWidth:n/100*window.innerHeight,raw:t.trim()}}var r="number"==typeof t?t:parseFloat(t)||0;return{isPct:!1,px:r,raw:"".concat(r,"px")}},T=P(this.currentStep.top,"y"),A=P(this.currentStep.left,"x"),I=P(this.currentStep.width,"x"),C=P(this.currentStep.height,"y"),L=I.px,j=C.px,D=this.options.padding,B=t.getBoundingClientRect(),R=B.height,N=B.width,M=window.innerWidth,W=window.innerHeight,F=M-(A.px+L),H=A.px,z=W-(T.px+j),$=T.px;b.top="auto",b.left="auto",b.right="auto",b.bottom="auto",b.transform="none";var q=this.currentStep.position||f||"right",K=$>=R+D,V=z>=R+D,G=H>=N+D,U=F>=N+D;if(K||V||G||U)switch(q){case"top":case"top-left":case"top-right":K||(V?q="bottom":U?q="right":G&&(q="left"));break;case"bottom":case"bottom-left":case"bottom-right":V||(K?q="top":U?q="right":G&&(q="left"));break;case"left":G||(U?q="right":V?q="bottom":K&&(q="top"));break;case"right":U||(G?q="left":V?q="bottom":K&&(q="top"))}else{var Z=Math.max($,z,H,F);q=Z===F?"right":Z===z?"bottom":Z===H?"left":"top"}var J=K&&V;switch(q){case"top":y="top",J?(b.top="".concat(T.px+j/2-R/2,"px"),b.bottom="auto"):b.bottom="".concat(W-T.px+D,"px"),b.left="".concat(A.px+L/2-N/2,"px");break;case"top-left":y="top-left",J?(b.top="".concat(T.px+j/2-R/2,"px"),b.bottom="auto"):b.bottom="".concat(W-T.px+D,"px"),b.right="".concat(M-A.px+D,"px");break;case"top-right":y="top-right",J?(b.top="".concat(T.px+j/2-R/2,"px"),b.bottom="auto"):b.bottom="".concat(W-T.px+D,"px"),b.left="".concat(A.px+L+D,"px");break;case"bottom":y="bottom",J?(b.top="".concat(T.px+j/2-R/2,"px"),b.bottom="auto"):b.top="".concat(T.px+j+D,"px"),b.left="".concat(A.px+L/2-N/2,"px");break;case"bottom-left":y="bottom-left",J?(b.top="".concat(T.px+j/2-R/2,"px"),b.bottom="auto"):b.top="".concat(T.px+j+D,"px"),b.right="".concat(M-A.px+D,"px");break;case"bottom-right":y="bottom-right",J?(b.top="".concat(T.px+j/2-R/2,"px"),b.bottom="auto"):b.top="".concat(T.px+j+D,"px"),b.left="".concat(A.px+L+D,"px");break;case"left":y="left",b.top="".concat(T.px+j/2-R/2,"px"),b.left="".concat(Math.max(0,A.px-N-D),"px");break;case"center":y="center",b.top="".concat(T.px+j/2-R/2,"px"),b.left="".concat(A.px+L/2-N/2,"px");break;default:y="right",b.top="".concat(T.px+j/2-R/2,"px"),b.left="".concat(A.px+L+D,"px")}var Y=function(t,e,n){return Math.max(e,Math.min(t,n))},X=null;if(b.top&&"auto"!==b.top)X=parseFloat(b.top)||0;else if(b.bottom&&"auto"!==b.bottom){var Q=parseFloat(b.bottom)||0;X=W-Q-R}var tt=null;if(b.left&&"auto"!==b.left)tt=parseFloat(b.left)||0;else if(b.right&&"auto"!==b.right){var et=parseFloat(b.right)||0;tt=M-et-N}var nt=Math.max(20,D||0);if(null!==X){var rt=Y(X,nt,Math.max(nt,W-R-nt));b.top="".concat(rt,"px"),b.bottom="auto"}if(null!==tt){var it=Y(tt,nt,Math.max(nt,M-N-nt));b.left="".concat(it,"px"),b.right="auto"}if(t.setAttribute("data-guidechimp-position","top-left-with-highlight-".concat(y)),x.length>0){var ot=x[0];this.currentStep&&this.currentStep.isBackdrop?ot.classList.remove("gc-overlay-hidden"):ot.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(b.animation=(0,i.ti)(this.currentStep.animationType)),p(t,D),this}if(!S&&(_||k)){if(t.setAttribute("data-guidechimp-position","top-left"),b.position="fixed",b.zIndex="10000",b.visibility="visible",_){var at,st=this.currentStep.top;at="string"==typeof st&&st.trim().endsWith("%")?(parseFloat(st)||0)/100*window.innerHeight:"number"==typeof st?st:parseFloat(st)||0,b.top="".concat(at,"px")}if(k){var ct,lt=this.currentStep.left;ct="string"==typeof lt&<.trim().endsWith("%")?(parseFloat(lt)||0)/100*window.innerWidth:"number"==typeof lt?lt:parseFloat(lt)||0,b.left="".concat(ct,"px")}if(x.length>0){var ut=x[0];this.currentStep&&this.currentStep.isBackdrop?ut.classList.remove("gc-overlay-hidden"):ut.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(b.animation=(0,i.ti)(this.currentStep.animationType)),p(t,d),this}if(!(S||_||k)){if(t.setAttribute("data-guidechimp-position","floating"),b.position="fixed",b.left="50%",b.top="50%",b.transform="translate(-50%, -50%)",b.zIndex="10000",b.visibility="visible",x.length>0){var pt=x[0];pt.classList.contains("gc-overlay-hidden")||pt.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(b.animation=(0,i.ti)(this.currentStep.animationType)),p(t,d),this}var ht=this.getStepEl(this.currentStep);if(!ht)return this;var ft=getComputedStyle(ht);"floating"===ft.getPropertyValue("position")&&(d=0);var dt=this.isEl(ht,"fakeStep");if(dt){if(t.setAttribute("data-guidechimp-position","floating"),b.position="fixed",b.left="50%",b.top="50%",b.transform="translate(-50%, -50%)",b.zIndex="10000",b.visibility="visible",x.length>0){var vt=x[0];this.currentStep&&!this.currentStep.isBackdrop?vt.classList.remove("gc-overlay-hidden"):vt.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(b.animation=(0,i.ti)(this.currentStep.animationType)),p(t,d),this}var gt=ht.getBoundingClientRect(),yt=gt.top,mt=gt.bottom,bt=gt.left,xt=gt.right,wt=gt.width,St=gt.height,_t=t.getBoundingClientRect(),kt=_t.height,Et=_t.width,Ot=t.cloneNode(!0);Ot.style.visibility="hidden",Ot.innerHTML="",t.parentElement.appendChild(Ot);var Pt=Ot.getBoundingClientRect(),Tt=Pt.width;Ot.parentElement.removeChild(Ot);var At=new DOMRect(0,0,window.innerWidth,window.innerHeight);if(!(h instanceof Window)){var It=h.getBoundingClientRect(),Ct=It.x,Lt=It.y;At=new DOMRect(Ct,Lt,h.scrollWidth,h.scrollHeight)}var jt=At,Dt=jt.top,Bt=jt.bottom,Rt=jt.left,Nt=jt.right;if(this.isEl(ht,"fakeStep"))y="floating";else{var Mt=["bottom","right","left","top"],Wt=getComputedStyle(t),Ft=Wt.marginTop,Ht=Wt.marginLeft,zt=Wt.marginRight,$t=Wt.marginBottom;if(Ft=parseInt(Ft,10),Ht=parseInt(Ht,10),zt=parseInt(zt,10),kt+Ft+($t=parseInt($t,10))>yt-Dt&&Mt.splice(Mt.indexOf("top"),1),kt+Ft+$t>Bt-mt&&Mt.splice(Mt.indexOf("bottom"),1),Tt+Ht+zt>bt-Rt&&Mt.splice(Mt.indexOf("left"),1),Tt+Ht+zt>Nt-xt&&Mt.splice(Mt.indexOf("right"),1),"top"===(y=Mt.length?Mt.includes(y)?y:Mt[0]:"floating")||"bottom"===y){var qt=["left","right","middle"];Nt-bt<Tt&&qt.splice(qt.indexOf("left"),1),xt-Rt<Tt&&qt.splice(qt.indexOf("right"),1),(bt+wt/2-Rt<Tt/2||Nt-(xt-wt/2)<Tt/2)&&qt.splice(qt.indexOf("middle"),1),m=qt.length?qt.includes(m)?m:qt[0]:"middle"}}t.setAttribute("data-guidechimp-position",y);var Kt=document.documentElement;if(this.currentStep.animationType&&(b.animation=(0,i.ti)(this.currentStep.animationType)),"snackbar"===this.options.type)"top"===this.currentStep.position&&(b.top="".concat(0+d,"px"));else{var Vt=yt-Dt,Gt=Bt-mt,Ut=kt+tooltipMarginTop+tooltipMarginBottom+d,Zt=Vt>=Ut&&Gt>=Ut;switch(y){case"top":Zt?(b.top="".concat(yt+St/2-kt/2,"px"),b.bottom="auto"):b.bottom="".concat(St+d,"px");break;case"right":b.left="".concat(xt+d/2-Kt.clientLeft,"px"),b.top="".concat(yt+St/2-kt/2,"px"),b.bottom="auto";break;case"left":b.right="".concat(Kt.clientWidth-(bt-d/2),"px"),b.top="".concat(yt+St/2-kt/2,"px"),b.bottom="auto";break;case"bottom":Zt?(b.top="".concat(yt+St/2-kt/2,"px"),b.bottom="auto"):b.top="".concat(St+d,"px");break;default:b.left="50%",b.top="50%",b.transform="translate(-50%,-50%)"}}if(t.removeAttribute("data-guidechimp-alignment"),m)switch(t.setAttribute("data-guidechimp-alignment",m),m){case"left":b.left="".concat(bt-d/2,"px");break;case"right":b.right="".concat(Kt.clientWidth-xt-d/2,"px");break;default:bt+wt/2<Et/2||bt+wt/2+Et/2>Kt.clientWidth?b.left="".concat(Kt.clientWidth/2-Et/2,"px"):b.left="".concat(bt+wt/2-Et/2,"px")}return p(t,d),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(s(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&&"function"==typeof e.parentElement.removeChild?e.parentElement.removeChild(e):"function"==typeof e.remove&&e.remove()),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">Ishaan</div>'}},{key:"createFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("fakeStep",this.getFakeStepTmpl(),d(d({},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:"mountOffsetFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.top,n=t.left,r=t.width,i=t.height,o=t.canvasWidth,a=t.canvasHeight;this.removeFakeStepEl();var s=this.createFakeStepEl(t);if(s&&void 0!==e&&void 0!==n&&r&&i){var c,l,u,p,h=o||window.innerWidth,f=a||window.innerHeight;c="string"==typeof e&&e.trim().endsWith("%")?(parseFloat(e)||0)/100*f:"number"==typeof e?e:parseFloat(e)||0,l="string"==typeof n&&n.trim().endsWith("%")?(parseFloat(n)||0)/100*h:"number"==typeof n?n:parseFloat(n)||0,u="string"==typeof r&&r.trim().endsWith("%")?(parseFloat(r)||0)/100*h:"number"==typeof r?r:parseFloat(r)||0,p="string"==typeof i&&i.trim().endsWith("%")?(parseFloat(i)||0)/100*f:"number"==typeof i?i:parseFloat(i)||0,s.style.cssText="\n position: fixed !important;\n top: ".concat(c,"px !important;\n left: ").concat(l,"px !important;\n width: ").concat(u,"px !important;\n height: ").concat(p,"px !important;\n visibility: hidden !important;\n pointer-events: none !important;\n z-index: -1 !important;\n ")}return this.mountEl(s,document.body)}},{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){var e=t&&t.element,n=t&&void 0!==t.top&&void 0!==t.left&&t.width&&t.height;return!e&&n?this.getOverlayOffsetPath(t):this.getOverlayElPath(this.getStepEl(t))}},{key:"getOverlayOffsetPath",value:function(t){var e=this.options.padding;e=e?e/2:0;var n=t.top,r=t.left,i=t.width,o=t.height,a=function(t,e){if("string"==typeof t&&t.trim().endsWith("%")){var n=parseFloat(t)||0;return"x"===e?n/100*window.innerWidth:n/100*window.innerHeight}return"number"==typeof t?t:parseFloat(t)||0},s=a(n,"y"),c=a(r,"x"),l=a(i,"x"),u=a(o,"y"),p=this.getOverlayDocumentPath();return p+="M ".concat(c+4," ").concat(s,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",").concat(4,"\n V ").concat(u+s-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",").concat(4,"\n H ").concat(l+c-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",-").concat(4,"\n V ").concat(s+4,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",-").concat(4,"Z")}},{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(),c=Math.max(0,r-e+4),l=Math.min(window.innerWidth,o+r+e-4);return s+="M ".concat(c," ").concat(i,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",").concat(4,"\n V ").concat(a+i-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",").concat(4,"\n H ").concat(l,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",-").concat(4,"\n V ").concat(i+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=h(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(),d(d({},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=d(d({},this.getDefaultTmplData()),{},{interaction:e});return this.createEl("interaction",this.getInteractionTmpl(),d(d({},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(),d(d({},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"> {{ progressbar }} {{ description }} {{ close }} {{ customButtons }} {{ notification }} </div>'}},{key:"createTooltipEl",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=d(d({},this.getDefaultTmplData()),{},{progressbar:this.createProgressbarEl(e),description:this.createDescriptionEl(e),close:this.createCloseEl(e),customButtons:this.createCustomButtonsEl(e),previous:this.createPreviousEl(e),pagination:this.createPaginationEl(e),next:this.createNextEl(e),copyright:this.createCopyrightEl(e),notification:this.createNotificationEl(e),isCaret:null===(t=this.currentStep)||void 0===t?void 0:t.isCaret});return this.createEl("tooltip",this.getTooltipTmpl(),d(d({},n),e))}},{key:"getCloseTmpl",value:function(){return'<div class="gc-close" style="--gc-close-foreground: {{iconCloseColor}};" @click="stop({ event: $event })"></div>'}},{key:"createCloseEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep||{},n=null==e?void 0:e.iconCloseColor;return"string"==typeof n&&n.trim()||(n="#000000"),this.createEl("close",this.getCloseTmpl(),d(d({},this.getDefaultTmplData()),{},{iconCloseColor:n},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=d(d({},this.getDefaultTmplData()),{},{showProgressbar:e,progressMax:n,progressMin:r,progress:i});return this.createEl("progressbar",this.getProgressbarTmpl(),d(d({},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(),d(d({},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(),d(d({},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,l=void 0===c?"":c,u=e.class;(i=document.createElement(s)).innerHTML=l,u&&(i.className=u),o&&i.addEventListener("click",(function(e){o.call(t,e)}))}n.push(i)})),this.createEl("customButtons",this.getCustomButtonsTmpl(),d(d({},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(),d(d({},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(),d(d({},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(),d(d({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"getCopyrightTmpl",value:function(){return'<div class="gc-copyright">Made with pagepilot.fabbuilder.com</div> '}},{key:"createCopyrightEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("copyright",this.getCopyrightTmpl(),d(d({},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(),d(d({},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=a(r,1),o=i[0];n.priority&&r.includes(n.priority)&&(o=n.priority);var s=t.trim();return this.listeners[s]=this.listeners[s]||{},this.listeners[s][o]=this.listeners[s][o]||[],this.listeners[s][o].push(e),this}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=s(this.constructor.getEventListenersPriorities()).reverse(),a=t.trim(),c=[],l=Promise.resolve(c);return this.listeners[a]&&o.forEach((function(t){var n=e.listeners[a][t];n&&(l=l.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(s(c),s(t))})))})),l}},{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=d(d({},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.currentStep,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}}],l=[{key:"getDefaultOptions",value:function(){return{position:"bottom",useKeyboard:!0,exitEscape:!0,exitOverlay:!1,showPagination:!0,showNavigation:!0,showProgressbar:!0,paginationTheme:"numbers",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,l=s.right,u=s.bottom,p=s.left;return{right:l,bottom:u,width:s.width,height:s.height,x:s.x,y:s.y,top:c+o,left:p+a}}},{key:"isFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isFixed(e))}}],c&&y(o.prototype,c),l&&y(o,l),Object.defineProperty(o,"prototype",{writable:!1}),t}(),x=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}(),w=(m=function(t,e){return m=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])},m(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}m(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),S=(new(function(t){function e(){return t.call(this,false)||this}return w(e,t),e}(x)),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)}}()),_=new(function(t){function e(){return t.call(this,true)||this}return S(e,t),e}(x)),k=__webpack_require__(219);function E(t){return E="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},E(t)}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P(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 T(t,e,n){return e&&P(t.prototype,e),n&&P(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=I(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 I(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=B(t)););return t}function C(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&&L(t,e)}function L(t,e){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},L(t,e)}function j(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=B(t);if(e){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return D(this,n)}}function D(t,e){if(e&&("object"===E(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 B(t){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},B(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){C(r,e);var n=j(r);function r(){return O(this,r),n.apply(this,arguments)}return T(r,[{key:"getDataBeacons",value:function(t){var e=this,n=A(B(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:"createGuideInstance",value:function(t,e){if(null==t||!t.tour)return null;if("string"==typeof t.tour||Array.isArray(t.tour))return new e(t.tour);if(t.tour instanceof e)return t.tour;if("object"===E(t.tour)){var n=t.tour;return new e(n.steps,n.options)}return null}},{key:"runGuide",value:function(t,e){var n=this.createGuideInstance(t,e),r=null!==document.querySelector(".gc-tooltip");n&&!r&&n.start()}},{key:"attachGuideEvent",value:function(t,e,n){var r=this,o=null==e?void 0:e.trigger,a=function(){return r.runGuide(e,n)};switch(o){case i.$h.onClick:t.addEventListener("click",a);break;case i.$h.onHover:t.addEventListener("mouseenter",a);break;case i.$h.onLongPress:var s,c=function(){return s=setTimeout(a,600)},l=function(){return clearTimeout(s)};t.addEventListener("mousedown",c),t.addEventListener("mouseup",l),t.addEventListener("mouseleave",l),t.addEventListener("touchstart",c),t.addEventListener("touchend",l);break;case i.$h.onPageLoad:"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a();break;default:console.warn("Unsupported trigger: ".concat(o))}}},{key:"createBeaconEl",value:function(e){var n=A(B(r.prototype),"createBeaconEl",this).call(this,e);return this.attachGuideEvent(n,e,t),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 M(t,e,n){return M=Y()?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&&Z(i,n.prototype),i},M.apply(null,arguments)}function W(t){return function(t){if(Array.isArray(t))return F(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 F(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 F(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 F(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 z(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){$(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 $(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */q=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 _(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===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var u={};function p(){}function h(){}function f(){}var d={};s(d,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=f.prototype=p.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var c=l(t[i],t,o);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==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){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,u;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function 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 _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function k(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:_,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,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}function K(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){K(o,r,i,a,s,"next",t)}function s(t){K(o,r,i,a,s,"throw",t)}a(void 0)}))}}function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U(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 Z(t,e){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Z(t,e)}function J(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 Y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function X(t){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},X(t)}var Q=__webpack_require__(68).match,tt="AHD_TOUR_DATA",et="APP_BANNER_DATA",nt="AHD_HIGHLIGHTS_DATA",rt="AHD_VISITOR_STATS",it=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&&Z(t,e)}(O,t);var e,n,r,i,o,a,s,c,l,u,p,h,f,d,v,g,y,m,b,x,w,S,k,E=(e=O,n=Y(),function(){var t,r=X(e);if(n){var i=X(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return J(this,t)});function O(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return G(this,O),n.userId&&!n.visitorId&&(n.visitorId=n.userId),(e=E.call(this,t,n)).attachPlugins(),e}return r=O,i=[{key:"attachPlugins",value:function(){[R].forEach((function(t){ot.extend(t)}))}},{key:"initializeSiteMap",value:(k=V(q().mark((function t(e){var n,r;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_.get(nt),(n=_.get(tt))&&!e){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(n);case 6:n=t.sent;case 7:if((r=_.get(rt))&&!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 k.apply(this,arguments)})},{key:"getHelpContent",value:(S=V(q().mark((function t(e,n){var r,i;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=_.get(tt))&&!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 S.apply(this,arguments)})},{key:"normalizeDimension",value:function(t){if(null!=t){if("string"==typeof t){var e=t.trim();return e.endsWith("%"),e}return"number"==typeof t?t:parseInt(t)}}},{key:"showPageTour",value:(w=V(q().mark((function t(e){var n,r,i,o,a,s,c=this;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:n=_.get(tt),(null==(r=this.getApplicabeDataForUrl(n.tours,e,!1))?void 0:r.length)>0&&(i=_.get(rt)||{},o=(null==i?void 0:i.visited)||[],a=new Set(o),r.forEach((function(t){if(!a.has(t.slug)){a.add(t.slug);var e=t.id||t._id;c.markPageVisited(t.slug,"tour",e)}})),_.put(rt,z(z({},i),{},{visited:W(a)}),86400),s=r.flatMap((function(t){return Array.isArray(t.steps)?t.steps.filter((function(t){return!!t.content})).map((function(e){var n,r,i,o,a,s,l;return{element:e.selector,description:e.content,position:e.position,animationType:e.animationType,delay:e.delay,isBackdrop:e.isBackdrop,isCaret:e.isCaret,dismissalSetting:e.dismissalSetting,showProgressbar:c.options.showProgressbar,width:c.normalizeDimension(e.canvasWidth||(null===(n=e.styles)||void 0===n?void 0:n.width)),height:c.normalizeDimension(e.canvasHeight||(null===(r=e.styles)||void 0===r?void 0:r.height)),top:c.normalizeDimension((null===(i=e.styles)||void 0===i?void 0:i.top)||e.top),left:c.normalizeDimension((null===(o=e.styles)||void 0===o?void 0:o.left)||e.left),stepId:e.id,id:t.id,type:"tour",iconCloseColor:null!==(a=null===(s=e.style)||void 0===s?void 0:s.iconCloseColor)&&void 0!==a?a:null===(l=e.behaviour)||void 0===l?void 0:l.iconCloseColor}})):[]})),console.log("Tour",s),this.setTour(s),this.start());case 5:case"end":return t.stop()}}),t,this)}))),function(t){return w.apply(this,arguments)})},{key:"showAppBanner",value:(x=V(q().mark((function t(e,n){var r;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=_.get(et))&&!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 x.apply(this,arguments)})},{key:"fetchFaqs",value:(b=V(q().mark((function t(e){var n;return q().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 b.apply(this,arguments)})},{key:"showPageBeacons",value:(m=V(q().mark((function t(e){var n,r,i,o,a,s,c=this;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:n=_.get(tt),(r=this.getApplicabeDataForUrl(n.tooltips,e,!0)).length>0&&(i=_.get(rt)||{},o=(null==i?void 0:i.visited)||[],a=new Set(o),r.forEach((function(t){if(!a.has(t.slug)){a.add(t.slug);var e=r[0].id||r[0]._id;c.markPageVisited(t.slug,"tooltip",e)}})),_.put(rt,z(z({},i),{},{visited:W(a)}),86400),s=r.flatMap((function(t){return(Array.isArray(t.step)?t.step:t.step?[t.step]:[]).filter((function(t){return!!t.content})).map((function(e){var n,r,i,o,a=(null===(n=e.contentMetadata)||void 0===n||null===(r=n.document)||void 0===r||null===(i=r.root)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.behaviour)||{},s=[{element:e.selector,title:e.title,description:e.content,animationType:e.animationType||a.animationType||"fadeIn",delay:e.delay||a.delay||0,isBackdrop:void 0!==e.isBackdrop?e.isBackdrop:void 0===a.isBackdrop||a.isBackdrop,isCaret:void 0!==e.isCaret?e.isCaret:void 0===a.isCaret||a.isCaret,position:e.position||a.position,stepId:e.id,id:t.id,type:"tooltip"}],c={element:e.selector||a.selector,position:e.position||a.position||"right",boundary:"outer",class:"beacon-labs64",triggerMode:e.triggerMode||a.triggerMode,trigger:e.triggerBehaviour||a.triggerBehaviour||"onClick",tour:s},l=e.triggerIcon||a.triggerIcon,u=e.triggerLabel||a.triggerLabel;if("icon"===c.triggerMode&&l){var p="beacon";"info"===l.type&&(p="info"),"success"===l.type&&(p="success"),"warning"===l.type&&(p="warning"),"helpIcon"===l.type&&(p="helpIcon"),c.triggerIcon={type:p,color:l.color||"#000000",opacity:l.opacity?l.opacity/100:1,isAnimated:l.isAnimated||!1}}else"label"===c.triggerMode&&u&&(c.triggerLabel={text:u.text,color:u.color||"#000000",background:u.backgroundColor||"#ffffff"});return c}))})),console.log("beacons",s),ot.beacons(s,{boundary:"outer"}).showAll());case 5:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"setBeacons",value:(y=V(q().mark((function t(e){return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:ot.beacons(e,{boundary:"outer"}).showAll();case 1:case"end":return t.stop()}}),t)}))),function(t){return y.apply(this,arguments)})},{key:"showHighlights",value:(g=V(q().mark((function t(e,n){var r,i,o;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:if((o=_.get(tt))&&!n){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(o,e);case 6:o=t.sent;case 7:(null===(r=o.tours)||void 0===r?void 0:r.length)>0&&this.showPageTour(e),(null===(i=o.tooltips)||void 0===i?void 0:i.length)>0&&this.showPageBeacons(e);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e){return g.apply(this,arguments)})},{key:"showPageHighlights",value:(v=V(q().mark((function t(e,n){var r,i,o,a,s=this,c=arguments;return q().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=_.get(nt),o=this.getUnAcknowledgedHightlightsForUrl(i,e,"highlight",r),a=o.map((function(t){return{element:t.selector,position:t.position,onClick:(e=V(q().mark((function e(){return q().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})),ot.beacons(a,{boundary:"outer"}).showAll();case 8:case"end":return t.stop()}}),t,this)}))),function(t,e){return v.apply(this,arguments)})},{key:"clearCachedData",value:(d=V(q().mark((function t(){return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:_.removeKey(nt),_.removeKey("AHD_HELP_DATA"),_.removeKey(tt),_.removeKey(rt);case 4:case"end":return t.stop()}}),t)}))),function(){return d.apply(this,arguments)})},{key:"acknowledgeHighlight",value:(f=V(q().mark((function t(e){var n,r,i;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=_.get(rt)||{},r=(null==n?void 0:n.ack)||[],(i=new Set(r)).has(e)||i.add(e),_.put(rt,z(z({},n),{},{ack:W(i)}),86400),this.updateVisitorStats({ack:[e]},"highlight");case 6:case"end":return t.stop()}}),t,this)}))),function(t){return f.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=_.get(rt)||{},o=(null==i?void 0:i.ack)||[];return t.filter((function(t){return!(!r&&o&&o.includes(t.id))&&Q(t.slug,{decode:decodeURIComponent})(e)}))}},{key:"getApplicabeDataForUrl",value:function(t,e){var n=_.get(rt)||{};return null==n||n.visited,t.filter((function(t){return!!Q(t.slug,{decode:decodeURIComponent})(e)}))}},{key:"fetchAndCacheHighlightsData",value:(h=V(q().mark((function t(e){var n;return q().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})),_.put(nt,e,this.options.highlightRefetchIntervalInSec)),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"fetchAndCacheTourData",value:(p=V(q().mark((function t(e,n){var r,i;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/unacknowledged?filter[slug]=").concat(n,"&filter[userId]=").concat(this.options.visitorId,"&filter[device]=desktop"),t.next=3,fetch(r).then((function(t){return t.json()}));case 3:return(i=t.sent)&&(e=i,_.put(tt,e,this.options.toursRefetchIntervalInSec)),t.abrupt("return",e);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return p.apply(this,arguments)})},{key:"fetchAndCacheBannerData",value:(u=V(q().mark((function t(e){var n;return q().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})),_.put(et,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:(l=V(q().mark((function t(e){var n;return q().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)&&_.put(rt,n,this.options.statsCacheIntervalInSec),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"updateVisitorStats",value:(c=V(q().mark((function t(e,n){var r;return q().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)&&_.put(rt,r,this.options.visitsCacheIntervalInSec),t.abrupt("return",void 0);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return c.apply(this,arguments)})},{key:"acknowledgeStep",value:(s=V(q().mark((function t(e,n,r){var i;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i={method:"GET",redirect:"follow"},t.next=3,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/acknowledge?userId=").concat(this.options.visitorId,"&id=").concat(n,"&type=").concat(e,"&stepId=").concat(r,"&device=desktop"),i).then((function(t){return t.json()}));case 3:t.sent;case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return s.apply(this,arguments)})},{key:"markPageVisited",value:(a=V(q().mark((function t(e,n,r){var i;return q().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,entityId:r,channel:"web",type:n}})}).then((function(t){return t.json()}));case 2:return(i=t.sent)&&_.put(rt,i,this.options.visitsCacheIntervalInSec),t.abrupt("return",void 0);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return a.apply(this,arguments)})}],i&&U(r.prototype,i),o&&U(r,o),Object.defineProperty(r,"prototype",{writable:!1}),O}(b),ot=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return M(it,e)};ot.prototype=it.prototype,ot.plugins=new Set,ot.extend=function(t){if(!ot.plugins.has(t)){ot.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,[it,ot].concat(n))}return ot};const at=ot})(),__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_3__=__webpack_require__(398),_templates_beaconWithLabel_html__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(290),_utils_constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(102);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()),"info-tooltip"===t.class&&i.classList.remove("gc-beacon"),"help-tooltip"===t.class&&i.classList.remove("gc-beacon"),(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(t){return(null==t?void 0:t.triggerMode)===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.label||(null==t?void 0:t.triggerMode)===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.noIcon?_templates_beaconWithLabel_html__WEBPACK_IMPORTED_MODULE_2__.Z:_templates_beacon_html__WEBPACK_IMPORTED_MODULE_3__.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(n),{beacon:n})}},{key:"getEl",value:function(t){return t instanceof HTMLElement?t:document.querySelector(t)}},{key:"iconType",value:function(t){switch(t){case"help":return"url(https://i.ibb.co/1tTctTQP/helpIcon.png)";case"info":return"url(https://i.ibb.co/g20HNY0/infoIcon.png)";case"warning":return"url(https://i.ibb.co/XrbmwHFp/warning-Icon.png)";default:return"url(https://i.ibb.co/ccYMGHZR/beacon-Icon.png)"}}},{key:"setBeaconPosition",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.position,i=n.boundary,o=n.triggerIcon,a=n.triggerLabel,s=n.triggerMode;r=r||this.options.position,i="inner"===(i=i||this.options.boundary)?"inner":"outer";var c,l,u=t.getBoundingClientRect(),p=e.classList.contains(this.constructor.getFixedClass());if(p)c=u.left,l=u.top;else{var h=e.parentElement.getBoundingClientRect();c=u.left-h.left,l=u.top-h.top}var f,d,v=u.width,g=u.height,y=e.style,m=getComputedStyle(e),b=m.width,x=m.height;(b=parseInt(b,10),x=parseInt(x,10),e.removeAttribute("data-beacon-position"),e.removeAttribute("data-beacon-boundary"),e.setAttribute("data-beacon-position",r),e.setAttribute("data-beacon-boundary",i),s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.icon)&&(y.backgroundImage=this.iconType(null==o?void 0:o.type),y.opacity=null!==(f=null==o?void 0:o.opacity)&&void 0!==f?f:1,y.backgroundColor=null!==(d=null==o?void 0:o.color)&&void 0!==d?d:"white",null!=o&&o.isAnimated||e.classList.add("gc-beacon-no-anim"));if(s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.label||s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.noIcon){var w,S,_,k;y.opacity=null!==(w=null==a?void 0:a.opacity)&&void 0!==w?w:1,y.backgroundColor=null!==(S=null==a?void 0:a.background)&&void 0!==S?S:"#fff",y.color=null!==(_=null==a?void 0:a.color)&&void 0!==_?_:"#000";var E=s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.label&&null!==(k=null==a?void 0:a.text)&&void 0!==k?k:"";e.setAttribute("data-beacon-label",E)}switch(r){case"top-left":"inner"===i?(y.left="".concat(c,"px"),y.top="".concat(l,"px")):(y.left="".concat(c-b,"px"),y.top="".concat(l-x,"px"));break;case"top":y.left="".concat(c+(v-b)/2,"px"),y.top="".concat("inner"===i?l:l-x,"px");break;case"top-right":"inner"===i?(y.left="".concat(v+c-b,"px"),y.top="".concat(l,"px")):(y.left="".concat(v+c,"px"),y.top="".concat(l-x,"px"));break;case"left":y.left="".concat("inner"===i?c:c-b,"px"),y.top="".concat(l+(g-x)/2,"px");break;case"right":y.left="".concat("inner"===i?c+v-b:c+v,"px"),y.top="".concat(l+(g-x)/2,"px");break;case"bottom-left":"inner"===i?(y.left="".concat(c,"px"),y.top="".concat(l+g-x,"px")):(y.left="".concat(c-b,"px"),y.top="".concat(l+g,"px"));break;case"bottom":y.left="".concat(c+(v-b)/2,"px"),y.top="".concat("inner"===i?l+g-x:l+g,"px");break;case"bottom-right":"inner"===i?(y.left="".concat(v+c-b,"px"),y.top="".concat(l+g-x,"px")):(y.left="".concat(v+c,"px"),y.top="".concat(l+g,"px"));break;default:e.setAttribute("data-beacon-position","center"),y.left="".concat(c+(v-b)/2,"px"),y.top="".concat(l+(g-x)/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}()},102:(t,e,n)=>{"use strict";n.d(e,{$h:()=>r,nL:()=>s,ti:()=>c,zm:()=>l});var r={onClick:"onClick",onHover:"onHover",onPageLoad:"onPageLoad",onLongPress:"onLongPress"},i="instant",o="fadeIn",a="slide",s={onOutsideClick:"onOutsideClick",dismissButtonClickOnly:"dismissButtonClickOnly",buttonClickOnly:"buttonClickOnly"},c=function(t){switch(t){case i:return"none";case o:return"fadeIn 1s ease-in";case a:return"slideUp 1s forwards";default:return"none"}},l={icon:"icon",noIcon:"noIcon",label:"label"}},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))},l=function(t){return/^[object NodeList]$/.test("".concat(t))};function u(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 "),_=d(S,2),k=_[0],E=_[1];e.removeAttribute("for");var O=k.replace(/\(|\)/g,"").split(","),P=d(O,2),T=P[0],A=P[1];T=T.trim(),A=A?A.trim():"";var I=w(E.trim()),C=Array.isArray(I);return void Object.keys(I).forEach((function(r){var i=h(h({},n),{},f({},T,I[r]));A&&(i[A]=C?parseInt(r,10):r),t(e,i,o)}))}e!==e.ownerDocument.body&&"GC-TEMPLATE"!==e.tagName&&(o=e.cloneNode(),r.append(o)),u(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),l=0,u="";c;){u+=n.slice(l,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)}u+=h,l=c.index+c[0].length,c=v.exec(n)}u+=n.substr(l,n.length-l),"html"===e?(o.innerHTML=u,o.removeAttribute(e)):["if","else","elseif"].includes(e)?o.removeAttribute(e):o.setAttribute(e,u)}))}else if(e.nodeType===Node.TEXT_NODE){var L=v.exec(e.nodeValue);if(L){for(var j=0;L;){o.append(document.createTextNode(e.nodeValue.slice(j,L.index)));var D=L,B=d(D,2),R=B[0],N=B[1];N=N.trim();try{R=w(N),(i()(R)||a()(R))&&(R="")}catch(t){console.error(t)}(0,s.Z)(R)||c(R)?o.append(R):l(R)?R.forEach((function(t){o.append(t)})):o.append(document.createTextNode(R)),j=L.index+L[0].length,L=v.exec(e.nodeValue)}o.append(document.createTextNode(e.nodeValue.slice(j,e.nodeValue.length)))}else o.append(e.cloneNode())}var M=e.childNodes,W=void 0===M?[]:M;W.length&&W.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>'},290:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});const r='<div class="gc-beacon--label {{ 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,l=0,u="",p=function(t){if(l<n.length&&n[l].type===t)return n[l++].value},h=function(t){var e=p(t);if(void 0!==e)return e;var r=n[l],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};l<n.length;){var d=p("CHAR"),v=p("NAME"),g=p("PATTERN");if(v||g){var y=d||"";-1===i.indexOf(y)&&(u+=y,y=""),u&&(a.push(u),u=""),a.push({name:v||s++,prefix:y,suffix:"",pattern:g||o,modifier:p("MODIFIER")||""})}else{var m=d||p("ESCAPED_CHAR");if(m)u+=m;else if(u&&(a.push(u),u=""),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=l(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,l="?"===o.modifier||"*"===o.modifier,u="*"===o.modifier||"+"===o.modifier;if(Array.isArray(c)){if(!u)throw new TypeError('Expected "'.concat(o.name,'" to not repeat, but got an array'));if(0===c.length){if(l)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(!l){var f=u?"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)},l=1;l<r.length;l++)c(l);return{path:o,index:a,params:s}}}function c(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function l(t){return t&&t.sensitive?"":"i"}function u(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,u=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)),_=c(h(w.suffix));if(w.pattern)if(e&&e.push(w),S||_)if("+"===w.modifier||"*"===w.modifier){var k="*"===w.modifier?"?":"";m+="(?:".concat(S,"((?:").concat(w.pattern,")(?:").concat(_).concat(S,"(?:").concat(w.pattern,"))*)").concat(_,")").concat(k)}else m+="(?:".concat(S,"(").concat(w.pattern,")").concat(_,")").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(_,")").concat(w.modifier)}}if(u)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,l(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("|"),")"),l(n))}(t,e,n):function(t,e,n){return u(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:()=>u})}},__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:()=>st});var t=__webpack_require__(955),e=__webpack_require__.n(t),n=__webpack_require__(95),r=__webpack_require__(629);var i=__webpack_require__(102);function o(t){return o="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},o(t)}function a(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)||c(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 s(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(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 c(t,e){if(t){if("string"==typeof t)return l(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)?l(t,e):void 0}}function l(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:{},i=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,i,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(O([])));m&&m!==e&&n.call(m,i)&&(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(i,a,s,c){var l=p(t[i],t,a);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==o(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){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(l.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 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 _(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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return 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,i,(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(k),!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),k(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;k(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 p(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 h(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){p(o,r,i,a,s,"next",t)}function s(t){p(o,r,i,a,s,"throw",t)}a(void 0)}))}}function f(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 d(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){v(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(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 m,b=function(){function t(n){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g(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(i),this.tour=null,this.setTour(n),this.notifications=[],this.elements=new Map,this.init(),this.actions={onNextStep:this.onNextStep.bind(this),onPrevStep:this.onPrevStep.bind(this),onCloseStep:this.onCloseStep.bind(this),onGotoStep:this.onGotoStep.bind(this)},document&&document.addEventListener("click",(function(t){return r.handleClick(t)}))}var o,c,l,p,f,v,m,b;return o=t,c=[{key:"init",value:function(){}},{key:"handleClick",value:function(t){var e=t.target.getAttribute("data-action");e&&this.actions[e]&&this.actions[e]()}},{key:"onNextStep",value:function(){this.next({event:"change"})}},{key:"onPrevStep",value:function(){this.previous({event:"change"})}},{key:"onCloseStep",value:function(){this.stop({event:"change"})}},{key:"onGotoStep",value:function(t){this.unobserveStep(),this.unmountStep(),this.go(t,!0,{event:"change"})}},{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&&0!==Object.keys(this.options).length?this.options=d(d({},this.options),t):this.options=d(d({},this.constructor.getDefaultOptions()),t),this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(b=h(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 b.apply(this,arguments)})},{key:"go",value:(m=h(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 s&&(this.unmountStep(),this.unobserveStep()),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 54:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"previous",value:(v=h(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 v.apply(this,arguments)})},{key:"next",value:(f=h(u().mark((function t(){var e,n,r,i,o,a,s,c,l=this,p=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=p.length,n=new Array(e),r=0;r<e;r++)n[r]=p[r];if(this.isDisplayed&&this.currentStep&&this.nextStep){t.next=3;break}return t.abrupt("return",!1);case 3:if(i=this.currentStep,o=i.type,a=i.id,s=i.onNext,c=i.stepId,this.startPreloader(),!s){t.next=12;break}return t.next=8,Promise.resolve().then((function(){return s.call.apply(s,[l,l.nextStep,l.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(),this.acknowledgeStep(o,a,c),t.abrupt("return",this.go.apply(this,[this.nextStepIndex,!0].concat(n)));case 20:case"end":return t.stop()}}),t,this)}))),function(){return f.apply(this,arguments)})},{key:"stop",value:(p=h(u().mark((function t(){var e,n,r,i,o,a,s,c=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=this.currentStep,n=e.type,r=e.id,i=e.stepId,o=c.length,a=new Array(o),s=0;s<o;s++)a[s]=c[s];if(this.currentStepIndex!==this.steps.length-1){t.next=9;break}return this.startPreloader(),t.next=8,this.emit.apply(this,["onComplete"].concat(a));case 8:this.stopPreloader();case 9:return this.startPreloader(),t.next=12,this.emit.apply(this,["onStop"].concat(a));case 12: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(),this.acknowledgeStep(n,r,i),t.abrupt("return",this);case 23:case"end":return t.stop()}}),t,this)}))),function(){return p.apply(this,arguments)})},{key:"getSteps",value:function(t){return t&&t.length?"string"==typeof t?this.getDataSteps(t):this.getJsSteps(t):[]}},{key:"getDataSteps",value:function(t){var e=this,n="data-guidechimp",r=Array.from(document.querySelectorAll("[".concat(n,"-tour*='").concat(t,"']")));r=r.filter((function(t){return t.getAttribute("".concat(n,"-tour")).split(",").includes(e.tour)}));var i=new RegExp("^".concat(n,"-").concat(t,"-[^-]+$")),o=new RegExp("^".concat(n,"-[^-]+$"));return r.map((function(r,a){for(var s={},c=0;c<r.attributes.length;c++){var l=r.attributes[c],u=l.name,p=l.value,h=i.test(u),f=!h&&o.test(u);if(h||f){var v=h?u.replace("".concat(n,"-").concat(t,"-"),""):u.replace("".concat(n,"-"),"");"tour"!==v&&(h||f&&!s[v])&&(s[v]=p)}}return d(d({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 d(d({},t),{},{step:t.step||e})}))}},{key:"sortSteps",value:function(t){return s(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||{},n=e.element,r=e.top,i=e.left,o=e.width,a=e.height,s=e.canvasWidth,c=e.canvasHeight;if(n){var l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n="string"==typeof t?document.querySelector(t):t;return n||e}catch(t){return e}}(n);return(!l||"none"===l.style.display||"hidden"===l.style.visibility||0===l.offsetWidth&&0===l.offsetHeight)&&(l=this.getEl("fakeStep")?this.getEl("fakeStep"):this.mountFakeStepEl()),l}return void 0!==r&&void 0!==i&&o&&a?this.mountOffsetFakeStepEl({top:r,left:i,width:o,height:a,canvasWidth:s,canvasHeight:c}):this.mountFakeStepEl()}},{key:"scrollParentsToStepEl",value:function(){var t=this.currentStep.scrollPadding,e=void 0===t?this.options.scrollPadding:t;return this.scrollParentsToEl(this.getStepEl(this.currentStep),e)}},{key:"getScrollableParentsEls",value:function(t){for(var e=[],n=t;n&&n!==n.ownerDocument.body;)n=this.getScrollableParentEl(n),e.push(n);return e}},{key:"getScrollableParentEl",value:function(t){var e=/(auto|scroll)/,n=getComputedStyle(t),r=t.ownerDocument;return"fixed"===n.getPropertyValue("position")?r.body:function t(i){if(!i||i===r.body)return r.body;var o=getComputedStyle(i);if("fixed"===n.getPropertyValue("position")&&"static"===o.getPropertyValue("position"))return t(i.parentElement);var a=o.getPropertyValue("overflow-x"),s=o.getPropertyValue("overflow-y");return e.test(a)||e.test(s)?i:t(i.parentElement)}(t.parentElement)}},{key:"scrollParentsToEl",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.getScrollableParentsEls(t);return n.forEach((function(n){n!==document.body&&(n.scrollTop=t.offsetTop-n.offsetTop-e,n.scrollLeft=t.offsetLeft-n.offsetLeft-e)})),this}},{key:"scrollTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t.getBoundingClientRect(),i=r.top,o=r.bottom,a=r.left,s=r.right,c=window,l=c.innerWidth,u=c.innerHeight;return a>=0&&s<=l||window.scrollBy({behavior:e,left:a-n}),i>=0&&o<=u||window.scrollBy({behavior:e,top:i-n}),this}},{key:"highlightStepEl",value:function(){var t,e,n,r,i,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=this.getStepEl(this.currentStep),s=this.getEl("overlay");if(s){var c,l,u,p,h,f=s.querySelector("path"),d=f.querySelector("animate"),v=null===(c=this.currentStep)||void 0===c?void 0:c.element,g=void 0!==(null===(l=this.currentStep)||void 0===l?void 0:l.top),y=void 0!==(null===(u=this.currentStep)||void 0===u?void 0:u.left),m=null===(p=this.currentStep)||void 0===p?void 0:p.width,b=null===(h=this.currentStep)||void 0===h?void 0:h.height,x=this.isEl(a,"fakeStep"),w=!v&&g&&y&&m&&b,S=x&&!w?this.getOverlayDocumentPath():this.getOverlayStepPath(this.currentStep);if(f.setAttribute("d",S),d){var _=d.getAttribute("lock");if(_||(d.setAttribute("from",S),d.setAttribute("to",S)),o){var k=this.isEl(this.getStepEl(this.fromStep),"fakeStep"),E=!this.fromStep||k||x?null:this.getOverlayStepPath(this.fromStep);E&&(d.setAttribute("from",E),d.setAttribute("to",S)),d.setAttribute("lock","true")}d.onend=function(){d.removeAttribute("lock")},d.beginElement()}}var O=null===(t=this.currentStep)||void 0===t?void 0:t.element,P=!O&&void 0!==(null===(e=this.currentStep)||void 0===e?void 0:e.top)&&void 0!==(null===(n=this.currentStep)||void 0===n?void 0:n.left)&&(null===(r=this.currentStep)||void 0===r?void 0:r.width)&&(null===(i=this.currentStep)||void 0===i?void 0:i.height);if(!P){var T=getComputedStyle(a);["absolute","relative","fixed"].includes(T.getPropertyValue("position"))||a.classList.add(this.constructor.getRelativePositionClass()),a.classList.add(this.constructor.getHighlightClass())}return a.setAttribute("data-guidechimp-".concat(this.uid),"highlight"),this.elements.set("highlight",a),this}},{key:"resetHighlightStepEl",value:function(){var t,e,n,r,i,o=this.getEl("overlay");if(o){var a=o.querySelector("path"),s=o.querySelector("animate");a.setAttribute("d",this.getOverlayDocumentPath()),s&&(s.removeAttribute("from"),s.removeAttribute("to"))}var c=this.getStepEl(this.currentStep);return!(null===(t=this.currentStep)||void 0===t?void 0:t.element)&&void 0!==(null===(e=this.currentStep)||void 0===e?void 0:e.top)&&void 0!==(null===(n=this.currentStep)||void 0===n?void 0:n.left)&&(null===(r=this.currentStep)||void 0===r?void 0:r.width)&&(null===(i=this.currentStep)||void 0===i?void 0:i.height)||(c.classList.remove(this.constructor.getRelativePositionClass()),c.classList.remove(this.constructor.getHighlightClass())),c.removeAttribute("data-guidechimp-".concat(this.uid)),this.elements.delete("highlight"),this}},{key:"setInteractionPosition",value:function(t){var e,n,r,i,o,a=null===(e=this.currentStep)||void 0===e?void 0:e.element,s=void 0!==(null===(n=this.currentStep)||void 0===n?void 0:n.top),c=void 0!==(null===(r=this.currentStep)||void 0===r?void 0:r.left),l=null===(i=this.currentStep)||void 0===i?void 0:i.width,u=null===(o=this.currentStep)||void 0===o?void 0:o.height;if(!a&&s&&c&&l&&u){if(!t)return this;var p=this.options.padding,h=function(t,e){if("string"==typeof t&&t.trim().endsWith("%")){var n=parseFloat(t)||0;return"x"===e?n/100*window.innerWidth:n/100*window.innerHeight}return"number"==typeof t?t:parseFloat(t)||0},f=h(this.currentStep.top,"y"),d=h(this.currentStep.left,"x"),v=h(this.currentStep.width,"x"),g=h(this.currentStep.height,"y");return t.style.cssText="position: fixed;\n width: ".concat(v+p,"px;\n height: ").concat(g+p,"px;\n top: ").concat(f-p/2,"px;\n left: ").concat(d-p/2,"px;\n z-index: 6403;"),this}var y=this.getStepEl(this.currentStep);if(!t||!y)return this;var m=this.options.padding;"floating"===getComputedStyle(y).getPropertyValue("position")&&(m=0);var b=this.constructor.getOffset(y),x=b.width,w=b.height,S=b.top,_=b.left;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(y)),t.style.cssText="width: ".concat(x+m,"px;\n height: ").concat(w+m,"px;\n top: ").concat(S-m/2,"px;\n left: ").concat(_-m/2,"px;"),this}},{key:"setControlPosition",value:function(t){var e,n,r,i,o,a=null===(e=this.currentStep)||void 0===e?void 0:e.element,s=void 0!==(null===(n=this.currentStep)||void 0===n?void 0:n.top),c=void 0!==(null===(r=this.currentStep)||void 0===r?void 0:r.left),l=null===(i=this.currentStep)||void 0===i?void 0:i.width,u=null===(o=this.currentStep)||void 0===o?void 0:o.height;if(!a&&s&&c&&l&&u){if(!t)return this;var p=t.style;return p.position="fixed",p.width="auto",p.height="auto",p.top="0",p.left="0",p.right="0",p.bottom="0",p.pointerEvents="auto",p.visibility="visible",this}var h=this.getStepEl(this.currentStep);if("snackbar"===this.options.type)switch(this.currentStep.position){case"top":h.style.top=0;break;case"topRight":h.style.top="100px",h.style.left="400px",t.style.top="100px",t.style.left="400px"}if(!t||!h)return this;var f=this.options.padding;"floating"===getComputedStyle(h).getPropertyValue("position")&&(f=0);var d=h.ownerDocument.defaultView.pageXOffset,v=h.ownerDocument.documentElement.getBoundingClientRect().width,g=this.constructor.getOffset(h),y=g.height,m=g.top,b=g.left,x=g.right,w=y+f,S=m-f/2,_=d<d+(b-f/2)?d:b-f/2,k=d+v>d+(x+f/2)?v:x+f/2;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(h)),t.style.cssText="width: ".concat(k,"px;\n height: ").concat(w,"px;\n top: ").concat(S,"px;\n left: ").concat(_,"px;"),this}},{key:"setTooltipPosition",value:function(t){var e,n,r,o,s,c,l,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.currentStep)return this;if(!t)return this;var p=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e){try{var i=e.style||{};if(i.transform&&-1!==i.transform.indexOf("translate(-50%"))return}catch(t){console.log(t)}var o=Math.max(n,12),a=window,s=a.innerWidth,c=a.innerHeight,l=e.getBoundingClientRect(),u=l.width,p=l.height,h=l.left,f=l.top,d=h,v=f,g=!1;h<o?(d=o,g=!0):h+u>s-o&&(d=Math.max(o,s-o-u),g=!0),f<o?(v=o,g=!0):f+p>c-o&&(v=Math.max(o,c-o-p),g=!0);var y=e.style;y.top&&"auto"!==y.top||(y.top="".concat(f,"px"),g=!0),y.left&&"auto"!==y.left||(y.left="".concat(h,"px"),g=!0),g&&(y.right="auto",y.bottom="auto",y.transform="none",y.left="".concat(d,"px"),y.top="".concat(v,"px")),r<2&&(requestAnimationFrame((function(){var n=e.getBoundingClientRect(),i=n.width,a=n.height,l=n.left,u=n.top;(l<o||l+i>s-o||u<o||u+a>c-o)&&t(e,o,r+1)})),setTimeout((function(){return t(e,o,r+1)}),50))}},h=u.boundary,f=u.position,d=this.options.padding;h=h||window;var v=(f=(f=f||this.currentStep.position)||this.options.position).split("-"),g=a(v,2),y=g[0],m=g[1],b=t.style;b.top=null,b.right=null,b.bottom=null,b.left=null,b.transform=null,b.animation=null,b.position=null,b.visibility="hidden",setTimeout((function(){b.visibility="visible"}),this.currentStep.delay||1e3);var x=document.getElementsByClassName("gc-overlay");if(x.length>0){var w=x[0];this.currentStep&&!this.currentStep.isBackdrop?w.classList.remove("gc-overlay-hidden"):w.classList.add("gc-overlay-hidden")}(null===(e=this.currentStep)||void 0===e?void 0:e.dismissalSetting)===i.nL.dismissButtonClickOnly||(null===(n=this.currentStep)||void 0===n?void 0:n.dismissalSetting)===i.nL.buttonClickOnly?this.setOptions({exitOverlay:!1}):this.setOptions({exitOverlay:!0}),(null===(r=this.currentStep)||void 0===r?void 0:r.dismissalSetting)===i.nL.onOutsideClick&&this.setOptions({exitOverlay:!0});var S=this.currentStep.element,_=void 0!==(null===(o=this.currentStep)||void 0===o?void 0:o.top),k=void 0!==(null===(s=this.currentStep)||void 0===s?void 0:s.left),E=null===(c=this.currentStep)||void 0===c?void 0:c.width,O=null===(l=this.currentStep)||void 0===l?void 0:l.height;if(!S&&_&&k&&E&&O){t.setAttribute("data-guidechimp-position","top-left-with-highlight"),b.position="fixed",b.zIndex="10000",b.visibility="visible",b.pointerEvents="auto";var P=function(t,e){if("string"==typeof t&&t.trim().endsWith("%")){var n=parseFloat(t)||0;return{isPct:!0,pct:n,px:"x"===e?n/100*window.innerWidth:n/100*window.innerHeight,raw:t.trim()}}var r="number"==typeof t?t:parseFloat(t)||0;return{isPct:!1,px:r,raw:"".concat(r,"px")}},T=P(this.currentStep.top,"y"),A=P(this.currentStep.left,"x"),I=P(this.currentStep.width,"x"),C=P(this.currentStep.height,"y"),L=I.px,j=C.px,D=this.options.padding,B=t.getBoundingClientRect(),R=B.height,N=B.width,M=window.innerWidth,W=window.innerHeight,F=M-(A.px+L),H=A.px,z=W-(T.px+j),$=T.px;b.top="auto",b.left="auto",b.right="auto",b.bottom="auto",b.transform="none";var q=this.currentStep.position||f||"right",K=$>=R+D,V=z>=R+D,G=H>=N+D,U=F>=N+D;if(K||V||G||U)switch(q){case"top":case"top-left":case"top-right":K||(V?q="bottom":U?q="right":G&&(q="left"));break;case"bottom":case"bottom-left":case"bottom-right":V||(K?q="top":U?q="right":G&&(q="left"));break;case"left":G||(U?q="right":V?q="bottom":K&&(q="top"));break;case"right":U||(G?q="left":V?q="bottom":K&&(q="top"))}else{var Z=Math.max($,z,H,F);q=Z===F?"right":Z===z?"bottom":Z===H?"left":"top"}var J=K&&V;switch(q){case"top":y="top",b.bottom="".concat(W-T.px+D,"px"),b.left="".concat(A.px+L/2-N/2,"px");break;case"top-left":y="top-left",J?(b.top="".concat(T.px+j/2-R/2,"px"),b.bottom="auto"):b.bottom="".concat(W-T.px+D,"px"),b.right="".concat(M-A.px+D,"px");break;case"top-right":y="top-right",J?(b.top="".concat(T.px+j/2-R/2,"px"),b.bottom="auto"):b.bottom="".concat(W-T.px+D,"px"),b.left="".concat(A.px+L+D,"px");break;case"bottom":y="bottom",b.top="".concat(T.px+j+D,"px"),b.left="".concat(A.px+L/2-N/2,"px");break;case"bottom-left":y="bottom-left",J?(b.top="".concat(T.px+j/2-R/2,"px"),b.bottom="auto"):b.top="".concat(T.px+j+D,"px"),b.right="".concat(M-A.px+D,"px");break;case"bottom-right":y="bottom-right",J?(b.top="".concat(T.px+j/2-R/2,"px"),b.bottom="auto"):b.top="".concat(T.px+j+D,"px"),b.left="".concat(A.px+L+D,"px");break;case"left":y="left",b.top="".concat(T.px+j/2-R/2,"px"),b.left="".concat(Math.max(0,A.px-N-D),"px");break;case"center":y="center",b.top="".concat(T.px+j/2-R/2,"px"),b.left="".concat(A.px+L/2-N/2,"px");break;default:y="right",b.top="".concat(T.px+j/2-R/2,"px"),b.left="".concat(A.px+L+D,"px")}var Y=function(t,e,n){return Math.max(e,Math.min(t,n))},X=null;if(b.top&&"auto"!==b.top)X=parseFloat(b.top)||0;else if(b.bottom&&"auto"!==b.bottom){var Q=parseFloat(b.bottom)||0;X=W-Q-R}var tt=null;if(b.left&&"auto"!==b.left)tt=parseFloat(b.left)||0;else if(b.right&&"auto"!==b.right){var et=parseFloat(b.right)||0;tt=M-et-N}var nt=Math.max(20,D||0);if(null!==X){var rt=Y(X,nt,Math.max(nt,W-R-nt));b.top="".concat(rt,"px"),b.bottom="auto"}if(null!==tt){var it=Y(tt,nt,Math.max(nt,M-N-nt));b.left="".concat(it,"px"),b.right="auto"}if(t.setAttribute("data-guidechimp-position","top-left-with-highlight-".concat(y)),x.length>0){var ot=x[0];this.currentStep&&this.currentStep.isBackdrop?ot.classList.remove("gc-overlay-hidden"):ot.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(b.animation=(0,i.ti)(this.currentStep.animationType)),p(t,D),this}if(!S&&(_||k)){if(t.setAttribute("data-guidechimp-position","top-left"),b.position="fixed",b.zIndex="10000",b.visibility="visible",_){var at,st=this.currentStep.top;at="string"==typeof st&&st.trim().endsWith("%")?(parseFloat(st)||0)/100*window.innerHeight:"number"==typeof st?st:parseFloat(st)||0,b.top="".concat(at,"px")}if(k){var ct,lt=this.currentStep.left;ct="string"==typeof lt&<.trim().endsWith("%")?(parseFloat(lt)||0)/100*window.innerWidth:"number"==typeof lt?lt:parseFloat(lt)||0,b.left="".concat(ct,"px")}if(x.length>0){var ut=x[0];this.currentStep&&this.currentStep.isBackdrop?ut.classList.remove("gc-overlay-hidden"):ut.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(b.animation=(0,i.ti)(this.currentStep.animationType)),p(t,d),this}if(!(S||_||k)){if(t.setAttribute("data-guidechimp-position","floating"),b.position="fixed",b.left="50%",b.top="50%",b.transform="translate(-50%, -50%)",b.zIndex="10000",b.visibility="visible",x.length>0){var pt=x[0];pt.classList.contains("gc-overlay-hidden")||pt.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(b.animation=(0,i.ti)(this.currentStep.animationType)),p(t,d),this}var ht=this.getStepEl(this.currentStep);if(!ht)return this;var ft=getComputedStyle(ht);"floating"===ft.getPropertyValue("position")&&(d=0);var dt=this.isEl(ht,"fakeStep");if(dt){if(t.setAttribute("data-guidechimp-position","floating"),b.position="fixed",b.left="50%",b.top="50%",b.transform="translate(-50%, -50%)",b.zIndex="10000",b.visibility="visible",x.length>0){var vt=x[0];this.currentStep&&!this.currentStep.isBackdrop?vt.classList.remove("gc-overlay-hidden"):vt.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(b.animation=(0,i.ti)(this.currentStep.animationType)),p(t,d),this}var gt=ht.getBoundingClientRect(),yt=gt.top,mt=gt.bottom,bt=gt.left,xt=gt.right,wt=gt.width,St=gt.height,_t=t.getBoundingClientRect(),kt=_t.height,Et=_t.width,Ot=t.cloneNode(!0);Ot.style.visibility="hidden",Ot.innerHTML="",t.parentElement.appendChild(Ot);var Pt=Ot.getBoundingClientRect(),Tt=Pt.width;Ot.parentElement.removeChild(Ot);var At=new DOMRect(0,0,window.innerWidth,window.innerHeight);if(!(h instanceof Window)){var It=h.getBoundingClientRect(),Ct=It.x,Lt=It.y;At=new DOMRect(Ct,Lt,h.scrollWidth,h.scrollHeight)}var jt=At,Dt=jt.top,Bt=jt.bottom,Rt=jt.left,Nt=jt.right;if(this.isEl(ht,"fakeStep"))y="floating";else{var Mt=["bottom","right","left","top"],Wt=getComputedStyle(t),Ft=Wt.marginTop,Ht=Wt.marginLeft,zt=Wt.marginRight,$t=Wt.marginBottom;if(Ft=parseInt(Ft,10),Ht=parseInt(Ht,10),zt=parseInt(zt,10),kt+Ft+($t=parseInt($t,10))>yt-Dt&&Mt.splice(Mt.indexOf("top"),1),kt+Ft+$t>Bt-mt&&Mt.splice(Mt.indexOf("bottom"),1),Tt+Ht+zt>bt-Rt&&Mt.splice(Mt.indexOf("left"),1),Tt+Ht+zt>Nt-xt&&Mt.splice(Mt.indexOf("right"),1),"top"===(y=Mt.length?Mt.includes(y)?y:Mt[0]:"floating")||"bottom"===y){var qt=["left","right","middle"];Nt-bt<Tt&&qt.splice(qt.indexOf("left"),1),xt-Rt<Tt&&qt.splice(qt.indexOf("right"),1),(bt+wt/2-Rt<Tt/2||Nt-(xt-wt/2)<Tt/2)&&qt.splice(qt.indexOf("middle"),1),m=qt.length?qt.includes(m)?m:qt[0]:"middle"}}t.setAttribute("data-guidechimp-position",y);var Kt=document.documentElement;if(this.currentStep.animationType&&(b.animation=(0,i.ti)(this.currentStep.animationType)),"snackbar"===this.options.type)"top"===this.currentStep.position&&(b.top="".concat(0+d,"px"));else{var Vt=yt-Dt,Gt=Bt-mt,Ut=kt+tooltipMarginTop+tooltipMarginBottom+d,Zt=Vt>=Ut&&Gt>=Ut;switch(y){case"top":Zt?(b.top="".concat(yt+St/2-kt/2,"px"),b.bottom="auto"):b.bottom="".concat(St+d,"px");break;case"right":b.left="".concat(xt+d/2-Kt.clientLeft,"px"),b.top="".concat(yt+St/2-kt/2,"px"),b.bottom="auto";break;case"left":b.right="".concat(Kt.clientWidth-(bt-d/2),"px"),b.top="".concat(yt+St/2-kt/2,"px"),b.bottom="auto";break;case"bottom":Zt?(b.top="".concat(yt+St/2-kt/2,"px"),b.bottom="auto"):b.top="".concat(St+d,"px");break;default:b.left="50%",b.top="50%",b.transform="translate(-50%,-50%)"}}if(t.removeAttribute("data-guidechimp-alignment"),m)switch(t.setAttribute("data-guidechimp-alignment",m),m){case"left":b.left="".concat(bt-d/2,"px");break;case"right":b.right="".concat(Kt.clientWidth-xt-d/2,"px");break;default:bt+wt/2<Et/2||bt+wt/2+Et/2>Kt.clientWidth?b.left="".concat(Kt.clientWidth/2-Et/2,"px"):b.left="".concat(bt+wt/2-Et/2,"px")}return p(t,d),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(s(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&&"function"==typeof e.parentElement.removeChild?e.parentElement.removeChild(e):"function"==typeof e.remove&&e.remove()),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">Ishaan</div>'}},{key:"createFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("fakeStep",this.getFakeStepTmpl(),d(d({},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:"mountOffsetFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.top,n=t.left,r=t.width,i=t.height,o=t.canvasWidth,a=t.canvasHeight;this.removeFakeStepEl();var s=this.createFakeStepEl(t);if(s&&void 0!==e&&void 0!==n&&r&&i){var c,l,u,p,h=o||window.innerWidth,f=a||window.innerHeight;c="string"==typeof e&&e.trim().endsWith("%")?(parseFloat(e)||0)/100*f:"number"==typeof e?e:parseFloat(e)||0,l="string"==typeof n&&n.trim().endsWith("%")?(parseFloat(n)||0)/100*h:"number"==typeof n?n:parseFloat(n)||0,u="string"==typeof r&&r.trim().endsWith("%")?(parseFloat(r)||0)/100*h:"number"==typeof r?r:parseFloat(r)||0,p="string"==typeof i&&i.trim().endsWith("%")?(parseFloat(i)||0)/100*f:"number"==typeof i?i:parseFloat(i)||0,s.style.cssText="\n position: fixed !important;\n top: ".concat(c,"px !important;\n left: ").concat(l,"px !important;\n width: ").concat(u,"px !important;\n height: ").concat(p,"px !important;\n visibility: hidden !important;\n pointer-events: none !important;\n z-index: -1 !important;\n ")}return this.mountEl(s,document.body)}},{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){var e=t&&t.element,n=t&&void 0!==t.top&&void 0!==t.left&&t.width&&t.height;return!e&&n?this.getOverlayOffsetPath(t):this.getOverlayElPath(this.getStepEl(t))}},{key:"getOverlayOffsetPath",value:function(t){var e=this.options.padding;e=e?e/2:0;var n=t.top,r=t.left,i=t.width,o=t.height,a=function(t,e){if("string"==typeof t&&t.trim().endsWith("%")){var n=parseFloat(t)||0;return"x"===e?n/100*window.innerWidth:n/100*window.innerHeight}return"number"==typeof t?t:parseFloat(t)||0},s=a(n,"y"),c=a(r,"x"),l=a(i,"x"),u=a(o,"y"),p=this.getOverlayDocumentPath();return p+="M ".concat(c+4," ").concat(s,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",").concat(4,"\n V ").concat(u+s-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",").concat(4,"\n H ").concat(l+c-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",-").concat(4,"\n V ").concat(s+4,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",-").concat(4,"Z")}},{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(),c=Math.max(0,r-e+4),l=Math.min(window.innerWidth,o+r+e-4);return s+="M ".concat(c," ").concat(i,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",").concat(4,"\n V ").concat(a+i-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",").concat(4,"\n H ").concat(l,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",-").concat(4,"\n V ").concat(i+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=h(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(),d(d({},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=d(d({},this.getDefaultTmplData()),{},{interaction:e});return this.createEl("interaction",this.getInteractionTmpl(),d(d({},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(),d(d({},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"> {{ progressbar }} {{ description }} {{ close }} {{ customButtons }} {{ notification }} </div>'}},{key:"createTooltipEl",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=d(d({},this.getDefaultTmplData()),{},{progressbar:this.createProgressbarEl(e),description:this.createDescriptionEl(e),close:this.createCloseEl(e),customButtons:this.createCustomButtonsEl(e),previous:this.createPreviousEl(e),pagination:this.createPaginationEl(e),next:this.createNextEl(e),copyright:this.createCopyrightEl(e),notification:this.createNotificationEl(e),isCaret:null===(t=this.currentStep)||void 0===t?void 0:t.isCaret});return this.createEl("tooltip",this.getTooltipTmpl(),d(d({},n),e))}},{key:"getCloseTmpl",value:function(){return'<div class="gc-close" style="--gc-close-foreground: {{iconCloseColor}};" @click="stop({ event: $event })"></div>'}},{key:"createCloseEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep||{},n=null==e?void 0:e.iconCloseColor;return"string"==typeof n&&n.trim()||(n="#000000"),this.createEl("close",this.getCloseTmpl(),d(d({},this.getDefaultTmplData()),{},{iconCloseColor:n},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=d(d({},this.getDefaultTmplData()),{},{showProgressbar:e,progressMax:n,progressMin:r,progress:i});return this.createEl("progressbar",this.getProgressbarTmpl(),d(d({},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(),d(d({},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(),d(d({},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,l=void 0===c?"":c,u=e.class;(i=document.createElement(s)).innerHTML=l,u&&(i.className=u),o&&i.addEventListener("click",(function(e){o.call(t,e)}))}n.push(i)})),this.createEl("customButtons",this.getCustomButtonsTmpl(),d(d({},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(),d(d({},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(),d(d({},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(),d(d({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"getCopyrightTmpl",value:function(){return'<div class="gc-copyright">Made with pagepilot.fabbuilder.com</div> '}},{key:"createCopyrightEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("copyright",this.getCopyrightTmpl(),d(d({},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(),d(d({},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=a(r,1),o=i[0];n.priority&&r.includes(n.priority)&&(o=n.priority);var s=t.trim();return this.listeners[s]=this.listeners[s]||{},this.listeners[s][o]=this.listeners[s][o]||[],this.listeners[s][o].push(e),this}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=s(this.constructor.getEventListenersPriorities()).reverse(),a=t.trim(),c=[],l=Promise.resolve(c);return this.listeners[a]&&o.forEach((function(t){var n=e.listeners[a][t];n&&(l=l.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(s(c),s(t))})))})),l}},{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=d(d({},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.currentStep,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}}],l=[{key:"getDefaultOptions",value:function(){return{position:"bottom",useKeyboard:!0,exitEscape:!0,exitOverlay:!1,showPagination:!0,showNavigation:!0,showProgressbar:!0,paginationTheme:"numbers",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,l=s.right,u=s.bottom,p=s.left;return{right:l,bottom:u,width:s.width,height:s.height,x:s.x,y:s.y,top:c+o,left:p+a}}},{key:"isFixed",value:function(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===getComputedStyle(t).getPropertyValue("position")||this.isFixed(e))}}],c&&y(o.prototype,c),l&&y(o,l),Object.defineProperty(o,"prototype",{writable:!1}),t}(),x=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}(),w=(m=function(t,e){return m=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])},m(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}m(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),S=(new(function(t){function e(){return t.call(this,false)||this}return w(e,t),e}(x)),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)}}()),_=new(function(t){function e(){return t.call(this,true)||this}return S(e,t),e}(x)),k=__webpack_require__(219);function E(t){return E="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},E(t)}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P(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 T(t,e,n){return e&&P(t.prototype,e),n&&P(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=I(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 I(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=B(t)););return t}function C(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&&L(t,e)}function L(t,e){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},L(t,e)}function j(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=B(t);if(e){var i=B(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return D(this,n)}}function D(t,e){if(e&&("object"===E(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 B(t){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},B(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){C(r,e);var n=j(r);function r(){return O(this,r),n.apply(this,arguments)}return T(r,[{key:"getDataBeacons",value:function(t){var e=this,n=A(B(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:"createGuideInstance",value:function(t,e){if(null==t||!t.tour)return null;if("string"==typeof t.tour||Array.isArray(t.tour))return new e(t.tour);if(t.tour instanceof e)return t.tour;if("object"===E(t.tour)){var n=t.tour;return new e(n.steps,n.options)}return null}},{key:"runGuide",value:function(t,e){var n=this.createGuideInstance(t,e),r=null!==document.querySelector(".gc-tooltip");n&&!r&&n.start()}},{key:"attachGuideEvent",value:function(t,e,n){var r=this,o=null==e?void 0:e.trigger,a=function(){return r.runGuide(e,n)};switch(o){case i.$h.onClick:t.addEventListener("click",a);break;case i.$h.onHover:t.addEventListener("mouseenter",a);break;case i.$h.onLongPress:var s,c=function(){return s=setTimeout(a,600)},l=function(){return clearTimeout(s)};t.addEventListener("mousedown",c),t.addEventListener("mouseup",l),t.addEventListener("mouseleave",l),t.addEventListener("touchstart",c),t.addEventListener("touchend",l);break;case i.$h.onPageLoad:"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a();break;default:console.warn("Unsupported trigger: ".concat(o))}}},{key:"createBeaconEl",value:function(e){var n=A(B(r.prototype),"createBeaconEl",this).call(this,e);return this.attachGuideEvent(n,e,t),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 M(t,e,n){return M=Y()?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&&Z(i,n.prototype),i},M.apply(null,arguments)}function W(t){return function(t){if(Array.isArray(t))return F(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 F(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 F(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 F(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 z(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){$(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 $(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */q=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 _(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===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=l(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var u={};function p(){}function h(){}function f(){}var d={};s(d,i,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==e&&n.call(g,i)&&(d=g);var y=f.prototype=p.prototype=Object.create(d);function m(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(i,o,a,s){var c=l(t[i],t,o);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==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){u.value=t,a(u)}),(function(t){return r("throw",t,a,s)}))}s(c.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=l(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,u;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function 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 _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function k(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:_,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,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}function K(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){K(o,r,i,a,s,"next",t)}function s(t){K(o,r,i,a,s,"throw",t)}a(void 0)}))}}function G(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function U(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 Z(t,e){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Z(t,e)}function J(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 Y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function X(t){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},X(t)}var Q=__webpack_require__(68).match,tt="AHD_TOUR_DATA",et="APP_BANNER_DATA",nt="AHD_HIGHLIGHTS_DATA",rt="AHD_VISITOR_STATS",it=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&&Z(t,e)}(O,t);var e,n,r,i,o,a,s,c,l,u,p,h,f,d,v,g,y,m,b,x,w,S,k,E=(e=O,n=Y(),function(){var t,r=X(e);if(n){var i=X(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return J(this,t)});function O(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return G(this,O),n.userId&&!n.visitorId&&(n.visitorId=n.userId),(e=E.call(this,t,n)).attachPlugins(),e}return r=O,i=[{key:"attachPlugins",value:function(){[R].forEach((function(t){ot.extend(t)}))}},{key:"initializeSiteMap",value:(k=V(q().mark((function t(e){var n,r;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_.get(nt),(n=_.get(tt))&&!e){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(n);case 6:n=t.sent;case 7:if((r=_.get(rt))&&!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 k.apply(this,arguments)})},{key:"getHelpContent",value:(S=V(q().mark((function t(e,n){var r,i;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=_.get(tt))&&!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 S.apply(this,arguments)})},{key:"normalizeDimension",value:function(t){if(null!=t){if("string"==typeof t){var e=t.trim();return e.endsWith("%"),e}return"number"==typeof t?t:parseInt(t)}}},{key:"showPageTour",value:(w=V(q().mark((function t(e){var n,r,i,o,a,s,c=this;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:n=_.get(tt),(null==(r=this.getApplicabeDataForUrl(n.tours,e,!1))?void 0:r.length)>0&&(i=_.get(rt)||{},o=(null==i?void 0:i.visited)||[],a=new Set(o),r.forEach((function(t){if(!a.has(t.slug)){a.add(t.slug);var e=t.id||t._id;c.markPageVisited(t.slug,"tour",e)}})),_.put(rt,z(z({},i),{},{visited:W(a)}),86400),s=r.flatMap((function(t){return Array.isArray(t.steps)?t.steps.filter((function(t){return!!t.content})).map((function(e){var n,r,i,o,a,s,l;return{element:e.selector,description:e.content,position:e.position,animationType:e.animationType,delay:e.delay,isBackdrop:e.isBackdrop,isCaret:e.isCaret,dismissalSetting:e.dismissalSetting,showProgressbar:c.options.showProgressbar,width:c.normalizeDimension(e.canvasWidth||(null===(n=e.styles)||void 0===n?void 0:n.width)),height:c.normalizeDimension(e.canvasHeight||(null===(r=e.styles)||void 0===r?void 0:r.height)),top:c.normalizeDimension((null===(i=e.styles)||void 0===i?void 0:i.top)||e.top),left:c.normalizeDimension((null===(o=e.styles)||void 0===o?void 0:o.left)||e.left),stepId:e.id,id:t.id,type:"tour",iconCloseColor:null!==(a=null===(s=e.style)||void 0===s?void 0:s.iconCloseColor)&&void 0!==a?a:null===(l=e.behaviour)||void 0===l?void 0:l.iconCloseColor}})):[]})),console.log("Tour",s),this.setTour(s),this.start());case 5:case"end":return t.stop()}}),t,this)}))),function(t){return w.apply(this,arguments)})},{key:"showAppBanner",value:(x=V(q().mark((function t(e,n){var r;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=_.get(et))&&!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 x.apply(this,arguments)})},{key:"fetchFaqs",value:(b=V(q().mark((function t(e){var n;return q().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 b.apply(this,arguments)})},{key:"showPageBeacons",value:(m=V(q().mark((function t(e){var n,r,i,o,a,s,c=this;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:n=_.get(tt),(r=this.getApplicabeDataForUrl(n.tooltips,e,!0)).length>0&&(i=_.get(rt)||{},o=(null==i?void 0:i.visited)||[],a=new Set(o),r.forEach((function(t){if(!a.has(t.slug)){a.add(t.slug);var e=r[0].id||r[0]._id;c.markPageVisited(t.slug,"tooltip",e)}})),_.put(rt,z(z({},i),{},{visited:W(a)}),86400),s=r.flatMap((function(t){return(Array.isArray(t.step)?t.step:t.step?[t.step]:[]).filter((function(t){return!!t.content})).map((function(e){var n,r,i,o,a=(null===(n=e.contentMetadata)||void 0===n||null===(r=n.document)||void 0===r||null===(i=r.root)||void 0===i||null===(o=i.data)||void 0===o?void 0:o.behaviour)||{},s=[{element:e.selector,title:e.title,description:e.content,animationType:e.animationType||a.animationType||"fadeIn",delay:e.delay||a.delay||0,isBackdrop:void 0!==e.isBackdrop?e.isBackdrop:void 0===a.isBackdrop||a.isBackdrop,isCaret:void 0!==e.isCaret?e.isCaret:void 0===a.isCaret||a.isCaret,position:e.position||a.position,stepId:e.id,id:t.id,type:"tooltip"}],c={element:e.selector||a.selector,position:e.position||a.position||"right",boundary:"outer",class:"beacon-labs64",triggerMode:e.triggerMode||a.triggerMode,trigger:e.triggerBehaviour||a.triggerBehaviour||"onClick",tour:s},l=e.triggerIcon||a.triggerIcon,u=e.triggerLabel||a.triggerLabel;if("icon"===c.triggerMode&&l){var p="beacon";"info"===l.type&&(p="info"),"success"===l.type&&(p="success"),"warning"===l.type&&(p="warning"),"helpIcon"===l.type&&(p="helpIcon"),c.triggerIcon={type:p,color:l.color||"#000000",opacity:l.opacity?l.opacity/100:1,isAnimated:l.isAnimated||!1}}else"label"===c.triggerMode&&u&&(c.triggerLabel={text:u.text,color:u.color||"#000000",background:u.backgroundColor||"#ffffff"});return c}))})),console.log("beacons",s),ot.beacons(s,{boundary:"outer"}).showAll());case 5:case"end":return t.stop()}}),t,this)}))),function(t){return m.apply(this,arguments)})},{key:"setBeacons",value:(y=V(q().mark((function t(e){return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:ot.beacons(e,{boundary:"outer"}).showAll();case 1:case"end":return t.stop()}}),t)}))),function(t){return y.apply(this,arguments)})},{key:"showHighlights",value:(g=V(q().mark((function t(e,n){var r,i,o;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.stop();case 2:if((o=_.get(tt))&&!n){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(o,e);case 6:o=t.sent;case 7:(null===(r=o.tours)||void 0===r?void 0:r.length)>0&&this.showPageTour(e),(null===(i=o.tooltips)||void 0===i?void 0:i.length)>0&&this.showPageBeacons(e);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e){return g.apply(this,arguments)})},{key:"showPageHighlights",value:(v=V(q().mark((function t(e,n){var r,i,o,a,s=this,c=arguments;return q().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=_.get(nt),o=this.getUnAcknowledgedHightlightsForUrl(i,e,"highlight",r),a=o.map((function(t){return{element:t.selector,position:t.position,onClick:(e=V(q().mark((function e(){return q().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})),ot.beacons(a,{boundary:"outer"}).showAll();case 8:case"end":return t.stop()}}),t,this)}))),function(t,e){return v.apply(this,arguments)})},{key:"clearCachedData",value:(d=V(q().mark((function t(){return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:_.removeKey(nt),_.removeKey("AHD_HELP_DATA"),_.removeKey(tt),_.removeKey(rt);case 4:case"end":return t.stop()}}),t)}))),function(){return d.apply(this,arguments)})},{key:"acknowledgeHighlight",value:(f=V(q().mark((function t(e){var n,r,i;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=_.get(rt)||{},r=(null==n?void 0:n.ack)||[],(i=new Set(r)).has(e)||i.add(e),_.put(rt,z(z({},n),{},{ack:W(i)}),86400),this.updateVisitorStats({ack:[e]},"highlight");case 6:case"end":return t.stop()}}),t,this)}))),function(t){return f.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=_.get(rt)||{},o=(null==i?void 0:i.ack)||[];return t.filter((function(t){return!(!r&&o&&o.includes(t.id))&&Q(t.slug,{decode:decodeURIComponent})(e)}))}},{key:"getApplicabeDataForUrl",value:function(t,e){var n=_.get(rt)||{};return null==n||n.visited,t.filter((function(t){return!!Q(t.slug,{decode:decodeURIComponent})(e)}))}},{key:"fetchAndCacheHighlightsData",value:(h=V(q().mark((function t(e){var n;return q().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})),_.put(nt,e,this.options.highlightRefetchIntervalInSec)),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"fetchAndCacheTourData",value:(p=V(q().mark((function t(e,n){var r,i;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r="".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/unacknowledged?filter[slug]=").concat(n,"&filter[userId]=").concat(this.options.visitorId,"&filter[device]=desktop"),t.next=3,fetch(r).then((function(t){return t.json()}));case 3:return(i=t.sent)&&(e=i,_.put(tt,e,this.options.toursRefetchIntervalInSec)),t.abrupt("return",e);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return p.apply(this,arguments)})},{key:"fetchAndCacheBannerData",value:(u=V(q().mark((function t(e){var n;return q().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})),_.put(et,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:(l=V(q().mark((function t(e){var n;return q().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)&&_.put(rt,n,this.options.statsCacheIntervalInSec),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return l.apply(this,arguments)})},{key:"updateVisitorStats",value:(c=V(q().mark((function t(e,n){var r;return q().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)&&_.put(rt,r,this.options.visitsCacheIntervalInSec),t.abrupt("return",void 0);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e){return c.apply(this,arguments)})},{key:"acknowledgeStep",value:(s=V(q().mark((function t(e,n,r){var i;return q().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i={method:"GET",redirect:"follow"},t.next=3,fetch("".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/client/acknowledge?userId=").concat(this.options.visitorId,"&id=").concat(n,"&type=").concat(e,"&stepId=").concat(r,"&device=desktop"),i).then((function(t){return t.json()}));case 3:t.sent;case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return s.apply(this,arguments)})},{key:"markPageVisited",value:(a=V(q().mark((function t(e,n,r){var i;return q().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,entityId:r,channel:"web",type:n}})}).then((function(t){return t.json()}));case 2:return(i=t.sent)&&_.put(rt,i,this.options.visitsCacheIntervalInSec),t.abrupt("return",void 0);case 5:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return a.apply(this,arguments)})}],i&&U(r.prototype,i),o&&U(r,o),Object.defineProperty(r,"prototype",{writable:!1}),O}(b),ot=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return M(it,e)};ot.prototype=it.prototype,ot.plugins=new Set,ot.extend=function(t){if(!ot.plugins.has(t)){ot.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,[it,ot].concat(n))}return ot};function at(){var t=Math.min(window.innerWidth/1280,1),e={Top:"bottom center","Top Left":"bottom left","Top Right":"bottom right",Bottom:"top center","Bottom Left":"top left","Bottom Right":"top right",Left:"center right",Right:"center left"};document.querySelectorAll("[data-guidechimp-position]").forEach((function(n){var r=n.getAttribute("data-guidechimp-position")||"";n.style.transformOrigin=e[r]||"top left",n.style.transform="scale(".concat(t,")")}))}at(),window.addEventListener("resize",at);const st=ot})(),__webpack_exports__})()));
|
|
13
13
|
//# sourceMappingURL=index.js.map
|