ahdjs 0.0.211 → 0.0.213
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/build/types/GuideChimp.d.ts +13 -0
- 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.213
|
|
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,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}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={},this.pendingBeacons=[],this.elementSearchIntervalId=null,this.elementSearchInterval=5e3,"undefined"!=typeof ResizeObserver&&(this.observers.elementResizeObserver=new ResizeObserver((function(){return e.refresh()}))),"undefined"!=typeof MutationObserver&&(this.observers.domMutationObserver=new MutationObserver((function(){return e.handleDomMutations()}))),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.elementSearchInterval=this.options.elementSearchInterval,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.pendingBeacons=[],this.beacons.length&&(this.beacons.forEach((function(t){var n=t.element;if(n){var r=e.getEl(n);r?e.createAndAttachBeacon(t,r):e.pendingBeacons.push(t)}})),this.addOnWindowResizeListener(),this.addOnScrollListener(),this.observeDomMutations(),this.searchForPendingElements(),this.startElementSearch()),this}},{key:"createAndAttachBeacon",value:function(t,e){var n=this.createBeaconEl(t);return n.hidden=!0,this.constructor.isFixed(e)&&n.classList.add(this.constructor.getFixedClass()),"info-tooltip"===t.class&&n.classList.remove("gc-beacon"),"help-tooltip"===t.class&&n.classList.remove("gc-beacon"),document.body.append(n),this.elements.set(t,n),this.setBeaconPosition(e,n,t),t._forceShow?(n.hidden=!1,delete t._forceShow):this.isCanShowBeacon(t)&&(n.hidden=!1),this.observeResizing(e),this}},{key:"startElementSearch",value:function(){var t=this;return this.stopElementSearch(),this.pendingBeacons.length>0&&(this.elementSearchIntervalId=setInterval((function(){t.searchForPendingElements()}),this.elementSearchInterval)),this}},{key:"stopElementSearch",value:function(){return this.elementSearchIntervalId&&(clearInterval(this.elementSearchIntervalId),this.elementSearchIntervalId=null),this}},{key:"searchForPendingElements",value:function(){var t=this;if(0===this.pendingBeacons.length)return this.stopElementSearch(),this;var e=[];return this.pendingBeacons.forEach((function(n){var r=n.element,o=t.getEl(r);o&&document.body.contains(o)?t.createAndAttachBeacon(n,o):e.push(n)})),this.pendingBeacons=e,0===this.pendingBeacons.length&&this.stopElementSearch(),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 _this5=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(_this5.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[_this5.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(_this5.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:_this5.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,o=n.boundary,i=n.triggerIcon,a=n.triggerLabel,s=n.triggerMode;r=r||this.options.position,o="inner"===(o=o||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=window.pageXOffset||document.documentElement.scrollLeft,d=window.pageYOffset||document.documentElement.scrollTop;c=u.left+h,l=u.top+d}var f,v,g=u.width,y=u.height,m=e.style,b=getComputedStyle(e),S=b.width,w=b.height;(S=parseInt(S,10),w=parseInt(w,10),e.removeAttribute("data-beacon-position"),e.removeAttribute("data-beacon-boundary"),e.setAttribute("data-beacon-position",r),e.setAttribute("data-beacon-boundary",o),s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.icon)&&(m.backgroundImage=this.iconType(null==i?void 0:i.type),m.opacity=null!==(f=null==i?void 0:i.opacity)&&void 0!==f?f:1,m.backgroundColor=null!==(v=null==i?void 0:i.color)&&void 0!==v?v:"white",null!=i&&i.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 x,k,E,_;m.opacity=null!==(x=null==a?void 0:a.opacity)&&void 0!==x?x:1,m.backgroundColor=null!==(k=null==a?void 0:a.background)&&void 0!==k?k:"#fff",m.color=null!==(E=null==a?void 0:a.color)&&void 0!==E?E:"#000";var O=s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.label&&null!==(_=null==a?void 0:a.text)&&void 0!==_?_:"";e.setAttribute("data-beacon-label",O)}switch(r){case"top-left":"inner"===o?(m.left="".concat(c,"px"),m.top="".concat(l,"px")):(m.left="".concat(c-S,"px"),m.top="".concat(l-w,"px"));break;case"top":m.left="".concat(c+(g-S)/2,"px"),m.top="".concat("inner"===o?l:l-w,"px");break;case"top-right":"inner"===o?(m.left="".concat(g+c-S,"px"),m.top="".concat(l,"px")):(m.left="".concat(g+c,"px"),m.top="".concat(l-w,"px"));break;case"left":m.left="".concat("inner"===o?c:c-S,"px"),m.top="".concat(l+(y-w)/2,"px");break;case"right":m.left="".concat("inner"===o?c+g-S:c+g,"px"),m.top="".concat(l+(y-w)/2,"px");break;case"bottom-left":"inner"===o?(m.left="".concat(c,"px"),m.top="".concat(l+y-w,"px")):(m.left="".concat(c-S,"px"),m.top="".concat(l+y,"px"));break;case"bottom":m.left="".concat(c+(g-S)/2,"px"),m.top="".concat("inner"===o?l+y-w:l+y,"px");break;case"bottom-right":"inner"===o?(m.left="".concat(g+c-S,"px"),m.top="".concat(l+y-w,"px")):(m.left="".concat(g+c,"px"),m.top="".concat(l+y,"px"));break;default:e.setAttribute("data-beacon-position","center"),m.left="".concat(c+(g-S)/2,"px"),m.top="".concat(l+(y-w)/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):e&&(n._forceShow=!0)}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.pendingBeacons=[],this.unobserveResizeAllElements(),this.removeOnWindowResizeListener(),this.removeOnScrollListener(),this.unobserveDomMutations(),this.stopElementSearch(),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.removeOnScrollListener()),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),o=t.elements.get(e);r&&o&&(document.body.contains(r)?(t.setBeaconPosition(r,o,e),t.isCanShowBeacon(e)&&(o.hidden=!1)):o.hidden=!0)}})),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:"addOnScrollListener",value:function(){return this.cache.set("onScrollListener",this.getOnScrollListener()),window.addEventListener("scroll",this.cache.get("onScrollListener"),!0),this}},{key:"getOnScrollListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnScrollListener",value:function(){return this.cache.has("onScrollListener")&&(window.removeEventListener("scroll",this.cache.get("onScrollListener"),!0),this.cache.delete("onScrollListener")),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:"handleDomMutations",value:function(){var t=this;return this.beacons.forEach((function(e){var n=e.element;if(n){var r=t.getEl(n),o=t.elements.get(e);o&&(r&&document.body.contains(r)?t.isCanShowBeacon(e)&&(o.hidden=!1,t.setBeaconPosition(r,o,e)):o.hidden=!0)}})),this.searchForPendingElements(),this}},{key:"observeDomMutations",value:function(){var t=this.observers.domMutationObserver;return t&&t.observe(document.body,{childList:!0,subtree:!0}),this}},{key:"unobserveDomMutations",value:function(){var t=this.observers.domMutationObserver;return t&&t.disconnect(),this}}],[{key:"getDefaultOptions",value:function(){return{position:"center",boundary:"inner",elementSearchInterval:5e3}}},{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:()=>p,ti:()=>h,zm:()=>d});var r={onClick:"onClick",onHover:"onHover",onMouseLeave:"onMouseLeave",onMouseEnter:"onMouseEnter",onPageLoad:"onPageLoad",onLongPress:"onLongPress"},o="instant",i="fadeIn",a="slide",s="slideLeft",c="slideRight",l="slideUp",u="slideDown",p={onOutsideClick:"onOutsideClick",dismissButtonClickOnly:"dismissButtonClickOnly",buttonClickOnly:"buttonClickOnly"},h=function(t){switch(t){case o:return"none";case i:return"fadeIn 1s ease-in";case u:return"slideDown 1s forwards";case s:return"slideLeft 1s forwards";case c:return"slideRight 1s forwards";case l:case a:return"slideUp 1s forwards";default:return"none"}},d={icon:"icon",noIcon:"noIcon",label:"label"}},95:(t,e,n)=>{"use strict";n.d(e,{Z:()=>S});var r=n(353),o=n.n(r),i=n(220),a=n.n(i),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){d(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 d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(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,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(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 o=new(Function.bind.apply(t,r));return n&&b(o,n.prototype),o},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 S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new DOMParser,r=t.replace(/<template/g,"<gc-template");r=r.replace(/<\/template/g,"</gc-template");var i=n.parseFromString(r,"text/html"),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,i=r,b=Object.keys(n),S=Object.values(n),w=function(t){return y(Function,b.concat(["return ".concat(t,";")])).apply(void 0,S)};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 x=e.getAttribute("for").split(" in "),k=f(x,2),E=k[0],_=k[1];e.removeAttribute("for");var O=E.replace(/\(|\)/g,"").split(","),P=f(O,2),A=P[0],C=P[1];A=A.trim(),C=C?C.trim():"";var T=w(_.trim()),I=Array.isArray(T);return void Object.keys(T).forEach((function(r){var o=h(h({},n),{},d({},A,T[r]));C&&(o[C]=I?parseInt(r,10):r),t(e,o,i)}))}e!==e.ownerDocument.body&&"GC-TEMPLATE"!==e.tagName&&(i=e.cloneNode(),r.append(i)),u(e.attributes).forEach((function(t){var e=t.name,n=t.value,r=g.exec(e);if(r){var s=f(r,2)[1];return i.addEventListener(s,(function(t){return y(Function,[].concat(b,["$event"]).concat(["return ".concat(n).concat(/\(.+\)/.test(n)?"":"()",";")])).apply(void 0,[].concat(S,[t]))})),void i.removeAttribute(e)}for(var c=v.exec(n),l=0,u="";c;){u+=n.slice(l,c.index);var p=f(c,2),h=p[0],d=p[1];d=d.trim();try{h=w(d),(o()(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?(i.innerHTML=u,i.removeAttribute(e)):["if","else","elseif"].includes(e)?i.removeAttribute(e):i.setAttribute(e,u)}))}else if(e.nodeType===Node.TEXT_NODE){var L=v.exec(e.nodeValue);if(L){for(var R=0;L;){i.append(document.createTextNode(e.nodeValue.slice(R,L.index)));var B=L,D=f(B,2),M=D[0],j=D[1];j=j.trim();try{M=w(j),(o()(M)||a()(M))&&(M="")}catch(t){console.error(t)}(0,s.Z)(M)||c(M)?i.append(M):l(M)?M.forEach((function(t){i.append(t)})):i.append(document.createTextNode(M)),R=L.index+L[0].length,L=v.exec(e.nodeValue)}i.append(document.createTextNode(e.nodeValue.slice(R,e.nodeValue.length)))}else i.append(e.cloneNode())}var N=e.childNodes,H=void 0===N?[]:N;H.length&&H.forEach((function(e){t(e,n,i)}))}};return b(i.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,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},239:(t,e,n)=>{var r=n(705),o=n(607),i=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)?o(t):i(t)}},531:(t,e,n)=>{var r=n(705),o=n(932),i=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(i(e))return o(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),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[s]=n:delete t[s]),o}},333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},639:(t,e,n)=>{var r=n(957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},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),o=n(5);t.exports=function(t){return"symbol"==typeof t||o(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),o=0;t.exports=function(t){var e=++o;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 o=1,i="";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==--o){s++;break}}else if("("===t[s]&&(o++,"?"!==t[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));i+=t[s++]}else i+=t[s++]+t[s++];if(o)throw new TypeError("Unbalanced pattern at ".concat(n));if(!i)throw new TypeError("Missing pattern at ".concat(n));e.push({type:"PATTERN",index:n,value:i}),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,o=void 0===r?"./":r,i="[^".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],o=r.type,i=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(i,", expected ").concat(t))},d=function(){for(var t,e="";t=p("CHAR")||p("ESCAPED_CHAR");)e+=t;return e};l<n.length;){var f=p("CHAR"),v=p("NAME"),g=p("PATTERN");if(v||g){var y=f||"";-1===o.indexOf(y)&&(u+=y,y=""),u&&(a.push(u),u=""),a.push({name:v||s++,prefix:y,suffix:"",pattern:g||i,modifier:p("MODIFIER")||""})}else{var m=f||p("ESCAPED_CHAR");if(m)u+=m;else if(u&&(a.push(u),u=""),p("OPEN")){y=d();var b=p("NAME")||"",S=p("PATTERN")||"",w=d();h("CLOSE"),a.push({name:b||(S?s++:""),pattern:b&&!S?i:S,prefix:y,suffix:w,modifier:p("MODIFIER")||""})}else h("END")}}return a}function o(t,e){return i(r(t,e),e)}function i(t,e){void 0===e&&(e={});var n=l(e),r=e.encode,o=void 0===r?function(t){return t}:r,i=e.validate,a=void 0===i||i,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 i=t[r];if("string"!=typeof i){var c=e?e[i.name]:void 0,l="?"===i.modifier||"*"===i.modifier,u="*"===i.modifier||"+"===i.modifier;if(Array.isArray(c)){if(!u)throw new TypeError('Expected "'.concat(i.name,'" to not repeat, but got an array'));if(0===c.length){if(l)continue;throw new TypeError('Expected "'.concat(i.name,'" to not be empty'))}for(var p=0;p<c.length;p++){var h=o(c[p],i);if(a&&!s[r].test(h))throw new TypeError('Expected all "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(h,'"'));n+=i.prefix+h+i.suffix}}else if("string"!=typeof c&&"number"!=typeof c){if(!l){var d=u?"an array":"a string";throw new TypeError('Expected "'.concat(i.name,'" to be ').concat(d))}}else{h=o(String(c),i);if(a&&!s[r].test(h))throw new TypeError('Expected "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(h,'"'));n+=i.prefix+h+i.suffix}}else n+=i}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,o=void 0===r?function(t){return t}:r;return function(n){var r=t.exec(n);if(!r)return!1;for(var i=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 o(t,n)})):s[n.name]=o(r[t],n)},l=1;l<r.length;l++)c(l);return{path:i,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,o=void 0!==r&&r,i=n.start,a=void 0===i||i,s=n.end,u=void 0===s||s,p=n.encode,h=void 0===p?function(t){return t}:p,d=n.delimiter,f=void 0===d?"/#?":d,v=n.endsWith,g="[".concat(c(void 0===v?"":v),"]|$"),y="[".concat(c(f),"]"),m=a?"^":"",b=0,S=t;b<S.length;b++){var w=S[b];if("string"==typeof w)m+=c(h(w));else{var x=c(h(w.prefix)),k=c(h(w.suffix));if(w.pattern)if(e&&e.push(w),x||k)if("+"===w.modifier||"*"===w.modifier){var E="*"===w.modifier?"?":"";m+="(?:".concat(x,"((?:").concat(w.pattern,")(?:").concat(k).concat(x,"(?:").concat(w.pattern,"))*)").concat(k,")").concat(E)}else m+="(?:".concat(x,"(").concat(w.pattern,")").concat(k,")").concat(w.modifier);else"+"===w.modifier||"*"===w.modifier?m+="((?:".concat(w.pattern,")").concat(w.modifier,")"):m+="(".concat(w.pattern,")").concat(w.modifier);else m+="(?:".concat(x).concat(k,")").concat(w.modifier)}}if(u)o||(m+="".concat(y,"?")),m+=n.endsWith?"(?=".concat(g,")"):"$";else{var _=t[t.length-1],O="string"==typeof _?y.indexOf(_[_.length-1])>-1:void 0===_;o||(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,o=n.exec(t.source);o;)e.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=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:()=>o,match:()=>a,parse:()=>r,pathToRegexp:()=>p,regexpToFunction:()=>s,tokensToFunction:()=>i,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:()=>pt});var t=__webpack_require__(955),e=__webpack_require__.n(t),n=__webpack_require__(95),r=__webpack_require__(629);var o=__webpack_require__(102);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function 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,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(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:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new _(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=x(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),i}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 d(){}function f(){}function v(){}var g={};c(g,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(O([])));m&&m!==e&&n.call(m,o)&&(g=m);var b=v.prototype=d.prototype=Object.create(g);function S(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,a,s,c){var l=p(t[o],t,a);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==i(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(l.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}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 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 o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return f.prototype=v,c(b,"constructor",v),c(v,"constructor",f),f.displayName=c(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"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}},S(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(b),c(b,s,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,_.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(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.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),E(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 o=r.arg;E(n)}return o}}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,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function h(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){p(i,r,o,a,s,"next",t)}function s(t){p(i,r,o,a,s,"throw",t)}a(void 0)}))}}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){v(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(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,o=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(o),this.tour=null,this.setTour(n),this.notifications=[],this.elements=new Map,this.init(),this._rootSpec=this.options.root||null,this.rootEl=this.resolveRoot(this._rootSpec),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 i,c,l,p,d,v,m,b;return i=t,c=[{key:"resolveRoot",value:function(t){if(!t)return null;try{if("string"==typeof t){var e=document.querySelector(t)||null;if(!e)return null;var n=(e.tagName||"").toUpperCase();return new Set(["IMG","INPUT","BR","HR","META","LINK","SOURCE","TRACK","WBR"]).has(n)?(this.referenceEl=e,this.rootEl=e.parentElement||document.body,this.rootEl):(this.referenceEl=e,this.rootEl=e,e)}if((0,r.Z)(t)){var o=(t.tagName||"").toUpperCase();return new Set(["IMG","INPUT","BR","HR","META","LINK","SOURCE","TRACK","WBR"]).has(o)?(this.referenceEl=t,this.rootEl=t.parentElement||document.body,this.rootEl):(this.referenceEl=t,this.rootEl=t,t)}}catch(t){return null}return null}},{key:"getRootEl",value:function(){if(!this.rootEl&&this._rootSpec){var t=this.resolveRoot(this._rootSpec);if(t)return this.rootEl=t,this.rootEl}return this.rootEl||document.body}},{key:"getViewportDims",value:function(){var t=this.getRootEl();if(this.referenceEl){var e=this.getElementVisibleRect(this.referenceEl);return{innerWidth:e.width,innerHeight:e.height,left:e.left,top:e.top,right:e.right,bottom:e.bottom}}if(t&&t!==document.body){var n=t.getBoundingClientRect();return{innerWidth:n.width,innerHeight:n.height,left:n.left,top:n.top,right:n.right,bottom:n.bottom}}return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}}},{key:"getScaleForWidth",value:function(t){return t<=360||t<=480?.65:t<=768?.75:t<=1023?.85:1}},{key:"applyRootWidthScale",value:function(){var t=this.getRootEl();if(t&&t!==document.body){var e=t.offsetWidth||t.getBoundingClientRect().width,n=this.getScaleForWidth(e),r=this.getEl("tooltip");if(r){var o=r.querySelector(".gc-close"),i=r.querySelector(".gc-copyright");o&&(o.style.transform="scale(".concat(n,")"),o.style.transformOrigin="top right"),i&&(i.style.transform="scale(".concat(n,")"),i.style.transformOrigin="bottom left")}}}},{key:"getElementVisibleRect",value:function(t){if(!t)return new DOMRect(0,0,0,0);try{if("IMG"===(t.tagName||"").toUpperCase()&&t.naturalWidth&&t.naturalHeight){var e=getComputedStyle(t);if("contain"===(e.getPropertyValue("object-fit")||e.objectFit)){var n=t.getBoundingClientRect(),r=Math.max(0,t.clientWidth||n.width||0),o=Math.max(0,t.clientHeight||n.height||0),i=Math.min(r/t.naturalWidth,o/t.naturalHeight),a=Math.round(t.naturalWidth*i),s=Math.round(t.naturalHeight*i),c=Math.round((r-a)/2),l=Math.round((o-s)/2),u=n.left+c,p=n.top+l;return{left:u,top:p,right:u+a,bottom:p+s,width:a,height:s,x:u,y:p}}}}catch(t){}return t.getBoundingClientRect()}},{key:"init",value:function(){}},{key:"handleClick",value:function(t){var e=t.target.getAttribute("data-action");if(e)if("goToStep"!==e)if("postMessageEvent"!==e)this.actions[e]&&this.actions[e]();else{var n=t.target.closest("[data-post-message-event], [data-action-payload]")||t.target.closest('[data-action="postMessageEvent"]'),r=n?n.getAttribute("data-post-message-event")||function(){try{return JSON.parse(n.getAttribute("data-action-payload")||"{}").postMessageEvent}catch(t){return null}}():null;r&&window.postMessage({type:r},"*")}else{var o=t.target.closest("[data-goto-step], [data-action-payload]")||t.target.closest('[data-action="goToStep"]'),i=o?o.getAttribute("data-goto-step")||function(){try{return JSON.parse(o.getAttribute("data-action-payload")||"{}").goToStep}catch(t){return null}}():null;if(null!=i&&""!==i){var a=parseInt(i,10)-1;!isNaN(a)&&a>=0&&this.onGotoStep(a)}}}},{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){if(this.options&&0!==Object.keys(this.options).length?this.options=f(f({},this.options),t):this.options=f(f({},this.constructor.getDefaultOptions()),t),t&&Object.prototype.hasOwnProperty.call(t,"root")){this._rootSpec=t.root;var e=this.resolveRoot(this._rootSpec);e&&(this.rootEl=e)}return this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(b=h(u().mark((function t(){var e,n,r,o,i,a,s,c=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=c.length>0&&void 0!==c[0]?c[0]:0,n=!(c.length>1&&void 0!==c[1])||c[1],this.isDisplayed=!0,(r=this.getRootEl())&&r!==document.body&&"static"===getComputedStyle(r).position&&(r.style.position="relative"),this.mountOverlayEl(),this.startPreloader(),o=c.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=c[a];return t.next=10,this.emit.apply(this,["onStart"].concat(i));case 10:if(this.stopPreloader(),this.tour&&this.tour.length){t.next=15;break}return this.removeOverlayEl(),this.isDisplayed=!1,t.abrupt("return",!1);case 15:if(this.steps=this.sortSteps(this.getSteps(this.tour)),this.steps.length){t.next=20;break}return this.removeOverlayEl(),this.isDisplayed=!1,t.abrupt("return",!1);case 20:return document.body.classList.add(this.constructor.getBodyClass()),this._saveScrollState(),t.next=24,this.go.apply(this,[e,n].concat(i));case 24:return s=t.sent,this.isDisplayed=s,document.body.classList.toggle(this.constructor.getBodyClass(),s),s&&(this.options.useKeyboard&&this.addOnKeydownListener(),this.addOnWindowResizeListener(),this.addOnWindowScrollListener(),this.addOnRootScrollListener()),t.abrupt("return",s);case 29: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,o,i,a,s,c,l,p,h,d,f,v,g,y,m,b,S,w=this,x=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=!(x.length>1&&void 0!==x[1])||x[1],r=x.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=x[i];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),d=p,f=(h=l).onBeforeChange,v=h.onAfterChange,this.startPreloader(),g=!1,!f){t.next=26;break}return t.next=23,Promise.resolve().then((function(){return f.call.apply(f,[w,h,s].concat(o))}));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(o));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:if(s&&(this.unmountStep(),this.unobserveStep()),this.beforeChangeStep({toStep:h,toStepIndex:d,currentStep:l,currentStepIndex:p,fromStep:s,fromStepIndex:c}),this.toStep=h,this.toStepIndex=d,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,(S=this.getStepEl(this.currentStep))||!this.currentStep||!1!==this.currentStep.showStep){t.next=55;break}if(this.stopPreloader(),!this.nextStep){t.next=52;break}return t.abrupt("return",this.go.apply(this,[this.nextStepIndex,!0].concat(o)));case 52:return t.next=54,this.stop.apply(this,o);case 54:return t.abrupt("return",!1);case 55:return"tooltip"!==this.currentStep.type&&(this._unlockScroll(),this.scrollParentsToStepEl(),this.scrollToStepEl(S||this.getStepEl(this.currentStep),y,b)),this.mountStep(),this._lockScroll(),"tooltip"!==this.currentStep.type&&setTimeout((function(){w.getEl("tooltip")&&(w._unlockScroll(),w.scrollTo(w.getEl("tooltip"),"instant",b),w._lockScroll())}),300),v&&v.call.apply(v,[this,this.toStep,this.fromStep].concat(o)),this.emit.apply(this,["onAfterChange",this.toStep,this.fromStep].concat(o)),t.abrupt("return",!0);case 62: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,o,i=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(o=this.currentStep.onPrevious,this.startPreloader(),!o){t.next=12;break}return t.next=8,Promise.resolve().then((function(){return o.call.apply(o,[i,i.previousStep,i.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:(d=h(u().mark((function t(){var e,n,r,o,i,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(o=this.currentStep,i=o.type,a=o.id,s=o.onNext,c=o.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(i,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 d.apply(this,arguments)})},{key:"stop",value:(p=h(u().mark((function t(){var e,n,r,o,i,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,o=e.stepId,i=c.length,a=new Array(i),s=0;s<i;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._unlockScroll(),this._savedBodyOverflow=void 0,this._savedHtmlOverflow=void 0,this._savedRootOverflow=void 0,this.setDefaults(),this.acknowledgeStep(n,r,o),t.abrupt("return",this);case 27: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 o=new RegExp("^".concat(n,"-").concat(t,"-[^-]+$")),i=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=o.test(u),d=!h&&i.test(u);if(h||d){var v=h?u.replace("".concat(n,"-").concat(t,"-"),""):u.replace("".concat(n,"-"),"");"tour"!==v&&(h||d&&!s[v])&&(s[v]=p)}}return f(f({step:a,title:"",description:"",position:e.options.position,interaction:e.options.interaction},s),{},{element:r})}))}},{key:"getJsSteps",value:function(t){return t.map((function(t,e){return f(f({},t),{},{step:t.step||e})}))}},{key:"sortSteps",value:function(t){return 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,o=e.left,i=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!==o&&i&&a?this.mountOffsetFakeStepEl({top:r,left:o,width:i,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(o){if(!o||o===r.body)return r.body;var i=getComputedStyle(o);if("fixed"===n.getPropertyValue("position")&&"static"===i.getPropertyValue("position"))return t(o.parentElement);var a=i.getPropertyValue("overflow-x"),s=i.getPropertyValue("overflow-y");return e.test(a)||e.test(s)?o:t(o.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(),o=r.top,i=r.bottom,a=r.left,s=r.right,c=this.getViewportDims(),l=c.innerWidth,u=c.innerHeight;return a>=0&&s<=l||window.scrollBy({behavior:e,left:a-n}),o>=0&&i<=u||window.scrollBy({behavior:e,top:o-n}),this}},{key:"_saveScrollState",value:function(){var t=this.getRootEl();return t&&t!==document.body?this._savedRootOverflow=t.style.overflow:(this._savedBodyOverflow=document.body.style.overflow,this._savedHtmlOverflow=document.documentElement.style.overflow),this}},{key:"_lockScroll",value:function(){var t=this.getRootEl();return t&&t!==document.body?t.style.overflow="hidden":(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"),this}},{key:"_unlockScroll",value:function(){var t=this.getRootEl();return t&&t!==document.body?t.style.overflow=void 0!==this._savedRootOverflow?this._savedRootOverflow:"":(document.body.style.overflow=void 0!==this._savedBodyOverflow?this._savedBodyOverflow:"",document.documentElement.style.overflow=void 0!==this._savedHtmlOverflow?this._savedHtmlOverflow:""),this}},{key:"_isHeaderOrFooterEl",value:function(t){for(var e=new Set(["HEADER","FOOTER","NAV"]),n=t;n&&n!==document.body;){if(e.has(n.tagName))return!0;var r=getComputedStyle(n).position;if("fixed"===r||"sticky"===r)return!0;n=n.parentElement}return!1}},{key:"scrollToStepEl",value:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t)return this;var n=t.getBoundingClientRect(),r=this.getViewportDims(),o=r.innerHeight,i=r.innerWidth;n.left>=0&&n.right<=i||window.scrollBy({behavior:"instant",left:n.left-e});var a=this._isHeaderOrFooterEl(t),s=window.scrollY||window.pageYOffset||0,c=n.top+s,l=c-(a?.3*o-e:Math.max(0,(o-n.height)/2)),u=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),p=Math.max(0,Math.min(l,u));return window.scrollTo({behavior:"instant",top:p}),this}},{key:"highlightStepEl",value:function(){var t,e,n,r,o,i=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,d=s.querySelector("path"),f=d.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,S=this.isEl(a,"fakeStep"),w=!v&&g&&y&&m&&b,x=S&&!w?this.getOverlayDocumentPath():this.getOverlayStepPath(this.currentStep);if(d.setAttribute("d",x),f){var k=f.getAttribute("lock");if(k||(f.setAttribute("from",x),f.setAttribute("to",x)),i){var E=this.isEl(this.getStepEl(this.fromStep),"fakeStep"),_=!this.fromStep||E||S?null:this.getOverlayStepPath(this.fromStep);_&&(f.setAttribute("from",_),f.setAttribute("to",x)),f.setAttribute("lock","true")}f.onend=function(){f.removeAttribute("lock")},f.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===(o=this.currentStep)||void 0===o?void 0:o.height);if(!P){var A=getComputedStyle(a);["absolute","relative","fixed"].includes(A.getPropertyValue("position"))||a.classList.add(this.constructor.getRelativePositionClass())}return a.setAttribute("data-guidechimp-".concat(this.uid),"highlight"),this.elements.set("highlight",a),this}},{key:"resetHighlightStepEl",value:function(){var t,e,n,r,o,i=this.getEl("overlay");if(i){var a=i.querySelector("path"),s=i.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===(o=this.currentStep)||void 0===o?void 0:o.height)||c.classList.remove(this.constructor.getRelativePositionClass()),c.removeAttribute("data-guidechimp-".concat(this.uid)),this.elements.delete("highlight"),this}},{key:"setInteractionPosition",value:function(t){var e,n,r,o,i,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===(o=this.currentStep)||void 0===o?void 0:o.width,u=null===(i=this.currentStep)||void 0===i?void 0:i.height;if(!a&&s&&c&&l&&u){if(!t)return this;var p=this.options.padding,h=this.getViewportDims(),d=h.innerWidth,f=h.innerHeight,v=function(t,e){if("string"==typeof t&&t.trim().endsWith("%")){var n=parseFloat(t)||0;return"x"===e?n/100*d:n/100*f}return"number"==typeof t?t:parseFloat(t)||0},g=this.getRootEl(),y=g&&g!==document.body,m=v(this.currentStep.top,"y"),b=v(this.currentStep.left,"x"),S=v(this.currentStep.width,"x"),w=v(this.currentStep.height,"y"),x=t.style;return x.cssText=y?"position: absolute;\n width: ".concat(S+p,"px;\n height: ").concat(w+p,"px;\n top: ").concat(m-p/2,"px;\n left: ").concat(b-p/2,"px;\n z-index: 6403;"):"position: fixed;\n width: ".concat(S+p,"px;\n height: ").concat(w+p,"px;\n top: ").concat(m-p/2,"px;\n left: ").concat(b-p/2,"px;\n z-index: 6403;"),this}var k=this.getStepEl(this.currentStep);if(!t||!k)return this;var E=this.options.padding;"floating"===getComputedStyle(k).getPropertyValue("position")&&(E=0);var _=this.constructor.getOffset(k),O=_.width,P=_.height,A=_.top,C=_.left;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(k)),t.style.cssText="width: ".concat(O+E,"px;\n height: ").concat(P+E,"px;\n top: ").concat(A-E/2,"px;\n left: ").concat(C-E/2,"px;"),this}},{key:"setControlPosition",value:function(t){var e,n,r,o,i,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===(o=this.currentStep)||void 0===o?void 0:o.width,u=null===(i=this.currentStep)||void 0===i?void 0:i.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 d=this.options.padding;"floating"===getComputedStyle(h).getPropertyValue("position")&&(d=0);var f=h.ownerDocument.defaultView.pageXOffset,v=h.ownerDocument.documentElement.getBoundingClientRect().width,g=this.constructor.getOffset(h),y=g.height,m=g.top,b=g.left,S=g.right,w=y+d,x=m-d/2,k=f<f+(b-d/2)?f:b-d/2,E=f+v>f+(S+d/2)?v:S+d/2,_=Math.max(0,f+v-k);return E=Math.max(0,Math.min(E,_)),t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(h)),t.style.cssText="width: ".concat(E,"px;\n height: ").concat(w,"px;\n top: ").concat(x,"px;\n left: ").concat(k,"px;"),this}},{key:"setTooltipPosition",value:function(t){var e,n,r,i,s,c,l,u,p=this,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.currentStep)return this;if(!t)return this;var d=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e){try{var o=e.style||{};if(o.transform&&-1!==o.transform.indexOf("translate(-50%"))return}catch(t){console.log(t)}var i,a,s=Math.max(n,0),c=p.getRootEl(),l=c&&c!==document.body,u=p.getViewportDims(),h=u.innerWidth,d=u.innerHeight,f=e.getBoundingClientRect(),v=f.width,g=f.height;if(l){var y=c.getBoundingClientRect();i=f.left-y.left,a=f.top-y.top}else i=f.left,a=f.top;var m=i,b=a,S=!1;i<s?(m=s,S=!0):i+v>h-s&&(m=Math.max(s,h-s-v),S=!0),a<s?(b=s,S=!0):a+g>d-s&&(b=Math.max(s,d-s-g),S=!0);var w=e.style;w.top&&"auto"!==w.top||(w.top="".concat(a,"px"),S=!0),w.left&&"auto"!==w.left||(w.left="".concat(i,"px"),S=!0),S&&(w.right="auto",w.bottom="auto",w.left="".concat(m,"px"),w.top="".concat(b,"px")),r<2&&(requestAnimationFrame((function(){var n,o,i=e.getBoundingClientRect();if(l){var a=c.getBoundingClientRect();n=i.left-a.left,o=i.top-a.top}else n=i.left,o=i.top;var u=i.width,p=i.height;(n<s||n+u>h-s||o<s||o+p>d-s)&&t(e,0,r+1)})),setTimeout((function(){return t(e,0,r+1)}),50))}},f=h.boundary,v=h.position,g=this.options.padding;f=f||window;var y=(v=(v=v||this.currentStep.position)||this.options.position).split("-"),m=a(y,2),b=m[0],S=m[1],w=t.style;w.top=null,w.right=null,w.bottom=null,w.left=null,w.transform=null,w.animation=null;var x=this.getStepEl(this.currentStep),k=x&&this.constructor.isFixed(x);if(w.position=k?"fixed":"absolute",w.zIndex="10001",w.visibility="hidden",this._tooltipShowTimer&&(clearTimeout(this._tooltipShowTimer),this._tooltipShowTimer=null),this.currentStep&&this.currentStep.element){var E=this.getStepEl(this.currentStep);if(E&&!this.isEl(E,"fakeStep")){var _=E.getBoundingClientRect(),O=_.bottom>0&&_.top<window.innerHeight&&_.right>0&&_.left<window.innerWidth;if(!O)return}}this._tooltipShowTimer=setTimeout((function(){p._tooltipShowTimer=null,w.visibility="visible"}),this.currentStep.delay||1e3);var P=document.getElementsByClassName("gc-overlay");if(P.length>0){var A=P[0];this.currentStep&&this.currentStep.isBackdrop?A.classList.remove("gc-overlay-hidden"):A.classList.add("gc-overlay-hidden")}(null===(e=this.currentStep)||void 0===e?void 0:e.dismissalSetting)===o.nL.dismissButtonClickOnly||(null===(n=this.currentStep)||void 0===n?void 0:n.dismissalSetting)===o.nL.buttonClickOnly?this.setOptions({exitOverlay:!1}):this.setOptions({exitOverlay:!0}),(null===(r=this.currentStep)||void 0===r?void 0:r.dismissalSetting)===o.nL.onOutsideClick&&this.setOptions({exitOverlay:!0});var C=this.currentStep.element,T=void 0!==(null===(i=this.currentStep)||void 0===i?void 0:i.top),I=void 0!==(null===(s=this.currentStep)||void 0===s?void 0:s.left),L=null===(c=this.currentStep)||void 0===c?void 0:c.width,R=null===(l=this.currentStep)||void 0===l?void 0:l.height;if(!C&&T&&I&&L&&R){var B,D,M=this.getRootEl(),j=M&&M!==document.body;t.setAttribute("data-guidechimp-position","top-left"),w.position=j?"absolute":"fixed",w.zIndex="10000",w.visibility="visible",w.pointerEvents="auto";var N=function(t,e){var n=p.getViewportDims(),r=n.innerWidth,o=n.innerHeight;if("string"==typeof t&&t.trim().endsWith("%")){var i=parseFloat(t)||0;return{isPct:!0,pct:i,px:"x"===e?i/100*r:i/100*o,raw:t.trim()}}var a="number"==typeof t?t:parseFloat(t)||0;return{isPct:!1,px:a,raw:"".concat(a,"px")}},H=N(this.currentStep.top,"y"),W=N(this.currentStep.left,"x"),F=N(this.currentStep.width,"x"),z=N(this.currentStep.height,"y"),q=F.px,$=z.px,V=H.px,U=W.px,K=this.options.padding,G=t.getBoundingClientRect(),Y=G.height,Z=G.width,X=this.getViewportDims(),J=X.innerWidth,Q=X.innerHeight,tt=J-(W.px+q),et=W.px,nt=Q-(H.px+$),rt=H.px;w.top="auto",w.left="auto",w.right="auto",w.bottom="auto";var ot=this.currentStep.position||v||"right",it=rt>=Y+K,at=nt>=Y+K,st=et>=Z+K,ct=tt>=Z+K;if(!(null!==(B=this.currentStep.lockPosition)&&void 0!==B?B:this.options.lockPosition))if(it||at||st||ct)switch(ot){case"top":case"top-left":case"top-right":it||(at?ot="bottom":ct?ot="right":st&&(ot="left"));break;case"bottom":case"bottom-left":case"bottom-right":at||(it?ot="top":ct?ot="right":st&&(ot="left"));break;case"left":st||(ct?ot="right":at?ot="bottom":it&&(ot="top"));break;case"right":ct||(st?ot="left":at?ot="bottom":it&&(ot="top"))}else{var lt=Math.max(rt,nt,et,tt);ot=lt===tt?"right":lt===nt?"bottom":lt===et?"left":"top"}switch(ot){case"top":b="top",w.bottom="".concat(Q-V+K,"px"),w.left="".concat(U+q/2-Z/2,"px");break;case"top-left":b="top-left",w.top="".concat(V-Y-K,"px"),w.right="".concat(J-U+K,"px");break;case"top-right":b="top-right",w.top="".concat(V-Y-K,"px"),w.left="".concat(U+q+K,"px");break;case"bottom":b="bottom",w.top="".concat(V+$+K,"px"),w.left="".concat(U+q/2-Z/2,"px");break;case"bottom-left":b="bottom-left",w.top="".concat(V+$+K,"px"),w.right="".concat(J-U+K,"px");break;case"bottom-right":b="bottom-right",w.top="".concat(V+$+K,"px"),w.left="".concat(U+q+K,"px");break;case"left":b="left",w.top="".concat(V+$/2-Y/2,"px"),w.left="".concat(U-Z,"px");break;case"center":b="center",w.top="".concat(V+$/2-Y/2,"px"),w.left="".concat(U+q/2-Z/2,"px");break;default:b="right",w.top="".concat(V+$/2-Y/2,"px"),w.left="".concat(U+q+K,"px")}var ut=function(t,e,n){return Math.max(e,Math.min(t,n))},pt=null;if(w.top&&"auto"!==w.top)pt=parseFloat(w.top)||0;else if(w.bottom&&"auto"!==w.bottom){var ht=parseFloat(w.bottom)||0;pt=Q-ht-Y}var dt=null;if(w.left&&"auto"!==w.left)dt=parseFloat(w.left)||0;else if(w.right&&"auto"!==w.right){var ft=parseFloat(w.right)||0;dt=J-ft-Z}var vt=J>=1024?0:Math.max(0,K||0);if(null!==pt){var gt;if(null!==(gt=this.currentStep.lockPosition)&&void 0!==gt?gt:this.options.lockPosition)w.top="".concat(pt,"px");else{var yt=ut(pt,vt,Math.max(vt,Q-Y-vt));w.top="".concat(yt,"px")}w.bottom="auto"}if(null!==dt){var mt;if(null!==(mt=this.currentStep.lockPosition)&&void 0!==mt?mt:this.options.lockPosition)w.left="".concat(dt,"px");else{var bt=ut(dt,vt,Math.max(vt,J-Z-vt));w.left="".concat(bt,"px")}w.right="auto"}if(t.setAttribute("data-guidechimp-position","".concat(b)),P.length>0){var St=P[0];this.currentStep&&this.currentStep.isBackdrop?St.classList.remove("gc-overlay-hidden"):St.classList.add("gc-overlay-hidden")}this.currentStep.animationType&&(w.animation=(0,o.ti)(this.currentStep.animationType));var wt=null!==(D=this.currentStep.lockPosition)&&void 0!==D?D:this.options.lockPosition,xt=["top-left","top-right","bottom-left","bottom-right"].includes(b);return(!wt||j&&!xt)&&d(t,0),this}if(!C&&(T||I)){t.setAttribute("data-guidechimp-position","top-left"),w.position="fixed",w.zIndex="10000",w.visibility="visible";var kt=this.getRootEl(),Et=kt&&kt!==document.body,_t=this.getViewportDims(),Ot=_t.innerWidth,Pt=_t.innerHeight;if(w.position=Et?"absolute":"fixed",T){var At,Ct=this.currentStep.top;At="string"==typeof Ct&&Ct.trim().endsWith("%")?(parseFloat(Ct)||0)/100*Pt:"number"==typeof Ct?Ct:parseFloat(Ct)||0,w.top="".concat(At,"px")}if(I){var Tt,It=this.currentStep.left;Tt="string"==typeof It&&It.trim().endsWith("%")?(parseFloat(It)||0)/100*Ot:"number"==typeof It?It:parseFloat(It)||0,w.left="".concat(Tt,"px")}if(P.length>0){var Lt=P[0];this.currentStep&&this.currentStep.isBackdrop?Lt.classList.remove("gc-overlay-hidden"):Lt.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(w.animation=(0,o.ti)(this.currentStep.animationType)),d(t,0),this}if(!(C||T||I)){var Rt=this.getRootEl(),Bt=Rt&&Rt!==document.body;if(t.setAttribute("data-guidechimp-position","floating"),w.position=Bt?"absolute":"fixed",w.left="50%",w.top="50%",w.transform="translate(-50%, -50%)",w.zIndex="10000",w.visibility="visible",P.length>0){var Dt=P[0];this.currentStep&&this.currentStep.isBackdrop?Dt.classList.remove("gc-overlay-hidden"):Dt.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(w.animation=(0,o.ti)(this.currentStep.animationType)),d(t,0),this}var Mt,jt,Nt,Ht=this.getStepEl(this.currentStep);if(!Ht)return this;var Wt=getComputedStyle(Ht);"floating"===Wt.getPropertyValue("position")&&(g=0);var Ft=this.isEl(Ht,"fakeStep");if(Ft){if(t.setAttribute("data-guidechimp-position","floating"),w.position="fixed",w.left="50%",w.top="50%",w.transform="translate(-50%, -50%)",w.zIndex="10000",w.visibility="visible",P.length>0){var zt=P[0];this.currentStep&&this.currentStep.isBackdrop?zt.classList.remove("gc-overlay-hidden"):zt.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(w.animation=(0,o.ti)(this.currentStep.animationType)),d(t,0),this}var qt=this.getElementVisibleRect(Ht),$t=qt.top,Vt=qt.bottom,Ut=qt.left,Kt=qt.right,Gt=qt.width,Yt=qt.height,Zt=t.getBoundingClientRect(),Xt=Zt.height,Jt=Zt.width,Qt=t.cloneNode(!0);Qt.style.visibility="hidden",Qt.innerHTML="",t.parentElement.appendChild(Qt);var te=Qt.getBoundingClientRect(),ee=te.width;Qt.parentElement.removeChild(Qt);var ne=new DOMRect(0,0,window.innerWidth,window.innerHeight);if(!(f instanceof Window)){var re=f.getBoundingClientRect(),oe=re.x,ie=re.y;ne=new DOMRect(oe,ie,f.scrollWidth,f.scrollHeight)}var ae=ne,se=ae.top,ce=ae.bottom,le=ae.left,ue=ae.right;if(this.isEl(Ht,"fakeStep"))b="floating";else if("demo"===(null===(Mt=this.currentStep)||void 0===Mt?void 0:Mt.type)||(null!==(jt=null===(Nt=this.currentStep)||void 0===Nt?void 0:Nt.lockPosition)&&void 0!==jt?jt:this.options.lockPosition));else{var pe=["bottom","right","left","top"],he=getComputedStyle(t),de=he.marginTop,fe=he.marginLeft,ve=he.marginRight,ge=he.marginBottom;de=parseInt(de,10),fe=parseInt(fe,10),ve=parseInt(ve,10),Xt+de+(ge=parseInt(ge,10))>$t-se&&pe.splice(pe.indexOf("top"),1),Xt+de+ge>ce-Vt&&pe.splice(pe.indexOf("bottom"),1);var ye=Jt;ye+fe+ve>Ut-le&&pe.splice(pe.indexOf("left"),1),ye+fe+ve>ue-Kt&&pe.splice(pe.indexOf("right"),1);var me=b;if("top"!==(b=pe.length?pe.includes(b)?b:pe[0]:"floating")&&"bottom"!==b||"left"!==me&&"right"!==me||void 0!==S||(S=me),"top"===b||"bottom"===b){var be=["left","right","middle"];Ut-le<ee&&be.splice(be.indexOf("left"),1),ue-Kt<ee&&be.splice(be.indexOf("right"),1),(Ut+Gt/2-le<ee/2||ue-(Kt-Gt/2)<ee/2)&&be.splice(be.indexOf("middle"),1),void 0===S||(S=be.length?be.includes(S)?S:be[0]:"middle")}}t.setAttribute("data-guidechimp-position",b),document.documentElement,this.currentStep.animationType&&(w.animation=(0,o.ti)(this.currentStep.animationType));var Se=$t+Yt/2,we=Ut+Gt/2,xe=null,ke=null;switch(b){case"top":xe=Math.round($t-Xt-g),ke=Math.round(we-Jt/2);break;case"right":ke=Math.round(Kt+g),xe=Math.round(Se-Xt/2);break;case"left":ke=Math.round(Ut-Jt-g),xe=Math.round(Se-Xt/2);break;case"bottom":xe=Math.round(Vt+g),ke=Math.round(we-Jt/2);break;default:var Ee=this.getViewportDims(),_e=Ee.innerWidth,Oe=Ee.innerHeight;ke=Math.round(_e/2-Jt/2),xe=Math.round(Oe/2-Xt/2)}var Pe=20,Ae=8;"top"!==b&&"bottom"!==b||("left"===S?ke=Math.round(we-(Jt-Pe-Ae)):"right"===S&&(ke=Math.round(we-Pe-Ae)));var Ce,Te,Ie=function(t,e,n){return Math.max(e,Math.min(t,n))},Le=window.pageYOffset||document.documentElement.scrollTop,Re=window.pageXOffset||document.documentElement.scrollLeft,Be=k?{top:0,left:0}:{top:Le,left:Re};if(null!==xe)if(null!==(Ce=this.currentStep.lockPosition)&&void 0!==Ce?Ce:this.options.lockPosition)w.top="".concat(xe+Be.top,"px");else{var De=this.getViewportDims(),Me=De.innerHeight,je=Ie(xe,0,Math.max(0,Me-Xt));w.top="".concat(je+Be.top,"px")}if(null!==ke)if(null!==(Te=this.currentStep.lockPosition)&&void 0!==Te?Te:this.options.lockPosition)w.left="".concat(ke+Be.left,"px");else{var Ne=this.getViewportDims(),He=Ne.innerWidth,We=Ie(ke,0,Math.max(0,He-Jt));w.left="".concat(We+Be.left,"px")}if(t.removeAttribute("data-guidechimp-alignment"),S){var Fe;t.setAttribute("data-guidechimp-alignment",S);var ze=this.getViewportDims(),qe=ze.innerWidth,$e=(null!==(Fe=this.currentStep.lockPosition)&&void 0!==Fe?Fe:this.options.lockPosition)?function(t){return t}:function(t){return Math.max(0,Math.min(t,qe-Jt))};switch(S){case"left":var Ve=we-(Jt-Pe-Ae);w.left="".concat($e(Ve)+Be.left,"px");break;case"right":var Ue=we-Pe-Ae;w.left="".concat($e(Ue)+Be.left,"px"),w.right="auto";break;default:var Ke=we-Jt/2;w.left="".concat($e(Ke)+Be.left,"px")}}if(this.referenceEl)try{var Ge=this.getRootEl(),Ye=Ge.getBoundingClientRect(),Ze=t.getBoundingClientRect(),Xe=Ge.scrollTop||0,Je=Ge.scrollLeft||0,Qe=Ze.top-Ye.top+Xe,tn=Ze.left-Ye.left+Je;w.top="".concat(Math.round(Qe),"px"),w.left="".concat(Math.round(tn),"px");try{var en=getComputedStyle(Ge);"static"===en.position&&(Ge.style.position="relative")}catch(t){}w.position="absolute"}catch(t){}var nn=this.getRootEl()&&this.getRootEl()!==document.body,rn=null!==(u=this.currentStep.lockPosition)&&void 0!==u?u:this.options.lockPosition,on="left"===S||"right"===S;return(!rn||nn&&!on)&&d(t,0),this.alignTooltipCaret(t,b),this}},{key:"alignTooltipCaret",value:function(t,e){if(!t||!this.currentStep)return this;var n=t.querySelector(".gc-tooltip-tail");if(!n||!this.currentStep.isCaret||n.classList.contains("gc-tooltip-tail-hidden"))return this;if(!["top","bottom","left","right"].includes(e))return this;var r=t.querySelector(".gc-description table");if(r){var o=r.style.background||r.style.backgroundColor||window.getComputedStyle(r).backgroundColor,i={top:{prop:"borderTopColor",edge:"bottom"},bottom:{prop:"borderBottomColor",edge:"top"},left:{prop:"borderLeftColor",edge:"right"},right:{prop:"borderRightColor",edge:"left"}}[e],a=i.prop,s=function(t,e){if(!t||"transparent"===t)return"#ffffff";if(!t.includes("gradient"))return t;var n=t.match(/#[0-9a-fA-F]{3,8}|(?:rgba?|hsla?)\([^)]*\)/gi)||[];return 0===n.length?"#ffffff":"right"===e||"bottom"===e||"bottom-left"===e||"bottom-right"===e?n[n.length-1]:n[0]}(o,i.edge);n.style.borderTopColor="transparent",n.style.borderBottomColor="transparent",n.style.borderLeftColor="transparent",n.style.borderRightColor="transparent",n.style[a]=s}var c=this.getStepEl(this.currentStep);if(!c||this.isEl(c,"fakeStep"))return this;var l=this.getElementVisibleRect(c),u=t.getBoundingClientRect(),p=t.offsetWidth?u.width/t.offsetWidth:1,h=t.offsetHeight?u.height/t.offsetHeight:1;if(n.style.left="",n.style.right="",n.style.top="",n.style.bottom="",n.style.marginLeft="",n.style.marginTop="","top"===e||"bottom"===e){var d=l.left+l.width/2,f=t.offsetWidth,v=(d-u.left)/(p||1)-8,g=f-8-16;v=Math.max(8,Math.min(v,g)),n.style.left="".concat(Math.round(v),"px"),n.style.right="auto",n.style.marginLeft="0px"}else{var y=l.top+l.height/2,m=t.offsetHeight,b=(y-u.top)/(h||1)-8,S=m-8-16;b=Math.max(8,Math.min(b,S)),n.style.top="".concat(Math.round(b),"px"),n.style.bottom="auto",n.style.marginTop="0px"}return this}},{key:"startPreloader",value:function(){document.body.classList.add(this.constructor.getLoadingClass());var t=this.getEl("overlay");if(t){var e=t.querySelector("path"),n=t.querySelector("animate"),r=new Map;r.set("d",e.getAttribute("d")),e.setAttribute("d",this.getOverlayDocumentPath()),n&&(r.set("from",n.getAttribute("from")),r.set("to",n.getAttribute("to")),n.removeAttribute("from"),n.removeAttribute("to")),this.cache.set("preloaderCache",r)}var o=this.mountPreloaderEl();return o.hidden=!0,setTimeout((function(){o.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();this.setInteractionPosition(t),this.setControlPosition(e);var n=this.getEl("tooltip"),r=this.getRootEl();if(n&&n.parentElement&&n.parentElement!==r)try{r.appendChild(n)}catch(t){}return this.setTooltipPosition(this.getEl("tooltip")),this.applyRootWidthScale(),this.referenceEl&&this.startPositionPoll(),this.observeStep(),this.highlightStepEl(!0),this.startAutoNavigation(),this}},{key:"unmountStep",value:function(){this.resetHighlightStepEl(),this.stopPositionPoll(),this.stopAutoNavigation();try{this.removeEl("tooltip")}catch(t){}return 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]:{},o=(0,n.Z)(e,r);return o&&o.setAttribute("data-quidechimp-".concat(this.uid),t),o}},{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===document.body?this.getRootEl():e||this.getRootEl()).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(),f(f({},this.getDefaultTmplData()),t))}},{key:"mountFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createFakeStepEl(t),this.getRootEl())}},{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,o=t.height,i=t.canvasWidth,a=t.canvasHeight;this.removeFakeStepEl();var s=this.createFakeStepEl(t);if(s&&void 0!==e&&void 0!==n&&r&&o){var c,l,u,p,h=this.getViewportDims(),d=h.innerWidth,f=h.innerHeight,v=this.getRootEl(),g=v&&v!==document.body,y=g?v.getBoundingClientRect():{left:0,top:0},m=g?v.offsetWidth||y.width||i||d:i||d,b=g?v.offsetHeight||y.height||a||f:a||f;c="string"==typeof e&&e.trim().endsWith("%")?(parseFloat(e)||0)/100*b:"number"==typeof e?e:parseFloat(e)||0,l="string"==typeof n&&n.trim().endsWith("%")?(parseFloat(n)||0)/100*m:"number"==typeof n?n:parseFloat(n)||0,u="string"==typeof r&&r.trim().endsWith("%")?(parseFloat(r)||0)/100*m:"number"==typeof r?r:parseFloat(r)||0,p="string"==typeof o&&o.trim().endsWith("%")?(parseFloat(o)||0)/100*b:"number"==typeof o?o:parseFloat(o)||0,s.style.cssText=g?"\n position: absolute !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 "):"\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,this.getRootEl())}},{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),this.getRootEl())}},{key:"removePreloaderEl",value:function(){return this.removeEl("preloader")}},{key:"getOverlayDocumentPath",value:function(){var t=this.getRootEl(),e=t&&t!==document.body,n=this.getViewportDims(),r=n.innerWidth,o=n.innerHeight;if(e)return"M 0 0 H ".concat(r," V ").concat(o," H 0 V 0 Z");var i=document.body,a=i.scrollWidth,s=i.scrollHeight,c=o>s?o:s;return"M 0 0 H ".concat(r>a?r:a," V ").concat(c," 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,n=this.options.padding;n=n?n/2:0;var r=t.top,o=t.left,i=t.width,a=t.height,s=this.getRootEl(),c=(s&&s!==document.body&&s.getBoundingClientRect(),function(t,n){if("string"==typeof t&&t.trim().endsWith("%")){var r=parseFloat(t)||0,o=e.getViewportDims(),i=o.innerWidth,a=o.innerHeight;return"x"===n?r/100*i:r/100*a}return"number"==typeof t?t:parseFloat(t)||0}),l=c(r,"y"),u=c(o,"x"),p=c(i,"x"),h=c(a,"y"),d=this.getOverlayDocumentPath();return d+="M ".concat(u+4," ").concat(l,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",").concat(4,"\n V ").concat(h+l-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",").concat(4,"\n H ").concat(p+u-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",-").concat(4,"\n V ").concat(l+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=this.getRootEl(),r=n&&n!==document.body,o=this.getElementVisibleRect(t),i=o.left,a=o.top,s=o.width,c=o.height;if(r){var l=n.getBoundingClientRect();i-=l.left,a-=l.top}var u=this.getOverlayDocumentPath(),p=Math.max(0,i-e+4),h=this.getViewportDims().innerWidth,d=Math.min(h,s+i+e-4);return u+="M ".concat(p," ").concat(a,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",").concat(4,"\n V ").concat(c+a-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",").concat(4,"\n H ").concat(d,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",-").concat(4,"\n V ").concat(a+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(),f(f({},r),n))}},{key:"mountOverlayEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.createOverlayEl(t),n=this.getRootEl(),r=n&&n!==document.body;return r&&e&&(e.style.setProperty("position","absolute","important"),e.style.setProperty("top","0","important"),e.style.setProperty("left","0","important"),e.style.setProperty("right","0","important"),e.style.setProperty("bottom","0","important")),this.mountEl(e,n)}},{key:"removeOverlayEl",value:function(){return this.removeEl("overlay")}},{key:"getInteractionTmpl",value:function(){return'<div if="!interaction" class="gc-interaction gc-disable"> </div>'}},{key:"createInteractionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.interaction;"boolean"==typeof this.currentStep.interaction&&(e=this.currentStep.interaction);var n=f(f({},this.getDefaultTmplData()),{},{interaction:e});return this.createEl("interaction",this.getInteractionTmpl(),f(f({},n),t))}},{key:"mountInteractionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createInteractionEl(t),this.getRootEl())}},{key:"removeInteractionEl",value:function(){return this.removeEl("interaction")}},{key:"getControlTmpl",value:function(){return'<div class="gc-control"> {{ tooltipEl }} </div>'}},{key:"createControlEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("control",this.getControlTmpl(),f(f({},this.getDefaultTmplData()),{},{tooltipEl:this.createTooltipEl(t)},t))}},{key:"mountControlEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createControlEl(t),this.getRootEl())}},{key:"removeControlEl",value:function(){return this.removeEl("control")}},{key:"getTooltipTmpl",value:function(){return"<div class=\"gc-tooltip\"> <div class=\"gc-tooltip-tail {{ !isCaret ? 'gc-tooltip-tail-hidden': '' }}\"></div> {{ description }} {{ close }} {{ copyright }} {{ customButtons }} {{ notification }} </div>"}},{key:"createTooltipEl",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=f(f({},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(),f(f({},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(),f(f({},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,o=(this.currentStepIndex+1)/this.steps.length*100,i=f(f({},this.getDefaultTmplData()),{},{showProgressbar:e,progressMax:n,progressMin:r,progress:o});return this.createEl("progressbar",this.getProgressbarTmpl(),f(f({},i),t))}},{key:"getTitleTmpl",value:function(){return'<div if="title" html="{{ title }}" class="gc-title"> </div>'}},{key:"createTitleEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep.title,n=void 0===e?"":e;return this.createEl("title",this.getTitleTmpl(),f(f({},this.getDefaultTmplData()),{},{title:n},t))}},{key:"getDescriptionTmpl",value:function(){return'<div if="description" html="{{ description }}" class="gc-description"></div>'}},{key:"createDescriptionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep.description,n=void 0===e?"":e;return this.createEl("description",this.getDescriptionTmpl(),f(f({},this.getDefaultTmplData()),{},{description:n},t))}},{key:"getCustomButtonsTmpl",value:function(){return'<div if="buttons.length" class="gc-custom-buttons"> <template for="button in buttons"> {{ button }} </template> </div>'}},{key:"createCustomButtonsEl",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[];return this.currentStep.buttons&&this.currentStep.buttons.forEach((function(e){var o=e;if(!(0,r.Z)(o)){var i=e.onClick,a=e.tagName,s=void 0===a?"button":a,c=e.title,l=void 0===c?"":c,u=e.class;(o=document.createElement(s)).innerHTML=l,u&&(o.className=u),i&&o.addEventListener("click",(function(e){i.call(t,e)}))}n.push(o)})),this.createEl("customButtons",this.getCustomButtonsTmpl(),f(f({},this.getDefaultTmplData()),{},{buttons:n},e))}},{key:"getPaginationTmpl",value:function(){return'<div if="showPagination && steps.length > 1" class="gc-pagination"> <template if="paginationTheme === \'numbers\' || steps.length >= paginationCirclesMaxItems"> <ul class="gc-pagination-theme-numbers"> <template for="(step, index) in steps"> <template if="index === 0"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <template if="currentStepIndex < 3"> <template if="index > 0 && index < 5"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="index === 5 && index !== steps.length - 1" class="gc-pagination-dots"> ... </li> </template> <template elseif="steps.length - currentStepIndex < 5"> <template if="steps.length - index < 6 && steps.length - 1 !== index"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="steps.length - index === 6 && index !== 0" class="gc-pagination-dots"> ... </li> </template> <template else> <li if="currentStepIndex - index === 3 && index !== 0" class="gc-pagination-dots"> ... </li> <template elseif="(currentStepIndex - index >= 0 && currentStepIndex - index < 3)\n || ( index - currentStepIndex >= 0 && index - currentStepIndex < 3)"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="index - currentStepIndex === 3 && steps.length -1 !== index" class="gc-pagination-dots"> ... </li> </template> <template if="index + 1 === steps.length"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> </template> </ul> </template> <template else> <div class="gc-pagination-theme-circles"> <template for="(step, index) in steps"> <div if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active"></div> <div elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"></div> <div elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"></div> <div else class="gc-pagination-item" @click="go(index, true, { event: $event })"></div> </template> </div> </template> </div> '}},{key:"createPaginationEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep,n=e.paginationTheme,r=void 0===n?this.options.paginationTheme:n,o=e.paginationCirclesMaxItems,i=void 0===o?this.options.paginationCirclesMaxItems:o,a=this.options.showPagination;return"boolean"==typeof this.currentStep.showPagination&&(a=this.currentStep.showPagination),this.createEl("pagination",this.getPaginationTmpl(),f(f({},this.getDefaultTmplData()),{},{showPagination:a,paginationTheme:r,paginationCirclesMaxItems:i},t))}},{key:"getPreviousTmpl",value:function(){return"<div class=\"gc-navigation-prev {{ (!previousStep || !showNavigation) ? 'gc-hidden': '' }}\" @click=\"previous({ event: $event })\"></div>"}},{key:"createPreviousEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showNavigation;return"boolean"==typeof this.currentStep.showNavigation&&(e=this.currentStep.showNavigation),this.createEl("previous",this.getPreviousTmpl(),f(f({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"getNextTmpl",value:function(){return"<div class=\"gc-navigation-next {{ (!nextStep || !showNavigation) ? 'gc-hidden': '' }}\" @click=\"next({ event: $event })\"></div>"}},{key:"createNextEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showNavigation;return"boolean"==typeof this.currentStep.showNavigation&&(e=this.currentStep.showNavigation),this.createEl("next",this.getNextTmpl(),f(f({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"getCopyrightTmpl",value:function(){return'<div class="gc-copyright">Made with <a style="cursor: pointer; color: inherit !important;" href="https://pagepilot.fabbuilder.com" target="_blank">Page Pilot</a></div> '}},{key:"createCopyrightEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("copyright",this.getCopyrightTmpl(),f(f({},this.getDefaultTmplData()),t))}},{key:"getNotificationTmpl",value:function(){return'<div html="{{ messages[0] }}" class="gc-notification"></div>'}},{key:"createNotificationEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("notification",this.getNotificationTmpl(),f(f({},this.getDefaultTmplData()),{},{messages:this.notifications},t))}},{key:"notify",value:function(t){this.notifications.push(t);var e=this.getEl("notification");return e&&this.mountEl(this.createNotificationEl(),e.parentElement),this}},{key:"on",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.constructor.getEventListenersPriorities(),o=a(r,1),i=o[0];n.priority&&r.includes(n.priority)&&(i=n.priority);var s=t.trim();return this.listeners[s]=this.listeners[s]||{},this.listeners[s][i]=this.listeners[s][i]||[],this.listeners[s][i].push(e),this}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=s(this.constructor.getEventListenersPriorities()).reverse(),a=t.trim(),c=[],l=Promise.resolve(c);return this.listeners[a]&&i.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=f(f({},t.constructor.getDefaultKeyboardCodes()),t.options.useKeyboard),o=r.previous,i=r.next,a=r.stop;a&&a.includes(n)?t.stop({event:e}):o&&o.includes(n)?t.previous({event:e}):i&&i.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:"addOnRootScrollListener",value:function(){var t=this,e=this.getRootEl();return e&&e!==document.body?(this.cache.set("onRootScrollListener",(function(){return t.refresh()})),e.addEventListener("scroll",this.cache.get("onRootScrollListener"),!0),this):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:"removeOnRootScrollListener",value:function(){var t=this.getRootEl();return t&&t!==document.body?(this.cache.has("onRootScrollListener")&&(t.removeEventListener("scroll",this.cache.get("onRootScrollListener"),!0),this.cache.delete("onRootScrollListener")),this):this}},{key:"removeListeners",value:function(){this.removeOnKeydownListener(),this.removeOnWindowResizeListener(),this.removeOnWindowScrollListener(),this.removeOnRootScrollListener(),this.stopPositionPoll(),this.stopAutoNavigation()}},{key:"startAutoNavigation",value:function(){var t,e=this;this.stopAutoNavigation();var n=null===(t=this.currentStep)||void 0===t?void 0:t.navigationMode;if("auto"!==n&&"both"!==n)return this;var r=this.options.navigationDelay;this.currentStep&&"number"==typeof this.currentStep.navigationDelay&&(r=this.currentStep.navigationDelay),("number"!=typeof r||r<=0)&&(r=3e3);var o=setTimeout((function(){e.isDisplayed&&e.nextStep&&e.next({event:"auto"})}),r);return this.cache.set("autoNavigationTimer",o),this}},{key:"stopAutoNavigation",value:function(){return this.cache.has("autoNavigationTimer")&&(clearTimeout(this.cache.get("autoNavigationTimer")),this.cache.delete("autoNavigationTimer")),this}},{key:"startPositionPoll",value:function(){var t=this;if(!this.referenceEl)return this;if(this.cache.has("positionPoll"))return this;var e={rafId:null,lastKey:null};return e.rafId=requestAnimationFrame((function n(){try{var r=t.getElementVisibleRect(t.referenceEl),o="".concat(Math.round(r.left),"|").concat(Math.round(r.top),"|").concat(Math.round(r.width),"|").concat(Math.round(r.height));if(e.lastKey!==o&&(e.lastKey=o,t.refresh()),t.currentStep&&t.currentStep.element){var i=t.getStepEl(t.currentStep);if(i&&!t.isEl(i,"fakeStep")){var a=i.getBoundingClientRect(),s=a.bottom>0&&a.top<window.innerHeight&&a.right>0&&a.left<window.innerWidth,c=t.getEl("tooltip");c&&(s||(t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),c.style.visibility="hidden"))}}}catch(t){}e.rafId=requestAnimationFrame(n)})),this.cache.set("positionPoll",e),this}},{key:"stopPositionPoll",value:function(){var t=this.cache.get("positionPoll");if(t){try{t.rafId&&cancelAnimationFrame(t.rafId)}catch(t){}this.cache.delete("positionPoll")}return this}},{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;if(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);var r=this.getEl("tooltip");return r&&n.observe(r,e),!0}return!1}},{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.applyRootWidthScale(),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:4,scrollPadding:10,scrollBehavior:"auto",apiHost:"https://ahd-be-jggub5n6qq-em.a.run.app",lockPosition:!1,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:"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,o=e.defaultView,i=o.pageYOffset||r.scrollTop||n.scrollTop,a=o.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+i,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(i.prototype,c),l&&y(i,l),Object.defineProperty(i,"prototype",{writable:!1}),t}(),S=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 o={v:n,t:this._getNow(),kt:r};this.persistent?localStorage.setItem(e,JSON.stringify(o)):this._lootBag[e]=o},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],o=localStorage.getItem(r);try{var i=JSON.parse(o);if(!("v"in i&&"t"in i&&"kt"in i))continue;null===this._ttl&&null===i.kt||this._isCacheStale(i)&&(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)}),x=(new(function(t){function e(){return t.call(this,false)||this}return w(e,t),e}(S)),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)}}()),k=new(function(t){function e(){return t.call(this,true)||this}return x(e,t),e}(S)),E=__webpack_require__(219);function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function 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 A(t,e,n){return e&&P(t.prototype,e),n&&P(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function C(){return C="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=T(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},C.apply(this,arguments)}function T(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=D(t)););return t}function I(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 R(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=D(t);if(e){var o=D(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return B(this,n)}}function B(t,e){if(e&&("object"===_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function D(t){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(t)}const M=function(t,e){e.beacons=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new(function(e){I(r,e);var n=R(r);function r(){return O(this,r),n.apply(this,arguments)}return A(r,[{key:"getDataBeacons",value:function(t){var e=this,n=C(D(r.prototype),"getDataBeacons",this).call(this,t);return n.forEach((function(t){var n=t.id,r=t.element,o="",i="".concat(e.constructor.getBeaconDataPrefix(),"-tour"),a="".concat(e.constructor.getBeaconDataPrefix(),"-").concat(n,"-tour");r.attributes[i]&&(o=r.attributes[i].value);r.attributes[a]&&(o=r.attributes[a].value);o&&(t.tour=o)})),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"===_(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,i=null==e?void 0:e.trigger,a=function(){return r.runGuide(e,n)},s=null;try{s=null!=e&&e.element?e.element instanceof HTMLElement?e.element:document.querySelector(e.element):null}catch(t){s=null}var c=s||t;switch(i){case o.$h.onClick:c.addEventListener("click",a),c!==t&&t.addEventListener("click",a,!0);break;case o.$h.onHover:case o.$h.onMouseEnter:c.addEventListener("mouseenter",a),c!==t&&t.addEventListener("mouseenter",a);break;case o.$h.onMouseLeave:c.addEventListener("mouseleave",a),c!==t&&t.addEventListener("mouseleave",a);break;case o.$h.onLongPress:var l,u=function(){return l=setTimeout(a,600)},p=function(){return clearTimeout(l)};c.addEventListener("mousedown",u),c.addEventListener("mouseup",p),c.addEventListener("mouseleave",p),c.addEventListener("touchstart",u),c.addEventListener("touchend",p),c!==t&&(t.addEventListener("mousedown",u),t.addEventListener("mouseup",p),t.addEventListener("mouseleave",p),t.addEventListener("touchstart",u),t.addEventListener("touchend",p));break;case o.$h.onPageLoad:"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a();break;default:console.warn("Unsupported trigger: ".concat(i))}}},{key:"createBeaconEl",value:function(e){var n=C(D(r.prototype),"createBeaconEl",this).call(this,e);return this.attachGuideEvent(n,e,t),n}}]),r}(E.Z))(e,n)}};var j=Array.from(new Set(Object.values({MODERN_SANS:"Inter",BOOK_SANS:"Source Sans Pro",ORGANIC_SANS:"Nunito",GEOMETRIC_SANS:"Montserrat",HEAVY_SANS:"Oswald",ROUNDED_SANS:"Rubik",MODERN_SERIF:"Playfair Display",BOOK_SERIF:"Merriweather",MONOSPACE:"Roboto Mono",ROBOTO:"Roboto",OPEN_SANS:"Open Sans",LATO:"Lato",POPPINS:"Poppins",INTER:"Inter",MONTSERRAT:"Montserrat",RALEWAY:"Raleway",NUNITO:"Nunito",PLAYFAIR_DISPLAY:"Playfair Display",MERRIWEATHER:"Merriweather",PT_SANS:"PT Sans",OSWALD:"Oswald",SOURCE_SANS_PRO:"Source Sans Pro",RUBIK:"Rubik",WORK_SANS:"Work Sans",NOTO_SANS:"Noto Sans",DANCING_SCRIPT:"Dancing Script",PACIFICO:"Pacifico",LOBSTER:"Lobster",BEBAS_NEUE:"Bebas Neue"})));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 H(t,e,n){return H=nt()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Q(o,n.prototype),o},H.apply(null,arguments)}function W(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,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(t,e)||z(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 F(t){return function(t){if(Array.isArray(t))return q(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||z(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 z(t,e){if(t){if("string"==typeof t)return q(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)?q(t,e):void 0}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $(t,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 V(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$(Object(n),!0).forEach((function(e){ot(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function U(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */U=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=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 o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return _()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=S(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),i}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 d(){}var f={};s(f,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(E([])));g&&g!==e&&n.call(g,o)&&(f=g);var y=d.prototype=p.prototype=Object.create(f);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(o,i,a,s){var c=l(t[o],t,i);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 o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function S(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return 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 o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:_}}function _(){return{value:void 0,done:!0}}return h.prototype=d,s(y,"constructor",d),s(d,"constructor",h),h.displayName=s(d,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,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(b.prototype),s(b.prototype,i,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new b(c(e,n,r,o),i);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,o,(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=E,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!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 o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.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),x(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 o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}function K(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function G(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){K(i,r,o,a,s,"next",t)}function s(t){K(i,r,o,a,s,"throw",t)}a(void 0)}))}}function Y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z(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 X(){return X="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=J(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},X.apply(this,arguments)}function J(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=rt(t)););return t}function Q(t,e){return Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Q(t,e)}function tt(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 et(t)}function et(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nt(){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 rt(t){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rt(t)}function ot(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var it=__webpack_require__(68).match,at="AHD_TOUR_DATA",st="AHD_HIGHLIGHTS_DATA",ct="AHD_VISITOR_STATS",lt=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&&Q(t,e)}(I,t);var e,n,r,o,i,a,s,c,l,u,p,h,d,f,v,g,y,m,b,S,w,x,E,_,O,P,A,C,T=(e=I,n=nt(),function(){var t,r=rt(e);if(n){var o=rt(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return tt(this,t)});function I(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Y(this,I),n.userId&&!n.visitorId&&(n.visitorId=n.userId),n.language||(n.language=""),ot(et(e=T.call(this,t,n)),"_lastPageUrl",""),ot(et(e),"_lastRenderedIdentifier",""),I._instances.add(et(e)),e.attachPlugins(),e}return r=I,o=[{key:"stop",value:function(){for(var t,e=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];this.isDisplayed&&((t=X(rt(I.prototype),"stop",this)).call.apply(t,[this].concat(r)),this.removeModalBanner()),I._instances.forEach((function(t){if(t!==e)try{t.isDisplayed&&t.stop.apply(t,r)}catch(t){}}))}},{key:"attachPlugins",value:function(){[M].forEach((function(t){ut.extend(t)}))}},{key:"initializeSiteMap",value:(C=G(U().mark((function t(e){var n,r;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k.get(st),(n=k.get(at))&&!e){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(n);case 6:n=t.sent;case 7:if((r=k.get(ct))&&!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 C.apply(this,arguments)})},{key:"getHelpContent",value:(A=G(U().mark((function t(e,n){var r,o;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=k.get(at))&&!n){t.next=5;break}return t.next=4,this.fetchAndCacheTourData(r);case 4:r=t.sent;case 5:return o=this.getApplicabeDataForUrl(r,e,"help",!0),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e){return A.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:(P=G(U().mark((function t(e){var n,r,o,i,a,s,c=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._lastPageUrl=e,t.next=3,this.stop();case 3:if((n=k.get(at))&&n.tours&&Array.isArray(n.tours)){t.next=6;break}return t.abrupt("return");case 6:(null==(r=this.getApplicabeDataForUrl(n.tours,e,!0))?void 0:r.length)>0&&(o=k.get(ct)||{},i=(null==o?void 0:o.visited)||[],a=new Set(i),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)}})),k.put(ct,V(V({},o),{},{visited:F(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,o,i,a,s,l,u,p,h;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===(o=e.styles)||void 0===o?void 0:o.top)||e.top),left:c.normalizeDimension((null===(i=e.styles)||void 0===i?void 0:i.left)||e.left),stepId:e.id,id:t.id,type:t.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,navigationMode:(null==e||null===(u=e.behaviour)||void 0===u?void 0:u.navigationMode)||e.navigationMode,navigationDelay:(null==e||null===(p=e.behaviour)||void 0===p?void 0:p.navigationDelay)||e.navigationDelay,showStep:null==e||null===(h=e.behaviour)||void 0===h?void 0:h.showStep}})):[]})),console.log("Tour",s),this.setTour(s),this.start());case 8:case"end":return t.stop()}}),t,this)}))),function(t){return P.apply(this,arguments)})},{key:"showAppBanner",value:(O=G(U().mark((function t(e,n){var r,o,i;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((o=k.get(at))&&!n){t.next=5;break}return t.next=4,this.fetchAndCacheTourData(o,e,!1);case 4:o=t.sent;case 5:return i=Array.isArray(null===(r=o)||void 0===r?void 0:r.appBanners)?o.appBanners.filter((function(t){return t.identifier===e})):[],t.abrupt("return",i);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e){return O.apply(this,arguments)})},{key:"handleBannerClick",value:function(t){var e=t.target.closest("[data-action]");if(e){var n=e.getAttribute("data-action");if(n){var r=function(){try{return JSON.parse(e.getAttribute("data-action-payload")||"{}")}catch(t){return{}}};if("postMessageEvent"===n){var o=e.getAttribute("data-post-message-event")||r().postMessageEvent;return console.log("[AHDjs] postMessageEvent eventName:",o),void(o&&(t.stopPropagation(),window.postMessage({type:o},"*"),console.log("[AHDjs] postMessage sent:",{type:o})))}if("goToStep"!==n)return"onNextStep"===n?(t.stopPropagation(),void this.stepBannerSlide(1)):"onPrevStep"===n?(t.stopPropagation(),void this.stepBannerSlide(-1)):"onCloseStep"===n?(t.stopPropagation(),void this.closeActiveBanner()):void 0;var i=e.getAttribute("data-goto-step")||r().goToStep,a=parseInt(i,10)-1;!isNaN(a)&&a>=0&&(t.stopPropagation(),this.goToBannerSlide(a))}}}},{key:"goToBannerSlide",value:function(t){var e=this._ahd_carousel;e&&"function"==typeof e.goTo&&e.goTo(t)}},{key:"stepBannerSlide",value:function(t){var e=this._ahd_carousel;e&&"function"==typeof e.goTo&&e.state&&e.goTo(e.state.index+t)}},{key:"closeActiveBanner",value:function(){if(document.querySelector('[data-ahd-modal="true"]'))this.removeModalBanner();else if(document.querySelector('[data-ahd-floater="true"]'))this.removeFloaterBanner();else{var t=document.querySelector('[data-ahd-simple-banner="true"]');if(t){var e=this._ahd_active_banner;e&&e.bannerId&&this.acknowledgeAppBanner(e.bannerId,e.slideIds||[]),t.remove(),delete this._ahd_active_banner}}}},{key:"renderAppBanner",value:(_=G(U().mark((function t(e,n){var r,o,i,a,s,c,l,u,p,h,d,f,v,g,y,m,b,S,w,x,E,_,O,P,A=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._lastRenderedIdentifier=e,a=k.get(at),!n){t.next=6;break}return t.next=5,this.fetchAndCacheTourData(a,e,!1);case 5:a=t.sent;case 6:if(s=Array.isArray(null===(r=a)||void 0===r?void 0:r.appBanners)?a.appBanners.filter((function(t){return t.identifier===e})):[],c=Array.isArray(s)?s[0]:s,l=(null==c||null===(o=c.content)||void 0===o?void 0:o.content)||(null==c?void 0:c.content)||(Array.isArray(null==c?void 0:c.slides)?null===(i=c.slides.find((function(t){return t&&t.content})))||void 0===i?void 0:i.content:void 0),"carousel"===(null==c?void 0:c.type))this.renderCarouselBanner(c,e);else if("modal"===(null==c?void 0:c.type))this.renderModalBanner(l,c);else if("floater"===(null==c?void 0:c.type))this.renderFloaterBanner(l,c);else if(e){console.log("Rendering banner in ",e),u=null;try{u=document.querySelector(e)}catch(t){u=null}if(!u&&e&&!e.startsWith("#"))try{u=document.querySelector("#"+e)}catch(t){u=null}u&&l&&(null!=c&&c.type&&"simpleBanner"!==(null==c?void 0:c.type)?(u.innerHTML=l,u.addEventListener("click",(function(t){return A.handleBannerClick(t)}))):(v=(null==c?void 0:c.id)||(null==c?void 0:c._id),g=Array.isArray(null==c?void 0:c.slides)?c.slides.map((function(t){return t.id||t._id})).filter(Boolean):[],(y=document.createElement("div")).className="gc-simple-banner",y.setAttribute("data-ahd-simple-banner","true"),y.style.position="relative",y.innerHTML=l,m=(null==c||null===(p=c.slides)||void 0===p||null===(h=p[0])||void 0===h?void 0:h.behaviour)||(null==c?void 0:c.behaviour)||{},b=(null==m?void 0:m.showCloseIcon)||(null==c||null===(d=c.slides)||void 0===d||null===(f=d[0])||void 0===f?void 0:f.showCloseIcon)||(null==c?void 0:c.showCloseIcon),console.log("Closing banner ",v,g),b&&((w=document.createElement("div")).className="gc-close",w.style.position="absolute",w.style.top="0",w.style.right="0",w.style.cursor="pointer",w.style.zIndex="10",w.style.setProperty("--gc-close-foreground",(null==m?void 0:m.iconCloseColor)||(null==c||null===(S=c.styles)||void 0===S?void 0:S.iconCloseColor)||"#000"),w.addEventListener("click",(function(){v&&A.acknowledgeAppBanner(v,g),y.remove(),delete A._ahd_active_banner})),y.appendChild(w)),u.innerHTML="",u.appendChild(y),y.addEventListener("click",(function(t){return A.handleBannerClick(t)}))))}return c&&(x=c.id||c._id,E=Array.isArray(c.slides)?c.slides.map((function(t){return t.id||t._id})).filter(Boolean):[],this._ahd_active_banner={bannerId:x,slideIds:E},_=!(null!=c&&c.type)||"simpleBanner"===(null==c?void 0:c.type),O="modal"===(null==c?void 0:c.type),P="floater"===(null==c?void 0:c.type),_||O||P||this.acknowledgeAppBanner(x,E)),t.abrupt("return",s);case 12:case"end":return t.stop()}}),t,this)}))),function(t,e){return _.apply(this,arguments)})},{key:"renderCarouselBanner",value:(E=G(U().mark((function t(e,n){var r,o,i,a,s,c,l,u,p,h,d,f,v,g,y,m,b,S,w,x,k,E,_,O,P=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.destroyCarousel(),(a=Array.isArray(e.slides)?e.slides:[]).length){t.next=4;break}return t.abrupt("return");case 4:if((s=document.createElement("div")).className="gc-carousel",s.setAttribute("data-ahd-carousel","true"),s.setAttribute("role","region"),s.setAttribute("aria-roledescription","carousel"),s.setAttribute("aria-label",e.title||"Carousel"),(c=document.createElement("div")).className="gc-carousel-slides",c.setAttribute("data-current-index","0"),a.forEach((function(t,e){var n,r=document.createElement("div");r.className="gc-carousel-slide",r.setAttribute("data-slide-index",String(e));var o=(null==t||null===(n=t.content)||void 0===n?void 0:n.content)||(null==t?void 0:t.content)||"";r.innerHTML=o,r.addEventListener("click",(function(t){return P.handleBannerClick(t)})),c.appendChild(r)})),(l=document.createElement("button")).className="gc-carousel-prev",l.setAttribute("aria-label","Previous slide"),l.innerText="‹",(u=document.createElement("button")).className="gc-carousel-next",u.setAttribute("aria-label","Next slide"),u.innerText="›",(p=document.createElement("div")).className="gc-carousel-indicators",a.forEach((function(t,e){var n=document.createElement("button");n.className="gc-carousel-indicator",n.setAttribute("data-slide",String(e)),n.setAttribute("aria-label","Go to slide ".concat(e+1)),0===e&&n.setAttribute("aria-current","true"),p.appendChild(n)})),s.appendChild(c),s.appendChild(l),s.appendChild(u),s.appendChild(p),"modal"===(null==e||null===(r=e.behaviour)||void 0===r?void 0:r.renderAs)||!n&&"carousel"===(null==e?void 0:e.type))this.removeModalBanner(),(d=document.createElement("div")).className="gc-modal-overlay",d.setAttribute("data-ahd-modal","true"),(f=document.createElement("div")).className="gc-modal",(v=document.createElement("div")).className="gc-close",v.style.setProperty("--gc-close-foreground",(null==e||null===(h=e.styles)||void 0===h?void 0:h.iconCloseColor)||"#000"),v.addEventListener("click",(function(){return P.removeModalBanner()})),(g=document.createElement("div")).className="gc-modal-content",g.appendChild(s),g.appendChild(v),f.appendChild(g),d.appendChild(f),d.addEventListener("click",(function(t){t.target===d&&P.removeModalBanner()})),document.addEventListener("keydown",(function t(e){"Escape"===e.key&&document.removeEventListener("keydown",t)})),document.body.style.overflow="hidden",document.body.appendChild(d);else if(n){y=null;try{y=document.querySelector(n)}catch(t){y=null}if(!y&&!n.startsWith("#"))try{y=document.querySelector("#"+n)}catch(t){y=null}y&&(y.innerHTML="",y.appendChild(s))}m={index:0,slidesCount:a.length,slidesWrap:c,timer:null},b=function(t){if(m){var e=(t%m.slidesCount+m.slidesCount)%m.slidesCount;m.index=e;var n=100*-e;m.slidesWrap.style.transform="translateX(".concat(n,"%)"),p.querySelectorAll(".gc-carousel-indicator").forEach((function(t,n){n===e?t.setAttribute("aria-current","true"):t.removeAttribute("aria-current")}))}},l.addEventListener("click",(function(){return b(m.index-1)})),u.addEventListener("click",(function(){return b(m.index+1)})),p.querySelectorAll(".gc-carousel-indicator").forEach((function(t){t.addEventListener("click",(function(t){var e=t.currentTarget,n=parseInt(e.getAttribute("data-slide")||"0",10);b(n)}))})),S=!(null==e||null===(o=e.behaviour)||void 0===o||!o.autoplay),w=(null==e||null===(i=e.behaviour)||void 0===i?void 0:i.autoplayDelay)||5e3,S&&(m.timer=window.setInterval((function(){return b(m.index+1)}),w),s.addEventListener("mouseenter",(function(){m.timer&&clearInterval(m.timer)})),s.addEventListener("mouseleave",(function(){m.timer=window.setInterval((function(){return b(m.index+1)}),w)}))),x=0,k=0,E=function(t){x=t.touches[0].clientX},_=function(t){k=t.touches[0].clientX-x},O=function(){k>50?b(m.index-1):k<-50&&b(m.index+1),x=0,k=0},s.addEventListener("touchstart",E,{passive:!0}),s.addEventListener("touchmove",_,{passive:!0}),s.addEventListener("touchend",O),this._ahd_carousel={carousel:s,state:m,goTo:b,handlers:{onTouchStart:E,onTouchMove:_,onTouchEnd:O}};case 49:case"end":return t.stop()}}),t,this)}))),function(t,e){return E.apply(this,arguments)})},{key:"destroyCarousel",value:function(){var t=this._ahd_carousel;if(t){try{var e=t.carousel,n=t.state,r=t.handlers;n&&n.timer&&clearInterval(n.timer),e&&(e.removeEventListener("touchstart",r.onTouchStart),e.removeEventListener("touchmove",r.onTouchMove),e.removeEventListener("touchend",r.onTouchEnd),e.parentElement&&e.parentElement.removeChild(e))}catch(t){}delete this._ahd_carousel}}},{key:"renderModalBanner",value:(x=G(U().mark((function t(e,n){var r,o,i,a,s,c,l,u,p,h,d,f,v,g,y,m,b,S,w=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.removeModalBanner(),e){t.next=3;break}return t.abrupt("return");case 3:(h=document.createElement("div")).className="gc-modal-overlay",h.setAttribute("data-ahd-modal","true"),(d=document.createElement("div")).className="gc-modal",null!=n&&null!==(r=n.styles)&&void 0!==r&&r.width&&(d.style.width=this.normalizeDimensionToStyle(n.styles.width)),null!=n&&null!==(o=n.styles)&&void 0!==o&&o.height&&(d.style.height=this.normalizeDimensionToStyle(n.styles.height)),f=(null==n||null===(i=n.slides)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.behaviour)||(null==n?void 0:n.behaviour)||{},v=null!==(s=null!==(c=null==f?void 0:f.showCloseIcon)&&void 0!==c?c:null==n||null===(l=n.slides)||void 0===l||null===(u=l[0])||void 0===u?void 0:u.showCloseIcon)&&void 0!==s?s:null==n?void 0:n.showCloseIcon,g=(null==f?void 0:f.iconCloseColor)||(null==n||null===(p=n.styles)||void 0===p?void 0:p.iconCloseColor)||"#000",(y=document.createElement("div")).className="gc-modal-content",y.innerHTML=e,y.addEventListener("click",(function(t){return w.handleBannerClick(t)})),(m=y.querySelector('[data-action="onCloseStep"]'))&&m.addEventListener("click",(function(t){t.stopPropagation(),w.removeModalBanner()})),d.appendChild(y),h.appendChild(d),b=function(){if(!m&&!1!==v&&h.isConnected){var t=document.createElement("div");t.className="gc-close",t.style.setProperty("--gc-close-foreground",g),t.addEventListener("click",(function(){return w.removeModalBanner()}));var e=y.querySelector("td.email-layout-content")||y.querySelector("tbody");e?("static"===getComputedStyle(e).position&&(e.style.position="relative"),e.appendChild(t)):y.appendChild(t)}},requestAnimationFrame((function(){return requestAnimationFrame(b)})),h.addEventListener("click",(function(t){t.target===h&&w.removeModalBanner()})),S=function t(e){"Escape"===e.key&&(w.removeModalBanner(),document.removeEventListener("keydown",t))},document.addEventListener("keydown",S),document.body.style.overflow="hidden",document.body.appendChild(h);case 28:case"end":return t.stop()}}),t,this)}))),function(t,e){return x.apply(this,arguments)})},{key:"removeModalBanner",value:function(){var t=this._ahd_active_banner;if(t){var e=t.bannerId,n=t.slideIds;this.acknowledgeAppBanner(e,n),delete this._ahd_active_banner}var r=document.querySelector('[data-ahd-modal="true"]');r&&(r.remove(),document.body.style.overflow=""),this.removeFloaterBanner()}},{key:"renderFloaterBanner",value:(w=G(U().mark((function t(e,n){var r,o,i,a,s,c,l,u,p,h,d,f,v,g,y,m,b,S,w,x,k,E,_,O,P,A,C,T,I,L,R,B,D,M,j,N,H,F,z,q=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.removeFloaterBanner(),e){t.next=3;break}return t.abrupt("return");case 3:w=["top-left","top-right","bottom-left","bottom-right","top-center","bottom-center","left-center","right-center","center"],x=Array.isArray(null==n?void 0:n.slides)?n.slides[0]:null,k=null!==(r=null==x||null===(o=x.contentMetadata)||void 0===o||null===(i=o.document)||void 0===i||null===(a=i.root)||void 0===a||null===(s=a.data)||void 0===s?void 0:s.behaviour)&&void 0!==r?r:{},E=null!==(c=null==x?void 0:x.behaviour)&&void 0!==c?c:{},_=null!==(l=null==n?void 0:n.behaviour)&&void 0!==l?l:{},O=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.find((function(t){return null!=t}))},P=null!==(u=O(E.position,k.position,null==x?void 0:x.position,_.position,null==n?void 0:n.position,null==n||null===(p=n.styles)||void 0===p?void 0:p.position))&&void 0!==u?u:"bottom-right",A=String(P).toLowerCase(),C=w.includes(A)?A:"bottom-right",(T=document.createElement("div")).className="gc-floater gc-floater-".concat(C),T.setAttribute("data-ahd-floater","true"),T.setAttribute("data-position",C),null!=n&&null!==(h=n.styles)&&void 0!==h&&h.width&&(T.style.width=this.normalizeDimensionToStyle(n.styles.width)),null!=n&&null!==(d=n.styles)&&void 0!==d&&d.height&&(T.style.height=this.normalizeDimensionToStyle(n.styles.height)),I=this.normalizeDimensionToStyle(null!==(f=O(E.offsetY,k.offsetY,null==x?void 0:x.offsetY,_.offsetY,null==n?void 0:n.offsetY,null==n||null===(v=n.styles)||void 0===v?void 0:v.offsetY,null==n?void 0:n.offset,null==n||null===(g=n.styles)||void 0===g?void 0:g.offset))&&void 0!==f?f:20),L=this.normalizeDimensionToStyle(null!==(y=O(E.offsetX,k.offsetX,null==x?void 0:x.offsetX,_.offsetX,null==n?void 0:n.offsetX,null==n||null===(m=n.styles)||void 0===m?void 0:m.offsetX,null==n?void 0:n.offset,null==n||null===(b=n.styles)||void 0===b?void 0:b.offset))&&void 0!==y?y:20),R=function(t,e){T.style[t]=e},t.t0=C,t.next="center"===t.t0?24:"top-center"===t.t0?28:"bottom-center"===t.t0?32:"left-center"===t.t0?36:"right-center"===t.t0?40:44;break;case 24:return R("top","50%"),R("left","50%"),T.style.transform="translate(-50%, -50%)",t.abrupt("break",47);case 28:return R("top",I),R("left","50%"),T.style.transform="translateX(-50%)",t.abrupt("break",47);case 32:return R("bottom",I),R("left","50%"),T.style.transform="translateX(-50%)",t.abrupt("break",47);case 36:return R("top","50%"),R("left",L),T.style.transform="translateY(-50%)",t.abrupt("break",47);case 40:return R("top","50%"),R("right",L),T.style.transform="translateY(-50%)",t.abrupt("break",47);case 44:B=C.split("-"),D=W(B,2),M=D[0],j=D[1],R(M,I),R(j,L);case 47:N=String(null!==(S=O(E.animationType,k.animationType,null==x?void 0:x.animationType,_.animationType,null==n?void 0:n.animationType))&&void 0!==S?S:"fadeIn"),H={fadeIn:"fadeIn",slide:"slideUp",slideDown:"slideDown",slideLeft:"slideLeft",slideRight:"slideRight"},"instant"===N?T.style.animation="none":H[N]&&(T.style.animation="".concat(H[N]," 0.3s ease-out")),(F=document.createElement("div")).className="gc-floater-content",F.innerHTML=e,F.addEventListener("click",(function(t){return q.handleBannerClick(t)})),(z=F.querySelector('[data-action="onCloseStep"]'))&&z.addEventListener("click",(function(t){t.stopPropagation(),q.removeFloaterBanner()})),T.appendChild(F),document.body.appendChild(T);case 58:case"end":return t.stop()}}),t,this)}))),function(t,e){return w.apply(this,arguments)})},{key:"removeFloaterBanner",value:function(){var t=document.querySelector('[data-ahd-floater="true"]');if(t){var e=this._ahd_active_banner;if(e){var n=e.bannerId,r=e.slideIds;this.acknowledgeAppBanner(n,r),delete this._ahd_active_banner}t.remove()}}},{key:"normalizeDimensionToStyle",value:function(t){if(null==t)return"";if("string"==typeof t){var e=t.trim();return/[a-z%]/i.test(e)?e:"".concat(e,"px")}return"number"==typeof t?"".concat(t,"px"):""}},{key:"fetchFaqs",value:(S=G(U().mark((function t(e){var n;return U().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 S.apply(this,arguments)})},{key:"showPageBeacons",value:(b=G(U().mark((function t(e){var n,r,o,i,a,s,c,l=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._lastPageUrl=e,t.next=3,this.stop();case 3:if(ut.beacons&&"function"==typeof ut.beacons)try{(n=ut.beacons([]))&&"function"==typeof n.removeAll&&n.removeAll()}catch(t){}if((r=k.get(at))&&r.tooltips&&Array.isArray(r.tooltips)){t.next=7;break}return t.abrupt("return");case 7:(o=this.getApplicabeDataForUrl(r.tooltips,e,!0)).length>0&&(i=k.get(ct)||{},a=(null==i?void 0:i.visited)||[],s=new Set(a),o.forEach((function(t){if(!s.has(t.slug)){s.add(t.slug);var e=o[0].id||o[0]._id;l.markPageVisited(t.slug,"tooltip",e)}})),k.put(ct,V(V({},i),{},{visited:F(s)}),86400),c=o.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,o,i,a=e.behaviour||(null===(n=e.contentMetadata)||void 0===n||null===(r=n.document)||void 0===r||null===(o=r.root)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.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",showProgressbar:l.options.showProgressbar}],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,tour:{steps:s,options:l.options}},u=e.triggerIcon||a.triggerIcon,p=e.triggerLabel||a.triggerLabel;if("icon"===c.triggerMode&&u){var h="beacon";"info"===u.type&&(h="info"),"success"===u.type&&(h="success"),"warning"===u.type&&(h="warning"),"helpIcon"===u.type&&(h="helpIcon"),c.triggerIcon={type:h,color:u.color||"#000000",isAnimated:u.isAnimated||!1}}else"label"===c.triggerMode&&p&&(c.triggerLabel={text:p.text,color:p.color||"#000000",background:p.background||"#d01e1e"});return c}))})),console.log("Beacons",c),ut.beacons(c,{boundary:"outer"}).showAll(!0));case 9:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"setBeacons",value:(m=G(U().mark((function t(e){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:ut.beacons(e,{boundary:"outer"}).showAll();case 1:case"end":return t.stop()}}),t)}))),function(t){return m.apply(this,arguments)})},{key:"resolveSlugPatternForUrl",value:function(t,e){var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=z(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}([].concat(F((null==e?void 0:e.tours)||[]),F((null==e?void 0:e.tooltips)||[])));try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.slug)try{if(it(o.slug,{decode:decodeURIComponent})(t))return o.slug}catch(t){}}}catch(t){r.e(t)}finally{r.f()}return t.replace(/\/([a-f0-9]{24}|[0-9]+)(?=\/|$)/gi,"/:id")}},{key:"showHighlights",value:(y=G(U().mark((function t(e,n){var r,o,i,a,s,c,l,u,p;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._lastPageUrl=e,t.next=3,this.stop();case 3:if(ut.beacons&&"function"==typeof ut.beacons)try{(s=ut.beacons([]))&&"function"==typeof s.removeAll&&s.removeAll()}catch(t){}if((c=k.get(at))&&!n){t.next=9;break}return t.next=8,this.fetchAndCacheTourData(c,e);case 8:c=t.sent;case 9:l=function(t,e){return[t.slug].concat(F(Array.isArray(t.altSlugs)?t.altSlugs:[])).filter(Boolean).some((function(t){try{return!!it(t,{decode:decodeURIComponent})(e)}catch(t){return!1}}))},u=(null===(r=c)||void 0===r||null===(o=r.tours)||void 0===o?void 0:o.filter((function(t){return l(t,e)})))||[],p=(null===(i=c)||void 0===i||null===(a=i.tooltips)||void 0===a?void 0:a.filter((function(t){return l(t,e)})))||[],u.length>0&&this.showPageTour(e),p.length>0&&this.showPageBeacons(e);case 14:case"end":return t.stop()}}),t,this)}))),function(t,e){return y.apply(this,arguments)})},{key:"showPageHighlights",value:(g=G(U().mark((function t(e,n){var r,o,i,a,s=this,c=arguments;return U().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:o=k.get(st),i=this.getUnAcknowledgedHightlightsForUrl(o,e,"highlight",r),a=i.map((function(t){return{element:t.selector,position:t.position,onClick:(e=G(U().mark((function e(){return U().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})),ut.beacons(a,{boundary:"outer"}).showAll();case 8:case"end":return t.stop()}}),t,this)}))),function(t,e){return g.apply(this,arguments)})},{key:"clearCachedData",value:(v=G(U().mark((function t(){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:k.removeKey(st),k.removeKey("AHD_HELP_DATA"),k.removeKey(at),k.removeKey(ct);case 4:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"setLanguage",value:(f=G(U().mark((function t(e){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.options.language=e,t.next=3,this.clearCachedData();case 3:if(!this._lastPageUrl){t.next=6;break}return t.next=6,this.showHighlights(this._lastPageUrl,!0);case 6:if(!this._lastRenderedIdentifier){t.next=9;break}return t.next=9,this.renderAppBanner(this._lastRenderedIdentifier,!0);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"acknowledgeHighlight",value:(d=G(U().mark((function t(e){var n,r,o;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=k.get(ct)||{},r=(null==n?void 0:n.ack)||[],(o=new Set(r)).has(e)||o.add(e),k.put(ct,V(V({},n),{},{ack:F(o)}),86400),this.updateVisitorStats({ack:[e]},"highlight");case 6:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"markUnacknowledge",value:(h=G(U().mark((function t(e){var n,r,o,i,a,s,c,l,u,p;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=k.get(at),r=null,o=null,n&&(i=(n.appBanners||[]).find((function(t){return t.identifier===e})),a=!i&&(n.tours||[]).find((function(t){return t.slug===e})),s=!i&&!a&&(n.tooltips||[]).find((function(t){return t.slug===e})),i?(r=i,o="app-banner"):a?(r=a,o="tour"):s&&(r=s,o="tooltip")),r){t.next=7;break}return console.warn('markUnacknowledge: no item found for "'.concat(e,'" in TOUR_DATA_STORAGE_KEY')),t.abrupt("return");case 7:return c=r._id||r.id,l="".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/stats/mark-unacknowledged/").concat(this.options.visitorId,"/").concat(c),t.next=11,fetch(l,{method:"GET",redirect:"follow"}).then((function(t){return t.json()}));case 11:return u=k.get(ct)||{},p=(null==u?void 0:u.ack)||[],k.put(ct,V(V({},u),{},{ack:p.filter((function(t){return t!==c}))}),86400),t.next=16,this.fetchAndCachePageVisitsData(null);case 16:if("app-banner"!==o){t.next=21;break}return t.next=19,this.renderAppBanner(e,!0);case 19:t.next=23;break;case 21:return t.next=23,this.showHighlights(window.location.href,!0);case 23:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"generateDescription",value:function(t){var e,n=t.content||"",r="ahd-google-fonts";if(!document.getElementById(r)){var o=document.createElement("link");o.id=r,o.rel="stylesheet",o.href=(e=j.map((function(t){return"family=".concat(t.replace(/ /g,"+"),":wght@300;400;500;600;700")})),"https://fonts.googleapis.com/css2?".concat(e.join("&"),"&display=swap")),document.head.appendChild(o)}return n}},{key:"getUnAcknowledgedHightlightsForUrl",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=k.get(ct)||{},i=(null==o?void 0:o.ack)||[];return t.filter((function(t){return!(!r&&i&&i.includes(t.id))&&it(t.slug,{decode:decodeURIComponent})(e)}))}},{key:"getApplicabeDataForUrl",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=k.get(ct)||{},o=(null==r?void 0:r.visited)||[];return t.filter((function(t){return!(![t.slug].concat(F(Array.isArray(t.altSlugs)?t.altSlugs:[])).filter(Boolean).some((function(t){try{return!!it(t,{decode:decodeURIComponent})(e)}catch(t){return!1}}))||!n&&o.includes(t.slug))}))}},{key:"fetchAndCacheHighlightsData",value:(p=G(U().mark((function t(e){var n;return U().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&filter[language]=").concat(this.options.language||"")).then((function(t){return t.json()}));case 2:return(n=t.sent).rows&&(e=n.rows.filter((function(t){return!!t.content})),k.put(st,e,this.options.highlightRefetchIntervalInSec)),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"fetchAndCacheTourData",value:(u=G(U().mark((function t(e,n){var r,o,i,a,s=arguments;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!(s.length>2&&void 0!==s[2])||s[2],n&&r&&(n=this.resolveSlugPatternForUrl(n,e)),o=this.options.language?"&filter[language]=".concat(this.options.language):"",i="".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").concat(o),t.next=6,fetch(i).then((function(t){return t.json()}));case 6:return(a=t.sent)&&(e=a,k.put(at,e,this.options.toursRefetchIntervalInSec)),t.abrupt("return",e);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})},{key:"fetchAndCachePageVisitsData",value:(l=G(U().mark((function t(e){var n;return U().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)&&k.put(ct,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=G(U().mark((function t(e,n){var r;return U().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)&&k.put(ct,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:"acknowledgeAppBanner",value:function(t,e){var n=this;t&&e.forEach((function(e){n.acknowledgeStep("app-banner",t,e)}))}},{key:"acknowledgeStep",value:(s=G(U().mark((function t(e,n,r){var o;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.options.visitorId){t.next=3;break}return console.warn("acknowledgeStep: visitorId is not defined, skipping acknowledgment"),t.abrupt("return");case 3:return o={method:"GET",redirect:"follow"},t.next=6,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"),o).then((function(t){return t.json()}));case 6:t.sent;case 7:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return s.apply(this,arguments)})},{key:"markPageVisited",value:(a=G(U().mark((function t(e,n,r){var o;return U().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(o=t.sent)&&k.put(ct,o,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)})}],o&&Z(r.prototype,o),i&&Z(r,i),Object.defineProperty(r,"prototype",{writable:!1}),I}(b);ot(lt,"_instances",new Set);var ut=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return H(lt,e)};ut.prototype=lt.prototype,ut.plugins=new Set,ut.extend=function(t){if(!ut.plugins.has(t)){ut.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,[lt,ut].concat(n))}return ut};const pt=ut})(),__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,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}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={},this.pendingBeacons=[],this.elementSearchIntervalId=null,this.elementSearchInterval=5e3,"undefined"!=typeof ResizeObserver&&(this.observers.elementResizeObserver=new ResizeObserver((function(){return e.refresh()}))),"undefined"!=typeof MutationObserver&&(this.observers.domMutationObserver=new MutationObserver((function(){return e.handleDomMutations()}))),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.elementSearchInterval=this.options.elementSearchInterval,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.pendingBeacons=[],this.beacons.length&&(this.beacons.forEach((function(t){var n=t.element;if(n){var r=e.getEl(n);r?e.createAndAttachBeacon(t,r):e.pendingBeacons.push(t)}})),this.addOnWindowResizeListener(),this.addOnScrollListener(),this.observeDomMutations(),this.searchForPendingElements(),this.startElementSearch()),this}},{key:"createAndAttachBeacon",value:function(t,e){var n=this.createBeaconEl(t);return n.hidden=!0,this.constructor.isFixed(e)&&n.classList.add(this.constructor.getFixedClass()),"info-tooltip"===t.class&&n.classList.remove("gc-beacon"),"help-tooltip"===t.class&&n.classList.remove("gc-beacon"),document.body.append(n),this.elements.set(t,n),this.setBeaconPosition(e,n,t),t._forceShow?(n.hidden=!1,delete t._forceShow):this.isCanShowBeacon(t)&&(n.hidden=!1),this.observeResizing(e),this}},{key:"startElementSearch",value:function(){var t=this;return this.stopElementSearch(),this.pendingBeacons.length>0&&(this.elementSearchIntervalId=setInterval((function(){t.searchForPendingElements()}),this.elementSearchInterval)),this}},{key:"stopElementSearch",value:function(){return this.elementSearchIntervalId&&(clearInterval(this.elementSearchIntervalId),this.elementSearchIntervalId=null),this}},{key:"searchForPendingElements",value:function(){var t=this;if(0===this.pendingBeacons.length)return this.stopElementSearch(),this;var e=[];return this.pendingBeacons.forEach((function(n){var r=n.element,o=t.getEl(r);o&&document.body.contains(o)?t.createAndAttachBeacon(n,o):e.push(n)})),this.pendingBeacons=e,0===this.pendingBeacons.length&&this.stopElementSearch(),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 _this5=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(_this5.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[_this5.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(_this5.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:_this5.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,o=n.boundary,i=n.triggerIcon,a=n.triggerLabel,s=n.triggerMode;r=r||this.options.position,o="inner"===(o=o||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=window.pageXOffset||document.documentElement.scrollLeft,d=window.pageYOffset||document.documentElement.scrollTop;c=u.left+h,l=u.top+d}var f,v,g=u.width,y=u.height,m=e.style,b=getComputedStyle(e),S=b.width,w=b.height;(S=parseInt(S,10),w=parseInt(w,10),e.removeAttribute("data-beacon-position"),e.removeAttribute("data-beacon-boundary"),e.setAttribute("data-beacon-position",r),e.setAttribute("data-beacon-boundary",o),s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.icon)&&(m.backgroundImage=this.iconType(null==i?void 0:i.type),m.opacity=null!==(f=null==i?void 0:i.opacity)&&void 0!==f?f:1,m.backgroundColor=null!==(v=null==i?void 0:i.color)&&void 0!==v?v:"white",null!=i&&i.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 x,k,E,_;m.opacity=null!==(x=null==a?void 0:a.opacity)&&void 0!==x?x:1,m.backgroundColor=null!==(k=null==a?void 0:a.background)&&void 0!==k?k:"#fff",m.color=null!==(E=null==a?void 0:a.color)&&void 0!==E?E:"#000";var O=s===_utils_constants__WEBPACK_IMPORTED_MODULE_1__.zm.label&&null!==(_=null==a?void 0:a.text)&&void 0!==_?_:"";e.setAttribute("data-beacon-label",O)}switch(r){case"top-left":"inner"===o?(m.left="".concat(c,"px"),m.top="".concat(l,"px")):(m.left="".concat(c-S,"px"),m.top="".concat(l-w,"px"));break;case"top":m.left="".concat(c+(g-S)/2,"px"),m.top="".concat("inner"===o?l:l-w,"px");break;case"top-right":"inner"===o?(m.left="".concat(g+c-S,"px"),m.top="".concat(l,"px")):(m.left="".concat(g+c,"px"),m.top="".concat(l-w,"px"));break;case"left":m.left="".concat("inner"===o?c:c-S,"px"),m.top="".concat(l+(y-w)/2,"px");break;case"right":m.left="".concat("inner"===o?c+g-S:c+g,"px"),m.top="".concat(l+(y-w)/2,"px");break;case"bottom-left":"inner"===o?(m.left="".concat(c,"px"),m.top="".concat(l+y-w,"px")):(m.left="".concat(c-S,"px"),m.top="".concat(l+y,"px"));break;case"bottom":m.left="".concat(c+(g-S)/2,"px"),m.top="".concat("inner"===o?l+y-w:l+y,"px");break;case"bottom-right":"inner"===o?(m.left="".concat(g+c-S,"px"),m.top="".concat(l+y-w,"px")):(m.left="".concat(g+c,"px"),m.top="".concat(l+y,"px"));break;default:e.setAttribute("data-beacon-position","center"),m.left="".concat(c+(g-S)/2,"px"),m.top="".concat(l+(y-w)/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):e&&(n._forceShow=!0)}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.pendingBeacons=[],this.unobserveResizeAllElements(),this.removeOnWindowResizeListener(),this.removeOnScrollListener(),this.unobserveDomMutations(),this.stopElementSearch(),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.removeOnScrollListener()),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),o=t.elements.get(e);r&&o&&(document.body.contains(r)?(t.setBeaconPosition(r,o,e),t.isCanShowBeacon(e)&&(o.hidden=!1)):o.hidden=!0)}})),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:"addOnScrollListener",value:function(){return this.cache.set("onScrollListener",this.getOnScrollListener()),window.addEventListener("scroll",this.cache.get("onScrollListener"),!0),this}},{key:"getOnScrollListener",value:function(){var t=this;return function(){return t.refresh()}}},{key:"removeOnScrollListener",value:function(){return this.cache.has("onScrollListener")&&(window.removeEventListener("scroll",this.cache.get("onScrollListener"),!0),this.cache.delete("onScrollListener")),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:"handleDomMutations",value:function(){var t=this;return this.beacons.forEach((function(e){var n=e.element;if(n){var r=t.getEl(n),o=t.elements.get(e);o&&(r&&document.body.contains(r)?t.isCanShowBeacon(e)&&(o.hidden=!1,t.setBeaconPosition(r,o,e)):o.hidden=!0)}})),this.searchForPendingElements(),this}},{key:"observeDomMutations",value:function(){var t=this.observers.domMutationObserver;return t&&t.observe(document.body,{childList:!0,subtree:!0}),this}},{key:"unobserveDomMutations",value:function(){var t=this.observers.domMutationObserver;return t&&t.disconnect(),this}}],[{key:"getDefaultOptions",value:function(){return{position:"center",boundary:"inner",elementSearchInterval:5e3}}},{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:()=>p,ti:()=>h,zm:()=>d});var r={onClick:"onClick",onHover:"onHover",onMouseLeave:"onMouseLeave",onMouseEnter:"onMouseEnter",onPageLoad:"onPageLoad",onLongPress:"onLongPress"},o="instant",i="fadeIn",a="slide",s="slideLeft",c="slideRight",l="slideUp",u="slideDown",p={onOutsideClick:"onOutsideClick",dismissButtonClickOnly:"dismissButtonClickOnly",buttonClickOnly:"buttonClickOnly"},h=function(t){switch(t){case o:return"none";case i:return"fadeIn 1s ease-in";case u:return"slideDown 1s forwards";case s:return"slideLeft 1s forwards";case c:return"slideRight 1s forwards";case l:case a:return"slideUp 1s forwards";default:return"none"}},d={icon:"icon",noIcon:"noIcon",label:"label"}},95:(t,e,n)=>{"use strict";n.d(e,{Z:()=>S});var r=n(353),o=n.n(r),i=n(220),a=n.n(i),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){d(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 d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(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,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(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 o=new(Function.bind.apply(t,r));return n&&b(o,n.prototype),o},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 S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new DOMParser,r=t.replace(/<template/g,"<gc-template");r=r.replace(/<\/template/g,"</gc-template");var i=n.parseFromString(r,"text/html"),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,i=r,b=Object.keys(n),S=Object.values(n),w=function(t){return y(Function,b.concat(["return ".concat(t,";")])).apply(void 0,S)};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 x=e.getAttribute("for").split(" in "),k=f(x,2),E=k[0],_=k[1];e.removeAttribute("for");var O=E.replace(/\(|\)/g,"").split(","),P=f(O,2),A=P[0],C=P[1];A=A.trim(),C=C?C.trim():"";var T=w(_.trim()),I=Array.isArray(T);return void Object.keys(T).forEach((function(r){var o=h(h({},n),{},d({},A,T[r]));C&&(o[C]=I?parseInt(r,10):r),t(e,o,i)}))}e!==e.ownerDocument.body&&"GC-TEMPLATE"!==e.tagName&&(i=e.cloneNode(),r.append(i)),u(e.attributes).forEach((function(t){var e=t.name,n=t.value,r=g.exec(e);if(r){var s=f(r,2)[1];return i.addEventListener(s,(function(t){return y(Function,[].concat(b,["$event"]).concat(["return ".concat(n).concat(/\(.+\)/.test(n)?"":"()",";")])).apply(void 0,[].concat(S,[t]))})),void i.removeAttribute(e)}for(var c=v.exec(n),l=0,u="";c;){u+=n.slice(l,c.index);var p=f(c,2),h=p[0],d=p[1];d=d.trim();try{h=w(d),(o()(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?(i.innerHTML=u,i.removeAttribute(e)):["if","else","elseif"].includes(e)?i.removeAttribute(e):i.setAttribute(e,u)}))}else if(e.nodeType===Node.TEXT_NODE){var L=v.exec(e.nodeValue);if(L){for(var R=0;L;){i.append(document.createTextNode(e.nodeValue.slice(R,L.index)));var B=L,D=f(B,2),M=D[0],j=D[1];j=j.trim();try{M=w(j),(o()(M)||a()(M))&&(M="")}catch(t){console.error(t)}(0,s.Z)(M)||c(M)?i.append(M):l(M)?M.forEach((function(t){i.append(t)})):i.append(document.createTextNode(M)),R=L.index+L[0].length,L=v.exec(e.nodeValue)}i.append(document.createTextNode(e.nodeValue.slice(R,e.nodeValue.length)))}else i.append(e.cloneNode())}var N=e.childNodes,H=void 0===N?[]:N;H.length&&H.forEach((function(e){t(e,n,i)}))}};return b(i.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,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},239:(t,e,n)=>{var r=n(705),o=n(607),i=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)?o(t):i(t)}},531:(t,e,n)=>{var r=n(705),o=n(932),i=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(i(e))return o(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),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[s]=n:delete t[s]),o}},333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},639:(t,e,n)=>{var r=n(957),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},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),o=n(5);t.exports=function(t){return"symbol"==typeof t||o(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),o=0;t.exports=function(t){var e=++o;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 o=1,i="";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==--o){s++;break}}else if("("===t[s]&&(o++,"?"!==t[s+1]))throw new TypeError("Capturing groups are not allowed at ".concat(s));i+=t[s++]}else i+=t[s++]+t[s++];if(o)throw new TypeError("Unbalanced pattern at ".concat(n));if(!i)throw new TypeError("Missing pattern at ".concat(n));e.push({type:"PATTERN",index:n,value:i}),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,o=void 0===r?"./":r,i="[^".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],o=r.type,i=r.index;throw new TypeError("Unexpected ".concat(o," at ").concat(i,", expected ").concat(t))},d=function(){for(var t,e="";t=p("CHAR")||p("ESCAPED_CHAR");)e+=t;return e};l<n.length;){var f=p("CHAR"),v=p("NAME"),g=p("PATTERN");if(v||g){var y=f||"";-1===o.indexOf(y)&&(u+=y,y=""),u&&(a.push(u),u=""),a.push({name:v||s++,prefix:y,suffix:"",pattern:g||i,modifier:p("MODIFIER")||""})}else{var m=f||p("ESCAPED_CHAR");if(m)u+=m;else if(u&&(a.push(u),u=""),p("OPEN")){y=d();var b=p("NAME")||"",S=p("PATTERN")||"",w=d();h("CLOSE"),a.push({name:b||(S?s++:""),pattern:b&&!S?i:S,prefix:y,suffix:w,modifier:p("MODIFIER")||""})}else h("END")}}return a}function o(t,e){return i(r(t,e),e)}function i(t,e){void 0===e&&(e={});var n=l(e),r=e.encode,o=void 0===r?function(t){return t}:r,i=e.validate,a=void 0===i||i,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 i=t[r];if("string"!=typeof i){var c=e?e[i.name]:void 0,l="?"===i.modifier||"*"===i.modifier,u="*"===i.modifier||"+"===i.modifier;if(Array.isArray(c)){if(!u)throw new TypeError('Expected "'.concat(i.name,'" to not repeat, but got an array'));if(0===c.length){if(l)continue;throw new TypeError('Expected "'.concat(i.name,'" to not be empty'))}for(var p=0;p<c.length;p++){var h=o(c[p],i);if(a&&!s[r].test(h))throw new TypeError('Expected all "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(h,'"'));n+=i.prefix+h+i.suffix}}else if("string"!=typeof c&&"number"!=typeof c){if(!l){var d=u?"an array":"a string";throw new TypeError('Expected "'.concat(i.name,'" to be ').concat(d))}}else{h=o(String(c),i);if(a&&!s[r].test(h))throw new TypeError('Expected "'.concat(i.name,'" to match "').concat(i.pattern,'", but got "').concat(h,'"'));n+=i.prefix+h+i.suffix}}else n+=i}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,o=void 0===r?function(t){return t}:r;return function(n){var r=t.exec(n);if(!r)return!1;for(var i=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 o(t,n)})):s[n.name]=o(r[t],n)},l=1;l<r.length;l++)c(l);return{path:i,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,o=void 0!==r&&r,i=n.start,a=void 0===i||i,s=n.end,u=void 0===s||s,p=n.encode,h=void 0===p?function(t){return t}:p,d=n.delimiter,f=void 0===d?"/#?":d,v=n.endsWith,g="[".concat(c(void 0===v?"":v),"]|$"),y="[".concat(c(f),"]"),m=a?"^":"",b=0,S=t;b<S.length;b++){var w=S[b];if("string"==typeof w)m+=c(h(w));else{var x=c(h(w.prefix)),k=c(h(w.suffix));if(w.pattern)if(e&&e.push(w),x||k)if("+"===w.modifier||"*"===w.modifier){var E="*"===w.modifier?"?":"";m+="(?:".concat(x,"((?:").concat(w.pattern,")(?:").concat(k).concat(x,"(?:").concat(w.pattern,"))*)").concat(k,")").concat(E)}else m+="(?:".concat(x,"(").concat(w.pattern,")").concat(k,")").concat(w.modifier);else"+"===w.modifier||"*"===w.modifier?m+="((?:".concat(w.pattern,")").concat(w.modifier,")"):m+="(".concat(w.pattern,")").concat(w.modifier);else m+="(?:".concat(x).concat(k,")").concat(w.modifier)}}if(u)o||(m+="".concat(y,"?")),m+=n.endsWith?"(?=".concat(g,")"):"$";else{var _=t[t.length-1],O="string"==typeof _?y.indexOf(_[_.length-1])>-1:void 0===_;o||(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,o=n.exec(t.source);o;)e.push({name:o[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),o=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:()=>o,match:()=>a,parse:()=>r,pathToRegexp:()=>p,regexpToFunction:()=>s,tokensToFunction:()=>i,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:()=>pt});var t=__webpack_require__(955),e=__webpack_require__.n(t),n=__webpack_require__(95),r=__webpack_require__(629);var o=__webpack_require__(102);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function 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,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(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:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",s=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new _(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=x(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),i}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 d(){}function f(){}function v(){}var g={};c(g,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(O([])));m&&m!==e&&n.call(m,o)&&(g=m);var b=v.prototype=d.prototype=Object.create(g);function S(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,a,s,c){var l=p(t[o],t,a);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==i(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(l.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}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 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 o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function O(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:P}}function P(){return{value:void 0,done:!0}}return f.prototype=v,c(b,"constructor",v),c(v,"constructor",f),f.displayName=c(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"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}},S(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(b),c(b,s,"Generator"),c(b,o,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,_.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(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.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),E(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 o=r.arg;E(n)}return o}}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,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function h(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){p(i,r,o,a,s,"next",t)}function s(t){p(i,r,o,a,s,"throw",t)}a(void 0)}))}}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){v(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(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,o=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(o),this.tour=null,this.setTour(n),this.notifications=[],this.elements=new Map,this.init(),this._rootSpec=this.options.root||null,this.rootEl=this.resolveRoot(this._rootSpec),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 i,c,l,p,d,v,m,b;return i=t,c=[{key:"resolveRoot",value:function(t){if(!t)return null;try{if("string"==typeof t){var e=document.querySelector(t)||null;if(!e)return null;var n=(e.tagName||"").toUpperCase();return new Set(["IMG","INPUT","BR","HR","META","LINK","SOURCE","TRACK","WBR"]).has(n)?(this.referenceEl=e,this.rootEl=e.parentElement||document.body,this.rootEl):(this.referenceEl=e,this.rootEl=e,e)}if((0,r.Z)(t)){var o=(t.tagName||"").toUpperCase();return new Set(["IMG","INPUT","BR","HR","META","LINK","SOURCE","TRACK","WBR"]).has(o)?(this.referenceEl=t,this.rootEl=t.parentElement||document.body,this.rootEl):(this.referenceEl=t,this.rootEl=t,t)}}catch(t){return null}return null}},{key:"getRootEl",value:function(){if(!this.rootEl&&this._rootSpec){var t=this.resolveRoot(this._rootSpec);if(t)return this.rootEl=t,this.rootEl}return this.rootEl||document.body}},{key:"getViewportDims",value:function(){var t=this.getRootEl();if(this.referenceEl){var e=this.getElementVisibleRect(this.referenceEl);return{innerWidth:e.width,innerHeight:e.height,left:e.left,top:e.top,right:e.right,bottom:e.bottom}}if(t&&t!==document.body){var n=t.getBoundingClientRect();return{innerWidth:n.width,innerHeight:n.height,left:n.left,top:n.top,right:n.right,bottom:n.bottom}}return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}}},{key:"getScaleForWidth",value:function(t){return t<=360||t<=480?.65:t<=768?.75:t<=1023?.85:1}},{key:"applyRootWidthScale",value:function(){var t=this.getRootEl();if(t&&t!==document.body){var e=t.offsetWidth||t.getBoundingClientRect().width,n=this.getScaleForWidth(e),r=this.getEl("tooltip");if(r){var o=r.querySelector(".gc-close"),i=r.querySelector(".gc-copyright");o&&(o.style.transform="scale(".concat(n,")"),o.style.transformOrigin="top right"),i&&(i.style.transform="scale(".concat(n,")"),i.style.transformOrigin="bottom left")}}}},{key:"getElementVisibleRect",value:function(t){if(!t)return new DOMRect(0,0,0,0);try{if("IMG"===(t.tagName||"").toUpperCase()&&t.naturalWidth&&t.naturalHeight){var e=getComputedStyle(t);if("contain"===(e.getPropertyValue("object-fit")||e.objectFit)){var n=t.getBoundingClientRect(),r=Math.max(0,t.clientWidth||n.width||0),o=Math.max(0,t.clientHeight||n.height||0),i=Math.min(r/t.naturalWidth,o/t.naturalHeight),a=Math.round(t.naturalWidth*i),s=Math.round(t.naturalHeight*i),c=Math.round((r-a)/2),l=Math.round((o-s)/2),u=n.left+c,p=n.top+l;return{left:u,top:p,right:u+a,bottom:p+s,width:a,height:s,x:u,y:p}}}}catch(t){}return t.getBoundingClientRect()}},{key:"init",value:function(){}},{key:"handleClick",value:function(t){var e=t.target.getAttribute("data-action");if(e)if("goToStep"!==e)if("postMessageEvent"!==e)this.actions[e]&&this.actions[e]();else{var n=t.target.closest("[data-post-message-event], [data-action-payload]")||t.target.closest('[data-action="postMessageEvent"]'),r=n?n.getAttribute("data-post-message-event")||function(){try{return JSON.parse(n.getAttribute("data-action-payload")||"{}").postMessageEvent}catch(t){return null}}():null;r&&window.postMessage({type:r},"*")}else{var o=t.target.closest("[data-goto-step], [data-action-payload]")||t.target.closest('[data-action="goToStep"]'),i=o?o.getAttribute("data-goto-step")||function(){try{return JSON.parse(o.getAttribute("data-action-payload")||"{}").goToStep}catch(t){return null}}():null;if(null!=i&&""!==i){var a=parseInt(i,10)-1;!isNaN(a)&&a>=0&&this.onGotoStep(a)}}}},{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){if(this.options&&0!==Object.keys(this.options).length?this.options=f(f({},this.options),t):this.options=f(f({},this.constructor.getDefaultOptions()),t),t&&Object.prototype.hasOwnProperty.call(t,"root")){this._rootSpec=t.root;var e=this.resolveRoot(this._rootSpec);e&&(this.rootEl=e)}return this}},{key:"getOptions",value:function(){return this.options}},{key:"start",value:(b=h(u().mark((function t(){var e,n,r,o,i,a,s,c=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=c.length>0&&void 0!==c[0]?c[0]:0,n=!(c.length>1&&void 0!==c[1])||c[1],this.isDisplayed=!0,(r=this.getRootEl())&&r!==document.body&&"static"===getComputedStyle(r).position&&(r.style.position="relative"),this.mountOverlayEl(),this.startPreloader(),o=c.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=c[a];return t.next=10,this.emit.apply(this,["onStart"].concat(i));case 10:if(this.stopPreloader(),this.tour&&this.tour.length){t.next=15;break}return this.removeOverlayEl(),this.isDisplayed=!1,t.abrupt("return",!1);case 15:if(this.steps=this.sortSteps(this.getSteps(this.tour)),this.steps.length){t.next=20;break}return this.removeOverlayEl(),this.isDisplayed=!1,t.abrupt("return",!1);case 20:return document.body.classList.add(this.constructor.getBodyClass()),this._saveScrollState(),t.next=24,this.go.apply(this,[e,n].concat(i));case 24:return s=t.sent,this.isDisplayed=s,document.body.classList.toggle(this.constructor.getBodyClass(),s),s&&(this.options.useKeyboard&&this.addOnKeydownListener(),this.addOnWindowResizeListener(),this.addOnWindowScrollListener(),this.addOnRootScrollListener()),t.abrupt("return",s);case 29: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,o,i,a,s,c,l,p,h,d,f,v,g,y,m,b,S,w=this,x=arguments;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(n=!(x.length>1&&void 0!==x[1])||x[1],r=x.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=x[i];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),d=p,f=(h=l).onBeforeChange,v=h.onAfterChange,this.startPreloader(),g=!1,!f){t.next=26;break}return t.next=23,Promise.resolve().then((function(){return f.call.apply(f,[w,h,s].concat(o))}));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(o));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:if(s&&(this.unmountStep(),this.unobserveStep()),this.beforeChangeStep({toStep:h,toStepIndex:d,currentStep:l,currentStepIndex:p,fromStep:s,fromStepIndex:c}),this.toStep=h,this.toStepIndex=d,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,(S=this.getStepEl(this.currentStep))||!this.currentStep||!1!==this.currentStep.showStep){t.next=55;break}if(this.stopPreloader(),!this.nextStep){t.next=52;break}return t.abrupt("return",this.go.apply(this,[this.nextStepIndex,!0].concat(o)));case 52:return t.next=54,this.stop.apply(this,o);case 54:return t.abrupt("return",!1);case 55:return"tooltip"!==this.currentStep.type&&(this._unlockScroll(),this.scrollParentsToStepEl(),this.scrollToStepEl(S||this.getStepEl(this.currentStep),y,b)),this.mountStep(),this._lockScroll(),"tooltip"!==this.currentStep.type&&setTimeout((function(){w.getEl("tooltip")&&(w._unlockScroll(),w.scrollTo(w.getEl("tooltip"),"instant",b),w._lockScroll())}),300),v&&v.call.apply(v,[this,this.toStep,this.fromStep].concat(o)),this.emit.apply(this,["onAfterChange",this.toStep,this.fromStep].concat(o)),t.abrupt("return",!0);case 62: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,o,i=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(o=this.currentStep.onPrevious,this.startPreloader(),!o){t.next=12;break}return t.next=8,Promise.resolve().then((function(){return o.call.apply(o,[i,i.previousStep,i.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:(d=h(u().mark((function t(){var e,n,r,o,i,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(o=this.currentStep,i=o.type,a=o.id,s=o.onNext,c=o.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(i,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 d.apply(this,arguments)})},{key:"stop",value:(p=h(u().mark((function t(){var e,n,r,o,i,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,o=e.stepId,i=c.length,a=new Array(i),s=0;s<i;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._unlockScroll(),this._savedBodyOverflow=void 0,this._savedHtmlOverflow=void 0,this._savedRootOverflow=void 0,this.setDefaults(),this.acknowledgeStep(n,r,o),t.abrupt("return",this);case 27: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 o=new RegExp("^".concat(n,"-").concat(t,"-[^-]+$")),i=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=o.test(u),d=!h&&i.test(u);if(h||d){var v=h?u.replace("".concat(n,"-").concat(t,"-"),""):u.replace("".concat(n,"-"),"");"tour"!==v&&(h||d&&!s[v])&&(s[v]=p)}}return f(f({step:a,title:"",description:"",position:e.options.position,interaction:e.options.interaction},s),{},{element:r})}))}},{key:"getJsSteps",value:function(t){return t.map((function(t,e){return f(f({},t),{},{step:t.step||e})}))}},{key:"sortSteps",value:function(t){return 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,o=e.left,i=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!==o&&i&&a?this.mountOffsetFakeStepEl({top:r,left:o,width:i,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(o){if(!o||o===r.body)return r.body;var i=getComputedStyle(o);if("fixed"===n.getPropertyValue("position")&&"static"===i.getPropertyValue("position"))return t(o.parentElement);var a=i.getPropertyValue("overflow-x"),s=i.getPropertyValue("overflow-y");return e.test(a)||e.test(s)?o:t(o.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(),o=r.top,i=r.bottom,a=r.left,s=r.right,c=this.getViewportDims(),l=c.innerWidth,u=c.innerHeight;return a>=0&&s<=l||window.scrollBy({behavior:e,left:a-n}),o>=0&&i<=u||window.scrollBy({behavior:e,top:o-n}),this}},{key:"_saveScrollState",value:function(){var t=this.getRootEl();return t&&t!==document.body?this._savedRootOverflow=t.style.overflow:(this._savedBodyOverflow=document.body.style.overflow,this._savedHtmlOverflow=document.documentElement.style.overflow),this}},{key:"_lockScroll",value:function(){var t=this.getRootEl();return t&&t!==document.body?t.style.overflow="hidden":(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"),this}},{key:"_unlockScroll",value:function(){var t=this.getRootEl();return t&&t!==document.body?t.style.overflow=void 0!==this._savedRootOverflow?this._savedRootOverflow:"":(document.body.style.overflow=void 0!==this._savedBodyOverflow?this._savedBodyOverflow:"",document.documentElement.style.overflow=void 0!==this._savedHtmlOverflow?this._savedHtmlOverflow:""),this}},{key:"_isHeaderOrFooterEl",value:function(t){for(var e=new Set(["HEADER","FOOTER","NAV"]),n=t;n&&n!==document.body;){if(e.has(n.tagName))return!0;var r=getComputedStyle(n).position;if("fixed"===r||"sticky"===r)return!0;n=n.parentElement}return!1}},{key:"scrollToStepEl",value:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!t)return this;var n=t.getBoundingClientRect(),r=this.getViewportDims(),o=r.innerHeight,i=r.innerWidth;n.left>=0&&n.right<=i||window.scrollBy({behavior:"instant",left:n.left-e});var a=this._isHeaderOrFooterEl(t),s=window.scrollY||window.pageYOffset||0,c=n.top+s,l=c-(a?.3*o-e:Math.max(0,(o-n.height)/2)),u=Math.max(0,document.documentElement.scrollHeight-window.innerHeight),p=Math.max(0,Math.min(l,u));return window.scrollTo({behavior:"instant",top:p}),this}},{key:"highlightStepEl",value:function(){var t,e,n,r,o,i=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,d=s.querySelector("path"),f=d.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,S=this.isEl(a,"fakeStep"),w=!v&&g&&y&&m&&b,x=S&&!w?this.getOverlayDocumentPath():this.getOverlayStepPath(this.currentStep);if(d.setAttribute("d",x),f){var k=f.getAttribute("lock");if(k||(f.setAttribute("from",x),f.setAttribute("to",x)),i){var E=this.isEl(this.getStepEl(this.fromStep),"fakeStep"),_=!this.fromStep||E||S?null:this.getOverlayStepPath(this.fromStep);_&&(f.setAttribute("from",_),f.setAttribute("to",x)),f.setAttribute("lock","true")}f.onend=function(){f.removeAttribute("lock")},f.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===(o=this.currentStep)||void 0===o?void 0:o.height);if(!P){var A=getComputedStyle(a);["absolute","relative","fixed"].includes(A.getPropertyValue("position"))||a.classList.add(this.constructor.getRelativePositionClass())}return a.setAttribute("data-guidechimp-".concat(this.uid),"highlight"),this.elements.set("highlight",a),this}},{key:"resetHighlightStepEl",value:function(){var t,e,n,r,o,i=this.getEl("overlay");if(i){var a=i.querySelector("path"),s=i.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===(o=this.currentStep)||void 0===o?void 0:o.height)||c.classList.remove(this.constructor.getRelativePositionClass()),c.removeAttribute("data-guidechimp-".concat(this.uid)),this.elements.delete("highlight"),this}},{key:"setInteractionPosition",value:function(t){var e,n,r,o,i,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===(o=this.currentStep)||void 0===o?void 0:o.width,u=null===(i=this.currentStep)||void 0===i?void 0:i.height;if(!a&&s&&c&&l&&u){if(!t)return this;var p=this.options.padding,h=this.getViewportDims(),d=h.innerWidth,f=h.innerHeight,v=function(t,e){if("string"==typeof t&&t.trim().endsWith("%")){var n=parseFloat(t)||0;return"x"===e?n/100*d:n/100*f}return"number"==typeof t?t:parseFloat(t)||0},g=this.getRootEl(),y=g&&g!==document.body,m=v(this.currentStep.top,"y"),b=v(this.currentStep.left,"x"),S=v(this.currentStep.width,"x"),w=v(this.currentStep.height,"y"),x=t.style;return x.cssText=y?"position: absolute;\n width: ".concat(S+p,"px;\n height: ").concat(w+p,"px;\n top: ").concat(m-p/2,"px;\n left: ").concat(b-p/2,"px;\n z-index: 6403;"):"position: fixed;\n width: ".concat(S+p,"px;\n height: ").concat(w+p,"px;\n top: ").concat(m-p/2,"px;\n left: ").concat(b-p/2,"px;\n z-index: 6403;"),this}var k=this.getStepEl(this.currentStep);if(!t||!k)return this;var E=this.options.padding;"floating"===getComputedStyle(k).getPropertyValue("position")&&(E=0);var _=this.constructor.getOffset(k),O=_.width,P=_.height,A=_.top,C=_.left;return t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(k)),t.style.cssText="width: ".concat(O+E,"px;\n height: ").concat(P+E,"px;\n top: ").concat(A-E/2,"px;\n left: ").concat(C-E/2,"px;"),this}},{key:"setControlPosition",value:function(t){var e,n,r,o,i,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===(o=this.currentStep)||void 0===o?void 0:o.width,u=null===(i=this.currentStep)||void 0===i?void 0:i.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 d=this.options.padding;"floating"===getComputedStyle(h).getPropertyValue("position")&&(d=0);var f=h.ownerDocument.defaultView.pageXOffset,v=h.ownerDocument.documentElement.getBoundingClientRect().width,g=this.constructor.getOffset(h),y=g.height,m=g.top,b=g.left,S=g.right,w=y+d,x=m-d/2,k=f<f+(b-d/2)?f:b-d/2,E=f+v>f+(S+d/2)?v:S+d/2,_=Math.max(0,f+v-k);return E=Math.max(0,Math.min(E,_)),t.classList.toggle(this.constructor.getFixedClass(),this.constructor.isFixed(h)),t.style.cssText="width: ".concat(E,"px;\n height: ").concat(w,"px;\n top: ").concat(x,"px;\n left: ").concat(k,"px;"),this}},{key:"setTooltipPosition",value:function(t){var e,n,r,i,s,c,l,u,p=this,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.currentStep)return this;if(!t)return this;var d=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e){try{var o=e.style||{};if(o.transform&&-1!==o.transform.indexOf("translate(-50%"))return}catch(t){console.log(t)}var i,a,s=Math.max(n,0),c=p.getRootEl(),l=c&&c!==document.body,u=p.getViewportDims(),h=u.innerWidth,d=u.innerHeight,f=e.getBoundingClientRect(),v=f.width,g=f.height;if(l){var y=c.getBoundingClientRect();i=f.left-y.left,a=f.top-y.top}else i=f.left,a=f.top;var m=i,b=a,S=!1;i<s?(m=s,S=!0):i+v>h-s&&(m=Math.max(s,h-s-v),S=!0),a<s?(b=s,S=!0):a+g>d-s&&(b=Math.max(s,d-s-g),S=!0);var w=e.style;w.top&&"auto"!==w.top||(w.top="".concat(a,"px"),S=!0),w.left&&"auto"!==w.left||(w.left="".concat(i,"px"),S=!0),S&&(w.right="auto",w.bottom="auto",w.left="".concat(m,"px"),w.top="".concat(b,"px")),r<2&&(requestAnimationFrame((function(){var n,o,i=e.getBoundingClientRect();if(l){var a=c.getBoundingClientRect();n=i.left-a.left,o=i.top-a.top}else n=i.left,o=i.top;var u=i.width,p=i.height;(n<s||n+u>h-s||o<s||o+p>d-s)&&t(e,0,r+1)})),setTimeout((function(){return t(e,0,r+1)}),50))}},f=h.boundary,v=h.position,g=this.options.padding;f=f||window;var y=(v=(v=v||this.currentStep.position)||this.options.position).split("-"),m=a(y,2),b=m[0],S=m[1],w=t.style;w.top=null,w.right=null,w.bottom=null,w.left=null,w.transform=null,w.animation=null;var x=this.getStepEl(this.currentStep),k=x&&this.constructor.isFixed(x);if(w.position=k?"fixed":"absolute",w.zIndex="10001",w.visibility="hidden",this._tooltipShowTimer&&(clearTimeout(this._tooltipShowTimer),this._tooltipShowTimer=null),this.currentStep&&this.currentStep.element){var E=this.getStepEl(this.currentStep);if(E&&!this.isEl(E,"fakeStep")){var _=E.getBoundingClientRect(),O=_.bottom>0&&_.top<window.innerHeight&&_.right>0&&_.left<window.innerWidth;if(!O)return}}this._tooltipShowTimer=setTimeout((function(){p._tooltipShowTimer=null,w.visibility="visible"}),this.currentStep.delay||1e3);var P=document.getElementsByClassName("gc-overlay");if(P.length>0){var A=P[0];this.currentStep&&this.currentStep.isBackdrop?A.classList.remove("gc-overlay-hidden"):A.classList.add("gc-overlay-hidden")}(null===(e=this.currentStep)||void 0===e?void 0:e.dismissalSetting)===o.nL.dismissButtonClickOnly||(null===(n=this.currentStep)||void 0===n?void 0:n.dismissalSetting)===o.nL.buttonClickOnly?this.setOptions({exitOverlay:!1}):this.setOptions({exitOverlay:!0}),(null===(r=this.currentStep)||void 0===r?void 0:r.dismissalSetting)===o.nL.onOutsideClick&&this.setOptions({exitOverlay:!0});var C=this.currentStep.element,T=void 0!==(null===(i=this.currentStep)||void 0===i?void 0:i.top),I=void 0!==(null===(s=this.currentStep)||void 0===s?void 0:s.left),L=null===(c=this.currentStep)||void 0===c?void 0:c.width,R=null===(l=this.currentStep)||void 0===l?void 0:l.height;if(!C&&T&&I&&L&&R){var B,D,M,j=this.getRootEl(),N=j&&j!==document.body;t.setAttribute("data-guidechimp-position","top-left"),w.position=N?"absolute":"fixed",w.zIndex="10000",w.visibility="visible",w.pointerEvents="auto";var H=function(t,e){var n=p.getViewportDims(),r=n.innerWidth,o=n.innerHeight;if("string"==typeof t&&t.trim().endsWith("%")){var i=parseFloat(t)||0;return{isPct:!0,pct:i,px:"x"===e?i/100*r:i/100*o,raw:t.trim()}}var a="number"==typeof t?t:parseFloat(t)||0;return{isPct:!1,px:a,raw:"".concat(a,"px")}},W=H(this.currentStep.top,"y"),F=H(this.currentStep.left,"x"),z=H(this.currentStep.width,"x"),q=H(this.currentStep.height,"y"),$=z.px,V=q.px,U=W.px,K=F.px,G=this.options.padding,Y=t.getBoundingClientRect(),Z=Y.height,X=Y.width,J=this.getViewportDims(),Q=J.innerWidth,tt=J.innerHeight,et=Q-(F.px+$),nt=F.px,rt=tt-(W.px+V),ot=W.px;w.top="auto",w.left="auto",w.right="auto",w.bottom="auto";var it=this.currentStep.position||v||"right",at=ot>=Z+G,st=rt>=Z+G,ct=nt>=X+G,lt=et>=X+G;if("demo"!==(null===(B=this.currentStep)||void 0===B?void 0:B.type)&&!(null!==(D=this.currentStep.lockPosition)&&void 0!==D?D:this.options.lockPosition))if(at||st||ct||lt)switch(it){case"top":case"top-left":case"top-right":at||(st?it="bottom":lt?it="right":ct&&(it="left"));break;case"bottom":case"bottom-left":case"bottom-right":st||(at?it="top":lt?it="right":ct&&(it="left"));break;case"left":ct||(lt?it="right":st?it="bottom":at&&(it="top"));break;case"right":lt||(ct?it="left":st?it="bottom":at&&(it="top"))}else{var ut=Math.max(ot,rt,nt,et);it=ut===et?"right":ut===rt?"bottom":ut===nt?"left":"top"}var pt=20,ht=8,dt=K+$/2;switch(S=void 0,it){case"top":b="top",w.bottom="".concat(tt-U+G,"px"),w.left="".concat(K+$/2-X/2,"px");break;case"top-left":b="top",S="left",w.top="".concat(U-Z-G,"px"),w.left="".concat(dt-(X-pt-ht),"px");break;case"top-right":b="top",S="right",w.top="".concat(U-Z-G,"px"),w.left="".concat(dt-pt-ht,"px");break;case"bottom":b="bottom",w.top="".concat(U+V+G,"px"),w.left="".concat(K+$/2-X/2,"px");break;case"bottom-left":b="bottom",S="left",w.top="".concat(U+V+G,"px"),w.left="".concat(dt-(X-pt-ht),"px");break;case"bottom-right":b="bottom",S="right",w.top="".concat(U+V+G,"px"),w.left="".concat(dt-pt-ht,"px");break;case"left":b="left",w.top="".concat(U+V/2-Z/2,"px"),w.left="".concat(K-X,"px");break;case"center":b="center",w.top="".concat(U+V/2-Z/2,"px"),w.left="".concat(K+$/2-X/2,"px");break;default:b="right",w.top="".concat(U+V/2-Z/2,"px"),w.left="".concat(K+$+G,"px")}var ft=function(t,e,n){return Math.max(e,Math.min(t,n))},vt=null;if(w.top&&"auto"!==w.top)vt=parseFloat(w.top)||0;else if(w.bottom&&"auto"!==w.bottom){var gt=parseFloat(w.bottom)||0;vt=tt-gt-Z}var yt=null;if(w.left&&"auto"!==w.left)yt=parseFloat(w.left)||0;else if(w.right&&"auto"!==w.right){var mt=parseFloat(w.right)||0;yt=Q-mt-X}var bt=Q>=1024?0:Math.max(0,G||0);if(null!==vt){var St;if(null!==(St=this.currentStep.lockPosition)&&void 0!==St?St:this.options.lockPosition)w.top="".concat(vt,"px");else{var wt=ft(vt,bt,Math.max(bt,tt-Z-bt));w.top="".concat(wt,"px")}w.bottom="auto"}if(null!==yt){var xt;if(null!==(xt=this.currentStep.lockPosition)&&void 0!==xt?xt:this.options.lockPosition)w.left="".concat(yt,"px");else{var kt=ft(yt,bt,Math.max(bt,Q-X-bt));w.left="".concat(kt,"px")}w.right="auto"}if(t.setAttribute("data-guidechimp-position","".concat(b)),t.removeAttribute("data-guidechimp-alignment"),"left"!==S&&"right"!==S||t.setAttribute("data-guidechimp-alignment",S),P.length>0){var Et=P[0];this.currentStep&&this.currentStep.isBackdrop?Et.classList.remove("gc-overlay-hidden"):Et.classList.add("gc-overlay-hidden")}this.currentStep.animationType&&(w.animation=(0,o.ti)(this.currentStep.animationType));var _t=null!==(M=this.currentStep.lockPosition)&&void 0!==M?M:this.options.lockPosition,Ot="left"===S||"right"===S;return(!_t||N&&!Ot)&&d(t,0),this.alignTooltipCaret(t,b),this}if(!C&&(T||I)){t.setAttribute("data-guidechimp-position","top-left"),w.position="fixed",w.zIndex="10000",w.visibility="visible";var Pt=this.getRootEl(),At=Pt&&Pt!==document.body,Ct=this.getViewportDims(),Tt=Ct.innerWidth,It=Ct.innerHeight;if(w.position=At?"absolute":"fixed",T){var Lt,Rt=this.currentStep.top;Lt="string"==typeof Rt&&Rt.trim().endsWith("%")?(parseFloat(Rt)||0)/100*It:"number"==typeof Rt?Rt:parseFloat(Rt)||0,w.top="".concat(Lt,"px")}if(I){var Bt,Dt=this.currentStep.left;Bt="string"==typeof Dt&&Dt.trim().endsWith("%")?(parseFloat(Dt)||0)/100*Tt:"number"==typeof Dt?Dt:parseFloat(Dt)||0,w.left="".concat(Bt,"px")}if(P.length>0){var Mt=P[0];this.currentStep&&this.currentStep.isBackdrop?Mt.classList.remove("gc-overlay-hidden"):Mt.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(w.animation=(0,o.ti)(this.currentStep.animationType)),d(t,0),this}if(!(C||T||I)){var jt=this.getRootEl(),Nt=jt&&jt!==document.body;if(t.setAttribute("data-guidechimp-position","floating"),w.position=Nt?"absolute":"fixed",w.left="50%",w.top="50%",w.transform="translate(-50%, -50%)",w.zIndex="10000",w.visibility="visible",P.length>0){var Ht=P[0];this.currentStep&&this.currentStep.isBackdrop?Ht.classList.remove("gc-overlay-hidden"):Ht.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(w.animation=(0,o.ti)(this.currentStep.animationType)),d(t,0),this}var Wt,Ft,zt,qt=this.getStepEl(this.currentStep);if(!qt)return this;var $t=getComputedStyle(qt);"floating"===$t.getPropertyValue("position")&&(g=0);var Vt=this.isEl(qt,"fakeStep");if(Vt){if(t.setAttribute("data-guidechimp-position","floating"),w.position="fixed",w.left="50%",w.top="50%",w.transform="translate(-50%, -50%)",w.zIndex="10000",w.visibility="visible",P.length>0){var Ut=P[0];this.currentStep&&this.currentStep.isBackdrop?Ut.classList.remove("gc-overlay-hidden"):Ut.classList.add("gc-overlay-hidden")}return this.currentStep.animationType&&(w.animation=(0,o.ti)(this.currentStep.animationType)),d(t,0),this}var Kt=this.getElementVisibleRect(qt),Gt=Kt.top,Yt=Kt.bottom,Zt=Kt.left,Xt=Kt.right,Jt=Kt.width,Qt=Kt.height,te=t.getBoundingClientRect(),ee=te.height,ne=te.width,re=t.cloneNode(!0);re.style.visibility="hidden",re.innerHTML="",t.parentElement.appendChild(re);var oe=re.getBoundingClientRect(),ie=oe.width;re.parentElement.removeChild(re);var ae=new DOMRect(0,0,window.innerWidth,window.innerHeight);if(!(f instanceof Window)){var se=f.getBoundingClientRect(),ce=se.x,le=se.y;ae=new DOMRect(ce,le,f.scrollWidth,f.scrollHeight)}var ue=ae,pe=ue.top,he=ue.bottom,de=ue.left,fe=ue.right;if(this.isEl(qt,"fakeStep"))b="floating";else if("demo"===(null===(Wt=this.currentStep)||void 0===Wt?void 0:Wt.type)||(null!==(Ft=null===(zt=this.currentStep)||void 0===zt?void 0:zt.lockPosition)&&void 0!==Ft?Ft:this.options.lockPosition));else{var ve=["bottom","right","left","top"],ge=getComputedStyle(t),ye=ge.marginTop,me=ge.marginLeft,be=ge.marginRight,Se=ge.marginBottom;ye=parseInt(ye,10),me=parseInt(me,10),be=parseInt(be,10),ee+ye+(Se=parseInt(Se,10))>Gt-pe&&ve.splice(ve.indexOf("top"),1),ee+ye+Se>he-Yt&&ve.splice(ve.indexOf("bottom"),1);var we=ne;we+me+be>Zt-de&&ve.splice(ve.indexOf("left"),1),we+me+be>fe-Xt&&ve.splice(ve.indexOf("right"),1);var xe=b;if("top"!==(b=ve.length?ve.includes(b)?b:ve[0]:"floating")&&"bottom"!==b||"left"!==xe&&"right"!==xe||void 0!==S||(S=xe),"top"===b||"bottom"===b){var ke=["left","right","middle"];Zt-de<ie&&ke.splice(ke.indexOf("left"),1),fe-Xt<ie&&ke.splice(ke.indexOf("right"),1),(Zt+Jt/2-de<ie/2||fe-(Xt-Jt/2)<ie/2)&&ke.splice(ke.indexOf("middle"),1),void 0===S||(S=ke.length?ke.includes(S)?S:ke[0]:"middle")}}t.setAttribute("data-guidechimp-position",b),document.documentElement,this.currentStep.animationType&&(w.animation=(0,o.ti)(this.currentStep.animationType));var Ee=Gt+Qt/2,_e=Zt+Jt/2,Oe=null,Pe=null;switch(b){case"top":Oe=Math.round(Gt-ee-g),Pe=Math.round(_e-ne/2);break;case"right":Pe=Math.round(Xt+g),Oe=Math.round(Ee-ee/2);break;case"left":Pe=Math.round(Zt-ne-g),Oe=Math.round(Ee-ee/2);break;case"bottom":Oe=Math.round(Yt+g),Pe=Math.round(_e-ne/2);break;default:var Ae=this.getViewportDims(),Ce=Ae.innerWidth,Te=Ae.innerHeight;Pe=Math.round(Ce/2-ne/2),Oe=Math.round(Te/2-ee/2)}var Ie=20,Le=8;"top"!==b&&"bottom"!==b||("left"===S?Pe=Math.round(_e-(ne-Ie-Le)):"right"===S&&(Pe=Math.round(_e-Ie-Le)));var Re,Be,De=function(t,e,n){return Math.max(e,Math.min(t,n))},Me=window.pageYOffset||document.documentElement.scrollTop,je=window.pageXOffset||document.documentElement.scrollLeft,Ne=k?{top:0,left:0}:{top:Me,left:je};if(null!==Oe)if(null!==(Re=this.currentStep.lockPosition)&&void 0!==Re?Re:this.options.lockPosition)w.top="".concat(Oe+Ne.top,"px");else{var He=this.getViewportDims(),We=He.innerHeight,Fe=De(Oe,0,Math.max(0,We-ee));w.top="".concat(Fe+Ne.top,"px")}if(null!==Pe)if(null!==(Be=this.currentStep.lockPosition)&&void 0!==Be?Be:this.options.lockPosition)w.left="".concat(Pe+Ne.left,"px");else{var ze=this.getViewportDims(),qe=ze.innerWidth,$e=De(Pe,0,Math.max(0,qe-ne));w.left="".concat($e+Ne.left,"px")}if(t.removeAttribute("data-guidechimp-alignment"),S){var Ve;t.setAttribute("data-guidechimp-alignment",S);var Ue=this.getViewportDims(),Ke=Ue.innerWidth,Ge=(null!==(Ve=this.currentStep.lockPosition)&&void 0!==Ve?Ve:this.options.lockPosition)?function(t){return t}:function(t){return Math.max(0,Math.min(t,Ke-ne))};switch(S){case"left":var Ye=_e-(ne-Ie-Le);w.left="".concat(Ge(Ye)+Ne.left,"px");break;case"right":var Ze=_e-Ie-Le;w.left="".concat(Ge(Ze)+Ne.left,"px"),w.right="auto";break;default:var Xe=_e-ne/2;w.left="".concat(Ge(Xe)+Ne.left,"px")}}if(this.referenceEl)try{var Je=this.getRootEl(),Qe=Je.getBoundingClientRect(),tn=t.getBoundingClientRect(),en=Je.scrollTop||0,nn=Je.scrollLeft||0,rn=tn.top-Qe.top+en,on=tn.left-Qe.left+nn;w.top="".concat(Math.round(rn),"px"),w.left="".concat(Math.round(on),"px");try{var an=getComputedStyle(Je);"static"===an.position&&(Je.style.position="relative")}catch(t){}w.position="absolute"}catch(t){}var sn=this.getRootEl()&&this.getRootEl()!==document.body,cn=null!==(u=this.currentStep.lockPosition)&&void 0!==u?u:this.options.lockPosition,ln="left"===S||"right"===S;return(!cn||sn&&!ln)&&d(t,0),this.alignTooltipCaret(t,b),this}},{key:"colorTooltipCaret",value:function(t,e){if(!t)return this;var n=t.querySelector(".gc-tooltip-tail");if(!n||!this.currentStep||!this.currentStep.isCaret||n.classList.contains("gc-tooltip-tail-hidden"))return this;var r={top:{prop:"borderTopColor",edge:"bottom"},bottom:{prop:"borderBottomColor",edge:"top"},left:{prop:"borderLeftColor",edge:"right"},right:{prop:"borderRightColor",edge:"left"}};if(!r[e])return this;var o=t.querySelector(".gc-description table");if(o){var i=o.style.background||o.style.backgroundColor||window.getComputedStyle(o).backgroundColor,a=r[e],s=a.prop,c=function(t,e){if(!t||"transparent"===t)return"#ffffff";if(!t.includes("gradient"))return t;var n=t.match(/#[0-9a-fA-F]{3,8}|(?:rgba?|hsla?)\([^)]*\)/gi)||[];return 0===n.length?"#ffffff":"right"===e||"bottom"===e||"bottom-left"===e||"bottom-right"===e?n[n.length-1]:n[0]}(i,a.edge);n.style.borderTopColor="transparent",n.style.borderBottomColor="transparent",n.style.borderLeftColor="transparent",n.style.borderRightColor="transparent",n.style[s]=c}return this}},{key:"alignTooltipCaret",value:function(t,e){if(!t||!this.currentStep)return this;var n=t.querySelector(".gc-tooltip-tail");if(!n||!this.currentStep.isCaret||n.classList.contains("gc-tooltip-tail-hidden"))return this;if(!["top","bottom","left","right"].includes(e))return this;this.colorTooltipCaret(t,e);var r=this.getStepEl(this.currentStep),o=this.currentStep||{},i=!o.element&&void 0!==o.top&&void 0!==o.left&&o.width&&o.height;if(!r||this.isEl(r,"fakeStep")&&!i)return this;var a=this.getElementVisibleRect(r),s=t.getBoundingClientRect(),c=t.offsetWidth?s.width/t.offsetWidth:1,l=t.offsetHeight?s.height/t.offsetHeight:1;if(n.style.left="",n.style.right="",n.style.top="",n.style.bottom="",n.style.marginLeft="",n.style.marginTop="","top"===e||"bottom"===e){var u=a.left+a.width/2,p=t.offsetWidth,h=(u-s.left)/(c||1)-8,d=p-8-16;h=Math.max(8,Math.min(h,d)),n.style.left="".concat(Math.round(h),"px"),n.style.right="auto",n.style.marginLeft="0px"}else{var f=a.top+a.height/2,v=t.offsetHeight,g=(f-s.top)/(l||1)-8,y=v-8-16;g=Math.max(8,Math.min(g,y)),n.style.top="".concat(Math.round(g),"px"),n.style.bottom="auto",n.style.marginTop="0px"}return this}},{key:"startPreloader",value:function(){document.body.classList.add(this.constructor.getLoadingClass());var t=this.getEl("overlay");if(t){var e=t.querySelector("path"),n=t.querySelector("animate"),r=new Map;r.set("d",e.getAttribute("d")),e.setAttribute("d",this.getOverlayDocumentPath()),n&&(r.set("from",n.getAttribute("from")),r.set("to",n.getAttribute("to")),n.removeAttribute("from"),n.removeAttribute("to")),this.cache.set("preloaderCache",r)}var o=this.mountPreloaderEl();return o.hidden=!0,setTimeout((function(){o.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();this.setInteractionPosition(t),this.setControlPosition(e);var n=this.getEl("tooltip"),r=this.getRootEl();if(n&&n.parentElement&&n.parentElement!==r)try{r.appendChild(n)}catch(t){}return this.setTooltipPosition(this.getEl("tooltip")),this.applyRootWidthScale(),this.referenceEl&&this.startPositionPoll(),this.observeStep(),this.highlightStepEl(!0),this.startAutoNavigation(),this}},{key:"unmountStep",value:function(){this.resetHighlightStepEl(),this.stopPositionPoll(),this.stopAutoNavigation();try{this.removeEl("tooltip")}catch(t){}return 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]:{},o=(0,n.Z)(e,r);return o&&o.setAttribute("data-quidechimp-".concat(this.uid),t),o}},{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===document.body?this.getRootEl():e||this.getRootEl()).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(),f(f({},this.getDefaultTmplData()),t))}},{key:"mountFakeStepEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createFakeStepEl(t),this.getRootEl())}},{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,o=t.height,i=t.canvasWidth,a=t.canvasHeight;this.removeFakeStepEl();var s=this.createFakeStepEl(t);if(s&&void 0!==e&&void 0!==n&&r&&o){var c,l,u,p,h=this.getViewportDims(),d=h.innerWidth,f=h.innerHeight,v=this.getRootEl(),g=v&&v!==document.body,y=g?v.getBoundingClientRect():{left:0,top:0},m=g?v.offsetWidth||y.width||i||d:i||d,b=g?v.offsetHeight||y.height||a||f:a||f;c="string"==typeof e&&e.trim().endsWith("%")?(parseFloat(e)||0)/100*b:"number"==typeof e?e:parseFloat(e)||0,l="string"==typeof n&&n.trim().endsWith("%")?(parseFloat(n)||0)/100*m:"number"==typeof n?n:parseFloat(n)||0,u="string"==typeof r&&r.trim().endsWith("%")?(parseFloat(r)||0)/100*m:"number"==typeof r?r:parseFloat(r)||0,p="string"==typeof o&&o.trim().endsWith("%")?(parseFloat(o)||0)/100*b:"number"==typeof o?o:parseFloat(o)||0,s.style.cssText=g?"\n position: absolute !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 "):"\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,this.getRootEl())}},{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),this.getRootEl())}},{key:"removePreloaderEl",value:function(){return this.removeEl("preloader")}},{key:"getOverlayDocumentPath",value:function(){var t=this.getRootEl(),e=t&&t!==document.body,n=this.getViewportDims(),r=n.innerWidth,o=n.innerHeight;if(e)return"M 0 0 H ".concat(r," V ").concat(o," H 0 V 0 Z");var i=document.body,a=i.scrollWidth,s=i.scrollHeight,c=o>s?o:s;return"M 0 0 H ".concat(r>a?r:a," V ").concat(c," 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,n=this.options.padding;n=n?n/2:0;var r=t.top,o=t.left,i=t.width,a=t.height,s=this.getRootEl(),c=(s&&s!==document.body&&s.getBoundingClientRect(),function(t,n){if("string"==typeof t&&t.trim().endsWith("%")){var r=parseFloat(t)||0,o=e.getViewportDims(),i=o.innerWidth,a=o.innerHeight;return"x"===n?r/100*i:r/100*a}return"number"==typeof t?t:parseFloat(t)||0}),l=c(r,"y"),u=c(o,"x"),p=c(i,"x"),h=c(a,"y"),d=this.getOverlayDocumentPath();return d+="M ".concat(u+4," ").concat(l,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",").concat(4,"\n V ").concat(h+l-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",").concat(4,"\n H ").concat(p+u-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",-").concat(4,"\n V ").concat(l+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=this.getRootEl(),r=n&&n!==document.body,o=this.getElementVisibleRect(t),i=o.left,a=o.top,s=o.width,c=o.height;if(r){var l=n.getBoundingClientRect();i-=l.left,a-=l.top}var u=this.getOverlayDocumentPath(),p=Math.max(0,i-e+4),h=this.getViewportDims().innerWidth,d=Math.min(h,s+i+e-4);return u+="M ".concat(p," ").concat(a,"\n a ").concat(4,",").concat(4," 0 0 0 -").concat(4,",").concat(4,"\n V ").concat(c+a-4,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",").concat(4,"\n H ").concat(d,"\n a ").concat(4,",").concat(4," 0 0 0 ").concat(4,",-").concat(4,"\n V ").concat(a+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(),f(f({},r),n))}},{key:"mountOverlayEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.createOverlayEl(t),n=this.getRootEl(),r=n&&n!==document.body;return r&&e&&(e.style.setProperty("position","absolute","important"),e.style.setProperty("top","0","important"),e.style.setProperty("left","0","important"),e.style.setProperty("right","0","important"),e.style.setProperty("bottom","0","important")),this.mountEl(e,n)}},{key:"removeOverlayEl",value:function(){return this.removeEl("overlay")}},{key:"getInteractionTmpl",value:function(){return'<div if="!interaction" class="gc-interaction gc-disable"> </div>'}},{key:"createInteractionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.interaction;"boolean"==typeof this.currentStep.interaction&&(e=this.currentStep.interaction);var n=f(f({},this.getDefaultTmplData()),{},{interaction:e});return this.createEl("interaction",this.getInteractionTmpl(),f(f({},n),t))}},{key:"mountInteractionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createInteractionEl(t),this.getRootEl())}},{key:"removeInteractionEl",value:function(){return this.removeEl("interaction")}},{key:"getControlTmpl",value:function(){return'<div class="gc-control"> {{ tooltipEl }} </div>'}},{key:"createControlEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("control",this.getControlTmpl(),f(f({},this.getDefaultTmplData()),{},{tooltipEl:this.createTooltipEl(t)},t))}},{key:"mountControlEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.mountEl(this.createControlEl(t),this.getRootEl())}},{key:"removeControlEl",value:function(){return this.removeEl("control")}},{key:"getTooltipTmpl",value:function(){return"<div class=\"gc-tooltip\"> <div class=\"gc-tooltip-tail {{ !isCaret ? 'gc-tooltip-tail-hidden': '' }}\"></div> {{ description }} {{ close }} {{ copyright }} {{ customButtons }} {{ notification }} </div>"}},{key:"createTooltipEl",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=f(f({},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(),f(f({},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(),f(f({},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,o=(this.currentStepIndex+1)/this.steps.length*100,i=f(f({},this.getDefaultTmplData()),{},{showProgressbar:e,progressMax:n,progressMin:r,progress:o});return this.createEl("progressbar",this.getProgressbarTmpl(),f(f({},i),t))}},{key:"getTitleTmpl",value:function(){return'<div if="title" html="{{ title }}" class="gc-title"> </div>'}},{key:"createTitleEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep.title,n=void 0===e?"":e;return this.createEl("title",this.getTitleTmpl(),f(f({},this.getDefaultTmplData()),{},{title:n},t))}},{key:"getDescriptionTmpl",value:function(){return'<div if="description" html="{{ description }}" class="gc-description"></div>'}},{key:"createDescriptionEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep.description,n=void 0===e?"":e;return this.createEl("description",this.getDescriptionTmpl(),f(f({},this.getDefaultTmplData()),{},{description:n},t))}},{key:"getCustomButtonsTmpl",value:function(){return'<div if="buttons.length" class="gc-custom-buttons"> <template for="button in buttons"> {{ button }} </template> </div>'}},{key:"createCustomButtonsEl",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[];return this.currentStep.buttons&&this.currentStep.buttons.forEach((function(e){var o=e;if(!(0,r.Z)(o)){var i=e.onClick,a=e.tagName,s=void 0===a?"button":a,c=e.title,l=void 0===c?"":c,u=e.class;(o=document.createElement(s)).innerHTML=l,u&&(o.className=u),i&&o.addEventListener("click",(function(e){i.call(t,e)}))}n.push(o)})),this.createEl("customButtons",this.getCustomButtonsTmpl(),f(f({},this.getDefaultTmplData()),{},{buttons:n},e))}},{key:"getPaginationTmpl",value:function(){return'<div if="showPagination && steps.length > 1" class="gc-pagination"> <template if="paginationTheme === \'numbers\' || steps.length >= paginationCirclesMaxItems"> <ul class="gc-pagination-theme-numbers"> <template for="(step, index) in steps"> <template if="index === 0"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <template if="currentStepIndex < 3"> <template if="index > 0 && index < 5"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="index === 5 && index !== steps.length - 1" class="gc-pagination-dots"> ... </li> </template> <template elseif="steps.length - currentStepIndex < 5"> <template if="steps.length - index < 6 && steps.length - 1 !== index"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="steps.length - index === 6 && index !== 0" class="gc-pagination-dots"> ... </li> </template> <template else> <li if="currentStepIndex - index === 3 && index !== 0" class="gc-pagination-dots"> ... </li> <template elseif="(currentStepIndex - index >= 0 && currentStepIndex - index < 3)\n || ( index - currentStepIndex >= 0 && index - currentStepIndex < 3)"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> <li elseif="index - currentStepIndex === 3 && steps.length -1 !== index" class="gc-pagination-dots"> ... </li> </template> <template if="index + 1 === steps.length"> <li if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> <li elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"> {{ index + 1 }} </li> <li elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"> {{ index + 1 }} </li> <li else class="gc-pagination-item" @click="go(index, true, { event: $event })"> {{ index + 1 }} </li> </template> </template> </ul> </template> <template else> <div class="gc-pagination-theme-circles"> <template for="(step, index) in steps"> <div if="index === currentStepIndex" class="gc-pagination-item gc-pagination-item-current gc-pagination-active"></div> <div elseif="index === previousStepIndex" class="gc-pagination-item gc-pagination-item-previous" @click="previous({ event: $event })"></div> <div elseif="index === nextStepIndex" class="gc-pagination-item gc-pagination-item-next" @click="next({ event: $event })"></div> <div else class="gc-pagination-item" @click="go(index, true, { event: $event })"></div> </template> </div> </template> </div> '}},{key:"createPaginationEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.currentStep,n=e.paginationTheme,r=void 0===n?this.options.paginationTheme:n,o=e.paginationCirclesMaxItems,i=void 0===o?this.options.paginationCirclesMaxItems:o,a=this.options.showPagination;return"boolean"==typeof this.currentStep.showPagination&&(a=this.currentStep.showPagination),this.createEl("pagination",this.getPaginationTmpl(),f(f({},this.getDefaultTmplData()),{},{showPagination:a,paginationTheme:r,paginationCirclesMaxItems:i},t))}},{key:"getPreviousTmpl",value:function(){return"<div class=\"gc-navigation-prev {{ (!previousStep || !showNavigation) ? 'gc-hidden': '' }}\" @click=\"previous({ event: $event })\"></div>"}},{key:"createPreviousEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showNavigation;return"boolean"==typeof this.currentStep.showNavigation&&(e=this.currentStep.showNavigation),this.createEl("previous",this.getPreviousTmpl(),f(f({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"getNextTmpl",value:function(){return"<div class=\"gc-navigation-next {{ (!nextStep || !showNavigation) ? 'gc-hidden': '' }}\" @click=\"next({ event: $event })\"></div>"}},{key:"createNextEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.options.showNavigation;return"boolean"==typeof this.currentStep.showNavigation&&(e=this.currentStep.showNavigation),this.createEl("next",this.getNextTmpl(),f(f({},this.getDefaultTmplData()),{},{showNavigation:e},t))}},{key:"getCopyrightTmpl",value:function(){return'<div class="gc-copyright">Made with <a style="cursor: pointer; color: inherit !important;" href="https://pagepilot.fabbuilder.com" target="_blank">Page Pilot</a></div> '}},{key:"createCopyrightEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("copyright",this.getCopyrightTmpl(),f(f({},this.getDefaultTmplData()),t))}},{key:"getNotificationTmpl",value:function(){return'<div html="{{ messages[0] }}" class="gc-notification"></div>'}},{key:"createNotificationEl",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.createEl("notification",this.getNotificationTmpl(),f(f({},this.getDefaultTmplData()),{},{messages:this.notifications},t))}},{key:"notify",value:function(t){this.notifications.push(t);var e=this.getEl("notification");return e&&this.mountEl(this.createNotificationEl(),e.parentElement),this}},{key:"on",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.constructor.getEventListenersPriorities(),o=a(r,1),i=o[0];n.priority&&r.includes(n.priority)&&(i=n.priority);var s=t.trim();return this.listeners[s]=this.listeners[s]||{},this.listeners[s][i]=this.listeners[s][i]||[],this.listeners[s][i].push(e),this}},{key:"emit",value:function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var i=s(this.constructor.getEventListenersPriorities()).reverse(),a=t.trim(),c=[],l=Promise.resolve(c);return this.listeners[a]&&i.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=f(f({},t.constructor.getDefaultKeyboardCodes()),t.options.useKeyboard),o=r.previous,i=r.next,a=r.stop;a&&a.includes(n)?t.stop({event:e}):o&&o.includes(n)?t.previous({event:e}):i&&i.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:"addOnRootScrollListener",value:function(){var t=this,e=this.getRootEl();return e&&e!==document.body?(this.cache.set("onRootScrollListener",(function(){return t.refresh()})),e.addEventListener("scroll",this.cache.get("onRootScrollListener"),!0),this):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:"removeOnRootScrollListener",value:function(){var t=this.getRootEl();return t&&t!==document.body?(this.cache.has("onRootScrollListener")&&(t.removeEventListener("scroll",this.cache.get("onRootScrollListener"),!0),this.cache.delete("onRootScrollListener")),this):this}},{key:"removeListeners",value:function(){this.removeOnKeydownListener(),this.removeOnWindowResizeListener(),this.removeOnWindowScrollListener(),this.removeOnRootScrollListener(),this.stopPositionPoll(),this.stopAutoNavigation()}},{key:"startAutoNavigation",value:function(){var t,e=this;this.stopAutoNavigation();var n=null===(t=this.currentStep)||void 0===t?void 0:t.navigationMode;if("auto"!==n&&"both"!==n)return this;var r=this.options.navigationDelay;this.currentStep&&"number"==typeof this.currentStep.navigationDelay&&(r=this.currentStep.navigationDelay),("number"!=typeof r||r<=0)&&(r=3e3);var o=setTimeout((function(){e.isDisplayed&&e.nextStep&&e.next({event:"auto"})}),r);return this.cache.set("autoNavigationTimer",o),this}},{key:"stopAutoNavigation",value:function(){return this.cache.has("autoNavigationTimer")&&(clearTimeout(this.cache.get("autoNavigationTimer")),this.cache.delete("autoNavigationTimer")),this}},{key:"startPositionPoll",value:function(){var t=this;if(!this.referenceEl)return this;if(this.cache.has("positionPoll"))return this;var e={rafId:null,lastKey:null};return e.rafId=requestAnimationFrame((function n(){try{var r=t.getElementVisibleRect(t.referenceEl),o="".concat(Math.round(r.left),"|").concat(Math.round(r.top),"|").concat(Math.round(r.width),"|").concat(Math.round(r.height));if(e.lastKey!==o&&(e.lastKey=o,t.refresh()),t.currentStep&&t.currentStep.element){var i=t.getStepEl(t.currentStep);if(i&&!t.isEl(i,"fakeStep")){var a=i.getBoundingClientRect(),s=a.bottom>0&&a.top<window.innerHeight&&a.right>0&&a.left<window.innerWidth,c=t.getEl("tooltip");c&&(s||(t._tooltipShowTimer&&(clearTimeout(t._tooltipShowTimer),t._tooltipShowTimer=null),c.style.visibility="hidden"))}}}catch(t){}e.rafId=requestAnimationFrame(n)})),this.cache.set("positionPoll",e),this}},{key:"stopPositionPoll",value:function(){var t=this.cache.get("positionPoll");if(t){try{t.rafId&&cancelAnimationFrame(t.rafId)}catch(t){}this.cache.delete("positionPoll")}return this}},{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;if(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);var r=this.getEl("tooltip");return r&&n.observe(r,e),!0}return!1}},{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.applyRootWidthScale(),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:4,scrollPadding:10,scrollBehavior:"auto",apiHost:"https://ahd-be-jggub5n6qq-em.a.run.app",lockPosition:!1,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:"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,o=e.defaultView,i=o.pageYOffset||r.scrollTop||n.scrollTop,a=o.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+i,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(i.prototype,c),l&&y(i,l),Object.defineProperty(i,"prototype",{writable:!1}),t}(),S=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 o={v:n,t:this._getNow(),kt:r};this.persistent?localStorage.setItem(e,JSON.stringify(o)):this._lootBag[e]=o},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],o=localStorage.getItem(r);try{var i=JSON.parse(o);if(!("v"in i&&"t"in i&&"kt"in i))continue;null===this._ttl&&null===i.kt||this._isCacheStale(i)&&(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)}),x=(new(function(t){function e(){return t.call(this,false)||this}return w(e,t),e}(S)),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)}}()),k=new(function(t){function e(){return t.call(this,true)||this}return x(e,t),e}(S)),E=__webpack_require__(219);function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}function 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 A(t,e,n){return e&&P(t.prototype,e),n&&P(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function C(){return C="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=T(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},C.apply(this,arguments)}function T(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=D(t)););return t}function I(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 R(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=D(t);if(e){var o=D(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return B(this,n)}}function B(t,e){if(e&&("object"===_(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function D(t){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(t)}const M=function(t,e){e.beacons=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new(function(e){I(r,e);var n=R(r);function r(){return O(this,r),n.apply(this,arguments)}return A(r,[{key:"getDataBeacons",value:function(t){var e=this,n=C(D(r.prototype),"getDataBeacons",this).call(this,t);return n.forEach((function(t){var n=t.id,r=t.element,o="",i="".concat(e.constructor.getBeaconDataPrefix(),"-tour"),a="".concat(e.constructor.getBeaconDataPrefix(),"-").concat(n,"-tour");r.attributes[i]&&(o=r.attributes[i].value);r.attributes[a]&&(o=r.attributes[a].value);o&&(t.tour=o)})),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"===_(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,i=null==e?void 0:e.trigger,a=function(){return r.runGuide(e,n)},s=null;try{s=null!=e&&e.element?e.element instanceof HTMLElement?e.element:document.querySelector(e.element):null}catch(t){s=null}var c=s||t;switch(i){case o.$h.onClick:c.addEventListener("click",a),c!==t&&t.addEventListener("click",a,!0);break;case o.$h.onHover:case o.$h.onMouseEnter:c.addEventListener("mouseenter",a),c!==t&&t.addEventListener("mouseenter",a);break;case o.$h.onMouseLeave:c.addEventListener("mouseleave",a),c!==t&&t.addEventListener("mouseleave",a);break;case o.$h.onLongPress:var l,u=function(){return l=setTimeout(a,600)},p=function(){return clearTimeout(l)};c.addEventListener("mousedown",u),c.addEventListener("mouseup",p),c.addEventListener("mouseleave",p),c.addEventListener("touchstart",u),c.addEventListener("touchend",p),c!==t&&(t.addEventListener("mousedown",u),t.addEventListener("mouseup",p),t.addEventListener("mouseleave",p),t.addEventListener("touchstart",u),t.addEventListener("touchend",p));break;case o.$h.onPageLoad:"loading"===document.readyState?document.addEventListener("DOMContentLoaded",a):a();break;default:console.warn("Unsupported trigger: ".concat(i))}}},{key:"createBeaconEl",value:function(e){var n=C(D(r.prototype),"createBeaconEl",this).call(this,e);return this.attachGuideEvent(n,e,t),n}}]),r}(E.Z))(e,n)}};var j=Array.from(new Set(Object.values({MODERN_SANS:"Inter",BOOK_SANS:"Source Sans Pro",ORGANIC_SANS:"Nunito",GEOMETRIC_SANS:"Montserrat",HEAVY_SANS:"Oswald",ROUNDED_SANS:"Rubik",MODERN_SERIF:"Playfair Display",BOOK_SERIF:"Merriweather",MONOSPACE:"Roboto Mono",ROBOTO:"Roboto",OPEN_SANS:"Open Sans",LATO:"Lato",POPPINS:"Poppins",INTER:"Inter",MONTSERRAT:"Montserrat",RALEWAY:"Raleway",NUNITO:"Nunito",PLAYFAIR_DISPLAY:"Playfair Display",MERRIWEATHER:"Merriweather",PT_SANS:"PT Sans",OSWALD:"Oswald",SOURCE_SANS_PRO:"Source Sans Pro",RUBIK:"Rubik",WORK_SANS:"Work Sans",NOTO_SANS:"Noto Sans",DANCING_SCRIPT:"Dancing Script",PACIFICO:"Pacifico",LOBSTER:"Lobster",BEBAS_NEUE:"Bebas Neue"})));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 H(t,e,n){return H=nt()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Q(o,n.prototype),o},H.apply(null,arguments)}function W(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,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(t,e)||z(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 F(t){return function(t){if(Array.isArray(t))return q(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||z(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 z(t,e){if(t){if("string"==typeof t)return q(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)?q(t,e):void 0}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $(t,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 V(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$(Object(n),!0).forEach((function(e){ot(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function U(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */U=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=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 o=e&&e.prototype instanceof p?e:p,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return _()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=S(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),i}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 d(){}var f={};s(f,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(E([])));g&&g!==e&&n.call(g,o)&&(f=g);var y=d.prototype=p.prototype=Object.create(f);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(o,i,a,s){var c=l(t[o],t,i);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 o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function S(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return 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 o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:_}}function _(){return{value:void 0,done:!0}}return h.prototype=d,s(y,"constructor",d),s(d,"constructor",h),h.displayName=s(d,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,d):(t.__proto__=d,s(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(b.prototype),s(b.prototype,i,(function(){return this})),t.AsyncIterator=b,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new b(c(e,n,r,o),i);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,o,(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=E,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!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 o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.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),x(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 o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}function K(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}function G(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){K(i,r,o,a,s,"next",t)}function s(t){K(i,r,o,a,s,"throw",t)}a(void 0)}))}}function Y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Z(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 X(){return X="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=J(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},X.apply(this,arguments)}function J(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=rt(t)););return t}function Q(t,e){return Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Q(t,e)}function tt(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 et(t)}function et(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nt(){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 rt(t){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rt(t)}function ot(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var it=__webpack_require__(68).match,at="AHD_TOUR_DATA",st="AHD_HIGHLIGHTS_DATA",ct="AHD_VISITOR_STATS",lt=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&&Q(t,e)}(I,t);var e,n,r,o,i,a,s,c,l,u,p,h,d,f,v,g,y,m,b,S,w,x,E,_,O,P,A,C,T=(e=I,n=nt(),function(){var t,r=rt(e);if(n){var o=rt(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return tt(this,t)});function I(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Y(this,I),n.userId&&!n.visitorId&&(n.visitorId=n.userId),n.language||(n.language=""),ot(et(e=T.call(this,t,n)),"_lastPageUrl",""),ot(et(e),"_lastRenderedIdentifier",""),I._instances.add(et(e)),e.attachPlugins(),e}return r=I,o=[{key:"stop",value:function(){for(var t,e=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];this.isDisplayed&&((t=X(rt(I.prototype),"stop",this)).call.apply(t,[this].concat(r)),this.removeModalBanner()),I._instances.forEach((function(t){if(t!==e)try{t.isDisplayed&&t.stop.apply(t,r)}catch(t){}}))}},{key:"attachPlugins",value:function(){[M].forEach((function(t){ut.extend(t)}))}},{key:"initializeSiteMap",value:(C=G(U().mark((function t(e){var n,r;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(k.get(st),(n=k.get(at))&&!e){t.next=7;break}return t.next=6,this.fetchAndCacheTourData(n);case 6:n=t.sent;case 7:if((r=k.get(ct))&&!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 C.apply(this,arguments)})},{key:"getHelpContent",value:(A=G(U().mark((function t(e,n){var r,o;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((r=k.get(at))&&!n){t.next=5;break}return t.next=4,this.fetchAndCacheTourData(r);case 4:r=t.sent;case 5:return o=this.getApplicabeDataForUrl(r,e,"help",!0),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e){return A.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:(P=G(U().mark((function t(e){var n,r,o,i,a,s,c=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._lastPageUrl=e,t.next=3,this.stop();case 3:if((n=k.get(at))&&n.tours&&Array.isArray(n.tours)){t.next=6;break}return t.abrupt("return");case 6:(null==(r=this.getApplicabeDataForUrl(n.tours,e,!0))?void 0:r.length)>0&&(o=k.get(ct)||{},i=(null==o?void 0:o.visited)||[],a=new Set(i),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)}})),k.put(ct,V(V({},o),{},{visited:F(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,o,i,a,s,l,u,p,h;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===(o=e.styles)||void 0===o?void 0:o.top)||e.top),left:c.normalizeDimension((null===(i=e.styles)||void 0===i?void 0:i.left)||e.left),stepId:e.id,id:t.id,type:t.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,navigationMode:(null==e||null===(u=e.behaviour)||void 0===u?void 0:u.navigationMode)||e.navigationMode,navigationDelay:(null==e||null===(p=e.behaviour)||void 0===p?void 0:p.navigationDelay)||e.navigationDelay,showStep:null==e||null===(h=e.behaviour)||void 0===h?void 0:h.showStep}})):[]})),console.log("Tour",s),this.setTour(s),this.start());case 8:case"end":return t.stop()}}),t,this)}))),function(t){return P.apply(this,arguments)})},{key:"showAppBanner",value:(O=G(U().mark((function t(e,n){var r,o,i;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((o=k.get(at))&&!n){t.next=5;break}return t.next=4,this.fetchAndCacheTourData(o,e,!1);case 4:o=t.sent;case 5:return i=Array.isArray(null===(r=o)||void 0===r?void 0:r.appBanners)?o.appBanners.filter((function(t){return t.identifier===e})):[],t.abrupt("return",i);case 7:case"end":return t.stop()}}),t,this)}))),function(t,e){return O.apply(this,arguments)})},{key:"handleBannerClick",value:function(t){var e=t.target.closest("[data-action]");if(e){var n=e.getAttribute("data-action");if(n){var r=function(){try{return JSON.parse(e.getAttribute("data-action-payload")||"{}")}catch(t){return{}}};if("postMessageEvent"===n){var o=e.getAttribute("data-post-message-event")||r().postMessageEvent;return console.log("[AHDjs] postMessageEvent eventName:",o),void(o&&(t.stopPropagation(),window.postMessage({type:o},"*"),console.log("[AHDjs] postMessage sent:",{type:o})))}if("goToStep"!==n)return"onNextStep"===n?(t.stopPropagation(),void this.stepBannerSlide(1)):"onPrevStep"===n?(t.stopPropagation(),void this.stepBannerSlide(-1)):"onCloseStep"===n?(t.stopPropagation(),void this.closeActiveBanner()):void 0;var i=e.getAttribute("data-goto-step")||r().goToStep,a=parseInt(i,10)-1;!isNaN(a)&&a>=0&&(t.stopPropagation(),this.goToBannerSlide(a))}}}},{key:"goToBannerSlide",value:function(t){var e=this._ahd_carousel;e&&"function"==typeof e.goTo&&e.goTo(t)}},{key:"stepBannerSlide",value:function(t){var e=this._ahd_carousel;e&&"function"==typeof e.goTo&&e.state&&e.goTo(e.state.index+t)}},{key:"closeActiveBanner",value:function(){if(document.querySelector('[data-ahd-modal="true"]'))this.removeModalBanner();else if(document.querySelector('[data-ahd-floater="true"]'))this.removeFloaterBanner();else{var t=document.querySelector('[data-ahd-simple-banner="true"]');if(t){var e=this._ahd_active_banner;e&&e.bannerId&&this.acknowledgeAppBanner(e.bannerId,e.slideIds||[]),t.remove(),delete this._ahd_active_banner}}}},{key:"renderAppBanner",value:(_=G(U().mark((function t(e,n){var r,o,i,a,s,c,l,u,p,h,d,f,v,g,y,m,b,S,w,x,E,_,O,P,A=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this._lastRenderedIdentifier=e,a=k.get(at),!n){t.next=6;break}return t.next=5,this.fetchAndCacheTourData(a,e,!1);case 5:a=t.sent;case 6:if(s=Array.isArray(null===(r=a)||void 0===r?void 0:r.appBanners)?a.appBanners.filter((function(t){return t.identifier===e})):[],c=Array.isArray(s)?s[0]:s,l=(null==c||null===(o=c.content)||void 0===o?void 0:o.content)||(null==c?void 0:c.content)||(Array.isArray(null==c?void 0:c.slides)?null===(i=c.slides.find((function(t){return t&&t.content})))||void 0===i?void 0:i.content:void 0),"carousel"===(null==c?void 0:c.type))this.renderCarouselBanner(c,e);else if("modal"===(null==c?void 0:c.type))this.renderModalBanner(l,c);else if("floater"===(null==c?void 0:c.type))this.renderFloaterBanner(l,c);else if(e){console.log("Rendering banner in ",e),u=null;try{u=document.querySelector(e)}catch(t){u=null}if(!u&&e&&!e.startsWith("#"))try{u=document.querySelector("#"+e)}catch(t){u=null}u&&l&&(null!=c&&c.type&&"simpleBanner"!==(null==c?void 0:c.type)?(u.innerHTML=l,u.addEventListener("click",(function(t){return A.handleBannerClick(t)}))):(v=(null==c?void 0:c.id)||(null==c?void 0:c._id),g=Array.isArray(null==c?void 0:c.slides)?c.slides.map((function(t){return t.id||t._id})).filter(Boolean):[],(y=document.createElement("div")).className="gc-simple-banner",y.setAttribute("data-ahd-simple-banner","true"),y.style.position="relative",y.innerHTML=l,m=(null==c||null===(p=c.slides)||void 0===p||null===(h=p[0])||void 0===h?void 0:h.behaviour)||(null==c?void 0:c.behaviour)||{},b=(null==m?void 0:m.showCloseIcon)||(null==c||null===(d=c.slides)||void 0===d||null===(f=d[0])||void 0===f?void 0:f.showCloseIcon)||(null==c?void 0:c.showCloseIcon),console.log("Closing banner ",v,g),b&&((w=document.createElement("div")).className="gc-close",w.style.position="absolute",w.style.top="0",w.style.right="0",w.style.cursor="pointer",w.style.zIndex="10",w.style.setProperty("--gc-close-foreground",(null==m?void 0:m.iconCloseColor)||(null==c||null===(S=c.styles)||void 0===S?void 0:S.iconCloseColor)||"#000"),w.addEventListener("click",(function(){v&&A.acknowledgeAppBanner(v,g),y.remove(),delete A._ahd_active_banner})),y.appendChild(w)),u.innerHTML="",u.appendChild(y),y.addEventListener("click",(function(t){return A.handleBannerClick(t)}))))}return c&&(x=c.id||c._id,E=Array.isArray(c.slides)?c.slides.map((function(t){return t.id||t._id})).filter(Boolean):[],this._ahd_active_banner={bannerId:x,slideIds:E},_=!(null!=c&&c.type)||"simpleBanner"===(null==c?void 0:c.type),O="modal"===(null==c?void 0:c.type),P="floater"===(null==c?void 0:c.type),_||O||P||this.acknowledgeAppBanner(x,E)),t.abrupt("return",s);case 12:case"end":return t.stop()}}),t,this)}))),function(t,e){return _.apply(this,arguments)})},{key:"renderCarouselBanner",value:(E=G(U().mark((function t(e,n){var r,o,i,a,s,c,l,u,p,h,d,f,v,g,y,m,b,S,w,x,k,E,_,O,P=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.destroyCarousel(),(a=Array.isArray(e.slides)?e.slides:[]).length){t.next=4;break}return t.abrupt("return");case 4:if((s=document.createElement("div")).className="gc-carousel",s.setAttribute("data-ahd-carousel","true"),s.setAttribute("role","region"),s.setAttribute("aria-roledescription","carousel"),s.setAttribute("aria-label",e.title||"Carousel"),(c=document.createElement("div")).className="gc-carousel-slides",c.setAttribute("data-current-index","0"),a.forEach((function(t,e){var n,r=document.createElement("div");r.className="gc-carousel-slide",r.setAttribute("data-slide-index",String(e));var o=(null==t||null===(n=t.content)||void 0===n?void 0:n.content)||(null==t?void 0:t.content)||"";r.innerHTML=o,r.addEventListener("click",(function(t){return P.handleBannerClick(t)})),c.appendChild(r)})),(l=document.createElement("button")).className="gc-carousel-prev",l.setAttribute("aria-label","Previous slide"),l.innerText="‹",(u=document.createElement("button")).className="gc-carousel-next",u.setAttribute("aria-label","Next slide"),u.innerText="›",(p=document.createElement("div")).className="gc-carousel-indicators",a.forEach((function(t,e){var n=document.createElement("button");n.className="gc-carousel-indicator",n.setAttribute("data-slide",String(e)),n.setAttribute("aria-label","Go to slide ".concat(e+1)),0===e&&n.setAttribute("aria-current","true"),p.appendChild(n)})),s.appendChild(c),s.appendChild(l),s.appendChild(u),s.appendChild(p),"modal"===(null==e||null===(r=e.behaviour)||void 0===r?void 0:r.renderAs)||!n&&"carousel"===(null==e?void 0:e.type))this.removeModalBanner(),(d=document.createElement("div")).className="gc-modal-overlay",d.setAttribute("data-ahd-modal","true"),(f=document.createElement("div")).className="gc-modal",(v=document.createElement("div")).className="gc-close",v.style.setProperty("--gc-close-foreground",(null==e||null===(h=e.styles)||void 0===h?void 0:h.iconCloseColor)||"#000"),v.addEventListener("click",(function(){return P.removeModalBanner()})),(g=document.createElement("div")).className="gc-modal-content",g.appendChild(s),g.appendChild(v),f.appendChild(g),d.appendChild(f),d.addEventListener("click",(function(t){t.target===d&&P.removeModalBanner()})),document.addEventListener("keydown",(function t(e){"Escape"===e.key&&document.removeEventListener("keydown",t)})),document.body.style.overflow="hidden",document.body.appendChild(d);else if(n){y=null;try{y=document.querySelector(n)}catch(t){y=null}if(!y&&!n.startsWith("#"))try{y=document.querySelector("#"+n)}catch(t){y=null}y&&(y.innerHTML="",y.appendChild(s))}m={index:0,slidesCount:a.length,slidesWrap:c,timer:null},b=function(t){if(m){var e=(t%m.slidesCount+m.slidesCount)%m.slidesCount;m.index=e;var n=100*-e;m.slidesWrap.style.transform="translateX(".concat(n,"%)"),p.querySelectorAll(".gc-carousel-indicator").forEach((function(t,n){n===e?t.setAttribute("aria-current","true"):t.removeAttribute("aria-current")}))}},l.addEventListener("click",(function(){return b(m.index-1)})),u.addEventListener("click",(function(){return b(m.index+1)})),p.querySelectorAll(".gc-carousel-indicator").forEach((function(t){t.addEventListener("click",(function(t){var e=t.currentTarget,n=parseInt(e.getAttribute("data-slide")||"0",10);b(n)}))})),S=!(null==e||null===(o=e.behaviour)||void 0===o||!o.autoplay),w=(null==e||null===(i=e.behaviour)||void 0===i?void 0:i.autoplayDelay)||5e3,S&&(m.timer=window.setInterval((function(){return b(m.index+1)}),w),s.addEventListener("mouseenter",(function(){m.timer&&clearInterval(m.timer)})),s.addEventListener("mouseleave",(function(){m.timer=window.setInterval((function(){return b(m.index+1)}),w)}))),x=0,k=0,E=function(t){x=t.touches[0].clientX},_=function(t){k=t.touches[0].clientX-x},O=function(){k>50?b(m.index-1):k<-50&&b(m.index+1),x=0,k=0},s.addEventListener("touchstart",E,{passive:!0}),s.addEventListener("touchmove",_,{passive:!0}),s.addEventListener("touchend",O),this._ahd_carousel={carousel:s,state:m,goTo:b,handlers:{onTouchStart:E,onTouchMove:_,onTouchEnd:O}};case 49:case"end":return t.stop()}}),t,this)}))),function(t,e){return E.apply(this,arguments)})},{key:"destroyCarousel",value:function(){var t=this._ahd_carousel;if(t){try{var e=t.carousel,n=t.state,r=t.handlers;n&&n.timer&&clearInterval(n.timer),e&&(e.removeEventListener("touchstart",r.onTouchStart),e.removeEventListener("touchmove",r.onTouchMove),e.removeEventListener("touchend",r.onTouchEnd),e.parentElement&&e.parentElement.removeChild(e))}catch(t){}delete this._ahd_carousel}}},{key:"renderModalBanner",value:(x=G(U().mark((function t(e,n){var r,o,i,a,s,c,l,u,p,h,d,f,v,g,y,m,b,S,w=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.removeModalBanner(),e){t.next=3;break}return t.abrupt("return");case 3:(h=document.createElement("div")).className="gc-modal-overlay",h.setAttribute("data-ahd-modal","true"),(d=document.createElement("div")).className="gc-modal",null!=n&&null!==(r=n.styles)&&void 0!==r&&r.width&&(d.style.width=this.normalizeDimensionToStyle(n.styles.width)),null!=n&&null!==(o=n.styles)&&void 0!==o&&o.height&&(d.style.height=this.normalizeDimensionToStyle(n.styles.height)),f=(null==n||null===(i=n.slides)||void 0===i||null===(a=i[0])||void 0===a?void 0:a.behaviour)||(null==n?void 0:n.behaviour)||{},v=null!==(s=null!==(c=null==f?void 0:f.showCloseIcon)&&void 0!==c?c:null==n||null===(l=n.slides)||void 0===l||null===(u=l[0])||void 0===u?void 0:u.showCloseIcon)&&void 0!==s?s:null==n?void 0:n.showCloseIcon,g=(null==f?void 0:f.iconCloseColor)||(null==n||null===(p=n.styles)||void 0===p?void 0:p.iconCloseColor)||"#000",(y=document.createElement("div")).className="gc-modal-content",y.innerHTML=e,y.addEventListener("click",(function(t){return w.handleBannerClick(t)})),(m=y.querySelector('[data-action="onCloseStep"]'))&&m.addEventListener("click",(function(t){t.stopPropagation(),w.removeModalBanner()})),d.appendChild(y),h.appendChild(d),b=function(){if(!m&&!1!==v&&h.isConnected){var t=document.createElement("div");t.className="gc-close",t.style.setProperty("--gc-close-foreground",g),t.addEventListener("click",(function(){return w.removeModalBanner()}));var e=y.querySelector("td.email-layout-content")||y.querySelector("tbody");e?("static"===getComputedStyle(e).position&&(e.style.position="relative"),e.appendChild(t)):y.appendChild(t)}},requestAnimationFrame((function(){return requestAnimationFrame(b)})),h.addEventListener("click",(function(t){t.target===h&&w.removeModalBanner()})),S=function t(e){"Escape"===e.key&&(w.removeModalBanner(),document.removeEventListener("keydown",t))},document.addEventListener("keydown",S),document.body.style.overflow="hidden",document.body.appendChild(h);case 28:case"end":return t.stop()}}),t,this)}))),function(t,e){return x.apply(this,arguments)})},{key:"removeModalBanner",value:function(){var t=this._ahd_active_banner;if(t){var e=t.bannerId,n=t.slideIds;this.acknowledgeAppBanner(e,n),delete this._ahd_active_banner}var r=document.querySelector('[data-ahd-modal="true"]');r&&(r.remove(),document.body.style.overflow=""),this.removeFloaterBanner()}},{key:"renderFloaterBanner",value:(w=G(U().mark((function t(e,n){var r,o,i,a,s,c,l,u,p,h,d,f,v,g,y,m,b,S,w,x,k,E,_,O,P,A,C,T,I,L,R,B,D,M,j,N,H,F,z,q=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.removeFloaterBanner(),e){t.next=3;break}return t.abrupt("return");case 3:w=["top-left","top-right","bottom-left","bottom-right","top-center","bottom-center","left-center","right-center","center"],x=Array.isArray(null==n?void 0:n.slides)?n.slides[0]:null,k=null!==(r=null==x||null===(o=x.contentMetadata)||void 0===o||null===(i=o.document)||void 0===i||null===(a=i.root)||void 0===a||null===(s=a.data)||void 0===s?void 0:s.behaviour)&&void 0!==r?r:{},E=null!==(c=null==x?void 0:x.behaviour)&&void 0!==c?c:{},_=null!==(l=null==n?void 0:n.behaviour)&&void 0!==l?l:{},O=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.find((function(t){return null!=t}))},P=null!==(u=O(E.position,k.position,null==x?void 0:x.position,_.position,null==n?void 0:n.position,null==n||null===(p=n.styles)||void 0===p?void 0:p.position))&&void 0!==u?u:"bottom-right",A=String(P).toLowerCase(),C=w.includes(A)?A:"bottom-right",(T=document.createElement("div")).className="gc-floater gc-floater-".concat(C),T.setAttribute("data-ahd-floater","true"),T.setAttribute("data-position",C),null!=n&&null!==(h=n.styles)&&void 0!==h&&h.width&&(T.style.width=this.normalizeDimensionToStyle(n.styles.width)),null!=n&&null!==(d=n.styles)&&void 0!==d&&d.height&&(T.style.height=this.normalizeDimensionToStyle(n.styles.height)),I=this.normalizeDimensionToStyle(null!==(f=O(E.offsetY,k.offsetY,null==x?void 0:x.offsetY,_.offsetY,null==n?void 0:n.offsetY,null==n||null===(v=n.styles)||void 0===v?void 0:v.offsetY,null==n?void 0:n.offset,null==n||null===(g=n.styles)||void 0===g?void 0:g.offset))&&void 0!==f?f:20),L=this.normalizeDimensionToStyle(null!==(y=O(E.offsetX,k.offsetX,null==x?void 0:x.offsetX,_.offsetX,null==n?void 0:n.offsetX,null==n||null===(m=n.styles)||void 0===m?void 0:m.offsetX,null==n?void 0:n.offset,null==n||null===(b=n.styles)||void 0===b?void 0:b.offset))&&void 0!==y?y:20),R=function(t,e){T.style[t]=e},t.t0=C,t.next="center"===t.t0?24:"top-center"===t.t0?28:"bottom-center"===t.t0?32:"left-center"===t.t0?36:"right-center"===t.t0?40:44;break;case 24:return R("top","50%"),R("left","50%"),T.style.transform="translate(-50%, -50%)",t.abrupt("break",47);case 28:return R("top",I),R("left","50%"),T.style.transform="translateX(-50%)",t.abrupt("break",47);case 32:return R("bottom",I),R("left","50%"),T.style.transform="translateX(-50%)",t.abrupt("break",47);case 36:return R("top","50%"),R("left",L),T.style.transform="translateY(-50%)",t.abrupt("break",47);case 40:return R("top","50%"),R("right",L),T.style.transform="translateY(-50%)",t.abrupt("break",47);case 44:B=C.split("-"),D=W(B,2),M=D[0],j=D[1],R(M,I),R(j,L);case 47:N=String(null!==(S=O(E.animationType,k.animationType,null==x?void 0:x.animationType,_.animationType,null==n?void 0:n.animationType))&&void 0!==S?S:"fadeIn"),H={fadeIn:"fadeIn",slide:"slideUp",slideDown:"slideDown",slideLeft:"slideLeft",slideRight:"slideRight"},"instant"===N?T.style.animation="none":H[N]&&(T.style.animation="".concat(H[N]," 0.3s ease-out")),(F=document.createElement("div")).className="gc-floater-content",F.innerHTML=e,F.addEventListener("click",(function(t){return q.handleBannerClick(t)})),(z=F.querySelector('[data-action="onCloseStep"]'))&&z.addEventListener("click",(function(t){t.stopPropagation(),q.removeFloaterBanner()})),T.appendChild(F),document.body.appendChild(T);case 58:case"end":return t.stop()}}),t,this)}))),function(t,e){return w.apply(this,arguments)})},{key:"removeFloaterBanner",value:function(){var t=document.querySelector('[data-ahd-floater="true"]');if(t){var e=this._ahd_active_banner;if(e){var n=e.bannerId,r=e.slideIds;this.acknowledgeAppBanner(n,r),delete this._ahd_active_banner}t.remove()}}},{key:"normalizeDimensionToStyle",value:function(t){if(null==t)return"";if("string"==typeof t){var e=t.trim();return/[a-z%]/i.test(e)?e:"".concat(e,"px")}return"number"==typeof t?"".concat(t,"px"):""}},{key:"fetchFaqs",value:(S=G(U().mark((function t(e){var n;return U().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 S.apply(this,arguments)})},{key:"showPageBeacons",value:(b=G(U().mark((function t(e){var n,r,o,i,a,s,c,l=this;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._lastPageUrl=e,t.next=3,this.stop();case 3:if(ut.beacons&&"function"==typeof ut.beacons)try{(n=ut.beacons([]))&&"function"==typeof n.removeAll&&n.removeAll()}catch(t){}if((r=k.get(at))&&r.tooltips&&Array.isArray(r.tooltips)){t.next=7;break}return t.abrupt("return");case 7:(o=this.getApplicabeDataForUrl(r.tooltips,e,!0)).length>0&&(i=k.get(ct)||{},a=(null==i?void 0:i.visited)||[],s=new Set(a),o.forEach((function(t){if(!s.has(t.slug)){s.add(t.slug);var e=o[0].id||o[0]._id;l.markPageVisited(t.slug,"tooltip",e)}})),k.put(ct,V(V({},i),{},{visited:F(s)}),86400),c=o.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,o,i,a=e.behaviour||(null===(n=e.contentMetadata)||void 0===n||null===(r=n.document)||void 0===r||null===(o=r.root)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.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",showProgressbar:l.options.showProgressbar}],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,tour:{steps:s,options:l.options}},u=e.triggerIcon||a.triggerIcon,p=e.triggerLabel||a.triggerLabel;if("icon"===c.triggerMode&&u){var h="beacon";"info"===u.type&&(h="info"),"success"===u.type&&(h="success"),"warning"===u.type&&(h="warning"),"helpIcon"===u.type&&(h="helpIcon"),c.triggerIcon={type:h,color:u.color||"#000000",isAnimated:u.isAnimated||!1}}else"label"===c.triggerMode&&p&&(c.triggerLabel={text:p.text,color:p.color||"#000000",background:p.background||"#d01e1e"});return c}))})),console.log("Beacons",c),ut.beacons(c,{boundary:"outer"}).showAll(!0));case 9:case"end":return t.stop()}}),t,this)}))),function(t){return b.apply(this,arguments)})},{key:"setBeacons",value:(m=G(U().mark((function t(e){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:ut.beacons(e,{boundary:"outer"}).showAll();case 1:case"end":return t.stop()}}),t)}))),function(t){return m.apply(this,arguments)})},{key:"resolveSlugPatternForUrl",value:function(t,e){var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=z(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}([].concat(F((null==e?void 0:e.tours)||[]),F((null==e?void 0:e.tooltips)||[])));try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.slug)try{if(it(o.slug,{decode:decodeURIComponent})(t))return o.slug}catch(t){}}}catch(t){r.e(t)}finally{r.f()}return t.replace(/\/([a-f0-9]{24}|[0-9]+)(?=\/|$)/gi,"/:id")}},{key:"showHighlights",value:(y=G(U().mark((function t(e,n){var r,o,i,a,s,c,l,u,p;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this._lastPageUrl=e,t.next=3,this.stop();case 3:if(ut.beacons&&"function"==typeof ut.beacons)try{(s=ut.beacons([]))&&"function"==typeof s.removeAll&&s.removeAll()}catch(t){}if((c=k.get(at))&&!n){t.next=9;break}return t.next=8,this.fetchAndCacheTourData(c,e);case 8:c=t.sent;case 9:l=function(t,e){return[t.slug].concat(F(Array.isArray(t.altSlugs)?t.altSlugs:[])).filter(Boolean).some((function(t){try{return!!it(t,{decode:decodeURIComponent})(e)}catch(t){return!1}}))},u=(null===(r=c)||void 0===r||null===(o=r.tours)||void 0===o?void 0:o.filter((function(t){return l(t,e)})))||[],p=(null===(i=c)||void 0===i||null===(a=i.tooltips)||void 0===a?void 0:a.filter((function(t){return l(t,e)})))||[],u.length>0&&this.showPageTour(e),p.length>0&&this.showPageBeacons(e);case 14:case"end":return t.stop()}}),t,this)}))),function(t,e){return y.apply(this,arguments)})},{key:"showPageHighlights",value:(g=G(U().mark((function t(e,n){var r,o,i,a,s=this,c=arguments;return U().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:o=k.get(st),i=this.getUnAcknowledgedHightlightsForUrl(o,e,"highlight",r),a=i.map((function(t){return{element:t.selector,position:t.position,onClick:(e=G(U().mark((function e(){return U().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})),ut.beacons(a,{boundary:"outer"}).showAll();case 8:case"end":return t.stop()}}),t,this)}))),function(t,e){return g.apply(this,arguments)})},{key:"clearCachedData",value:(v=G(U().mark((function t(){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:k.removeKey(st),k.removeKey("AHD_HELP_DATA"),k.removeKey(at),k.removeKey(ct);case 4:case"end":return t.stop()}}),t)}))),function(){return v.apply(this,arguments)})},{key:"setLanguage",value:(f=G(U().mark((function t(e){return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.options.language=e,t.next=3,this.clearCachedData();case 3:if(!this._lastPageUrl){t.next=6;break}return t.next=6,this.showHighlights(this._lastPageUrl,!0);case 6:if(!this._lastRenderedIdentifier){t.next=9;break}return t.next=9,this.renderAppBanner(this._lastRenderedIdentifier,!0);case 9:case"end":return t.stop()}}),t,this)}))),function(t){return f.apply(this,arguments)})},{key:"acknowledgeHighlight",value:(d=G(U().mark((function t(e){var n,r,o;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=k.get(ct)||{},r=(null==n?void 0:n.ack)||[],(o=new Set(r)).has(e)||o.add(e),k.put(ct,V(V({},n),{},{ack:F(o)}),86400),this.updateVisitorStats({ack:[e]},"highlight");case 6:case"end":return t.stop()}}),t,this)}))),function(t){return d.apply(this,arguments)})},{key:"markUnacknowledge",value:(h=G(U().mark((function t(e){var n,r,o,i,a,s,c,l,u,p;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=k.get(at),r=null,o=null,n&&(i=(n.appBanners||[]).find((function(t){return t.identifier===e})),a=!i&&(n.tours||[]).find((function(t){return t.slug===e})),s=!i&&!a&&(n.tooltips||[]).find((function(t){return t.slug===e})),i?(r=i,o="app-banner"):a?(r=a,o="tour"):s&&(r=s,o="tooltip")),r){t.next=7;break}return console.warn('markUnacknowledge: no item found for "'.concat(e,'" in TOUR_DATA_STORAGE_KEY')),t.abrupt("return");case 7:return c=r._id||r.id,l="".concat(this.options.apiHost,"/api/tenant/").concat(this.options.applicationId,"/stats/mark-unacknowledged/").concat(this.options.visitorId,"/").concat(c),t.next=11,fetch(l,{method:"GET",redirect:"follow"}).then((function(t){return t.json()}));case 11:return u=k.get(ct)||{},p=(null==u?void 0:u.ack)||[],k.put(ct,V(V({},u),{},{ack:p.filter((function(t){return t!==c}))}),86400),t.next=16,this.fetchAndCachePageVisitsData(null);case 16:if("app-banner"!==o){t.next=21;break}return t.next=19,this.renderAppBanner(e,!0);case 19:t.next=23;break;case 21:return t.next=23,this.showHighlights(window.location.href,!0);case 23:case"end":return t.stop()}}),t,this)}))),function(t){return h.apply(this,arguments)})},{key:"generateDescription",value:function(t){var e,n=t.content||"",r="ahd-google-fonts";if(!document.getElementById(r)){var o=document.createElement("link");o.id=r,o.rel="stylesheet",o.href=(e=j.map((function(t){return"family=".concat(t.replace(/ /g,"+"),":wght@300;400;500;600;700")})),"https://fonts.googleapis.com/css2?".concat(e.join("&"),"&display=swap")),document.head.appendChild(o)}return n}},{key:"getUnAcknowledgedHightlightsForUrl",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=k.get(ct)||{},i=(null==o?void 0:o.ack)||[];return t.filter((function(t){return!(!r&&i&&i.includes(t.id))&&it(t.slug,{decode:decodeURIComponent})(e)}))}},{key:"getApplicabeDataForUrl",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=k.get(ct)||{},o=(null==r?void 0:r.visited)||[];return t.filter((function(t){return!(![t.slug].concat(F(Array.isArray(t.altSlugs)?t.altSlugs:[])).filter(Boolean).some((function(t){try{return!!it(t,{decode:decodeURIComponent})(e)}catch(t){return!1}}))||!n&&o.includes(t.slug))}))}},{key:"fetchAndCacheHighlightsData",value:(p=G(U().mark((function t(e){var n;return U().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&filter[language]=").concat(this.options.language||"")).then((function(t){return t.json()}));case 2:return(n=t.sent).rows&&(e=n.rows.filter((function(t){return!!t.content})),k.put(st,e,this.options.highlightRefetchIntervalInSec)),t.abrupt("return",e);case 5:case"end":return t.stop()}}),t,this)}))),function(t){return p.apply(this,arguments)})},{key:"fetchAndCacheTourData",value:(u=G(U().mark((function t(e,n){var r,o,i,a,s=arguments;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=!(s.length>2&&void 0!==s[2])||s[2],n&&r&&(n=this.resolveSlugPatternForUrl(n,e)),o=this.options.language?"&filter[language]=".concat(this.options.language):"",i="".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").concat(o),t.next=6,fetch(i).then((function(t){return t.json()}));case 6:return(a=t.sent)&&(e=a,k.put(at,e,this.options.toursRefetchIntervalInSec)),t.abrupt("return",e);case 9:case"end":return t.stop()}}),t,this)}))),function(t,e){return u.apply(this,arguments)})},{key:"fetchAndCachePageVisitsData",value:(l=G(U().mark((function t(e){var n;return U().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)&&k.put(ct,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=G(U().mark((function t(e,n){var r;return U().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)&&k.put(ct,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:"acknowledgeAppBanner",value:function(t,e){var n=this;t&&e.forEach((function(e){n.acknowledgeStep("app-banner",t,e)}))}},{key:"acknowledgeStep",value:(s=G(U().mark((function t(e,n,r){var o;return U().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.options.visitorId){t.next=3;break}return console.warn("acknowledgeStep: visitorId is not defined, skipping acknowledgment"),t.abrupt("return");case 3:return o={method:"GET",redirect:"follow"},t.next=6,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"),o).then((function(t){return t.json()}));case 6:t.sent;case 7:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return s.apply(this,arguments)})},{key:"markPageVisited",value:(a=G(U().mark((function t(e,n,r){var o;return U().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(o=t.sent)&&k.put(ct,o,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)})}],o&&Z(r.prototype,o),i&&Z(r,i),Object.defineProperty(r,"prototype",{writable:!1}),I}(b);ot(lt,"_instances",new Set);var ut=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return H(lt,e)};ut.prototype=lt.prototype,ut.plugins=new Set,ut.extend=function(t){if(!ut.plugins.has(t)){ut.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,[lt,ut].concat(n))}return ut};const pt=ut})(),__webpack_exports__})()));
|
|
13
13
|
//# sourceMappingURL=index.js.map
|