gleap 14.1.4 → 14.1.6

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.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Gleap=t():e.Gleap=t()}(this,(()=>(()=>{"use strict";var e={561:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["id","class","length"],n=e.attributes;return[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(n)).reduce((function(e,n){return t.indexOf(n.nodeName)>-1||e.push("["+n.nodeName+'="'+n.value+'"]'),e}),[])}},770:(e,t)=>{function n(e){if(!e.hasAttribute("class"))return[];try{return Array.prototype.slice.call(e.classList).filter((function(e){return/^[a-z_-][a-z\d_-]*$/i.test(e)?e:null}))}catch(n){var t=e.getAttribute("class");return(t=t.trim().replace(/\s+/g," ")).split(" ")}}Object.defineProperty(t,"__esModule",{value:!0}),t.getClasses=n,t.getClassSelectors=function(e){return n(e).filter(Boolean).map((function(e){return"."+e}))}},584:(e,t)=>{function n(e,t,o,r,i,a,s){if(a!==s)for(var l=r;l<=i&&i-l+1>=s-a;++l)o[a]=t[l],n(e,t,o,l+1,i,a+1,s);else e.push(o.slice(0,a).join(""))}Object.defineProperty(t,"__esModule",{value:!0}),t.getCombinations=function(e,t){for(var o=[],r=e.length,i=[],a=1;a<=t;++a)n(o,e,i,0,r-1,0,a);return o}},169:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getID=function(e){var t=e.getAttribute("id");if(null!==t&&""!==t)return t.match(/(?:^\d|:)/)?'[id="'+t+'"]':"#"+t;return null}},64:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getNthChild=function(e){var t=0,n=void 0,r=void 0,i=e.parentNode;if(Boolean(i)){var a=i.childNodes,s=a.length;for(n=0;n<s;n++)if(r=a[n],(0,o.isElement)(r)&&(t++,r===e))return":nth-child("+t+")"}return null};var o=n(440)},175:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getParents=function(e){var t=[],n=e;for(;(0,o.isElement)(n);)t.push(n),n=n.parentNode;return t};var o=n(440)},970:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getTag=function(e){return e.tagName.toLowerCase().replace(/:/g,"\\:")}},924:(e,t,n)=>{t.A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.selectorTypes,o=void 0===n?["ID","Class","Tag","NthChild"]:n,r=t.attributesToIgnore,i=void 0===r?["id","class","length"]:r,a=t.excludeRegex,s=void 0===a?null:a,l=[],p=(0,u.getParents)(e),d=!0,f=!1,g=void 0;try{for(var m,v=p[Symbol.iterator]();!(d=(m=v.next()).done);d=!0){var b=h(m.value,o,i,s);Boolean(b)&&l.push(b)}}catch(T){f=!0,g=T}finally{try{!d&&v.return&&v.return()}finally{if(f)throw g}}var y=[],w=!0,x=!1,k=void 0;try{for(var S,C=l[Symbol.iterator]();!(w=(S=C.next()).done);w=!0){var I=S.value;y.unshift(I);var L=y.join(" > ");if((0,c.isUnique)(e,L))return L}}catch(T){x=!0,k=T}finally{try{!w&&C.return&&C.return()}finally{if(x)throw k}}return null};var o=n(169),r=n(770),i=n(584),a=n(561),s=n(64),l=n(970),c=n(213),u=n(175);function p(e,t){var n=e.parentNode.querySelectorAll(t);return 1===n.length&&n[0]===e}function d(e,t){return t.find(p.bind(null,e))}function f(e,t,n){var o=(0,i.getCombinations)(t,3),r=d(e,o);return Boolean(r)||Boolean(n)&&(r=d(e,o=o.map((function(e){return n+e}))),Boolean(r))?r:null}function h(e,t,n,i){var c=void 0,u=function(e,t,n){var i={Tag:l.getTag,NthChild:s.getNthChild,Attributes:function(e){return(0,a.getAttributes)(e,n)},Class:r.getClassSelectors,ID:o.getID};return t.reduce((function(t,n){return t[n]=i[n](e),t}),{})}(e,t,n);i&&i instanceof RegExp&&(u.ID=i.test(u.ID)?null:u.ID,u.Class=u.Class.filter((function(e){return!i.test(e)})));var d=!0,h=!1,g=void 0;try{for(var m,v=t[Symbol.iterator]();!(d=(m=v.next()).done);d=!0){var b=m.value,y=u.ID,w=u.Tag,x=u.Class,k=u.Attributes,S=u.NthChild;switch(b){case"ID":if(Boolean(y)&&p(e,y))return y;break;case"Tag":if(Boolean(w)&&p(e,w))return w;break;case"Class":if(Boolean(x)&&x.length&&(c=f(e,x,w)))return c;break;case"Attributes":if(Boolean(k)&&k.length&&(c=f(e,k,w)))return c;break;case"NthChild":if(Boolean(S))return S}}}catch(C){h=!0,g=C}finally{try{!d&&v.return&&v.return()}finally{if(h)throw g}}return"*"}},440:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.isElement=function(e){var t=void 0;t="object"===("undefined"==typeof HTMLElement?"undefined":n(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===(void 0===e?"undefined":n(e))&&1===e.nodeType&&"string"==typeof e.nodeName;return t}},213:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isUnique=function(e,t){if(!Boolean(t))return!1;var n=e.ownerDocument.querySelectorAll(t);return 1===n.length&&n[0]===e}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};return(()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function r(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:String(n)}n.d(o,{default:()=>Ar});var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r(this,"feedbackButton",null),r(this,"injectedFeedbackButton",!1),r(this,"buttonHidden",null),r(this,"lastButtonIcon",null)}var n,o,i;return n=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(o=[{key:"toggleFeedbackButton",value:function(t){this.buttonHidden=!t,e.getInstance().updateFeedbackButtonState(),Co.getInstance().updateContainerStyle()}},{key:"feedbackButtonPressed",value:function(){var e=Bt.getInstance();e.isOpened()?e.hideWidget():(e.setAppMode("widget"),e.showWidget())}},{key:"injectFeedbackButton",value:function(){var e=this;if(!this.injectedFeedbackButton){this.injectedFeedbackButton=!0;var t=document.createElement("div");t.addEventListener("click",(function(){e.feedbackButtonPressed()})),document.body.appendChild(t),this.feedbackButton=t,this.updateFeedbackButtonState()}}},{key:"updateNotificationBadge",value:function(e){var t=document.querySelector(".bb-notification-bubble");if(t){var n="bb-notification-bubble--hidden";e>0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"refresh",value:function(){document.querySelector(".bb-feedback-button")?(this.updateFeedbackButtonText(),this.updateFeedbackButtonState()):(this.injectedFeedbackButton=!1,this.feedbackButton=null,this.buttonHidden=null,this.lastButtonIcon=null,this.injectFeedbackButton())}},{key:"updateFeedbackButtonText",value:function(){var t=nt.getInstance().getFlowConfig();if(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT){var n=document.querySelector(".bb-feedback-button-classic");n&&(n.innerText=t.widgetButtonText)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=nt.getInstance().getFlowConfig(),n="";n=t.buttonLogo?'<img class="bb-logo-logo" src="'.concat(t.buttonLogo,'" alt="Feedback Button" />'):d("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-font gl-block",this.feedbackButton.setAttribute("dir",lo.getInstance().isRTLLayout?"rtl":"ltr"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?(this.feedbackButton.classList.add("bb-feedback-button--classic-button-style"),this.feedbackButton.innerHTML='<div class="bb-feedback-button-classic '.concat(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?"bb-feedback-button-classic--left":"").concat(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM?"bb-feedback-button-classic--bottom":"",'">').concat(t.widgetButtonText,"</div>")):n!==this.lastButtonIcon&&(this.feedbackButton.innerHTML='<div class="bb-feedback-button-icon">'.concat(n).concat(d("arrowdown","#fff"),'</div><div class="bb-notification-bubble bb-notification-bubble--hidden"></div>')),this.lastButtonIcon=n;var o=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(o=!0):e.getInstance().buttonHidden&&(o=!0),o&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),Bt.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var r=Bt.getInstance().appMode;"survey"!==r&&"survey_full"!==r&&"survey_web"!==r||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||Ge.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&t(n.prototype,o),i&&t(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}();function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}r(a,"FEEDBACK_BUTTON_BOTTOM_RIGHT","BOTTOM_RIGHT"),r(a,"FEEDBACK_BUTTON_BOTTOM_LEFT","BOTTOM_LEFT"),r(a,"FEEDBACK_BUTTON_CLASSIC","BUTTON_CLASSIC"),r(a,"FEEDBACK_BUTTON_CLASSIC_LEFT","BUTTON_CLASSIC_LEFT"),r(a,"FEEDBACK_BUTTON_CLASSIC_BOTTOM","BUTTON_CLASSIC_BOTTOM"),r(a,"FEEDBACK_BUTTON_NONE","BUTTON_NONE"),r(a,"instance",void 0);var u=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var n=l(e.match(/.{2}/g),3),o=n[0],r=n[1],i=n[2],a=[parseInt(o,16)+t,parseInt(r,16)+t,parseInt(i,16)+t];o=a[0],r=a[1],i=a[2],o=Math.max(Math.min(255,o),0).toString(16),r=Math.max(Math.min(255,r),0).toString(16),i=Math.max(Math.min(255,i),0).toString(16);var s=(o.length<2?"0":"")+o,c=(r.length<2?"0":"")+r,u=(i.length<2?"0":"")+i;return"#".concat(s).concat(c).concat(u)},p=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},d=function(e,t){return"button"===e?'<svg class="bb-logo-logo bb-logo-logo--default" width="145" height="144" viewBox="0 0 145 144" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M38.9534 15H105.047C113.857 15 121 22.1426 121 30.9534L121 89.5238L121 96.015L121 125.541C121 128.759 117.393 130.66 114.739 128.84L90.1188 111.968H38.9534C30.1426 111.968 23 104.826 23 96.015V30.9534C23 22.1426 30.1426 15 38.9534 15Z" fill="white"/>\n </svg>':"unmute"===e?'<svg id="tooltip-svg-unmute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path id="tooltip-svg-unmute-path" d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.1 386.2C556.7 352 576 306.3 576 256c0-60.1-27.7-113.8-70.9-149c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C507.3 170.7 528 210.9 528 256c0 39.1-15.6 74.5-40.9 100.5L449 326.6c19-17.5 31-42.7 31-70.6c0-30.1-13.9-56.9-35.4-74.5c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C425.1 227.6 432 241 432 256s-6.9 28.4-17.7 37.3c-1.3 1-2.4 2.2-3.4 3.4L352 250.6V64c0-12.6-7.4-24-18.9-29.2s-25-3.1-34.4 5.3L197.8 129.8 38.8 5.1zM352 373.3L82.9 161.3C53.8 167.4 32 193.1 32 224v64c0 35.3 28.7 64 64 64h67.8L298.7 471.9c9.4 8.4 22.9 10.4 34.4 5.3S352 460.6 352 448V373.3z"/></svg>':"mute"===e?'<svg id="tooltip-svg-mute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path id="tooltip-svg-mute-path" d="M533.6 32.5C598.5 85.3 640 165.8 640 256s-41.5 170.8-106.4 223.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C557.5 398.2 592 331.2 592 256s-34.5-142.2-88.7-186.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM473.1 107c43.2 35.2 70.9 88.9 70.9 149s-27.7 113.8-70.9 149c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C475.3 341.3 496 301.1 496 256s-20.7-85.3-53.2-111.8c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zm-60.5 74.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM301.1 34.8C312.6 40 320 51.4 320 64V448c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h67.8L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3z"/></svg>':"replay"===e?'<svg id="tooltip-svg-replay" width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path id="tooltip-svg-replay-path" d="M48.5 224H40C26.7 224 16 213.3 16 200V72C16 62.3 21.8 53.5 30.8 49.8C39.8 46.1 50.1 48.1 57 55L98.6 96.6C186.2 10.1 327.3 10.4 414.4 97.6C501.9 185.1 501.9 326.9 414.4 414.4C326.9 501.9 185.1 501.9 97.6 414.4C85.1 401.9 85.1 381.6 97.6 369.1C110.1 356.6 130.4 356.6 142.9 369.1C205.4 431.6 306.7 431.6 369.2 369.1C431.7 306.6 431.7 205.3 369.2 142.8C307 80.6 206.5 80.3 143.9 141.8L185 183C191.9 189.9 193.9 200.2 190.2 209.2C186.5 218.2 177.7 224 168 224H48.5Z" />\n </svg>':"dismiss"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M294.6 166.6L317.3 144 272 98.7l-22.6 22.6L160 210.7 70.6 121.4 48 98.7 2.7 144l22.6 22.6L114.7 256 25.4 345.4 2.7 368 48 413.3l22.6-22.6L160 301.3l89.4 89.4L272 413.3 317.3 368l-22.6-22.6L205.3 256l89.4-89.4z"/></svg>':"blur"===e?'<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">\n <path class="bb-svg-path" d="m602.25 1200c238.2 0 435.95-193.26 435.95-435.95 0-269.66-220.23-615.73-435.95-764.05-220.23 161.8-440.45 485.39-440.45 764.05 0 242.7 197.75 435.95 440.45 435.95zm-260.68-382.02c0 112.36 89.887 206.74 206.74 206.74v62.922c-148.32 0-274.16-121.35-274.16-269.66z" fill="#333"/>\n</svg>':"pen"===e?'<svg width="1072px" height="1034px" viewBox="0 0 1072 1034" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-907.000000, -217.000000)" fill-rule="nonzero">\n <g transform="translate(907.268457, 217.009827)">\n <g transform="translate(132.335119, 0.000000)" fill="#000" class="bb-svg-path">\n <path d="M20.3764235,730.530173 L10.1884235,720.342173 C-0.791576454,709.362173 -3.16357645,692.432173 4.37592355,678.858173 L83.1809235,537.018173 C71.7589235,502.979173 82.3098335,463.998173 112.254924,440.706173 L655.334924,18.3161733 C689.951924,-8.6058267 739.197924,-5.5388267 770.214924,25.4684733 L913.774924,169.028473 C944.782924,200.040473 947.848924,249.286473 920.927224,283.908473 L498.537224,826.988473 C496.322424,829.836173 493.935624,832.543173 491.384924,835.090073 C467.271924,859.207073 432.513924,866.195073 402.232924,856.063073 L260.382924,934.868073 C246.804924,942.407173 229.874924,940.036073 218.894924,929.055573 L208.706924,918.867573 L20.3764235,730.530173 Z M866.006424,241.190173 C871.393124,234.264373 870.779824,224.417173 864.576724,218.213173 L721.016724,74.6531733 C714.813624,68.4500733 704.965724,67.8367733 698.043724,73.2234733 L154.963724,495.613473 C147.381724,501.507973 146.018424,512.433473 151.912924,520.015473 C152.358234,520.585783 152.834804,521.128773 153.346524,521.636573 L417.586524,785.886573 C424.379524,792.675673 435.391524,792.675673 442.180524,785.886573 C442.692244,785.374853 443.168804,784.831873 443.610224,784.265473 L866.006424,241.190173 Z M342.796424,809.480173 L129.746424,596.430173 L77.9264235,689.707173 L249.516424,861.297173 L342.796424,809.480173 Z"></path>\n </g>\n <g transform="translate(-0.000000, 755.530173)" fill="#EB144C">\n <path d="M124.711543,0 L313.042043,188.3374 L233.288043,268.0914 C222.003043,279.3764 204.483043,281.5324 190.800043,273.3219 L16.8900429,168.9719 C-2.51595711,157.3309 -5.80895711,130.5499 10.1908429,114.5499 L124.711543,0 Z" class="bb-pen-tip"></path>\n </g>\n </g>\n </g>\n </g>\n</svg>':"rect"===e?'<svg width="339px" height="241px" viewBox="0 0 339 241" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-0.000865, 0.000000)" fill-rule="nonzero">\n <g transform="translate(0.000865, 0.000000)" fill="#000000" class="bb-svg-path">\n <path d="M339,0 L339,241 L0,241 L0,0 L339,0 Z M312.826351,26.168387 L26.1855674,26.168387 L26.1855674,214.41156 L312.826351,214.41156 L312.826351,26.168387 Z"></path>\n </g>\n <g transform="translate(0.000000, 83.206095)" fill="#EB144C" class="bb-pen-tip">\n <path d="M0,0 L26.186,26.186 L26.1864325,131.205465 L131.204,131.205 L157.792,157.793 L0.000865118243,157.793905 L0,0 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"pointer"===e?'<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">\n <path d="m1050.7 508.95-225.94 157.5 160.31 160.31c4.4531 4.4531 6.9141 10.43 6.9141 16.758s-2.4609 12.305-6.9141 16.758l-126.09 126.09c-4.4531 4.4531-10.43 6.9141-16.758 6.9141-6.3281 0-12.188-2.4609-16.758-6.9141l-160.2-160.43-157.62 225.94c-3.3984 4.9219-9.0234 7.8516-14.883 7.8516-0.70313 0-1.5234 0-2.2266-0.11719-6.7969-0.82031-12.422-5.2734-14.766-11.719l-333.16-880.55c-2.5781-6.6797-0.9375-14.297 4.2188-19.336 5.0391-5.0391 12.656-6.6797 19.336-4.2188l880.66 333.05c6.3281 2.3438 10.781 8.0859 11.602 14.766 0.82031 6.7969-2.1094 13.359-7.7344 17.344z" fill="#333"/>\n </svg>':"clip"===e?'<svg width="600px" height="1126px" viewBox="0 0 600 1126" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-0.002000, 0.501000)" fill="#333333" fill-rule="nonzero">\n <path d="M225.002,1124.999 C165.33,1124.999 108.102,1101.292 65.902,1059.097 C23.707,1016.902 5.68434189e-14,959.671 5.68434189e-14,899.997 L5.68434189e-14,299.997 C5.68434189e-14,220.431 31.605,144.127 87.867,87.867 C144.129,31.605 220.437,-4.26325641e-14 299.997,-4.26325641e-14 C379.557,-4.26325641e-14 455.867,31.605 512.127,87.867 C568.389,144.129 599.994,220.437 599.994,299.997 L599.994,1012.497 C599.994,1025.895 592.8456,1038.274 581.244,1044.974 C569.642,1051.6732 555.346,1051.6732 543.744,1044.974 C532.142,1038.2748 524.994,1025.896 524.994,1012.497 L524.994,299.997 C524.994,240.325 501.287,183.097 459.092,140.897 C416.897,98.702 359.666,74.995 299.992,74.995 C240.318,74.995 183.092,98.702 140.892,140.897 C98.697,183.092 74.99,240.323 74.99,299.997 L74.99,899.997 C74.99,953.587 103.58,1003.107 149.99,1029.897 C196.4,1056.694 253.58,1056.694 299.99,1029.897 C346.4,1003.104 374.99,953.585 374.99,899.997 L374.99,337.497 C374.99,310.704 360.697,285.942 337.49,272.544 C314.283,259.149 285.697,259.149 262.49,272.544 C239.283,285.942 224.99,310.704 224.99,337.497 L224.99,824.997 C224.99,838.395 217.8416,850.774 206.24,857.474 C194.638,864.1732 180.342,864.1732 168.74,857.474 C157.138,850.7748 149.99,838.396 149.99,824.997 L149.99,337.497 C149.99,283.907 178.58,234.387 224.99,207.597 C271.4,180.8 328.58,180.8 374.99,207.597 C421.4,234.39 449.99,283.909 449.99,337.497 L449.99,899.997 C449.99,959.669 426.283,1016.897 384.088,1059.097 C341.893,1101.292 284.662,1124.999 224.988,1124.999 L225.002,1124.999 Z" id="Path"></path>\n </g>\n </g>\n</svg>':"mic"===e?'<svg\n width="1200pt"\n height="1200pt"\n version="1.1"\n viewBox="0 0 1200 1200"\n xmlns="http://www.w3.org/2000/svg"\n >\n <g class="bb-svg-path">\n <path\n d="m600 862.5c144.75 0 262.5-117.75 262.5-262.5v-300c0-144.75-117.75-262.5-262.5-262.5s-262.5 117.75-262.5 262.5v300c0 144.75 117.75 262.5 262.5 262.5z"\n />\n <path\n d="m1012.5 600c0-20.707-16.793-37.5-37.5-37.5s-37.5 16.793-37.5 37.5c0 186.11-151.41 337.5-337.5 337.5s-337.5-151.39-337.5-337.5c0-20.707-16.793-37.5-37.5-37.5s-37.5 16.793-37.5 37.5c0 214.8 165.08 391.57 375 410.6v114.4c0 20.727 16.793 37.5 37.5 37.5s37.5-16.773 37.5-37.5v-114.4c209.92-19.031 375-195.8 375-410.6z"\n />\n </g>\n </svg>':"camera"===e?'<svg width="1155px" height="1004px" viewBox="0 0 1155 1004" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g fill="#333333" fill-rule="nonzero">\n <g transform="translate(128.324095, 0.000000)">\n <path d="M42.7803063,0.00413459787 C31.4357421,0.00413459787 20.5549853,4.41399115 12.5336107,12.2572687 C4.51223664,20.1005462 0.00420584816,30.741831 0.00420584816,41.8370305 L0.00420584816,251.00151 C-0.156199045,262.200455 4.27736739,272.989996 12.315738,280.963903 C20.3585574,288.938257 31.3288589,293.431222 42.7803063,293.431222 C54.2317532,293.431222 65.2018267,288.938592 73.2448746,280.963903 C81.2832452,272.989549 85.7172445,262.200455 85.5564062,251.00151 L85.5564062,83.6699265 L256.660808,83.6699265 C268.112255,83.8267939 279.145066,79.4909873 287.298762,71.6298611 C295.452913,63.7643845 300.04718,53.0359758 300.04718,41.8370305 C300.04718,30.6380854 295.453255,19.9098998 287.298762,12.0441998 C279.144611,4.18307356 268.112255,-0.153157091 256.660808,0.00413459787 L42.7803063,0.00413459787 Z"></path>\n <path d="M983.227131,710.59444 C971.895913,710.764382 961.099907,715.326799 953.20401,723.279287 C945.312674,731.227538 940.964345,741.91668 941.119476,752.99849 L941.119476,920.330075 L770.015075,920.330075 C758.563631,920.173205 747.530815,924.509015 739.377123,932.370139 C731.222968,940.235615 726.628705,950.964028 726.628705,962.16297 C726.628705,973.361918 731.222627,984.090105 739.377123,991.955802 C747.531272,999.816926 758.563631,1004.15316 770.015075,1003.99587 L983.895579,1003.99587 C995.24014,1003.99587 1006.1209,999.586011 1014.14227,991.742733 C1022.16365,983.899455 1026.67168,973.258169 1026.67168,962.16297 L1026.67168,752.99849 C1026.83208,741.690223 1022.30053,730.801401 1014.11489,722.812989 C1005.93394,714.825472 994.790363,710.415949 983.227131,710.59444 L983.227131,710.59444 Z"></path>\n <path d="M983.227131,375.93127 C971.895913,376.101212 961.099907,380.66363 953.20401,388.61612 C945.312674,396.56437 940.964345,407.253512 941.119476,418.335325 L941.119476,585.66691 C940.959072,596.865853 945.39264,607.655394 953.431008,615.629303 C961.47383,623.603658 972.444131,628.096618 983.895579,628.096618 C995.347023,628.096618 1006.3171,623.603989 1014.36015,615.629303 C1022.39852,607.654947 1026.83251,596.865853 1026.67168,585.66691 L1026.67168,418.335325 C1026.83208,407.027056 1022.30053,396.138232 1014.11489,388.149822 C1005.93394,380.162305 994.790363,375.752783 983.227131,375.93127 L983.227131,375.93127 Z"></path>\n <path d="M769.974012,0.00413459787 C758.522563,-0.152733184 747.489752,4.18307356 739.336055,12.0441998 C731.181906,19.9096767 726.587637,30.6380854 726.587637,41.8370305 C726.587637,53.0359758 731.181564,63.7641611 739.336055,71.6298611 C747.490209,79.4909873 758.522563,83.8272181 769.974012,83.6699265 L941.078414,83.6699265 L941.078414,251.00151 C940.918009,262.200455 945.351572,272.989996 953.389945,280.963903 C961.432763,288.938257 972.403063,293.431222 983.854512,293.431222 C995.30596,293.431222 1006.27603,288.938592 1014.31908,280.963903 C1022.35745,272.989549 1026.79145,262.200455 1026.63061,251.00151 L1026.63061,41.8370305 C1026.63061,30.7426118 1022.12133,20.1017733 1014.10121,12.2572687 C1006.08109,4.41276405 995.199876,0.00413459787 983.854512,0.00413459787 L769.974012,0.00413459787 Z"></path>\n <path d="M427.765208,0.00413459787 C416.31376,-0.152733184 405.280949,4.18307356 397.127256,12.0441998 C388.973102,19.9096767 384.378838,30.6380854 384.378838,41.8370305 C384.378838,53.0359758 388.972761,63.7641611 397.127256,71.6298611 C405.281406,79.4909873 416.31376,83.8272181 427.765208,83.6699265 L598.86961,83.6699265 C610.321058,83.8267939 621.35387,79.4909873 629.507562,71.6298611 C637.661716,63.7643845 642.255985,53.0359758 642.255985,41.8370305 C642.255985,30.6380854 637.662058,19.9098998 629.507562,12.0441998 C621.353413,4.18307356 610.321058,-0.153157091 598.86961,0.00413459787 L427.765208,0.00413459787 Z"></path>\n </g>\n <g transform="translate(0.000000, 427.000000)">\n <path d="M768.516184,22.1826583 C752.659627,13.73125 732.573775,13.73125 717.773442,24.29375 L562.379192,124.6375 L562.379192,31.6875 C562.379192,13.7330104 548.635081,0 530.666079,0 L31.7131123,0 C13.7441105,0 0,13.7330104 0,31.6875 L0,475.3125 C0,493.26699 13.7441105,507 31.7131123,507 L530.666079,507 C548.635081,507 562.379192,493.26699 562.379192,475.3125 L562.379192,382.3625 L717.773442,482.70625 C726.231681,487.9875 735.742444,491.157658 745.257258,491.157658 C753.715498,491.157658 761.113815,489.046567 769.572406,484.820862 C786.485185,475.313732 796,458.414612 796,439.400352 L796,68.6566021 C794.943601,48.5869719 785.428963,31.6878521 768.516184,22.1807219 L768.516184,22.1826583 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"recorderon"===e?'<svg width="1251px" height="1251px" viewBox="0 0 1251 1251" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g>\n <circle fill="#E31810" cx="625.5" cy="625.5" r="625.5"></circle>\n <circle fill="#F71008" cx="625" cy="625" r="507"></circle>\n <g transform="translate(175.000000, 449.000000)" fill="#FFFFFF" fill-rule="nonzero">\n <path d="M0,347.097493 L0,4.90250696 L135.528311,4.90250696 C161.471024,4.90250696 183.639743,9.49741034 202.034469,18.6872171 C220.429194,27.8770239 234.46286,40.8541449 244.135466,57.6185803 C253.808072,74.3830156 258.644376,94.0714804 258.644376,116.683975 C258.644376,139.40786 253.724206,158.929238 243.883867,175.248107 C234.043527,191.566976 219.814173,204.070682 201.195803,212.759227 C182.577434,221.447772 160.073248,225.792044 133.683247,225.792044 L42.9396629,225.792044 L42.9396629,167.64563 L121.941933,167.64563 C135.807866,167.64563 147.325536,165.751973 156.494943,161.964659 C165.66435,158.177344 172.51345,152.496373 177.042243,144.921744 C181.571035,137.347116 183.835432,127.934526 183.835432,116.683975 C183.835432,105.322032 181.571035,95.7423543 177.042243,87.9449425 C172.51345,80.1475308 165.636395,74.2159282 156.411077,70.1501349 C147.185759,66.0843416 135.584222,64.051445 121.606467,64.051445 L72.6284142,64.051445 L72.6284142,347.097493 L0,347.097493 Z M185.512762,191.37204 L270.888889,347.097493 L190.712487,347.097493 L107.181424,191.37204 L185.512762,191.37204 Z"></path>\n <polygon points="309.166667 347.097493 309.166667 4.90250696 540.126846 4.90250696 540.126846 64.5527072 381.634607 64.5527072 381.634607 146.091356 528.244113 146.091356 528.244113 205.741556 381.634607 205.741556 381.634607 287.447293 540.796296 287.447293 540.796296 347.097493"></polygon>\n <path d="M901,124.638783 L827.757943,124.638783 C826.420189,115.158428 823.68894,106.709759 819.564197,99.2927757 C815.439454,91.8757921 810.144176,85.5462611 803.678363,80.3041825 C797.212549,75.0621039 789.77129,71.0468948 781.354585,68.2585551 C772.93788,65.4702155 763.824427,64.0760456 754.014228,64.0760456 C736.288981,64.0760456 720.849065,68.4537389 707.69448,77.2091255 C694.539894,85.964512 684.339516,98.6793409 677.093346,115.353612 C669.847176,132.027883 666.224091,152.243346 666.224091,176 C666.224091,200.425856 669.875046,220.948035 677.176956,237.56654 C684.478866,254.185044 694.707113,266.732573 707.861699,275.209125 C721.016285,283.685678 736.233242,287.923954 753.51257,287.923954 C763.21129,287.923954 772.213263,286.641318 780.518488,284.076046 C788.823714,281.510773 796.209233,277.746515 802.675047,272.78327 C809.14086,267.820025 814.519748,261.769328 818.81171,254.631179 C823.103672,247.493029 826.08575,239.351077 827.757943,230.205323 L901,230.539924 C899.104848,246.26616 894.394837,261.406844 886.869968,275.961977 C879.3451,290.51711 869.256201,303.510773 856.603274,314.942966 C843.950346,326.375158 828.900608,335.409379 811.45406,342.045627 C794.007513,348.681876 774.303504,352 752.342035,352 C721.796641,352 694.512024,345.084918 670.488184,331.254753 C646.464343,317.424588 627.512821,297.404309 613.633619,271.193916 C599.754416,244.983523 592.814815,213.252218 592.814815,176 C592.814815,138.636248 599.838026,106.849176 613.884448,80.6387833 C627.93087,54.4283904 646.993871,34.4359949 671.073451,20.661597 C695.153031,6.88719899 722.242559,0 752.342035,0 C772.185393,0 790.607387,2.78833967 807.608016,8.36501901 C824.608646,13.9416984 839.686254,22.0557668 852.840839,32.7072243 C865.995425,43.3586819 876.72533,56.3802281 885.030556,71.7718631 C893.335782,87.1634981 898.65893,104.785805 901,124.638783 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"recorderoff"===e?'<svg width="1251px" height="1251px" viewBox="0 0 1251 1251" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g class="bb-rec-on-circle" fill="#EEEEEE" fill-rule="nonzero">\n <path d="M625.5,0 C970.954111,0 1251,280.045889 1251,625.5 C1251,970.954111 970.954111,1251 625.5,1251 C280.045889,1251 0,970.954111 0,625.5 C0,280.045889 280.045889,0 625.5,0 Z M626,124 C348.753056,124 124,348.753056 124,626 C124,903.246944 348.753056,1128 626,1128 C903.246944,1128 1128,903.246944 1128,626 C1128,348.753056 903.246944,124 626,124 Z"></path>\n </g>\n <g class="bb-rec-on-cont" fill="#E31810" transform="translate(86.000000, 86.000000)" fill-rule="nonzero">\n <path d="M540,0 C241.2,0 0,241.2 0,540 C0,838.8 241.2,1080 540,1080 C838.8,1080 1080,838.8 1080,540 C1080,241.2 838.8,0 540,0 Z M777.6,741.6 C777.6,761.998 761.998,777.6 741.6,777.6 L338.4,777.6 C318.002,777.6 302.4,761.998 302.4,741.6 L302.4,338.4 C302.4,318.002 318.002,302.4 338.4,302.4 L741.6,302.4 C761.998,302.4 777.6,318.002 777.6,338.4 L777.6,741.6 Z"></path>\n </g>\n </g>\n </svg>':"arrowdown"===e?'<svg class="bb-logo-arrowdown" fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m50 77.637c-1.3477 0-2.6953-0.51562-3.7266-1.543l-44.73-44.73c-2.0586-2.0586-2.0586-5.3945 0-7.4531 2.0586-2.0586 5.3945-2.0586 7.4531 0l41.004 41 41.004-41c2.0586-2.0586 5.3945-2.0586 7.4531 0 2.0586 2.0586 2.0586 5.3945 0 7.4531l-44.73 44.727c-1.0312 1.0312-2.3789 1.5469-3.7266 1.5469z"/>\n </svg>'):"arrowleft"===e?'<svg fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m70.988 1.6211c2.1875-2.168 5.7344-2.168 7.9297 0 2.1836 2.168 2.1836 5.7227 0 7.8906l-46.016 40.445 46.016 40.5c2.1836 2.168 2.1836 5.668 0 7.8906-2.1953 2.168-5.7383 2.168-7.9297 0l-50.039-44.109c-1.168-1.168-1.668-2.7227-1.5898-4.2773-0.078125-1.5 0.42188-3.0547 1.5898-4.2227l50.039-44.109z" fill-rule="evenodd"/>\n </svg>'):"close"===e?'<svg fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m72.812 33.02l-5.832-5.832-16.98 16.875-16.98-16.875-5.832 5.832 16.875 16.98-16.875 16.98 5.832 5.832 16.98-16.875 16.98 16.875 5.832-5.832-16.875-16.98z"/>\n </svg>'):"undo"===e?'<svg width="62px" height="60px" viewBox="0 0 62 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g class="bb-svg-path" transform="translate(-0.000500, 0.001926)" fill-rule="nonzero">\n <path d="M28.0005,51.6270739 C24.9653,51.0684839 22.0825,49.8731739 19.5396,48.1192739 L13.8208,53.8380739 C17.9536,57.0060739 22.8403,59.0333739 28.0008,59.7286739 L28.0005,51.6270739 Z" id="Path"></path>\n <path d="M2.2705,33.9980739 C2.96581,39.1582739 4.9932,44.0450739 8.1611,48.1780739 L13.8799,42.4592739 C12.126,39.9162739 10.9307,37.0334739 10.3721,33.9983739 L2.2705,33.9980739 Z" id="Path"></path>\n <path d="M61.7305,33.9980739 L53.6289,33.9980739 C53.07031,37.0332739 51.875,39.9160739 50.1211,42.4589739 L55.8399,48.1777739 C59.0079,44.0449739 61.0352,39.1582739 61.7305,33.9977739 L61.7305,33.9980739 Z" id="Path"></path>\n <path d="M4.0005,24.9980739 L24.0005,24.9980739 L24.0005,16.9980739 L14.27,16.9980739 C17.6762,12.3613739 22.7622,9.24417393 28.442,8.31057393 C34.1178,7.38088393 39.934,8.70901393 44.645,12.0175739 C49.352,15.3222739 52.5786,20.3417739 53.6294,25.9975739 L61.731,25.9975739 C60.6646,18.0834739 56.4888,10.9235739 50.129,6.09957393 C43.7657,1.27147393 35.746,-0.818426068 27.836,0.290973932 C19.9298,1.39647393 12.793,5.61127393 8,11.9979739 L8,0.997973932 L-3.55271368e-15,0.997973932 L-3.55271368e-15,20.9979739 C-3.55271368e-15,22.0604739 0.42188,23.0760739 1.1719,23.8260739 C1.92192,24.5760739 2.9375,24.9979739 4,24.9979739 L4.0005,24.9980739 Z" id="Path"></path>\n <path d="M36.0005,51.6270739 L36.0005,59.7286739 C41.1607,59.0333639 46.0475,57.0059739 50.1805,53.8380739 L44.4617,48.1192739 C41.9187,49.8731739 39.0359,51.0684739 36.0008,51.6270739 L36.0005,51.6270739 Z" id="Path"></path>\n </g>\n </g>\n </svg>':"circle-dot"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"/></svg>'):"circle-question"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"/></svg>'):"circle-info"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216 192V224h24 48 24v24 88h8 24v48H296 216 192V336h24zm72-144H224V128h64v64z"/></svg>'):"circle-exclamation"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm24-384v24V264v24H232V264 152 128h48zM232 368V320h48v48H232z"/></svg>'):"circle-up"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM384 256H304V384H208V256H128V224L256 96 384 224v32z"/></svg>'):"circle-right"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM256 384l0-80-128 0 0-96 128 0 0-80 32 0L416 256 288 384l-32 0z"/></svg>'):""};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,m(o.key),o)}}function g(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:String(t)}var v=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),g(this,"startTimestamp",Date.now()),g(this,"requestId",0),g(this,"requests",{}),g(this,"externalRequests",[]),g(this,"maxRequests",30),g(this,"filters",[]),g(this,"defaultBlacklist",["gleap.io"]),g(this,"blacklist",[]),g(this,"initialized",!1),g(this,"stopped",!1),g(this,"loadAllResources",!1)}var t,n,o;return t=e,n=[{key:"setLoadAllResources",value:function(e){this.loadAllResources=e}},{key:"isContentTypeSupported",value:function(e){if("string"!=typeof e)return!1;if(""===e)return!0;e=e.toLocaleLowerCase();for(var t=["text/","xml","json"],n=0;n<t.length;n++)if(e.includes(t[n]))return!0;return!1}},{key:"getRequests",value:function(){var e=JSON.parse(JSON.stringify(Object.values(this.requests)));if(this.externalRequests&&this.externalRequests.length>0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t<e.length;t++){var n=e[t];if(n&&n.request&&n.request.headers)for(var o=0;o<this.filters.length;o++)delete n.request.headers[this.filters[o]];if(n&&n.request&&n.request.payload){var r=n.request.payload;try{r=JSON.parse(n.request.payload)}catch(c){}if(r){for(o=0;o<this.filters.length;o++)delete r[this.filters[o]];n.request.payload=JSON.stringify(r)}}if(n&&n.response&&n.response.responseText)try{var i=JSON.parse(n.response.responseText);for(o=0;o<this.filters.length;o++)delete i[this.filters[o]];n.response.responseText=JSON.stringify(i)}catch(c){}}try{if("undefined"!=typeof window&&window.performance){var a=window.performance.getEntriesByType("resource");for(t=0;t<a.length;t++){var s=a[t];s&&s.name&&(this.loadAllResources||["xmlhttprequest","fetch"].indexOf(s.initiatorType)>-1)&&!e.find((function(e){return e.url===s.name}))&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+s.startTime),url:s.name,duration:Math.round(s.duration),initiatorType:s.initiatorType})}}}catch(u){}var l=this.blacklist.concat(this.defaultBlacklist);if(l&&l.length>0)try{e=e.filter((function(e){for(var t=0;t<l.length;t++)if(e&&e.url&&e.url.includes(l[t]))return!1;return!0}))}catch(u){}return e}},{key:"setMaxRequests",value:function(e){e>70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=this.filters.concat(e||[])}},{key:"setBlacklist",value:function(e){this.blacklist=this.blacklist.concat(e||[])}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n<t.length;n++)delete this.requests[t[n]]}},{key:"calcRequestTime",value:function(e){if(e&&this.requests&&this.requests[e]){var t=this.requests[e].date;t&&(this.requests[e].duration=(new Date).getTime()-t.getTime())}}},{key:"getTextContentSize",value:function(e){var t=0;try{t=(new TextEncoder).encode(e).length}catch(n){try{t=encodeURI(s).split(/%..|./).length-1}catch(n){try{t=new Blob([e]).size}catch(n){t=e.length}}}return t/1024/1024}},{key:"cleanupContentSize",value:function(e){return this.getTextContentSize(e)>.15?"<content_too_large>":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":f(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(t){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,o){if(!e.stopped&&o&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[o]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var r=n[1]&&n[1].method?n[1].method:"GET";e.requests[o]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:r,url:n[0],date:new Date}}else e.requests[o]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,o){if(!e.stopped&&o&&e.requests&&e.requests[o]){try{e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:"",responseText:"<request_still_open>"},e.calcRequestTime(o)}catch(i){}try{var r="";n.headers&&void 0!==n.headers.get&&(r=n.headers.get("content-type")),e.isContentTypeSupported(r)?n.text().then((function(r){e.requests[o]&&(e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(r)}),e.calcRequestTime(o),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[o]&&(e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:n.statusText,responseText:"<content_type_not_supported>"}),e.calcRequestTime(o),e.cleanRequests())}catch(i){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var o=t.currentTarget,r=o.responseType,i="<"+r+">";""!==r&&"text"!==r||(i=e.cleanupContentSize(o.responseText)),e.requests[o.bbRequestId].success=!0,e.requests[o.bbRequestId].response={status:o.status,statusText:o.statusText,responseText:i},e.calcRequestTime(o.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,o=XMLHttpRequest.prototype.open,r=XMLHttpRequest.prototype.send;return void 0===XMLHttpRequest.prototype.gleapSetRequestHeader&&(XMLHttpRequest.prototype.gleapSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader),XMLHttpRequest.prototype.gleapSetRequestHeader&&(XMLHttpRequest.prototype.setRequestHeader=function(e,t){this.requestHeaders||(this.requestHeaders={}),this.requestHeaders&&this.requestHeaders.hasOwnProperty(e)||(this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t),this.gleapSetRequestHeader(e,t))}),XMLHttpRequest.prototype.open=function(){return this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e)),o.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),r.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var o=++n.requestId;return e.onFetch(arguments,o),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,o)}return t})).catch((function(t){throw e.onFetchFailed(t,o),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var o=new FileReader;o.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},o.onerror=function(e){n(e)},o.readAsText(e)}))}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&h(t.prototype,n),o&&h(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();g(v,"instance",void 0);const b=v;var y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return new Promise((function(o,r){var i=0===e.indexOf("data:image/jpeg"),a=new Image;a.src=e,a.onerror=function(){r()},a.onload=function(){var e=document.createElement("canvas"),r=t,s=n;t>a.width/1.5&&(r=a.width/1.5),n>a.height/1.5&&(s=a.height/1.5);var l=a.width,c=a.height;l>c?l>r&&(c*=r/l,l=r):c>s&&(l*=s/c,c=s),e.width=l,e.height=c,e.getContext("2d").drawImage(a,0,0,l,c),o(i?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},w=function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},x=function(e){if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},k=function(e,t){return e.length>t?e.slice(0,t)+"...":e},S=function(e){try{var t=e.split("."),n=!1,o=t[t.length-2];return"co"!==o&&"com"!==o&&"gv"!==o&&"ac"!==o&&"edu"!==o&&"gov"!==o&&"mil"!==o&&"net"!==o&&"org"!==o||(n=!0),(t=t.slice(n?-3:-2)).join(".")}catch(r){}return e},C=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},I=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(o){}else localStorage.removeItem(n)},L=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",(function(){e()}))};const T=Math.min,E=Math.max,O=Math.round,M=Math.floor,A=e=>({x:e,y:e}),P={left:"right",right:"left",bottom:"top",top:"bottom"},R={start:"end",end:"start"};function N(e,t,n){return E(e,T(t,n))}function D(e,t){return"function"==typeof e?e(t):e}function j(e){return e.split("-")[0]}function F(e){return e.split("-")[1]}function B(e){return"x"===e?"y":"x"}function _(e){return"y"===e?"height":"width"}function H(e){return["top","bottom"].includes(j(e))?"y":"x"}function q(e){return B(H(e))}function U(e){return e.replace(/start|end/g,(e=>R[e]))}function z(e){return e.replace(/left|right|bottom|top/g,(e=>P[e]))}function W(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function G(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function V(e,t,n){let{reference:o,floating:r}=e;const i=H(t),a=q(t),s=_(a),l=j(t),c="y"===i,u=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,d=o[s]/2-r[s]/2;let f;switch(l){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:p};break;case"left":f={x:o.x-r.width,y:p};break;default:f={x:o.x,y:o.y}}switch(F(t)){case"start":f[a]-=d*(n&&c?-1:1);break;case"end":f[a]+=d*(n&&c?-1:1)}return f}async function X(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:d=!1,padding:f=0}=D(t,e),h=W(f),g=s[d?"floating"===p?"reference":"floating":p],m=G(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===p?{...a.floating,x:o,y:r}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=G(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(m.top-w.top+h.top)/y.y,bottom:(w.bottom-m.bottom+h.bottom)/y.y,left:(m.left-w.left+h.left)/y.x,right:(w.right-m.right+h.right)/y.x}}const K=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=j(n),s=F(n),l="y"===H(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,p=D(t,e);let{mainAxis:d,crossAxis:f,alignmentAxis:h}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:d*c}:{x:d*c,y:f*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}};function Z(e){return Q(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function J(e){var t;return null==(t=(Q(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Q(e){return e instanceof Node||e instanceof Y(e).Node}function $(e){return e instanceof Element||e instanceof Y(e).Element}function ee(e){return e instanceof HTMLElement||e instanceof Y(e).HTMLElement}function te(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot)}function ne(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=se(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function oe(e){return["table","td","th"].includes(Z(e))}function re(e){const t=ie(),n=se(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function ie(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ae(e){return["html","body","#document"].includes(Z(e))}function se(e){return Y(e).getComputedStyle(e)}function le(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ce(e){if("html"===Z(e))return e;const t=e.assignedSlot||e.parentNode||te(e)&&e.host||J(e);return te(t)?t.host:t}function ue(e){const t=ce(e);return ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:ee(t)&&ne(t)?t:ue(t)}function pe(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=ue(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),a=Y(r);return i?t.concat(a,a.visualViewport||[],ne(r)?r:[],a.frameElement&&n?pe(a.frameElement):[]):t.concat(r,pe(r,[],n))}function de(e){const t=se(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ee(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=O(n)!==i||O(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function fe(e){return $(e)?e:e.contextElement}function he(e){const t=fe(e);if(!ee(t))return A(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=de(t);let a=(i?O(n.width):n.width)/o,s=(i?O(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ge=A(0);function me(e){const t=Y(e);return ie()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ge}function ve(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=fe(e);let a=A(1);t&&(o?$(o)&&(a=he(o)):a=he(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Y(e))&&t}(i,n,o)?me(i):A(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,u=r.width/a.x,p=r.height/a.y;if(i){const e=Y(i),t=o&&$(o)?Y(o):o;let n=e,r=n.frameElement;for(;r&&o&&t!==n;){const e=he(r),t=r.getBoundingClientRect(),o=se(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,a=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,p*=e.y,l+=i,c+=a,n=Y(r),r=n.frameElement}}return G({width:u,height:p,x:l,y:c})}const be=[":popover-open",":modal"];function ye(e){return be.some((t=>{try{return e.matches(t)}catch(n){return!1}}))}function we(e){return ve(J(e)).left+le(e).scrollLeft}function xe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=Y(e),o=J(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const e=ie();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)o=function(e){const t=J(e),n=le(e),o=e.ownerDocument.body,r=E(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=E(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+we(e);const s=-n.scrollTop;return"rtl"===se(o).direction&&(a+=E(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}(J(e));else if($(t))o=function(e,t){const n=ve(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=ee(e)?he(e):A(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=me(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return G(o)}function ke(e,t){const n=ce(e);return!(n===t||!$(n)||ae(n))&&("fixed"===se(n).position||ke(n,t))}function Se(e,t,n){const o=ee(t),r=J(t),i="fixed"===n,a=ve(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=A(0);if(o||!o&&!i)if(("body"!==Z(t)||ne(r))&&(s=le(t)),o){const e=ve(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&(l.x=we(r));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Ce(e,t){return ee(e)&&"fixed"!==se(e).position?t?t(e):e.offsetParent:null}function Ie(e,t){const n=Y(e);if(!ee(e)||ye(e))return n;let o=Ce(e,t);for(;o&&oe(o)&&"static"===se(o).position;)o=Ce(o,t);return o&&("html"===Z(o)||"body"===Z(o)&&"static"===se(o).position&&!re(o))?n:o||function(e){let t=ce(e);for(;ee(t)&&!ae(t);){if(re(t))return t;t=ce(t)}return null}(e)||n}const Le={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,a=J(o),s=!!t&&ye(t.floating);if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=A(1);const u=A(0),p=ee(o);if((p||!p&&!i)&&(("body"!==Z(o)||ne(a))&&(l=le(o)),ee(o))){const e=ve(o);c=he(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:J,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=pe(e,[],!1).filter((e=>$(e)&&"body"!==Z(e))),r=null;const i="fixed"===se(e).position;let a=i?ce(e):e;for(;$(a)&&!ae(a);){const t=se(a),n=re(a);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||ne(a)&&!n&&ke(e,a))?o=o.filter((e=>e!==a)):r=t,a=ce(a)}return t.set(e,o),o}(t,this._c):[].concat(n),o],a=i[0],s=i.reduce(((e,n)=>{const o=xe(t,n,r);return e.top=E(o.top,e.top),e.right=T(o.right,e.right),e.bottom=T(o.bottom,e.bottom),e.left=E(o.left,e.left),e}),xe(t,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Ie,getElementRects:async function(e){const t=this.getOffsetParent||Ie,n=this.getDimensions;return{reference:Se(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=de(e);return{width:t,height:n}},getScale:he,isElement:$,isRTL:function(e){return"rtl"===se(e).direction}};function Te(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=fe(e),u=r||i?[...c?pe(c):[],...pe(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const p=c&&s?function(e,t){let n,o=null;const r=J(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:p,height:d}=e.getBoundingClientRect();if(s||t(),!p||!d)return;const f={rootMargin:-M(u)+"px "+-M(r.clientWidth-(c+p))+"px "+-M(r.clientHeight-(u+d))+"px "+-M(c)+"px",threshold:E(0,T(1,l))||1};let h=!0;function g(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{o=new IntersectionObserver(g,{...f,root:r.ownerDocument})}catch(m){o=new IntersectionObserver(g,f)}o.observe(e)}(!0),i}(c,n):null;let d,f=-1,h=null;a&&(h=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let g=l?ve(e):null;return l&&function t(){const o=ve(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n();g=o,d=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==p||p(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(d)}}const Ee=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=D(e,t),c={x:n,y:o},u=await X(t,l),p=H(j(r)),d=B(p);let f=c[d],h=c[p];if(i){const e="y"===d?"bottom":"right";f=N(f+u["y"===d?"top":"left"],f,f-u[e])}if(a){const e="y"===p?"bottom":"right";h=N(h+u["y"===p?"top":"left"],h,h-u[e])}const g=s.fn({...t,[d]:f,[p]:h});return{...g,data:{x:g.x-n,y:g.y-o}}}}},Oe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=D(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=j(r),b=j(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=d||(b||!g?[z(s)]:function(e){const t=z(e);return[U(e),t,U(t)]}(s));d||"none"===h||w.push(...function(e,t,n,o){const r=F(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:a;default:return[]}}(j(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(U)))),i}(s,g,h,y));const x=[s,...w],k=await X(t,m),S=[];let C=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&S.push(k[v]),p){const e=function(e,t,n){void 0===n&&(n=!1);const o=F(e),r=q(e),i=_(r);let a="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=z(a)),[a,z(a)]}(r,a,y);S.push(k[e[0]],k[e[1]])}if(C=[...C,{placement:r,overflows:S}],!S.every((e=>e<=0))){var I,L;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(L=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(f){case"bestFit":{var T;const e=null==(T=C.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},Me=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=D(e,t)||{};if(null==c)return{};const p=W(u),d={x:n,y:o},f=q(r),h=_(f),g=await a.getDimensions(c),m="y"===f,v=m?"top":"left",b=m?"bottom":"right",y=m?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[f]-d[f]-i.floating[h],x=d[f]-i.reference[f],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=k?k[y]:0;S&&await(null==a.isElement?void 0:a.isElement(k))||(S=s.floating[y]||i.floating[h]);const C=w/2-x/2,I=S/2-g[h]/2-1,L=T(p[v],I),E=T(p[b],I),O=L,M=S-g[h]-E,A=S/2-g[h]/2+C,P=N(O,A,M),R=!l.arrow&&null!=F(r)&&A!==P&&i.reference[h]/2-(A<O?L:E)-g[h]/2<0,j=R?A<O?A-O:A-M:0;return{[f]:d[f]+j,data:{[f]:P,centerOffset:A-P-j,...R&&{alignmentOffset:j}},reset:R}}}),Ae=(e,t,n)=>{const o=new Map,r={platform:Le,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:p}=V(c,o,l),d=o,f={},h=0;for(let g=0;g<s.length;g++){const{name:n,fn:i}=s[g],{x:m,y:v,data:b,reset:y}=await i({x:u,y:p,initialPlacement:o,placement:d,strategy:r,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=m?m:u,p=null!=v?v:p,f={...f,[n]:{...f[n],...b}},y&&h<=50&&(h++,"object"==typeof y&&(y.placement&&(d=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:r}):y.rects),({x:u,y:p}=V(c,d,l))),g=-1)}return{x:u,y:p,placement:d,strategy:r,middlewareData:f}})(e,t,{...r,platform:i})};function Pe(e){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(e)}function Re(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,De(o.key),o)}}function Ne(e,t,n){return(t=De(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function De(e){var t=function(e,t){if("object"!=Pe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Pe(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pe(t)?t:String(t)}function je(e){return function(e){if(Array.isArray(e))return Fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fe(e,t)}(e)||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 Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var Be=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ne(this,"tooltips",[]),Ne(this,"filteredTooltips",[]),Ne(this,"lastUrl",null),Ne(this,"elementToFloatingUIMap",new WeakMap),Ne(this,"elementToTooltipMap",new WeakMap),Ne(this,"nextId",0),Ne(this,"linkTooltip",(function(e,n){if(!e.hasAttribute("data-gleap-tooltip")){var o=t.nextId++;if(e.setAttribute("data-gleap-tooltip",o),e){var r=null;if("hotspot"===n.mode){var i=document.createElement("div");i.setAttribute("data-gleap-tooltip-anchor",o),i.classList.add("gleap-tooltip-anchor"),e.setAttribute("data-gleap-tooltip-mode","hotspot"),t.canEmbed(e)?e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i):e.parentNode.insertBefore(i,e.nextSibling);var a=document.createElement("div");a.classList.add("gleap-tooltip-hotspot"),a.setAttribute("data-gleap-tooltip-hotspot",o),a.innerHTML="".concat(d(n.icon,n.color)).concat(n.animated?'<div style="background-color: '.concat(n.color,'" class="gleap-tooltip-hotspot-animation"></div>'):""),i.appendChild(a),t.repositionHotspot(e,n),r=a,t.elementToTooltipMap.set(e,n)}else r=e;var s=t.createTooltip(r,n.html,n);t.elementToFloatingUIMap.set(e,s)}}})),Ne(this,"updateFilteredTooltips",(function(){t.filteredTooltips=t.getFilteredTooltips(),t.checkForTooltips()})),Ne(this,"getFilteredTooltips",(function(){if(!t.tooltips)return[];var e=window.location.href;return t.tooltips.filter((function(t){if(!t.page||0===t.page.length)return!0;var n=t.pageType,o=t.page;switch(n){case"is":return e===o;case"isnot":return e!==o;case"contains":return e.includes(o);case"notcontains":return!e.includes(o);case"startswith":return e.startsWith(o);case"endswith":return e.endsWith(o);default:return!1}}))})),Ne(this,"checkForTooltips",(function(){for(var e=0;e<t.filteredTooltips.length;e++){var n=t.filteredTooltips[e];try{for(var o=document.querySelectorAll(n.selector),r=0;r<o.length;r++){var i=o[r];i&&t.linkTooltip(i,n)}}catch(a){}}})),Ne(this,"load",(function(){var e=t,n=Ge.getInstance(),o=new XMLHttpRequest;o.open("GET",n.apiUrl+"/config/"+n.sdkKey+"/tooltips"),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("Api-Token",n.sdkKey);try{o.setRequestHeader("Gleap-Id",n.session.gleapId),o.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(r){}o.onerror=function(){console.error("Failed to fetch tooltips")},o.onreadystatechange=function(t){if(4===o.readyState&&200===o.status)try{e.tooltips=JSON.parse(o.responseText),e.updateFilteredTooltips()}catch(r){console.error("Failed to parse tooltips",r)}},o.send()}))}var t,n,o;return t=e,n=[{key:"processNodeInsertion",value:function(e){var t=this;e.nodeType===Node.ELEMENT_NODE&&(this.checkNodeTooltip(e),e.childNodes&&e.childNodes.forEach((function(e){t.processNodeInsertion(e)})))}},{key:"checkNodeTooltip",value:function(e){var t=this;this.filteredTooltips.length>0&&this.filteredTooltips.forEach((function(n){n.selector&&e.matches(n.selector)&&t.linkTooltip(e,n)}))}},{key:"start",value:function(){var e=this,t=this;if(window){var n,o,r,i=(n=t.updateHotspotPositions.bind(t),o=250,r=null,function(){if(!r){var e=this,t=arguments;r=setTimeout((function(){n.call.apply(n,[e].concat(je(t))),r=null}),o)}});window.addEventListener("resize",i),this.observer=new MutationObserver((function(n){t.lastUrl!==window.location.href&&(t.lastUrl=window.location.href,t.filteredTooltips=t.getFilteredTooltips()),n.forEach((function(n){n.addedNodes.forEach((function(e){e.nodeType===Node.ELEMENT_NODE&&t.processNodeInsertion(e)})),n.removedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE&&e.elementToFloatingUIMap.has(t)){var n=e.elementToFloatingUIMap.get(t);n&&(n.tooltip&&n.tooltip.remove(),n.cleanup(),e.elementToFloatingUIMap.delete(t))}e.elementToTooltipMap.has(t)&&e.elementToTooltipMap.delete(t)}))}))})),this.observer.observe(document.body,{childList:!0,subtree:!0})}}},{key:"updateHotspotPositions",value:function(){var e=this;document.querySelectorAll("[data-gleap-tooltip-mode='hotspot']").forEach((function(t){var n=e.elementToTooltipMap.get(t);n&&e.repositionHotspot(t,n)}))}},{key:"createTooltip",value:function(e,t,n){var o=document.createElement("div");o.className="gleap-tooltip",o.innerHTML='<div class="gleap-tooltip-inner">\n '.concat(t,'\n <div class="gleap-tooltip-arrow">\n <svg width="116" height="56" viewBox="0 0 116 56" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M57.75 0.74998L115.5 0.680177L66.8726 49.3076C61.7958 54.3844 53.5646 54.3844 48.4878 49.3076L4.05618e-05 0.819784L57.75 0.74998Z" fill="white"/>\n </svg>\n </div>\n </div>'),document.body.appendChild(o);var r,i=o.querySelector(".gleap-tooltip-arrow"),a=Te(e,o,(function(){Ae(e,o,{placement:"left"===n.posX?"left":"right",middleware:[K(10),Oe(),Ee(),Me({element:i})]}).then((function(e){var t=e.x,n=e.y,r=e.middlewareData,a=e.placement;try{if(Object.assign(o.style,{left:"".concat(t,"px"),top:"".concat(n,"px")}),r.arrow){var s={left:"",top:"",transform:""};null!=r.arrow.x&&(s.left="".concat(r.arrow.x,"px"),"bottom"===a?(s.transform="translateY(-7px) rotate(180deg)",s.top="".concat(-20,"px")):"top"===a&&(s.transform="translateY(7px) rotate(0deg)",s.top="100%")),null!=r.arrow.y&&(s.top="".concat(r.arrow.y,"px"),"right"===a?(s.transform="translateX(-7px) rotate(90deg)",s.left="".concat(-20,"px")):"left"===a&&(s.transform="translateX(7px) rotate(270deg)",s.left="100%")),Object.assign(i.style,s)}}catch(l){}}))}));function s(){clearTimeout(r),o.style.visibility="visible",o.style.opacity="1",o.style.pointerEvents="auto"}function l(){r=setTimeout((function(){o.style.opacity="0",setTimeout((function(){o.style.visibility="hidden",o.style.pointerEvents="none"}),200)}),500)}return e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",l),o.addEventListener("mouseenter",s),o.addEventListener("mouseleave",l),{cleanup:a,tooltip:o}}},{key:"canEmbed",value:function(e){var t=new Set(["area","base","br","embed","hr","img","input","source","track","wbr","canvas"]);return e&&!t.has(e.tagName.toLowerCase())}},{key:"repositionHotspot",value:function(e,t){if(e&&t){var n=e.getAttribute("data-gleap-tooltip");if(n){var o=document.querySelector('[data-gleap-tooltip-hotspot="'.concat(n,'"]'));if(o){t.posX||(t.posX="right"),t.posY||(t.posY="center"),t.offsetX||(t.offsetX=4),t.offsetY||(t.offsetY=0);var r=e.getBoundingClientRect();try{var i=document.createRange();i.selectNodeContents(e);var a=window.getComputedStyle(e),s=i.getBoundingClientRect().width+parseFloat(a.paddingLeft);s<r.width&&(r.width=s)}catch(f){}var l=document.querySelector('[data-gleap-tooltip-anchor="'.concat(n,'"]')).getBoundingClientRect(),c=l.left-r.left,u=l.top-r.top,p=0,d=0;switch(t.posX){case"left":d=-1*(t.offsetX+17);break;case"right":d=r.width+t.offsetX}switch(t.posY){case"top":p=0+t.offsetY;break;case"bottom":p=r.height-17+t.offsetY;break;case"center":p=r.height/2-8.5+t.offsetY}o&&(o.style.position="absolute",o.style.top=p-u+"px",o.style.left=d-c+"px")}}}}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e,this.instance.start()),this.instance}}],n&&Re(t.prototype,n),o&&Re(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(Object(n),!0).forEach((function(t){ze(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ue(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,We(o.key),o)}}function ze(e,t,n){return(t=We(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function We(e){var t=function(e,t){if("object"!=_e(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=_e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_e(t)?t:String(t)}Ne(Be,"instance",void 0);var Ge=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ze(this,"apiUrl","https://api.gleap.io"),ze(this,"wsApiUrl","wss://ws.gleap.io"),ze(this,"sdkKey",null),ze(this,"updatingSession",!1),ze(this,"useCookies",!1),ze(this,"session",{gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0}),ze(this,"ready",!1),ze(this,"onSessionReadyListener",[]),ze(this,"setOnSessionReady",(function(e){t.ready?e():t.onSessionReadyListener.push(e)})),ze(this,"injectSession",(function(e){e&&t.session&&(e.setRequestHeader("Api-Token",t.sdkKey),e.setRequestHeader("Gleap-Id",t.session.gleapId),e.setRequestHeader("Gleap-Hash",t.session.gleapHash))})),ze(this,"clearSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t.session&&t.session.gleapHash&&hn.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash));try{I("session-".concat(t.sdkKey),null)}catch(r){}if(t.useCookies)try{!function(e){try{var t=S(window.location.host.split(":")[0]);document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; Domain="+t}catch(r){}}("session-".concat(t.sdkKey))}catch(r){}if(t.ready=!1,t.session={gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0},Bt.getInstance().sendMessage({name:"session-cleared"},!0),Co.getInstance().clearAllNotifications(!1),Co.getInstance().setNotificationCount(0),Ao.getInstance().removeBannerUI(),n&&!isNaN(e)){var o=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*o)}})),ze(this,"validateSession",(function(e){e&&e.gleapId&&(t.session&&t.session.gleapHash&&hn.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),I("session-".concat(t.sdkKey),e),t.useCookies&&function(e,t,n){try{var o="";if(n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),o="; expires="+r.toUTCString()}var i=S(window.location.host.split(":")[0]);document.cookie=e+"="+(t||"")+o+"; path=/; domain="+i}catch(a){}}("session-".concat(t.sdkKey),encodeURIComponent(JSON.stringify(e)),365),t.session=e,t.ready=!0,t.session&&t.session.gleapHash&&hn.notifyEvent("register-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),t.notifySessionReady())})),ze(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;try{if(t.useCookies){var n=function(e){try{for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var r=n[o];" "==r.charAt(0);)r=r.substring(1,r.length);if(0==r.indexOf(t))return r.substring(t.length,r.length)}}catch(i){}return null}("session-".concat(t.sdkKey));if(n){var o=JSON.parse(decodeURIComponent(n));t.validateSession(o)}}}catch(s){}if(!(t.session&&t.session.gleapId&&t.session.gleapId.length>0)){var r=C("session-".concat(t.sdkKey));r&&t.validateSession(r)}var i=t,a=new XMLHttpRequest;a.open("POST",i.apiUrl+"/sessions"),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.setRequestHeader("Api-Token",i.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(a.setRequestHeader("Gleap-Id",t.session.gleapId),a.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(s){}a.onreadystatechange=function(t){if(4===a.readyState)if(200===a.status||201===a.status)try{var n=JSON.parse(a.responseText);i.validateSession(n),Ye.getInstance().restart(),Be.getInstance().load()}catch(s){}else 429!==a.status&&i.clearSession(e,!0)},a.send(JSON.stringify({lang:lo.getInstance().getActiveLanguage()}))})),ze(this,"checkIfSessionNeedsUpdate",(function(e,n){if(!t.session||!t.session.userId||!e)return!0;try{if(t.session.userId.toString()!==e.toString())return!0}catch(o){}return t.checkIfSessionDataNeedsUpdate(n)})),ze(this,"checkIfSessionDataNeedsUpdate",(function(e){if(e)for(var n=Object.keys(e),o=0;o<n.length;o++){var r=n[o];if(JSON.stringify(t.session[r])!==JSON.stringify(e[r])&&(!t.session.customData||JSON.stringify(t.session.customData[r])!==JSON.stringify(e[r])))return!0}return!1})),ze(this,"updateSession",(function(e){if(t.checkIfSessionDataNeedsUpdate(e)){var n=t;return new Promise((function(o,r){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return r("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",n.apiUrl+"/sessions/partialupdate"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",n.sdkKey);try{t.setRequestHeader("Gleap-Id",n.session.gleapId),t.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(i){}t.onerror=function(){r()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var a=JSON.parse(t.responseText);n.validateSession(a),o(a)}catch(i){r(i)}else r()},t.send(JSON.stringify({data:qe(qe({},e),{},{lang:lo.getInstance().getActiveLanguage()}),type:"js",sdkVersion:"14.1.4",ws:!0}))}))}))}})),ze(this,"identifySession",(function(e,n,o){if(t.checkIfSessionNeedsUpdate(e,n)){var r=t;return new Promise((function(i,a){t.setOnSessionReady((function(){if(!r.session.gleapId||!r.session.gleapHash)return a("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",r.apiUrl+"/sessions/identify"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",r.sdkKey);try{t.setRequestHeader("Gleap-Id",r.session.gleapId),t.setRequestHeader("Gleap-Hash",r.session.gleapHash)}catch(l){}t.onerror=function(){a()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var n=JSON.parse(t.responseText);r.validateSession(n),Ye.getInstance().restart(),Be.getInstance().load(),i(n)}catch(l){a(l)}else a()};var s=qe({},n);n.customData&&(delete s.customData,s=qe(qe({},s),n.customData)),t.send(JSON.stringify(qe(qe({},s),{},{userId:e,userHash:o,lang:lo.getInstance().getActiveLanguage()})))}))}))}})),ze(this,"startProductTourConfig",(function(e){var n=t;return new Promise((function(o,r){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return r("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",n.apiUrl+"/outbound/producttours"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",n.sdkKey);try{t.setRequestHeader("Gleap-Id",n.session.gleapId),t.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(i){}t.onerror=function(){r()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var n=JSON.parse(t.responseText);n&&n.config&&o(n.config)}catch(i){r(i)}else r()},t.send(JSON.stringify({outboundId:e}))}))}))}))}var t,n,o;return t=e,n=[{key:"getName",value:function(){try{return this.session.name?this.session.name.split(" ")[0].split("@")[0].split(".")[0].split("+")[0]:""}catch(e){return this.session.name}}},{key:"getSession",value:function(){return this.session}},{key:"getGleapId",value:function(){return this.session&&this.session.gleapId?this.session.gleapId:null}},{key:"isUser",value:function(){return!(!this.session||!this.session.userId)}},{key:"notifySessionReady",value:function(){if(this.onSessionReadyListener.length>0)for(var e=0;e<this.onSessionReadyListener.length;e++)this.onSessionReadyListener[e]();this.onSessionReadyListener=[],Bt.getInstance().sendSessionUpdate()}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Ue(t.prototype,n),o&&Ue(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ve(e){return Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(e)}function Xe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ze(o.key),o)}}function Ke(e,t,n){return(t=Ze(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ze(e){var t=function(e,t){if("object"!=Ve(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Ve(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ve(t)?t:String(t)}ze(Ge,"instance",void 0);var Ye=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ke(this,"eventArray",[]),Ke(this,"streamedEventArray",[]),Ke(this,"eventMaxLength",500),Ke(this,"errorCount",0),Ke(this,"streamingEvents",!1),Ke(this,"lastUrl",void 0),Ke(this,"mainLoopTimeout",null),Ke(this,"socket",null),Ke(this,"connectedWebSocketGleapId",null),Ke(this,"connectionTimeout",null),Ke(this,"pingWS",null),Ke(this,"handleOpenBound",null),Ke(this,"handleErrorBound",null),Ke(this,"handleMessageBound",null),Ke(this,"handleCloseBound",null),Ke(this,"runEventStreamLoop",(function(){var e=t;t.streamEvents(),t.mainLoopTimeout=setTimeout((function(){e.runEventStreamLoop()}),2500)})),Ke(this,"streamEvents",(function(){if(!(!Ge.getInstance().ready||t.streamingEvents||t.errorCount>2)&&0!==t.streamedEventArray.length&&t.socket&&t.socket.readyState===t.socket.OPEN){var e=t;t.streamingEvents=!0;var n=new XMLHttpRequest;n.open("POST",Ge.getInstance().apiUrl+"/sessions/ping"),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),Ge.getInstance().injectSession(n),n.onerror=function(){e.errorCount++,e.streamingEvents=!1},n.onreadystatechange=function(t){4===n.readyState&&(200===n.status||201===n.status?e.errorCount=0:e.errorCount++,e.streamingEvents=!1)};var o=zt.getInstance().getSessionDuration();n.send(JSON.stringify({time:o,events:t.streamedEventArray,opened:Bt.getInstance().isOpened(),type:"js",sdkVersion:"14.1.4",ws:!0})),t.streamedEventArray=[]}})),this.handleOpenBound=this.handleOpen.bind(this),this.handleErrorBound=this.handleError.bind(this),this.handleMessageBound=this.handleMessage.bind(this),this.handleCloseBound=this.handleClose.bind(this)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"cleanupWebSocket",value:function(){this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=null),this.pingWS&&clearInterval(this.pingWS),this.socket&&(this.socket.removeEventListener("open",this.handleOpenBound),this.socket.removeEventListener("error",this.handleErrorBound),this.socket.removeEventListener("message",this.handleMessageBound),this.socket.removeEventListener("close",this.handleCloseBound),this.socket.close(),this.socket=null)}},{key:"initWebSocket",value:function(){this.cleanupWebSocket(),this.connectedWebSocketGleapId=Ge.getInstance().session.gleapId,Ge.getInstance().session&&Ge.getInstance().sdkKey&&(this.socket=new WebSocket("".concat(Ge.getInstance().wsApiUrl,"?gleapId=").concat(Ge.getInstance().session.gleapId,"&gleapHash=").concat(Ge.getInstance().session.gleapHash,"&apiKey=").concat(Ge.getInstance().sdkKey,"&sdkVersion=").concat("14.1.4")),this.socket.addEventListener("open",this.handleOpenBound),this.socket.addEventListener("message",this.handleMessageBound),this.socket.addEventListener("error",this.handleErrorBound),this.socket.addEventListener("close",this.handleCloseBound))}},{key:"handleOpen",value:function(e){var t=this;this.pingWS=setInterval((function(){t.socket.readyState===t.socket.OPEN&&(t.socket.send("PING"),t.socket.send(9))}),1e4),this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=null)}},{key:"handleMessage",value:function(e){this.processMessage(JSON.parse(e.data))}},{key:"handleError",value:function(e){}},{key:"handleClose",value:function(e){var t=this;setTimeout((function(){t.initWebSocket()}),5e3)}},{key:"processMessage",value:function(e){try{if("update"===e.name){var t=e.data,n=t.a,o=t.u;Bt.getInstance().isOpened()||(n&&Mr.getInstance().performActions(n),null!=o&&Co.getInstance().setNotificationCount(o))}}catch(r){}}},{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.cleanupMainLoop()}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"cleanupMainLoop",value:function(){this.mainLoopTimeout&&(clearInterval(this.mainLoopTimeout),this.mainLoopTimeout=null)}},{key:"restart",value:function(){this.connectedWebSocketGleapId!==Ge.getInstance().session.gleapId&&this.initWebSocket(),this.cleanupMainLoop(),this.trackInitialEvents(),this.runEventStreamLoop()}},{key:"start",value:function(){this.startPageListener(),this.resetErrorCountLoop()}},{key:"trackInitialEvents",value:function(){e.getInstance().logEvent("sessionStarted"),e.getInstance().logCurrentPage()}},{key:"logCurrentPage",value:function(){if(!Mr.getInstance().disablePageTracking){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}}},{key:"startPageListener",value:function(){var e=this;setInterval((function(){e.logCurrentPage()}),1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=x(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}])&&Xe(t.prototype,n),o&&Xe(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Je(e){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(e)}function Qe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,et(o.key),o)}}function $e(e,t,n){return(t=et(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){var t=function(e,t){if("object"!=Je(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Je(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Je(t)?t:String(t)}Ke(Ye,"instance",void 0);var tt=function(e,t){var n=parseInt(e);return isNaN(n)?t:n},nt=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$e(this,"flowConfig",null),$e(this,"projectActions",null),$e(this,"onConfigLoadedListener",[]),$e(this,"aiTools",[]),$e(this,"onConfigLoaded",(function(e){null!==t.flowConfig?e():t.onConfigLoadedListener.push(e)})),$e(this,"setAiTools",(function(e){t.aiTools=e})),$e(this,"getAiTools",(function(){return t.aiTools})),$e(this,"start",(function(){var e=Ge.getInstance(),n=C("config-".concat(e.sdkKey,"-").concat(lo.getInstance().getActiveLanguage()));return n?(t.applyConfig(n),t.loadConfigFromServer().catch((function(e){})),Promise.resolve()):t.loadConfigFromServer()})),$e(this,"loadConfigFromServer",(function(){var e=t;return new Promise((function(t,n){var o=Ge.getInstance(),r=new XMLHttpRequest,i=lo.getInstance().getActiveLanguage();r.open("GET",o.apiUrl+"/config/"+o.sdkKey+"?lang="+i),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.injectSession(r),r.onerror=function(){n()},r.onreadystatechange=function(a){if(4===r.readyState){if(200===r.status||201===r.status)try{var s=JSON.parse(r.responseText);try{I("config-".concat(o.sdkKey,"-").concat(i),s)}catch(l){}return e.applyConfig(s),t()}catch(a){}n()}},r.send()}))}))}var t,n,o;return t=e,n=[{key:"getFlowConfig",value:function(){return this.flowConfig}},{key:"applyStylesFromConfig",value:function(){var e=this.flowConfig;Mr.setStyles(e.color?e.color:"#485BFF",e.headerColor?e.headerColor:"#485BFF",e.buttonColor?e.buttonColor:"#485BFF",e.backgroundColor?e.backgroundColor:"#FFFFFF",tt(e.borderRadius,20),tt(e.buttonX,20),tt(e.buttonY,20),e.feedbackButtonPosition)}},{key:"notifyConfigLoaded",value:function(){if(this.onConfigLoadedListener.length>0)for(var e=0;e<this.onConfigLoadedListener.length;e++)this.onConfigLoadedListener[e]();this.onConfigLoadedListener=[]}},{key:"applyConfig",value:function(e){try{var t=e.flowConfig;this.flowConfig=t,this.applyStylesFromConfig(),Bt.getInstance().sendConfigUpdate(),a.getInstance().updateFeedbackButtonState(),Co.getInstance().updateContainerStyle(),t.enableWebReplays?Un.getInstance().start():Un.getInstance().stop(),t.enableNetworkLogs&&b.getInstance().start(),b.getInstance().setLoadAllResources(!!t.sendNetworkResources),t.networkLogPropsToIgnore&&b.getInstance().setFilters(t.networkLogPropsToIgnore),t.networkLogBlacklist&&b.getInstance().setBlacklist(t.networkLogBlacklist),lo.getInstance().updateRTLSupport(),Mr.enableShortcuts(!!t.enableShortcuts),this.notifyConfigLoaded()}catch(n){}}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Qe(t.prototype,n),o&&Qe(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();$e(nt,"instance",void 0);var ot=["//fonts.googleapis.com","//cdn.jsdelivr.net","//cdnjs.cloudflare.com","//ajax.googleapis.com","//use.typekit.net",".amazonaws.com","//jssdk.gleap.io",".gstatic.com"];function rt(e){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rt(e)}function it(){it=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new M(o||[]);return r(a,"_invoke",{value:L(e,n,s)}),a}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",f="suspendedYield",h="executing",g="completed",m={};function v(){}function b(){}function y(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(A([])));k&&k!==n&&o.call(k,a)&&(w=k);var S=y.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function n(r,i,a,s){var l=p(e[r],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==rt(u)&&o.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var i;r(this,"_invoke",{value:function(e,o){function r(){return new t((function(t,r){n(e,o,t,r)}))}return i=i?i.then(r,r):r()}})}function L(t,n,o){var r=d;return function(i,a){if(r===h)throw new Error("Generator is already running");if(r===g){if("throw"===i)throw a;return{value:e,done:!0}}for(o.method=i,o.arg=a;;){var s=o.delegate;if(s){var l=T(s,o);if(l){if(l===m)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===d)throw r=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=h;var c=p(t,n,o);if("normal"===c.type){if(r=o.done?g:f,c.arg===m)continue;return{value:c.arg,done:o.done}}"throw"===c.type&&(r=g,o.method="throw",o.arg=c.arg)}}}function T(t,n){var o=n.method,r=t.iterator[o];if(r===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),m;var i=p(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function n(){for(;++r<t.length;)if(o.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(rt(t)+" is not iterable")}return b.prototype=y,r(S,"constructor",{value:y,configurable:!0}),r(y,"constructor",{value:b,configurable:!0}),b.displayName=c(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(I.prototype),c(I.prototype,s,(function(){return this})),t.AsyncIterator=I,t.async=function(e,n,o,r,i){void 0===i&&(i=Promise);var a=new I(u(e,n,o,r),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=A,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(o,r){return s.type="throw",s.arg=t,n.next=o,r&&(n.method="next",n.arg=e),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;O(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:A(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),m}},t}function at(e,t,n,o,r,i,a){try{var s=e[i](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(o,r)}function st(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function a(e){at(i,o,r,a,s,"next",e)}function s(e){at(i,o,r,a,s,"throw",e)}a(void 0)}))}}var lt=function(e){var t="",n=window.document.doctype;if(n&&(t="<!DOCTYPE "+n.name+(n.publicId?' PUBLIC "'+n.publicId+'"':"")+(!n.publicId&&n.systemId?" SYSTEM":"")+(n.systemId?' "'+n.systemId+'"':"")+">"),e&&e.childNodes&&e.childNodes.length>0)for(var o=0;o<e.childNodes.length;o++)e.childNodes[o]&&(t+=e.childNodes[o].outerHTML);return t},ct=function(e,t,n){return o=e,r=/url\((.*?)\)/g,i=function(e){return new Promise((function(o,r){if(!e)return o(e);var i=e.substr(4,e.length-5).replaceAll("'","").replaceAll('"',"");if(0===i.indexOf("http")||0===i.indexOf("//")||0===i.indexOf("data"))return o(e);try{var a=i;return t&&(a=new URL(i,t+"/").href),n?o("url("+a+")"):ut(a).then((function(e){return o("url("+e+")")}))}catch(s){return o(e)}}))},new Promise((function(e,t){var n=[];o.replace(r,(function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];var a=i.apply(void 0,[e].concat(o));n.push(a)})),Promise.all(n).then((function(t){e(o.replace(r,(function(){return t.shift()})))})).catch((function(){t()}))}));var o,r,i},ut=function(e){return new Promise((function(t,n){if(e){var o=new XMLHttpRequest;o.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.onerror=function(){n()},e.readAsDataURL(o.response)},o.onerror=function(e){t()},o.open("GET",e),o.responseType="blob",o.send()}else t()}))},pt=function(e){return new Promise((function(t,n){if(e&&e.src){if(function(e){if(!e)return!1;for(var t=0;t<ot.length;t++)if(-1!==e.indexOf(ot[t]))return!0;return!1}(e.src))return t();var o=new XMLHttpRequest;o.onload=function(){var n=new FileReader;n.onloadend=function(){!function(e,t,n,o){y(e,500,500).then((function(e){t.src=e,n()})).catch((function(){console.warn("BB: Image resize failed."),n()}))}(n.result,e,t)},n.onerror=function(){t()},n.readAsDataURL(o.response)},o.onerror=function(e){t()};var r=e.src;o.open("GET",r),o.responseType="blob",o.send()}else t()}))},dt=function(e,t,n,o){var r=null;t.ownerNode&&(r=e.querySelector('[bb-styleid="'+o+'"]'));try{if(r){var i=null;if(""!=n){var a=e.querySelector("head"),s=window.document.createElement("style");a.appendChild(s),s.type="text/css",s.styleSheet?s.styleSheet.cssText=n:s.appendChild(window.document.createTextNode(n)),i=s}else{var l=window.document.createElement("link");l.rel="stylesheet",l.type=t.type,l.href=t.href,l.media=t.media,i=l}i&&(r.parentNode.insertBefore(i,r),r.remove())}}catch(c){}},ft=function(e){var t=null;try{e.cssRules?t=e.cssRules:e.rules&&(t=e.rules)}catch(r){}var n="";if(t)for(var o in t)t[o].cssText&&(n+=t[o].cssText);return n},ht=function(e,t){for(var n,o=[],r=function(){var e=document.styleSheets[i];if(e.media&&"print"===e.media.mediaText)return 1;var r=ft(e);if(e&&e.ownerNode)if(""!=r){var a=document.getElementsByTagName("base");n=a.length?a[0].href.substr(location.origin.length,999):window.location.href.split(/[?#]/)[0],e.href&&(n=e.href);var s=n.substring(0,n.lastIndexOf("/"));o.push(ct(r,s,t).then((function(t){return{styletext:t,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}})))}else o.push(Promise.resolve({styletext:r,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}))},i=0;i<document.styleSheets.length;i++)r();return Promise.all(o).then((function(t){if(t)for(var n=0;n<t.length;n++)dt(e,t[n].stylesheet,t[n].styletext,t[n].styleId);return!0}))},gt=function(e,t){return new Promise((function(n,o){return t?ht(e,t).then((function(){n()})).catch((function(){n()})):function(e){for(var t=e.querySelectorAll("img"),n=[],o=0;o<t.length;o++){var r=t[o];n.push(pt(r))}return Promise.all(n)}(e).then((function(){return ht(e,t).then((function(){n()}))})).catch((function(){console.warn("Gleap: Failed with resolving local resources. Please contact the Gleap support team."),n()}))}))},mt=function(e,t,n){if(void 0!==e.adoptedStyleSheets)for(var o=0;o<e.adoptedStyleSheets.length;o++){var r=e.adoptedStyleSheets[o],i=ft(r),a=window.document.createElement("style");a.type="text/css",a.styleSheet?a.styleSheet.cssText=i:a.appendChild(window.document.createTextNode(i)),n&&a.setAttribute("bb-shadow-child",n),t.insertBefore(a,t.firstElementChild)}},vt=function(e){if(e&&"function"==typeof e.getAnimations){var t=e.getAnimations(),n={};return t.forEach((function(t){var o,r=(null===(o=t.effect)||void 0===o?void 0:o.getKeyframes())||[],i=r[r.length-1]||{};Object.keys(i).forEach((function(t){"offset"!==t&&(n[t]=getComputedStyle(e)[t])}))})),0===Object.keys(n).length?null:JSON.stringify(n)}return null},bt=function(){var e=st(it().mark((function e(t){var n,o,r,i;return it().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=1,o=function(){var e=st(it().mark((function e(t,r,i){var a,s,l,c,u,p,d,f,h;return it().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=function(){var e=st(it().mark((function e(t,n,r){return it().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=6;break}return e.next=3,o(t,n,r);case 3:t=!t.nextElementSibling||t.nextElementSibling.nextSibling!==t.nextSibling&&null!==t.nextSibling?t.nextSibling:t.nextElementSibling,e.next=0;break;case 6:case"end":return e.stop()}}),e)})));return function(t,n,o){return e.apply(this,arguments)}}(),s=t.cloneNode(),null!=(l=vt(t))&&s.setAttribute("bb-web-animations",l),void 0===s.setAttribute){e.next=20;break}if(i&&s.setAttribute("bb-shadow-child",i),!(t instanceof HTMLCanvasElement)){e.next=20;break}return e.prev=7,c=t.getBoundingClientRect(),e.next=11,y(t.toDataURL(),1400,1400);case 11:u=e.sent,s.setAttribute("bb-canvas-data",u),s.setAttribute("bb-canvas-height",c.height),s.setAttribute("bb-canvas-width",c.width),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(7),console.warn("Gleap: Failed to clone canvas data.",e.t0);case 20:if(t.nodeType==Node.ELEMENT_NODE&&("IFRAME"!=(p=t.tagName?t.tagName.toUpperCase():t.tagName)&&"VIDEO"!=p&&"EMBED"!=p&&"IMG"!=p&&"SVG"!=p||(d=t.getBoundingClientRect(),s.setAttribute("bb-element",!0),s.setAttribute("bb-height",d.height),s.setAttribute("bb-width",d.width)),(t.scrollTop>0||t.scrollLeft>0)&&(s.setAttribute("bb-scrollpos",!0),s.setAttribute("bb-scrolltop",t.scrollTop),s.setAttribute("bb-scrollleft",t.scrollLeft)),"SELECT"!==p&&"TEXTAREA"!==p&&"INPUT"!==p||(f=t.value,("value"===t.getAttribute("gleap-ignore")||t.classList.contains("gl-mask"))&&(f=new Array(f.length+1).join("*")),s.setAttribute("bb-data-value",f),"checkbox"!==t.type&&"radio"!==t.type||!t.checked||s.setAttribute("bb-data-checked",!0))),r.appendChild(s),!t.shadowRoot){e.next=29;break}return h=n,n++,e.next=27,a(t.shadowRoot.firstChild,s,h);case 27:mt(t.shadowRoot,s,h),void 0!==s.setAttribute&&s.setAttribute("bb-shadow-parent",h);case 29:return e.next=31,a(t.firstChild,s);case 31:case"end":return e.stop()}}),e,null,[[7,17]])})));return function(t,n,o){return e.apply(this,arguments)}}(),r=document.createDocumentFragment(),e.next=5,o(t,r);case 5:return(i=r.querySelector("head"))||(i=r),mt(window.document,i),e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),yt=function(e){return new Promise(function(){var t=st(it().mark((function t(n,o){var r,i,a,s,l,c,u,p,d,f,h,g,m,v,b;return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=window.document.querySelectorAll("style, link"),i=0;i<r.length;++i)r[i].setAttribute("bb-styleid",i);return t.next=4,bt(window.document.documentElement);case 4:for(a=t.sent,s=a.querySelectorAll("link[rel=import]"),i=0;i<s.length;++i)if((l=s[i])&&l.childNodes&&l.childNodes.length>0){for(c=l.childNodes;c.length>0;)l.parentNode.insertBefore(c[0],l);l.remove()}for(u=a.querySelectorAll("script, noscript"),i=0;i<u.length;++i)u[i].remove();for(p="",d=a.querySelectorAll("base"),i=0;i<d.length;++i)d[i].href&&(p=d[i].href),d[i].remove();for(f=window.location.href.substring(0,window.location.href.lastIndexOf("/")),h=f+"/",p&&(p.startsWith("http")?h=p:(h=f+p).endsWith("/")||(h+="/")),(g=window.document.createElement("base")).href=h,(m=a.querySelector("head")).insertBefore(g,m.firstChild),v=a.querySelectorAll(".bb-feedback-dialog-container, .bb-capture-editor-borderlayer"),i=0;i<v.length;++i)v[i].remove();for(b=a.querySelectorAll("[bb-element=true]"),i=0;i<b.length;++i)b[i]&&(b[i].style.height=b[i].getAttribute("bb-height")+"px");gt(a,e).then((function(){var e=lt(a);n({html:e,baseUrl:f,width:window.innerWidth,height:window.innerHeight,isMobile:w()})}));case 24:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())};function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}function xt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,St(o.key),o)}}function kt(e,t,n){return(t=St(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function St(e){var t=function(e,t){if("object"!=wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=wt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wt(t)?t:String(t)}var Ct=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),kt(this,"rerender",void 0),kt(this,"stream",void 0),kt(this,"mediaRecorder",void 0),kt(this,"audioMuted",!1),kt(this,"audioAvailable",!0),kt(this,"available",!0),kt(this,"isRecording",!1),kt(this,"file",null),kt(this,"maxRecordTime",120),kt(this,"recordTime",0),kt(this,"recordingTimer",null),kt(this,"permissionErrorText",""),kt(this,"startScreenRecording",(function(){var e=this;if(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia||this.isRecording)return this.available=!1,void this.rerender();navigator.mediaDevices.getDisplayMedia({video:{width:{ideal:Math.min(window.screen.width,3072)},height:{ideal:Math.min(window.screen.height,1728)},frameRate:{ideal:10,max:24},displaySurface:"monitor"},selfBrowserSurface:"include",audio:!0}).then((function(t){e.stream=t,e.audioMuted?(e.audioAvailable=!1,e.handleRecord({stream:t})):e.startAudioRecording(),e.rerender()})).catch((function(t){window.alert(e.permissionErrorText),e.rerender()}))})),kt(this,"stopScreenRecording",(function(){this.mediaRecorder&&this.stream&&this.isRecording&&(this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null),this.mediaRecorder.stop(),this.stream.getTracks().forEach((function(e){e.stop()})),this.rerender())})),kt(this,"startAudioRecording",(function(){var e=this;this.stream&&navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(t){for(var n=0;n<t.getAudioTracks().length;n++)e.stream.addTrack(t.getAudioTracks()[n]);e.audioMuted=!1,e.audioAvailable=!0,e.handleRecord({stream:e.stream}),e.rerender()})).catch((function(t){e.audioAvailable=!1,e.handleRecord({stream:e.stream}),e.rerender()}))})),kt(this,"toggleAudio",(function(){if(this.audioMuted=!this.audioMuted,this.rerender(),this.stream)for(var e=this.stream.getAudioTracks(),t=0;t<e.length;t++){e[t].enabled=!this.audioMuted}})),kt(this,"clearPreview",(function(){document.querySelector(".bb-capture-preview video").src=null,this.file=null,this.rerender()})),kt(this,"handleRecord",(function(e){var t=e.stream,n=this,o=[];this.mediaRecorder=new MediaRecorder(t,{mimeType:this.getSupportedMimeType()}),this.isRecording=!0,this.recordTime=0;var r=document.querySelector(".bb-capture-toolbar-item-timer");this.recordingTimer=setInterval((function(){n.recordTime++;var e=n.maxRecordTime-n.recordTime;e>0?r.innerHTML=n.formatTime(e):(r.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&o.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(o)},this.mediaRecorder.onstop=function(){n.prepareRecording(o)},this.mediaRecorder.start(200),n.rerender()})),kt(this,"prepareRecording",(function(e){var t=new Blob(e,{type:this.getSupportedMimeType()}),n=this.getSupportedMimeType(),o=n.includes("mp4")?"mp4":"webm";this.file=new File([t],"screen-recording.".concat(o),{type:n});var r=document.querySelector(".bb-capture-preview video");r&&(r.src=URL.createObjectURL(t),this.audioAvailable=!0,this.isRecording=!1,this.rerender())})),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){o.rerender()}),100)}var t,n,o;return t=e,(n=[{key:"getSupportedMimeType",value:function(){for(var e=0,t=["video/webm","audio/webm","video/webm;codecs=vp8","video/webm;codecs=daala","video/webm;codecs=h264","audio/webm;codecs=opus","video/mp4"];e<t.length;e++){var n=t[e];if(MediaRecorder.isTypeSupported(n))return n}return"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9<e?":":":0")+e}}])&&xt(t.prototype,n),o&&xt(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function It(e){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},It(e)}function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){Ot(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Et(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Mt(o.key),o)}}function Ot(e,t,n){return(t=Mt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mt(e){var t=function(e,t){if("object"!=It(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=It(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==It(t)?t:String(t)}kt(Ct,"uploadScreenRecording",(function(e){return new Promise((function(t,n){null==e&&t(null);var o=new XMLHttpRequest;o.open("POST",Ge.getInstance().apiUrl+"/uploads/sdk"),Ge.getInstance().injectSession(o);var r=new FormData;r.append("file",e),o.send(r),o.onerror=function(){n()},o.onreadystatechange=function(){4==o.readyState&&(200==o.status?t(JSON.parse(o.response).fileUrl):n())}}))}));var At=function(){function e(t,n,o,r,i,a,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ot(this,"excludeData",{}),Ot(this,"type","BUG"),Ot(this,"priority","LOW"),Ot(this,"customData",{}),Ot(this,"ticketAttributes",{}),Ot(this,"metaData",{}),Ot(this,"consoleLog",[]),Ot(this,"networkLogs",[]),Ot(this,"customEventLog",[]),Ot(this,"formData",{}),Ot(this,"isSilent",!1),Ot(this,"outboundId",void 0),Ot(this,"screenshotData",void 0),Ot(this,"webReplay",void 0),Ot(this,"screenRecordingUrl",void 0),Ot(this,"spamToken",void 0),this.type=t,this.priority=n,this.formData=o,this.isSilent=r,this.excludeData=i,this.outboundId=a,this.spamToken=s}var t,n,o;return t=e,n=[{key:"takeSnapshot",value:function(){var e=this,t=Mr.getInstance();this.customData=cn.getInstance().getCustomData(),this.metaData=zt.getInstance().getMetaData(),this.consoleLog=Yt.getInstance().getLogs(),this.networkLogs=b.getInstance().getRequests(),this.customEventLog=Ye.getInstance().getEventArray(),this.ticketAttributes=cn.getInstance().getTicketAttributes();var n=[],o=t.getGlobalDataItem("webReplay");null!==o&&(this.webReplay=o);var r,i=t.getGlobalDataItem("screenRecordingData");if(null!=i){var a=Ct.uploadScreenRecording(i).then((function(t){t&&(e.screenRecordingUrl=t)}));n.push(a)}if(!this.excludeData||!this.excludeData.screenshot){var s=(r=t.isLiveMode(),yt(r)).then((function(n){if(n){var o=t.getGlobalDataItem("snapshotPosition");n.x=o.x,n.y=o.y,e.screenshotData=n}}));n.push(s)}return Promise.all(n)}},{key:"getData",value:function(){var e={type:this.type,priority:this.priority,customData:this.customData,metaData:this.metaData,consoleLog:this.consoleLog,networkLogs:this.networkLogs,customEventLog:this.customEventLog,formData:Tt(Tt({},this.ticketAttributes),this.formData),isSilent:this.isSilent,outbound:this.outboundId,screenshotData:this.screenshotData,webReplay:this.webReplay,screenRecordingUrl:this.screenRecordingUrl,spamToken:this.spamToken},t=qo.getInstance().getTags();if(t&&t.length>0&&(e.tags=t),this.excludeData)for(var n=Object.keys(this.excludeData),o=0;o<n.length;o++){var r=n[o];!0===this.excludeData[r]&&(e[r]&&delete e[r],"screenshot"===r&&delete e.screenshotData,"replays"===r&&delete e.webReplay)}return e}},{key:"getTicketData",value:function(){var e=this;return new Promise((function(t,n){e.takeSnapshot().then((function(){var n=e.getData();t(n)})).catch((function(e){console.log("Failed to take snapshot",e),n()}))}))}},{key:"sendFeedback",value:function(){var e=this;return new Promise((function(t,n){e.takeSnapshot().then((function(){var o=e.getData(),r=new XMLHttpRequest;r.open("POST",Ge.getInstance().apiUrl+"/bugs/v2"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),Ge.getInstance().injectSession(r),r.onerror=function(e){n()},r.onreadystatechange=function(e){if(4===r.readyState)if(200===r.status||201===r.status)try{var o=JSON.parse(r.responseText);t(o)}catch(i){n()}else n()},r.send(JSON.stringify(o))})).catch((function(e){console.log("Failed to take snapshot",e),n()}))}))}}],n&&Et(t.prototype,n),o&&Et(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Pt(e){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(e)}function Rt(e){return function(e){if(Array.isArray(e))return Nt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nt(e,t)}(e)||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 Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Dt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ft(o.key),o)}}function jt(e,t,n){return(t=Ft(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ft(e){var t=function(e,t){if("object"!=Pt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Pt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pt(t)?t:String(t)}var Bt=function(){function e(){var t=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),jt(this,"frameUrl","https://messenger-app.gleap.io"),jt(this,"gleapFrameContainer",null),jt(this,"gleapFrame",null),jt(this,"comReady",!1),jt(this,"injectedFrame",!1),jt(this,"widgetOpened",!1),jt(this,"listeners",[]),jt(this,"appMode","widget"),jt(this,"markerManager",void 0),jt(this,"escListener",void 0),jt(this,"frameHeight",0),jt(this,"queue",[]),jt(this,"urlHandler",(function(e,t){if(e&&e.length>0)if(t){var n=window.open(e,"_blank");!n||n.closed||void 0===n.closed?window.location.href=e:n.focus()}else window.location.href=e})),jt(this,"autoWhiteListCookieManager",(function(){window&&window.cmp_block_ignoredomains&&window.cmp_block_ignoredomains.concat(["messenger-app.gleap.io"])})),jt(this,"injectFrame",(function(){t.injectedFrame||(t.injectedFrame=!0,t.autoWhiteListCookieManager(),L((function(){nt.getInstance().onConfigLoaded((function(){nt.getInstance().applyStylesFromConfig();var e=document.createElement("div");e.className="gleap-frame-container gleap-frame-container--hidden gl-block",e.innerHTML='<div class="gleap-frame-container-inner"><iframe src="'.concat(t.frameUrl,'" class="gleap-frame" scrolling="yes" allow="autoplay; encrypted-media; fullscreen; microphone *;" frameborder="0"></iframe></div>'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle(),"widget"===t.appMode&&t.showFrameContainer(!0)}))})))})),jt(this,"showImage",(function(e){L((function(){var t=document.createElement("div");t.className="gleap-image-view",t.innerHTML='<div class="gleap-image-view-close">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm97.9-320l-17 17-47 47 47 47 17 17L320 353.9l-17-17-47-47-47 47-17 17L158.1 320l17-17 47-47-47-47-17-17L192 158.1l17 17 47 47 47-47 17-17L353.9 192z"/></svg>\n </div><img class="gleap-image-view-image" src="'.concat(e,'" />'),document.body.appendChild(t);var n=function(){t.remove()};t.querySelector(".gleap-image-view-close").addEventListener("click",(function(){n()})),t.addEventListener("click",(function(e){e.target===t&&n()}))}))})),jt(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--extended",o="gleap-frame-container--survey-full",r="gleap-frame-container--classic",i="gleap-frame-container--classic-left",s="gleap-frame-container--modern-left",l="gleap-frame-container--no-button",c=[r,i,n,s,l,e,o],u=0;u<c.length;u++)t.gleapFrameContainer.classList.remove(c[u]);var p=void 0,d=nt.getInstance().getFlowConfig();d.feedbackButtonPosition!==a.FEEDBACK_BUTTON_CLASSIC&&d.feedbackButtonPosition!==a.FEEDBACK_BUTTON_CLASSIC_BOTTOM||(p=r),d.feedbackButtonPosition===a.FEEDBACK_BUTTON_CLASSIC_LEFT&&(p=i),d.feedbackButtonPosition===a.FEEDBACK_BUTTON_BOTTOM_LEFT&&(p=s),null===a.getInstance().buttonHidden?d.feedbackButtonPosition===a.FEEDBACK_BUTTON_NONE&&(p=l):a.getInstance().buttonHidden&&(p=l),p&&t.gleapFrameContainer.classList.add(p),"survey"===t.appMode&&t.gleapFrameContainer.classList.add(e),"survey_full"!==t.appMode&&"survey_web"!==t.appMode||t.gleapFrameContainer.classList.add(o),"extended"===t.appMode&&t.gleapFrameContainer.classList.add(n),t.gleapFrameContainer.setAttribute("dir",lo.getInstance().isRTLLayout?"rtl":"ltr")}})),this.startCommunication(),"undefined"!=typeof window){var n=function(){try{document.documentElement.style.setProperty("--glvh",.01*window.innerHeight+"px")}catch(e){}};try{window.addEventListener("resize",n),n()}catch(o){}}}var t,n,o;return t=e,n=[{key:"setUrlHandler",value:function(e){this.urlHandler=e}},{key:"isSurvey",value:function(){return"survey"===this.appMode||"survey_full"===this.appMode||"survey_web"===this.appMode}},{key:"setAppMode",value:function(e){this.appMode=e,this.updateFrameStyle();var t=document.querySelector(".gleap-frame-container-inner");"widget"!==this.appMode&&"survey_full"!==this.appMode&&"survey_web"!==this.appMode||!t||(t.style.maxHeight="".concat(700,"px"))}},{key:"registerEscListener",value:function(){var e=this;this.escListener||(this.escListener=function(t){"Escape"===(t=t||window.event).key&&e.hideWidget()},document.addEventListener("keydown",this.escListener))}},{key:"unregisterEscListener",value:function(){this.escListener&&(document.removeEventListener("keydown",this.escListener),this.escListener=null)}},{key:"destroy",value:function(){this.gleapFrame&&this.gleapFrame.remove(),this.gleapFrameContainer&&this.gleapFrameContainer.remove(),this.injectedFrame=!1,this.widgetOpened=!1,this.markerManager=void 0,this.gleapFrameContainer=null,this.gleapFrame=null}},{key:"isOpened",value:function(){return this.widgetOpened||null!=this.markerManager}},{key:"showFrameContainer",value:function(e){var t=this;if(this.gleapFrameContainer){var n=nt.getInstance().getFlowConfig(),o="gleap-frame-container--loading";this.gleapFrameContainer.classList&&(this.gleapFrameContainer.classList.remove("gleap-frame-container--hidden"),e?(this.gleapFrameContainer.classList.add(o),n.disableBGFade&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nofade"),n.disableBGGradient&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nogradient")):this.gleapFrameContainer.classList.remove(o),setTimeout((function(){t.gleapFrameContainer.classList.add("gleap-frame-container--animate")}),500)),this.widgetOpened=!0,this.updateUI()}}},{key:"runWidgetShouldOpenCallback",value:function(){this.gleapFrameContainer&&(this.workThroughQueue(),Mr.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),this.showFrameContainer(!1),this.updateWidgetStatus(),hn.notifyEvent("open"),this.registerEscListener())}},{key:"updateUI",value:function(){Co.getInstance().clearAllNotifications(this.isSurvey()),Co.getInstance().setNotificationCount(0),a.getInstance().updateFeedbackButtonState()}},{key:"showWidget",value:function(){var t=this;setTimeout((function(){t.gleapFrameContainer?t.runWidgetShouldOpenCallback():e.getInstance().injectFrame(),t.updateUI()}),0)}},{key:"updateWidgetStatus",value:function(){this.sendMessage({name:"widget-status-update",data:{isWidgetOpen:this.widgetOpened}})}},{key:"hideMarkerManager",value:function(){this.markerManager&&(this.markerManager.clear(),this.markerManager=null)}},{key:"hideWidget",value:function(){"survey_web"!==this.appMode&&(this.hideMarkerManager(),this.gleapFrameContainer&&(this.gleapFrameContainer.classList.add("gleap-frame-container--hidden"),this.gleapFrameContainer.classList.remove("gleap-frame-container--animate")),this.widgetOpened=!1,this.updateWidgetStatus(),a.getInstance().updateFeedbackButtonState(),hn.notifyEvent("close"),Co.getInstance().reloadNotificationsFromCache(),this.unregisterEscListener(),"undefined"!=typeof window&&void 0!==window.focus&&window.focus())}},{key:"sendMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{this.gleapFrame=document.querySelector(".gleap-frame"),this.comReady&&this.gleapFrame&&this.gleapFrame.contentWindow?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}catch(n){}}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:Ge.getInstance().getSession(),apiUrl:Ge.getInstance().apiUrl,sdkKey:Ge.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:nt.getInstance().getFlowConfig(),aiTools:nt.getInstance().getAiTools(),overrideLanguage:lo.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new oo(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){var e=Rt(this.queue);this.queue=[];for(var t=0;t<e.length;t++)this.sendMessage(e[t],!0)}},{key:"startCommunication",value:function(){var e=this;this.addMessageListener((function(t){if("ping"===t.name&&(e.comReady=!0,e.sendConfigUpdate(),e.sendSessionUpdate(),e.workThroughQueue(),setTimeout((function(){e.runWidgetShouldOpenCallback()}),300)),"play-ping"===t.name&&jo.ping(),"open-image"===t.name&&e.showImage(t.data.url),"page-changed"===t.name&&(!t.data||"newsdetails"!==t.data.name&&"appextended"!==t.data.name?"extended"===e.appMode&&e.setAppMode("widget"):e.setAppMode("extended")),"collect-ticket-data"===t.name){var n={customData:cn.getInstance().getCustomData(),metaData:zt.getInstance().getMetaData(),consoleLog:Yt.getInstance().getLogs(),networkLogs:b.getInstance().getRequests(),customEventLog:Ye.getInstance().getEventArray(),formData:cn.getInstance().getTicketAttributes()},o=qo.getInstance().getTags();o&&o.length>0&&(n.tags=o),e.sendMessage({name:"collect-ticket-data",data:n})}if("height-update"===t.name){e.frameHeight=t.data;var r=document.querySelector(".gleap-frame-container-inner");"survey"!==e.appMode&&"survey_full"!==e.appMode&&"survey_web"!==e.appMode||!r||(r.style.maxHeight="".concat(e.frameHeight,"px"))}if("notify-event"===t.name&&hn.notifyEvent(t.data.type,t.data.data),"cleanup-drawings"===t.name&&e.hideMarkerManager(),"open-url"===t.name){var i=t.data,a=!!t.newTab;e.urlHandler(i,a)}if("run-custom-action"===t.name&&xn.triggerCustomAction(t.data,{shareToken:t.shareToken}),"close-widget"===t.name&&e.hideWidget(),"tool-execution"===t.name&&hn.notifyEvent("tool-execution",t.data),"send-feedback"===t.name){var s=t.data.formData,l=t.data.action,c=t.data.outboundId,u=t.data.spamToken;new At(l.feedbackType,"MEDIUM",s,!1,l.excludeData,c,u).sendFeedback().then((function(t){if(e.sendMessage({name:"feedback-sent",data:t}),hn.notifyEvent("feedback-sent",s),c&&c.length>0){hn.notifyEvent("outbound-sent",{outboundId:c,outbound:l,formData:s});try{delete s.reportedBy}catch(n){}Mr.trackEvent("outbound-".concat(c,"-submitted"),s)}})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),hn.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl||t.origin===Ao.getInstance().bannerUrl)try{for(var n=JSON.parse(t.data),o=0;o<e.listeners.length;o++)e.listeners[o]&&e.listeners[o](n)}catch(r){}}))}},{key:"addMessageListener",value:function(e){this.listeners.push(e)}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Dt(t.prototype,n),o&&Dt(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function _t(e){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_t(e)}function Ht(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ut(o.key),o)}}function qt(e,t,n){return(t=Ut(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ut(e){var t=function(e,t){if("object"!=_t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=_t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_t(t)?t:String(t)}jt(Bt,"instance",void 0);var zt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),qt(this,"sessionStart",new Date),qt(this,"appBuildNumber",""),qt(this,"appVersionCode",""),qt(this,"environment","prod")}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"setAppVersionCode",value:function(e){this.getInstance().appVersionCode=e}},{key:"setAppBuildNumber",value:function(e){this.getInstance().appBuildNumber=e}}],(n=[{key:"getSessionDuration",value:function(){var e=new Date;return Math.round((e.getTime()-this.sessionStart.getTime())/1e3)}},{key:"getMetaData",value:function(){var e,t,n,o=navigator.userAgent,r=navigator.appName,i=""+parseFloat(navigator.appVersion),a=parseInt(navigator.appVersion,10);-1!==(t=o.indexOf("Opera"))?(r="Opera",i=o.substring(t+6),-1!==(t=o.indexOf("Version"))&&(i=o.substring(t+8))):-1!==(t=o.indexOf("MSIE"))?(r="Microsoft Internet Explorer",i=o.substring(t+5)):-1!==(t=o.indexOf("Chrome"))?(r="Chrome",i=o.substring(t+7)):-1!==(t=o.indexOf("Safari"))?(r="Safari",i=o.substring(t+7),-1!==(t=o.indexOf("Version"))&&(i=o.substring(t+8))):-1!==(t=o.indexOf("Firefox"))?(r="Firefox",i=o.substring(t+8)):(e=o.lastIndexOf(" ")+1)<(t=o.lastIndexOf("/"))&&(r=o.substring(e,t),i=o.substring(t+1),r.toLowerCase()===r.toUpperCase()&&(r=navigator.appName)),-1!==(n=i.indexOf(";"))&&(i=i.substring(0,n)),-1!==(n=i.indexOf(" "))&&(i=i.substring(0,n)),a=parseInt(""+i,10),isNaN(a)&&(i=""+parseFloat(navigator.appVersion),a=parseInt(navigator.appVersion,10));var s="Unknown OS";return-1!==navigator.appVersion.indexOf("Win")&&(s="Windows"),-1!==navigator.appVersion.indexOf("Mac")&&(s="MacOS"),-1!==navigator.appVersion.indexOf("X11")&&(s="UNIX"),-1!==navigator.appVersion.indexOf("Linux")&&(s="Linux"),-1!==navigator.appVersion.indexOf("iPad")&&(s="iPad"),-1!==navigator.appVersion.indexOf("iPhone")&&(s="iPhone"),-1!==navigator.appVersion.indexOf("Android")&&(s="Android"),{browserName:r+"("+i+")",userAgent:o,browser:r,systemName:s,buildVersionNumber:this.appBuildNumber,releaseVersionNumber:this.appVersionCode,sessionDuration:this.getSessionDuration(),devicePixelRatio:window.devicePixelRatio,screenWidth:window.screen.width,screenHeight:window.screen.height,innerWidth:window.innerWidth,innerHeight:window.innerHeight,currentUrl:window.location.href,language:navigator.language||navigator.userLanguage,mobile:w(),sdkVersion:"14.1.4",sdkType:"javascript",environment:this.environment}}}])&&Ht(t.prototype,n),o&&Ht(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Wt(e){return Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wt(e)}function Gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(n),!0).forEach((function(t){Kt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Zt(o.key),o)}}function Kt(e,t,n){return(t=Zt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){var t=function(e,t){if("object"!=Wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Wt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Wt(t)?t:String(t)}qt(zt,"instance",void 0);var Yt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Kt(this,"logArray",[]),Kt(this,"disabled",!1),Kt(this,"originalConsoleLog",void 0),Kt(this,"logMaxLength",500)}var t,n,o;return t=e,n=[{key:"getLogs",value:function(){return this.logArray}},{key:"stop",value:function(){this.disabled=!0,this.originalConsoleLog&&(window.console=this.originalConsoleLog)}},{key:"addLog",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:k(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var o=0;o<e.length;o++)n+=e[o]+" "}catch(r){}this.addLog(n,t)}}},{key:"start",value:function(){if(!this.disabled){var e,t=this;window.console=(e=window.console,window.console&&e||(e={}),t.originalConsoleLog=e,Vt(Vt({},e),{},{log:function(){t.addLogWithArgs(arguments,"INFO"),e.log&&e.log.apply(e,arguments)},warn:function(){t.addLogWithArgs(arguments,"WARNING"),e.warn&&e.warn.apply(e,arguments)},error:function(){t.addLogWithArgs(arguments,"ERROR"),e.error&&e.error.apply(e,arguments)},info:function(n){t.addLogWithArgs(arguments,"INFO"),e.info&&e.info.apply(e,arguments)}}))}}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Xt(t.prototype,n),o&&Xt(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Jt(e){return Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jt(e)}function Qt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,$t(o.key),o)}}function $t(e){var t=function(e,t){if("object"!=Jt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Jt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jt(t)?t:String(t)}Kt(Yt,"instance",void 0);var en,tn,nn,on=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,n=[{key:"start",value:function(){document.addEventListener("click",(function(e){if(e.target){if("A"===e.target.tagName&&"gleap:"===e.target.protocol){e.preventDefault();var t=e.target.href;Or(t)}Bt.getInstance().isOpened()||Yt.getInstance().addLog(function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=k(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),o="",r="";if(void 0!==e.getAttribute){var i=e.getAttribute("id");i&&(o=' id="'.concat(i,'"'));var a=e.getAttribute("class");a&&(r=' class="'.concat(a,'"'))}var s=(e.tagName||"").toLowerCase(),l="<",c=">";return t||(l="[",c="]"),"".concat(l).concat(s).concat(o).concat(r).concat(c).concat(n).concat(l,"/").concat(s).concat(c)}(e.target),"CLICK")}}))}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Qt(t.prototype,n),o&&Qt(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}function an(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ln(o.key),o)}}function sn(e,t,n){return(t=ln(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ln(e){var t=function(e,t){if("object"!=rn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=rn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rn(t)?t:String(t)}en=on,nn=void 0,(tn=$t(tn="instance"))in en?Object.defineProperty(en,tn,{value:nn,enumerable:!0,configurable:!0,writable:!0}):en[tn]=nn;var cn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),sn(this,"customData",{}),sn(this,"ticketAttributes",{})}var t,n,o;return t=e,n=[{key:"getCustomData",value:function(){return this.customData}},{key:"attachCustomData",value:function(e){this.customData=Object.assign(this.customData,x(e))}},{key:"setCustomData",value:function(e,t){this.customData[e]=t}},{key:"removeCustomData",value:function(e){delete this.customData[e]}},{key:"clearCustomData",value:function(){this.customData={}}},{key:"setTicketAttribute",value:function(e,t){this.ticketAttributes[e]=t}},{key:"unsetTicketAttribute",value:function(e){delete this.ticketAttributes[e]}},{key:"clearTicketAttributes",value:function(){this.ticketAttributes={}}},{key:"getTicketAttributes",value:function(){return this.ticketAttributes}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&an(t.prototype,n),o&&an(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function pn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,fn(o.key),o)}}function dn(e,t,n){return(t=fn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fn(e){var t=function(e,t){if("object"!=un(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=un(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==un(t)?t:String(t)}sn(cn,"instance",void 0);var hn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),dn(this,"eventListeners",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"notifyEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=Mr.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var o=this.getInstance().eventListeners[e];if(o)for(var r=0;r<o.length;r++){var i=o[r];i&&i(t)}}},{key:"on",value:function(e,t){var n=this.getInstance();n.eventListeners[e]||(n.eventListeners[e]=[]),n.eventListeners[e].push(t)}}],(n=null)&&pn(t.prototype,n),o&&pn(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function gn(e){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gn(e)}function mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function vn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){yn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,wn(o.key),o)}}function yn(e,t,n){return(t=wn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wn(e){var t=function(e,t){if("object"!=gn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=gn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==gn(t)?t:String(t)}dn(hn,"instance",void 0);var xn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),yn(this,"customActionCallbacks",[])}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"registerCustomAction",value:function(e){var t=this.getInstance();t.customActionCallbacks&&t.customActionCallbacks.push(e)}},{key:"triggerCustomAction",value:function(e,t){var n=this.getInstance();if(n.customActionCallbacks)for(var o=0;o<n.customActionCallbacks.length;o++){var r=n.customActionCallbacks[o];r&&r(vn({name:e},t||{}))}}}],(n=null)&&bn(t.prototype,n),o&&bn(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function kn(){kn=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new M(o||[]);return r(a,"_invoke",{value:L(e,n,s)}),a}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",f="suspendedYield",h="executing",g="completed",m={};function v(){}function b(){}function y(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(A([])));k&&k!==n&&o.call(k,a)&&(w=k);var S=y.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function n(r,i,a,s){var l=p(e[r],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==Pn(u)&&o.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var i;r(this,"_invoke",{value:function(e,o){function r(){return new t((function(t,r){n(e,o,t,r)}))}return i=i?i.then(r,r):r()}})}function L(t,n,o){var r=d;return function(i,a){if(r===h)throw new Error("Generator is already running");if(r===g){if("throw"===i)throw a;return{value:e,done:!0}}for(o.method=i,o.arg=a;;){var s=o.delegate;if(s){var l=T(s,o);if(l){if(l===m)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===d)throw r=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=h;var c=p(t,n,o);if("normal"===c.type){if(r=o.done?g:f,c.arg===m)continue;return{value:c.arg,done:o.done}}"throw"===c.type&&(r=g,o.method="throw",o.arg=c.arg)}}}function T(t,n){var o=n.method,r=t.iterator[o];if(r===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),m;var i=p(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function n(){for(;++r<t.length;)if(o.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(Pn(t)+" is not iterable")}return b.prototype=y,r(S,"constructor",{value:y,configurable:!0}),r(y,"constructor",{value:b,configurable:!0}),b.displayName=c(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(I.prototype),c(I.prototype,s,(function(){return this})),t.AsyncIterator=I,t.async=function(e,n,o,r,i){void 0===i&&(i=Promise);var a=new I(u(e,n,o,r),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=A,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(o,r){return s.type="throw",s.arg=t,n.next=o,r&&(n.method="next",n.arg=e),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;O(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:A(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),m}},t}function Sn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,t)||Ln(e,t)||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 Cn(e){return function(e){if(Array.isArray(e))return Tn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ln(e)||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 In(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ln(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Ln(e,t){if(e){if("string"==typeof e)return Tn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tn(e,t):void 0}}function Tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function En(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function On(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,An(o.key),o)}}function Mn(e,t,n){return t&&On(e.prototype,t),n&&On(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function An(e){var t=function(e,t){if("object"!=Pn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Pn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pn(t)?t:String(t)}function Pn(e){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(e)}yn(xn,"instance",void 0);var Rn=function(){var e,t;function n(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function o(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function r(e){try{var t=e.rules||e.cssRules;return t?function(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}(Array.from(t).map(i).join("")):null}catch(n){return null}}function i(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=r(e.styleSheet)||t}catch(n){}return t}(t=e||(e={}))[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment";var a=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(t,o)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function s(e){var t=e.maskInputOptions,n=e.tagName,o=e.type,r=e.value,i=e.maskInputFn,a=r||"";return(t[n.toLowerCase()]||t[o])&&(a=i?i(a):"*".repeat(a.length)),a}var l="__rrweb_original__";var c=1,u=new RegExp("[^a-z0-9-_:]"),p=-2;function d(){return c++}var f,h,g=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,m=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,v=/^(data:)([^,]*),(.*)/i;function b(e,t){return(e||"").replace(g,(function(e,n,o,r,i,a){var s=o||i||a,l=n||r||"";if(!s)return e;if(!m.test(s)||v.test(s))return"url(".concat(l).concat(s).concat(l,")");if("/"===s[0])return"url(".concat(l).concat(function(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}(t)+s).concat(l,")");var c=t.split("/"),u=s.split("/");c.pop();for(var p=0,d=u;p<d.length;p++){var f=d[p];"."!==f&&(".."===f?c.pop():c.push(f))}return"url(".concat(l).concat(c.join("/")).concat(l,")")}))}var y=/^[^ \t\n\r\u000c]+/,w=/^[, \t\n\r\u000c]+/;function x(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function k(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function S(){var e=document.createElement("a");return e.href="",e.href}function C(e,t,n,o){return"src"===n||"href"===n&&o&&("use"!==t||"#"!==o[0])||"xlink:href"===n&&o&&"#"!==o[0]||"background"===n&&o&&("table"===t||"td"===t||"th"===t)?x(e,o):"srcset"===n&&o?function(e,t){if(""===t.trim())return t;var n=0;function o(e){var o,r=e.exec(t.substring(n));return r?(o=r[0],n+=o.length,o):""}for(var r=[];o(w),!(n>=t.length);){var i=o(y);if(","===i.slice(-1))i=x(e,i.substring(0,i.length-1)),r.push(i);else{var a="";i=x(e,i);for(var s=!1;;){var l=t.charAt(n);if(""===l){r.push((i+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){n+=1,r.push((i+a).trim());break}"("===l&&(s=!0)}a+=l,n+=1}}}return r.join(", ")}(e,o):"style"===n&&o?b(o,S()):"object"===t&&"data"===n&&o?x(e,o):o}function I(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&I(e.parentNode,t,n);for(var o=e.classList.length;o--;){var r=e.classList[o];if(t.test(r))return!0}return!!n&&I(e.parentNode,t,n)}function L(e,t,n){var o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("string"==typeof t){if(o.classList.contains(t)||o.closest(".".concat(t)))return!0}else if(I(o,t,!0))return!0;return!(!n||!o.matches(n)&&!o.closest(n))}function T(t,n){var o=n.doc,i=n.mirror,a=n.blockClass,c=n.blockSelector,p=n.maskTextClass,d=n.maskTextSelector,g=n.inlineStylesheet,m=n.maskInputOptions,v=void 0===m?{}:m,y=n.maskTextFn,w=n.maskInputFn,x=n.dataURLOptions,I=void 0===x?{}:x,T=n.inlineImages,E=n.recordCanvas,O=n.keepIframeSrcFn,M=n.newlyAddedElement,A=void 0!==M&&M,P=function(e,t){if(t.hasNode(e)){var n=t.getId(e);return 1===n?void 0:n}}(o,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode}:{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:P};case t.ELEMENT_NODE:return function(t,n){for(var o=n.doc,i=n.blockClass,a=n.blockSelector,c=n.inlineStylesheet,p=n.maskInputOptions,d=void 0===p?{}:p,g=n.maskInputFn,m=n.dataURLOptions,v=void 0===m?{}:m,y=n.inlineImages,w=n.recordCanvas,x=n.keepIframeSrcFn,I=n.newlyAddedElement,L=void 0!==I&&I,T=n.rootId,E=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var o=e.classList.length;o--;){var r=e.classList[o];if(t.test(r))return!0}return!!n&&e.matches(n)}(t,i,a),O=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return u.test(t)?"div":t}(t),M={},A=t.attributes.length,P=0;P<A;P++){var R=t.attributes[P];M[R.name]=C(o,O,R.name,R.value)}if("link"===O&&c){var N=Array.from(o.styleSheets).find((function(e){return e.href===t.href})),D=null;N&&(D=r(N)),D&&(delete M.rel,delete M.href,M._cssText=b(D,N.href))}if("style"===O&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(D=r(t.sheet))&&(M._cssText=b(D,S()))}if("input"===O||"textarea"===O||"select"===O){var j=t.value,F=t.checked;"radio"!==M.type&&"checkbox"!==M.type&&"submit"!==M.type&&"button"!==M.type&&j?M.value=s({type:M.type,tagName:O,value:j,maskInputOptions:d,maskInputFn:g}):F&&(M.checked=F)}if("option"===O&&(t.selected&&!d.select?M.selected=!0:delete M.selected),"canvas"===O&&w)if("2d"===t.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var o=0;o<e.height;o+=50){var r=t.getImageData,i=l in r?r[l]:r;if(new Uint32Array(i.call(t,n,o,Math.min(50,e.width-n),Math.min(50,e.height-o)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(t)||(M.rr_dataURL=t.toDataURL(v.type,v.quality));else if(!("__context"in t)){var B=t.toDataURL(v.type,v.quality),_=document.createElement("canvas");_.width=t.width,_.height=t.height,B!==_.toDataURL(v.type,v.quality)&&(M.rr_dataURL=B)}if("img"===O&&y){f||(f=o.createElement("canvas"),h=f.getContext("2d"));var H=t,q=H.crossOrigin;H.crossOrigin="anonymous";var U=function(){try{f.width=H.naturalWidth,f.height=H.naturalHeight,h.drawImage(H,0,0),M.rr_dataURL=f.toDataURL(v.type,v.quality)}catch(e){console.warn("Cannot inline img src=".concat(H.currentSrc,"! Error: ").concat(e))}q?M.crossOrigin=q:H.removeAttribute("crossorigin")};H.complete&&0!==H.naturalWidth?U():H.onload=U}if(("audio"===O||"video"===O)&&(M.rr_mediaState=t.paused?"paused":"played",M.rr_mediaCurrentTime=t.currentTime),L||(t.scrollLeft&&(M.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(M.rr_scrollTop=t.scrollTop)),E){var z=t.getBoundingClientRect(),W=z.width,G=z.height;M={class:M.class,rr_width:"".concat(W,"px"),rr_height:"".concat(G,"px")}}return"iframe"===O&&!x(M.src)&&(t.contentDocument||(M.rr_src=M.src),delete M.src),{type:e.Element,tagName:O,attributes:M,childNodes:[],isSVG:k(t)||void 0,needBlock:E,rootId:T}}(t,{doc:o,blockClass:a,blockSelector:c,inlineStylesheet:g,maskInputOptions:v,maskInputFn:w,dataURLOptions:I,inlineImages:T,recordCanvas:E,keepIframeSrcFn:O,newlyAddedElement:A,rootId:P});case t.TEXT_NODE:return function(t,n){var o,r=n.maskTextClass,i=n.maskTextSelector,a=n.maskTextFn,s=n.rootId,l=t.parentNode&&t.parentNode.tagName,c=t.textContent,u="STYLE"===l||void 0,p="SCRIPT"===l||void 0;if(u&&c){try{t.nextSibling||t.previousSibling||null!==(o=t.parentNode.sheet)&&void 0!==o&&o.cssRules&&(c=function(e){return e.cssRules?Array.from(e.cssRules).map((function(e){return e.cssText||""})).join(""):""}(t.parentNode.sheet))}catch(y){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(y),t)}c=b(c,S())}return p&&(c="SCRIPT_PLACEHOLDER"),!u&&!p&&c&&L(t,r,i)&&(c=a?a(c):c.replace(/[\S]/g,"*")),{type:e.Text,textContent:c||"",isStyle:u,rootId:s}}(t,{maskTextClass:p,maskTextSelector:d,maskTextFn:y,rootId:P});case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:P};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:P};default:return!1}}function E(e){return void 0===e?"":e.toLowerCase()}function O(t,r){var i,a=r.doc,s=r.mirror,l=r.blockClass,c=r.blockSelector,u=r.maskTextClass,f=r.maskTextSelector,h=r.skipChild,g=void 0!==h&&h,m=r.inlineStylesheet,v=void 0===m||m,b=r.maskInputOptions,y=void 0===b?{}:b,w=r.maskTextFn,x=r.maskInputFn,k=r.slimDOMOptions,S=r.dataURLOptions,C=void 0===S?{}:S,I=r.inlineImages,L=void 0!==I&&I,M=r.recordCanvas,A=void 0!==M&&M,P=r.onSerialize,R=r.onIframeLoad,N=r.iframeLoadTimeout,D=void 0===N?5e3:N,j=r.onStylesheetLoad,F=r.stylesheetLoadTimeout,B=void 0===F?5e3:F,_=r.keepIframeSrcFn,H=void 0===_?function(){return!1}:_,q=r.newlyAddedElement,U=void 0!==q&&q,z=r.preserveWhiteSpace,W=void 0===z||z,G=T(t,{doc:a,mirror:s,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:f,inlineStylesheet:v,maskInputOptions:y,maskTextFn:w,maskInputFn:x,dataURLOptions:C,inlineImages:L,recordCanvas:A,keepIframeSrcFn:H,newlyAddedElement:U});if(!G)return console.warn(t,"not serialized"),null;i=s.hasNode(t)?s.getId(t):function(t,n){return!!(n.comment&&t.type===e.Comment||t.type===e.Element&&(n.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js"))||n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(E(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===E(t.attributes.name)||"icon"===E(t.attributes.rel)||"apple-touch-icon"===E(t.attributes.rel)||"shortcut icon"===E(t.attributes.rel)))||"meta"===t.tagName&&(n.headMetaDescKeywords&&E(t.attributes.name).match(/^description|keywords$/)||n.headMetaSocial&&(E(t.attributes.property).match(/^(og|twitter|fb):/)||E(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===E(t.attributes.name))||n.headMetaRobots&&("robots"===E(t.attributes.name)||"googlebot"===E(t.attributes.name)||"bingbot"===E(t.attributes.name))||n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"]||n.headMetaAuthorship&&("author"===E(t.attributes.name)||"generator"===E(t.attributes.name)||"framework"===E(t.attributes.name)||"publisher"===E(t.attributes.name)||"progid"===E(t.attributes.name)||E(t.attributes.property).match(/^article:/)||E(t.attributes.property).match(/^product:/))||n.headMetaVerification&&("google-site-verification"===E(t.attributes.name)||"yandex-verification"===E(t.attributes.name)||"csrf-token"===E(t.attributes.name)||"p:domain_verify"===E(t.attributes.name)||"verify-v1"===E(t.attributes.name)||"verification"===E(t.attributes.name)||"shopify-checkout-api-token"===E(t.attributes.name)))))}(G,k)||!W&&G.type===e.Text&&!G.isStyle&&!G.textContent.replace(/^\s+|\s+$/gm,"").length?p:d();var V=Object.assign(G,{id:i});if(s.add(t,V),i===p)return null;P&&P(t);var X=!g;if(V.type===e.Element){X=X&&!V.needBlock,delete V.needBlock;var K=t.shadowRoot;K&&o(K)&&(V.isShadowHost=!0)}if((V.type===e.Document||V.type===e.Element)&&X){k.headWhitespace&&V.type===e.Element&&"head"===V.tagName&&(W=!1);for(var Z={doc:a,mirror:s,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:f,skipChild:g,inlineStylesheet:v,maskInputOptions:y,maskTextFn:w,maskInputFn:x,slimDOMOptions:k,dataURLOptions:C,inlineImages:L,recordCanvas:A,preserveWhiteSpace:W,onSerialize:P,onIframeLoad:R,iframeLoadTimeout:D,onStylesheetLoad:j,stylesheetLoadTimeout:B,keepIframeSrcFn:H},Y=0,J=Array.from(t.childNodes);Y<J.length;Y++){(ee=O(J[Y],Z))&&V.childNodes.push(ee)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot)for(var Q=0,$=Array.from(t.shadowRoot.childNodes);Q<$.length;Q++){var ee;(ee=O($[Q],Z))&&(o(t.shadowRoot)&&(ee.isShadow=!0),V.childNodes.push(ee))}}return t.parentNode&&n(t.parentNode)&&o(t.parentNode)&&(V.isShadow=!0),V.type===e.Element&&"iframe"===V.tagName&&function(e,t,n){var o=e.contentWindow;if(o){var r,i=!1;try{r=o.document.readyState}catch(l){return}if("complete"!==r){var a=setTimeout((function(){i||(t(),i=!0)}),n);return void e.addEventListener("load",(function(){clearTimeout(a),i=!0,t()}))}var s="about:blank";if(o.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}(t,(function(){var e=t.contentDocument;if(e&&R){var n=O(e,{doc:e,mirror:s,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:y,maskTextFn:w,maskInputFn:x,slimDOMOptions:k,dataURLOptions:C,inlineImages:L,recordCanvas:A,preserveWhiteSpace:W,onSerialize:P,onIframeLoad:R,iframeLoadTimeout:D,onStylesheetLoad:j,stylesheetLoadTimeout:B,keepIframeSrcFn:H});n&&R(t,n)}}),D),V.type===e.Element&&"link"===V.tagName&&"stylesheet"===V.attributes.rel&&function(e,t,n){var o,r=!1;try{o=e.sheet}catch(a){return}if(!o){var i=setTimeout((function(){r||(t(),r=!0)}),n);e.addEventListener("load",(function(){clearTimeout(i),r=!0,t()}))}}(t,(function(){if(j){var e=O(t,{doc:a,mirror:s,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:y,maskTextFn:w,maskInputFn:x,slimDOMOptions:k,dataURLOptions:C,inlineImages:L,recordCanvas:A,preserveWhiteSpace:W,onSerialize:P,onIframeLoad:R,iframeLoadTimeout:D,onStylesheetLoad:j,stylesheetLoadTimeout:B,keepIframeSrcFn:H});e&&j(t,e)}}),B),V}function M(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,o={capture:!0,passive:!0};return n.addEventListener(e,t,o),function(){return n.removeEventListener(e,t,o)}}var A="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",P={map:{},getId:function(){return console.error(A),-1},getNode:function(){return console.error(A),null},removeNodeFromMap:function(){console.error(A)},has:function(){return console.error(A),!1},reset:function(){console.error(A)}};function R(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null,r=0;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var l=Date.now();!r&&!1===n.leading&&(r=l);var c=t-(l-r),u=this;c<=0||c>t?(o&&(clearTimeout(o),o=null),r=l,e.apply(u,a)):!o&&!1!==n.trailing&&(o=setTimeout((function(){r=!1===n.leading?0:Date.now(),o=null,e.apply(u,a)}),c))}}function N(e,t,n,o){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,i=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,o?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),i&&i.set&&i.set.call(this,e)}}),function(){return N(e,t,i||{},!0)}}function D(e,t,n){try{if(!(t in e))return function(){};var o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,function(){e[t]=o}}catch(i){return function(){}}}function j(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function F(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function B(e,t,n,o){if(!e)return!1;var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!r)return!1;if("string"==typeof t){if(r.classList.contains(t)||o&&null!==r.closest("."+t))return!0}else if(I(r,t,o))return!0;return!(!n||!(e.matches(n)||o&&null!==r.closest(n)))}function _(e,t){return t.getId(e)===p}function H(e,t){if(n(e))return!1;var o=t.getId(e);return!t.has(o)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||H(e.parentNode,t))}function q(e){return Boolean(e.changedTouches)}function U(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function z(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function W(e){return Boolean(null==e?void 0:e.shadowRoot)}("undefined"==typeof window?"undefined":Pn(window))<"u"&&window.Proxy&&window.Reflect&&(P=new Proxy(P,{get:function(e,t,n){return"map"===t&&console.error(A),Reflect.get(e,t,n)}}));var G=function(){function e(){En(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return Mn(e,[{key:"getId",value:function(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}(),V=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(V||{}),X=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e}(X||{}),K=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(K||{}),Z=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(Z||{}),Y=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(Y||{}),J=function(e){return e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e}(J||{});function Q(e){return"__ln"in e}var $=function(){function e(){En(this,e),this.length=0,this.head=null}return Mn(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++){var o;t=(null===(o=t)||void 0===o?void 0:o.next)||null}return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Q(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Q(e.nextSibling)&&e.nextSibling.__ln.previous){var o=e.nextSibling.__ln.previous;t.previous=o,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,o&&(o.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;!this.head||(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}]),e}(),ee=function(e,t){return"".concat(e,"@").concat(t)},te=function(){function e(){var t=this;En(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],o=new $,r=function(e){for(var n=e,o=p;o===p;)o=(n=n&&n.nextSibling)&&t.mirror.getId(n);return o},i=function(i){var a,s,l,c,u=null;(null==(s=null==(a=i.getRootNode)?void 0:a.call(i))?void 0:s.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&i.getRootNode().host&&(u=i.getRootNode().host);for(var p=u;(null==(c=null==(l=null===(d=p)||void 0===d?void 0:d.getRootNode)?void 0:l.call(p))?void 0:c.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&p.getRootNode().host;){var d;p=p.getRootNode().host}var f=!(t.doc.contains(i)||p&&t.doc.contains(p));if(i.parentNode&&!f){var h=n(i.parentNode)?t.mirror.getId(u):t.mirror.getId(i.parentNode),g=r(i);if(-1===h||-1===g)return o.addNode(i);var m=O(i,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){U(e,t.mirror)&&t.iframeManager.addIframe(e),z(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),W(i)&&t.shadowDomManager.addShadowRoot(i.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});m&&e.push({parentId:h,nextId:g,node:m})}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());for(var a=0,s=Array.from(t.movedSet.values());a<s.length;a++){var l=s[a];oe(t.removes,l,t.mirror)&&!t.movedSet.has(l.parentNode)||i(l)}for(var c=0,u=Array.from(t.addedSet.values());c<u.length;c++){var d=u[c];!ie(t.droppedSet,d)&&!oe(t.removes,d,t.mirror)||ie(t.movedSet,d)?i(d):t.droppedSet.add(d)}for(var f=null;o.length;){var h=null;if(f){var g=t.mirror.getId(f.value.parentNode),m=r(f.value);-1!==g&&-1!==m&&(h=f)}if(!h)for(var v=o.length-1;v>=0;v--){var b=o.get(v);if(b){var y=t.mirror.getId(b.value.parentNode);if(-1===r(b.value))continue;if(-1!==y){h=b;break}var w=b.value;if(w.parentNode&&w.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var x=w.parentNode.host;if(-1!==t.mirror.getId(x)){h=b;break}}}}if(!h){for(;o.head;)o.removeNode(o.head.value);break}f=h.previous,o.removeNode(h.value),i(h.value)}var k={texts:t.texts.map((function(e){return{id:t.mirror.getId(e.node),value:e.value}})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){return{id:t.mirror.getId(e.node),attributes:e.attributes}})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};!k.texts.length&&!k.attributes.length&&!k.removes.length&&!k.adds.length||(t.texts=[],t.attributes=[],t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(k))}},this.processMutation=function(e){if(!_(e.target,t.mirror))switch(e.type){case"characterData":var r=e.target.textContent;!B(e.target,t.blockClass,t.blockSelector,!1)&&r!==e.oldValue&&t.texts.push({value:L(e.target,t.maskTextClass,t.maskTextSelector)&&r?t.maskTextFn?t.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:e.target});break;case"attributes":var i=e.target,a=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(a=s({maskInputOptions:t.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:a,maskInputFn:t.maskInputFn})),B(e.target,t.blockClass,t.blockSelector,!1)||a===e.oldValue)return;var l=t.attributes.find((function(t){return t.node===e.target}));if("IFRAME"===i.tagName&&"src"===e.attributeName&&!t.keepIframeSrcFn(a)){if(i.contentDocument)return;e.attributeName="rr_src"}if(l||(l={node:e.target,attributes:{}},t.attributes.push(l)),"style"===e.attributeName){var c=t.doc.createElement("span");e.oldValue&&c.setAttribute("style",e.oldValue),(void 0===l.attributes.style||null===l.attributes.style)&&(l.attributes.style={});for(var u=l.attributes.style,p=0,d=Array.from(i.style);p<d.length;p++){var f=d[p],h=i.style.getPropertyValue(f),g=i.style.getPropertyPriority(f);(h!==c.style.getPropertyValue(f)||g!==c.style.getPropertyPriority(f))&&(u[f]=""===g?h:[h,g])}for(var m=0,v=Array.from(c.style);m<v.length;m++){var b=v[m];""===i.style.getPropertyValue(b)&&(u[b]=!1)}}else l.attributes[e.attributeName]=C(t.doc,i.tagName,e.attributeName,a);break;case"childList":if(B(e.target,t.blockClass,t.blockSelector,!0))return;e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(r){var i=t.mirror.getId(r),a=n(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);B(e.target,t.blockClass,t.blockSelector,!1)||_(r,t.mirror)||!function(e,t){return-1!==t.getId(e)}(r,t.mirror)||(t.addedSet.has(r)?(ne(t.addedSet,r),t.droppedSet.add(r)):t.addedSet.has(e.target)&&-1===i||H(e.target,t.mirror)||(t.movedSet.has(r)&&t.movedMap[ee(i,a)]?ne(t.movedSet,r):t.removes.push({parentId:a,id:i,isShadow:!(!n(e.target)||!o(e.target))||void 0})),t.mapRemoves.push(r))}))}},this.genAdds=function(e,n){if(t.mirror.hasNode(e)){if(_(e,t.mirror))return;t.movedSet.add(e);var o=null;n&&t.mirror.hasNode(n)&&(o=t.mirror.getId(n)),o&&-1!==o&&(t.movedMap[ee(t.mirror.getId(e),o)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);B(e,t.blockClass,t.blockSelector,!1)||e.childNodes.forEach((function(e){return t.genAdds(e)}))}}return Mn(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function ne(e,t){e.delete(t),t.childNodes.forEach((function(t){return ne(e,t)}))}function oe(e,t,n){return 0!==e.length&&re(e,t,n)}function re(e,t,n){var o=t.parentNode;if(!o)return!1;var r=n.getId(o);return!!e.some((function(e){return e.id===r}))||re(e,o,n)}function ie(e,t){return 0!==e.size&&ae(e,t)}function ae(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||ae(e,n))}var se=Object.defineProperty,le=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,fe=function(e,t,n){return t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},he=function(e,t){for(var n in t||(t={}))pe.call(t,n)&&fe(e,n,t[n]);if(ue){var o,r=In(ue(t));try{for(r.s();!(o=r.n()).done;){n=o.value;de.call(t,n)&&fe(e,n,t[n])}}catch(i){r.e(i)}finally{r.f()}}return e},ge=function(e,t){return le(e,ce(t))},me=[],ve=("undefined"==typeof CSSGroupingRule?"undefined":Pn(CSSGroupingRule))<"u",be=("undefined"==typeof CSSMediaRule?"undefined":Pn(CSSMediaRule))<"u",ye=("undefined"==typeof CSSSupportsRule?"undefined":Pn(CSSSupportsRule))<"u",we=("undefined"==typeof CSSConditionRule?"undefined":Pn(CSSConditionRule))<"u";function xe(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(n){return e.target}}function ke(e,t){var n,o,r,i=new te;me.push(i),i.init(e);var a=window.MutationObserver||window.__rrMutationObserver,s=null==(r=null==(o=null===(n=window)||void 0===n?void 0:n.Zone)?void 0:o.__symbol__)?void 0:r.call(o,"MutationObserver");s&&window[s]&&(a=window[s]);var l=new a(i.processMutations.bind(i));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),l}function Se(e){var t=e.mouseInteractionCb,n=e.doc,o=e.mirror,r=e.blockClass,i=e.blockSelector,a=e.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,l=[];return Object.keys(K).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(e){var a=e.toLowerCase(),s=function(e){return function(n){var a=xe(n);if(!B(a,r,i,!0)){var s=q(n)?n.changedTouches[0]:n;if(s){var l=o.getId(a),c=s.clientX,u=s.clientY;t({type:K[e],id:l,x:c,y:u})}}}}(e);l.push(M(a,s,n))})),function(){l.forEach((function(e){return e()}))}}function Ce(e){var t=e.scrollCb,n=e.doc,o=e.mirror,r=e.blockClass,i=e.blockSelector,a=R((function(e){var a=xe(e);if(a&&!B(a,r,i,!0)){var s=o.getId(a);if(a===n){var l=n.scrollingElement||n.documentElement;t({id:s,x:l.scrollLeft,y:l.scrollTop})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}}),e.sampling.scroll||100);return M("scroll",a,n)}function Ie(e,t){var n=he({},e);return t||delete n.userTriggered,n}var Le=["INPUT","TEXTAREA","SELECT"],Te=new WeakMap;function Ee(e){return function(e,t){if(ve&&e.parentRule instanceof CSSGroupingRule||be&&e.parentRule instanceof CSSMediaRule||ye&&e.parentRule instanceof CSSSupportsRule||we&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var o=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(o)}return t}(e,[])}function Oe(e,t,n){var o,r;return e?(e.ownerNode?o=t.getId(e.ownerNode):r=n.getId(e),{styleId:r,id:o}):{}}function Me(e,t){var n,o,r,i=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?i.getId(t):i.getId(t.host);var l="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(r=null==(o=t.ownerDocument)?void 0:o.defaultView)?void 0:r.ShadowRoot,c=Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets");return null!==s&&-1!==s&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null==(e=c.get)?void 0:e.call(this)},set:function(e){var t,n=null==(t=c.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(o){}return n}}),function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}):function(){}}function Ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.doc.defaultView;if(!n)return function(){};!function(e,t){var n=e.mutationCb,o=e.mousemoveCb,r=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,u=e.styleDeclarationCb,p=e.canvasMutationCb,d=e.fontCb,f=e.selectionCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),o.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),r.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),i.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),a.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),l.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),c.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),u.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),p.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),d.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),f.apply(void 0,arguments)}}(e,t);var o,r=ke(e,e.doc),i=function(e){var t=e.mousemoveCb,n=e.sampling,o=e.doc,r=e.mirror;if(!1===n.mousemove)return function(){};var i,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,l=[],c=R((function(e){var n=Date.now()-i;t(l.map((function(e){return e.timeOffset-=n,e})),e),l=[],i=null}),s),u=R((function(e){var t=xe(e),n=q(e)?e.changedTouches[0]:e,o=n.clientX,a=n.clientY;i||(i=Date.now()),l.push({x:o,y:a,id:r.getId(t),timeOffset:Date.now()-i}),c(("undefined"==typeof DragEvent?"undefined":Pn(DragEvent))<"u"&&e instanceof DragEvent?X.Drag:e instanceof MouseEvent?X.MouseMove:X.TouchMove)}),a,{trailing:!1}),p=[M("mousemove",u,o),M("touchmove",u,o),M("drag",u,o)];return function(){p.forEach((function(e){return e()}))}}(e),a=Se(e),l=Ce(e),c=function(e){var t=e.viewportResizeCb,n=-1,o=-1;return M("resize",R((function(){var e=j(),r=F();(n!==e||o!==r)&&(t({width:Number(r),height:Number(e)}),n=e,o=r)}),200),window)}(e),u=function(e){var t=e.inputCb,n=e.doc,o=e.mirror,r=e.blockClass,i=e.blockSelector,a=e.ignoreClass,l=e.maskInputOptions,c=e.maskInputFn,u=e.sampling,p=e.userTriggeredOnInput;function d(e){var t=xe(e),o=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(Le.indexOf(t.tagName)<0)&&!B(t,r,i,!0)){var u=t.type;if(!t.classList.contains(a)){var d=t.value,h=!1;"radio"===u||"checkbox"===u?h=t.checked:(l[t.tagName.toLowerCase()]||l[u])&&(d=s({maskInputOptions:l,tagName:t.tagName,type:u,value:d,maskInputFn:c})),f(t,Ie({text:d,isChecked:h,userTriggered:o},p));var g=t.name;"radio"===u&&g&&h&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach((function(e){e!==t&&f(e,Ie({text:e.value,isChecked:!h,userTriggered:!1},p))}))}}}function f(e,n){var r=Te.get(e);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){Te.set(e,n);var i=o.getId(e);t(ge(he({},n),{id:i}))}}var h=("last"===u.input?["change"]:["input","change"]).map((function(e){return M(e,d,n)})),g=n.defaultView;if(!g)return function(){h.forEach((function(e){return e()}))};var m=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),v=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&h.push.apply(h,Cn(v.map((function(e){return N(e[0],e[1],{set:function(){d({target:this})}},!1,g)})))),function(){h.forEach((function(e){return e()}))}}(e),p=function(e){var t=e.mediaInteractionCb,n=e.blockClass,o=e.blockSelector,r=e.mirror,i=e.sampling,a=function(e){return R((function(i){var a=xe(i);if(a&&!B(a,n,o,!0)){var s=a.currentTime,l=a.volume,c=a.muted,u=a.playbackRate;t({type:e,id:r.getId(a),currentTime:s,volume:l,muted:c,playbackRate:u})}}),i.media||500)},s=[M("play",a(Y.Play)),M("pause",a(Y.Pause)),M("seeked",a(Y.Seeked)),M("volumechange",a(Y.VolumeChange)),M("ratechange",a(Y.RateChange))];return function(){s.forEach((function(e){return e()}))}}(e),d=function(e,t){var n=e.styleSheetRuleCb,o=e.mirror,r=e.stylesheetManager,i=t.win,a=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=function(e,t){var i=Oe(this,o,r.styleMirror),s=i.id,l=i.styleId;return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,adds:[{rule:e,index:t}]}),a.apply(this,[e,t])};var s,l,c=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=function(e){var t=Oe(this,o,r.styleMirror),i=t.id,a=t.styleId;return(i&&-1!==i||a&&-1!==a)&&n({id:i,styleId:a,removes:[{index:e}]}),c.apply(this,[e])},i.CSSStyleSheet.prototype.replace&&(s=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=function(e){var t=Oe(this,o,r.styleMirror),i=t.id,a=t.styleId;return(i&&-1!==i||a&&-1!==a)&&n({id:i,styleId:a,replace:e}),s.apply(this,[e])}),i.CSSStyleSheet.prototype.replaceSync&&(l=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=function(e){var t=Oe(this,o,r.styleMirror),i=t.id,a=t.styleId;return(i&&-1!==i||a&&-1!==a)&&n({id:i,styleId:a,replaceSync:e}),l.apply(this,[e])});var u={};ve?u.CSSGroupingRule=i.CSSGroupingRule:(be&&(u.CSSMediaRule=i.CSSMediaRule),we&&(u.CSSConditionRule=i.CSSConditionRule),ye&&(u.CSSSupportsRule=i.CSSSupportsRule));var p={};return Object.entries(u).forEach((function(e){var t=Sn(e,2),i=t[0],a=t[1];p[i]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=function(e,t){var a=Oe(this.parentStyleSheet,o,r.styleMirror),s=a.id,l=a.styleId;return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,adds:[{rule:e,index:[].concat(Cn(Ee(this)),[t||0])}]}),p[i].insertRule.apply(this,[e,t])},a.prototype.deleteRule=function(e){var t=Oe(this.parentStyleSheet,o,r.styleMirror),a=t.id,s=t.styleId;return(a&&-1!==a||s&&-1!==s)&&n({id:a,styleId:s,removes:[{index:[].concat(Cn(Ee(this)),[e])}]}),p[i].deleteRule.apply(this,[e])}})),function(){i.CSSStyleSheet.prototype.insertRule=a,i.CSSStyleSheet.prototype.deleteRule=c,s&&(i.CSSStyleSheet.prototype.replace=s),l&&(i.CSSStyleSheet.prototype.replaceSync=l),Object.entries(u).forEach((function(e){var t=Sn(e,2),n=t[0],o=t[1];o.prototype.insertRule=p[n].insertRule,o.prototype.deleteRule=p[n].deleteRule}))}}(e,{win:n}),f=Me(e,e.doc),h=function(e,t){var n=e.styleDeclarationCb,o=e.mirror,r=e.ignoreCSSAttributes,i=e.stylesheetManager,a=t.win,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=function(e,t,a){var l;if(r.has(e))return s.apply(this,[e,t,a]);var c=Oe(null==(l=this.parentRule)?void 0:l.parentStyleSheet,o,i.styleMirror),u=c.id,p=c.styleId;return(u&&-1!==u||p&&-1!==p)&&n({id:u,styleId:p,set:{property:e,value:t,priority:a},index:Ee(this.parentRule)}),s.apply(this,[e,t,a])};var l=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=function(e){var t;if(r.has(e))return l.apply(this,[e]);var a=Oe(null==(t=this.parentRule)?void 0:t.parentStyleSheet,o,i.styleMirror),s=a.id,c=a.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,remove:{property:e},index:Ee(this.parentRule)}),l.apply(this,[e])},function(){a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=l}}(e,{win:n}),g=e.collectFonts?function(e){var t=e.fontCb,n=e.doc,o=n.defaultView;if(!o)return function(){};var r=[],i=new WeakMap,a=o.FontFace;o.FontFace=function(e,t,n){var o=new a(e,t,n);return i.set(o,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),o};var s=D(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=i.get(n);e&&(t(e),i.delete(n))}),0),e.apply(this,[n])}}));return r.push((function(){o.FontFace=a})),r.push(s),function(){r.forEach((function(e){return e()}))}}(e):function(){},m=function(e){var t=e.doc,n=e.mirror,o=e.blockClass,r=e.blockSelector,i=e.selectionCb,a=!0,s=function(){var e=t.getSelection();if(!(!e||a&&null!=e&&e.isCollapsed)){a=e.isCollapsed||!1;for(var s=[],l=e.rangeCount||0,c=0;c<l;c++){var u=e.getRangeAt(c),p=u.startContainer,d=u.startOffset,f=u.endContainer,h=u.endOffset;B(p,o,r,!0)||B(f,o,r,!0)||s.push({start:n.getId(p),startOffset:d,end:n.getId(f),endOffset:h})}i({ranges:s})}};return s(),M("selectionchange",s)}(e),v=[],b=In(e.plugins);try{for(b.s();!(o=b.n()).done;){var y=o.value;v.push(y.observer(y.callback,n,y.options))}}catch(w){b.e(w)}finally{b.f()}return function(){me.forEach((function(e){return e.reset()})),r.disconnect(),i(),a(),l(),c(),u(),p(),d(),f(),h(),g(),m(),v.forEach((function(e){return e()}))}}for(var Pe=function(){function e(t){En(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return Mn(e,[{key:"getId",value:function(e,t,n,o){var r=n||this.getIdToRemoteIdMap(e),i=o||this.getRemoteIdToIdMap(e),a=r.get(t);return a||(a=this.generateIdFn(),r.set(t,a),i.set(a,t)),a}},{key:"getIds",value:function(e,t){var n=this,o=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,o,r)}))}},{key:"getRemoteId",value:function(e,t,n){var o=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:o.get(t)||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,o=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,o)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),Re=function(){function e(t){En(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Pe(d),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Pe(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return Mn(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){if("rrweb"===e.data.type){if(!e.source)return;var t=this.crossOriginIframeMap.get(e.source);if(!t)return;var n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,o=this;switch(t.type){case V.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e),{timestamp:t.timestamp,type:V.IncrementalSnapshot,data:{source:X.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case V.Meta:case V.Load:case V.DomContentLoaded:return!1;case V.Plugin:return t;case V.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case V.IncrementalSnapshot:switch(t.data.source){case X.Mutation:return t.data.adds.forEach((function(t){o.replaceIds(t,e,["parentId","nextId","previousId"]),o.replaceIdOnNode(t.node,e)})),t.data.removes.forEach((function(t){o.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){o.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){o.replaceIds(t,e,["id"])})),t;case X.Drag:case X.TouchMove:case X.MouseMove:return t.data.positions.forEach((function(t){o.replaceIds(t,e,["id"])})),t;case X.ViewportResize:return!1;case X.MediaInteraction:case X.MouseInteraction:case X.Scroll:case X.CanvasMutation:case X.Input:return this.replaceIds(t.data,e,["id"]),t;case X.StyleSheetRule:case X.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case X.Font:return t;case X.Selection:return t.data.ranges.forEach((function(t){o.replaceIds(t,e,["start","end"])})),t;case X.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach((function(t){o.replaceStyleIds(t,e,["styleId"])})),t}}}},{key:"replace",value:function(e,t,n,o){var r,i=In(o);try{for(i.s();!(r=i.n()).done;){var a=r.value;!Array.isArray(t[a])&&"number"!=typeof t[a]||(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]))}}catch(s){i.e(s)}finally{i.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}}]),e}(),Ne=Object.defineProperty,De=Object.defineProperties,je=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,He=function(e,t,n){return t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},qe=function(e,t){for(var n in t||(t={}))Be.call(t,n)&&He(e,n,t[n]);if(Fe){var o,r=In(Fe(t));try{for(r.s();!(o=r.n()).done;){n=o.value;_e.call(t,n)&&He(e,n,t[n])}}catch(i){r.e(i)}finally{r.f()}}return e},Ue=function(e,t){return De(e,je(t))},ze=function(){function e(t){En(this,e),this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;var n=this;this.restorePatches.push(D(Element.prototype,"attachShadow",(function(e){return function(t){var o=e.call(this,t);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}})))}return Mn(e,[{key:"addShadowRoot",value:function(e,t){var n=this;!o(e)||this.shadowDoms.has(e)||(this.shadowDoms.add(e),ke(Ue(qe({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),Ce(Ue(qe({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),Me({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e)}),0))}},{key:"observeAttachShadow",value:function(e){if(e.contentWindow){var t=this;this.restorePatches.push(D(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(o){var r=n.call(this,o);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),r}})))}}},{key:"reset",value:function(){this.restorePatches.forEach((function(e){return e()})),this.shadowDoms=new WeakSet}}]),e}(),We="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ge=("undefined"==typeof Uint8Array?"undefined":Pn(Uint8Array))>"u"?[]:new Uint8Array(256),Ve=0;Ve<64;Ve++)Ge[We.charCodeAt(Ve)]=Ve;var Xe=new Map;var Ke=function(e,t,n){if(e&&(Je(e,t)||"object"==Pn(e))){var o=function(e,t){var n=Xe.get(e);return n||(n=new Map,Xe.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),r=o.indexOf(e);return-1===r&&(r=o.length,o.push(e)),r}};function Ze(e,t,n){if(e instanceof Array)return e.map((function(e){return Ze(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){var o=e.constructor.name,r=function(e){var t,n=new Uint8Array(e),o=n.length,r="";for(t=0;t<o;t+=3)r+=We[n[t]>>2],r+=We[(3&n[t])<<4|n[t+1]>>4],r+=We[(15&n[t+1])<<2|n[t+2]>>6],r+=We[63&n[t+2]];return o%3==2?r=r.substring(0,r.length-1)+"=":o%3==1&&(r=r.substring(0,r.length-2)+"=="),r}(e);return{rr_type:o,base64:r}}if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ze(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[Ze(e.data,t,n),e.width,e.height]}:Je(e,t)||"object"==Pn(e)?{rr_type:e.constructor.name,index:Ke(e,t,n)}:e}var Ye=function(e,t,n){return Cn(e).map((function(e){return Ze(e,t,n)}))},Je=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function Qe(e,t,n){var o=[];try{var r=D(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return B(this,t,n,!0)||"__context"in this||(this.__context=o),e.apply(this,[o].concat(i))}}));o.push(r)}catch(i){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){o.forEach((function(e){return e()}))}}function $e(e,t,n,o,r,i,a){var s,l=[],c=In(Object.getOwnPropertyNames(e));try{var u=function(){var i=s.value;if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))try{if("function"!=typeof e[i])return 1;var c=D(e,i,(function(e){return function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var u=e.apply(this,l);if(Ke(u,a,this),!B(this.canvas,o,r,!0)){var p=Ye([].concat(l),a,this),d={type:t,property:i,args:p};n(this.canvas,d)}return u}}));l.push(c)}catch(p){var u=N(e,i,{set:function(e){n(this.canvas,{type:t,property:i,args:[e],setter:!0})}});l.push(u)}};for(c.s();!(s=c.n()).done;)u()}catch(p){c.e(p)}finally{c.f()}return l}function et(e,t,n){var o=void 0===t?null:t,r=function(e,t){var n=atob(e);if(t){for(var o=new Uint8Array(n.length),r=0,i=n.length;r<i;++r)o[r]=n.charCodeAt(r);return String.fromCharCode.apply(null,new Uint16Array(o.buffer))}return n}(e,void 0!==n&&n),i=r.indexOf("\n",10)+1,a=r.substring(i)+(o?"//# sourceMappingURL="+o:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var tt=function(e,t,n){var o;return function(r){return o=o||et(e,t,n),new Worker(o,r)}}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixwPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylwW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgdT1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCxsPW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gdihzLGUsbil7Y29uc3QgYT1gJHtzfS0ke2V9YDtpZigiT2Zmc2NyZWVuQ2FudmFzImluIGdsb2JhbFRoaXMpe2lmKGwuaGFzKGEpKXJldHVybiBsLmdldChhKTtjb25zdCB0PW5ldyBPZmZzY3JlZW5DYW52YXMocyxlKTt0LmdldENvbnRleHQoIjJkIik7Y29uc3QgZz1hd2FpdChhd2FpdCB0LmNvbnZlcnRUb0Jsb2IobikpLmFycmF5QnVmZmVyKCksZD11KGcpO3JldHVybiBsLnNldChhLGQpLGR9ZWxzZSByZXR1cm4iIn1jb25zdCBpPXNlbGY7aS5vbm1lc3NhZ2U9YXN5bmMgZnVuY3Rpb24ocyl7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtjb25zdHtpZDplLGJpdG1hcDpuLHdpZHRoOmEsaGVpZ2h0OnQsZGF0YVVSTE9wdGlvbnM6Z309cy5kYXRhLGQ9dihhLHQsZyksaD1uZXcgT2Zmc2NyZWVuQ2FudmFzKGEsdCk7aC5nZXRDb250ZXh0KCIyZCIpLmRyYXdJbWFnZShuLDAsMCksbi5jbG9zZSgpO2NvbnN0IHc9YXdhaXQgaC5jb252ZXJ0VG9CbG9iKGcpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89dShiKTtpZighYy5oYXMoZSkmJmF3YWl0IGQ9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX1lbHNlIHJldHVybiBpLnBvc3RNZXNzYWdlKHtpZDpzLmRhdGEuaWR9KX19KSgpOwoK",null,!1),nt=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,it=function(){function e(t){var n=this;En(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId||!n.rafStamps.invokeId)&&(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var o=t.sampling,r=void 0===o?"all":o,i=t.win,a=t.blockClass,s=t.blockSelector,l=t.recordCanvas,c=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,l&&"all"===r&&this.initCanvasMutationObserver(i,a,s),l&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,a,s,{dataURLOptions:c})}return Mn(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,o,r){var i=this,a=Qe(t,n,o),s=new Map,l=new tt;l.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,o=n.base64,r=n.type,a=n.width,l=n.height;i.mutationCb({id:t,type:Z["2D"],commands:[{property:"clearRect",args:[0,0,a,l]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],type:r}]},0,0]}]})}};var c,u=1e3/e,p=0;c=requestAnimationFrame((function e(a){p&&a-p<u||(p=a,function(){var e=[];return t.document.querySelectorAll("canvas").forEach((function(t){B(t,n,o,!0)||e.push(t)})),e}().forEach((function(e){return function(e,t,n){return new Promise((function(o,r){var i=function(e){try{s(n.next(e))}catch(u){r(u)}},a=function(e){try{s(n.throw(e))}catch(u){r(u)}},s=function(e){return e.done?o(e.value):Promise.resolve(e.value).then(i,a)};s((n=n.apply(e,t)).next())}))}(i,null,kn().mark((function t(){var n,o,i,a;return kn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=this.mirror.getId(e),!s.get(o)){t.next=3;break}return t.abrupt("return");case 3:return s.set(o,!0),["webgl","webgl2"].includes(e.__context)&&(i=e.getContext(e.__context),!1===(null==(n=null==i?void 0:i.getContextAttributes())?void 0:n.preserveDrawingBuffer)&&(null==i||i.clear(i.COLOR_BUFFER_BIT))),t.next=6,createImageBitmap(e);case 6:a=t.sent,l.postMessage({id:o,bitmap:a,width:e.width,height:e.height,dataURLOptions:r.dataURLOptions},[a]);case 8:case"end":return t.stop()}}),t,this)})))}))),c=requestAnimationFrame(e)})),this.resetObservers=function(){a(),cancelAnimationFrame(c)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var o=Qe(e,t,n),r=function(e,t,n,o){var r,i=[],a=In(Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype));try{var s=function(){var a=r.value;try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])return 1;var s=D(t.CanvasRenderingContext2D.prototype,a,(function(r){return function(){for(var i=this,s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return B(this.canvas,n,o,!0)||setTimeout((function(){var n=Ye([].concat(l),t,i);e(i.canvas,{type:Z["2D"],property:a,args:n})}),0),r.apply(this,l)}}));i.push(s)}catch(c){var l=N(t.CanvasRenderingContext2D.prototype,a,{set:function(t){e(this.canvas,{type:Z["2D"],property:a,args:[t],setter:!0})}});i.push(l)}};for(a.s();!(r=a.n()).done;)s()}catch(l){a.e(l)}finally{a.f()}return function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,o,r){var i=[];return i.push.apply(i,Cn($e(t.WebGLRenderingContext.prototype,Z.WebGL,e,n,o,0,t))),Pn(t.WebGL2RenderingContext)<"u"&&i.push.apply(i,Cn($e(t.WebGL2RenderingContext.prototype,Z.WebGL2,e,n,o,0,t))),function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){o(),r(),i()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var o=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,o)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var o=n.map((function(e){return function(e,t){var n={};for(var o in e)ot.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&nt){var r,i=In(nt(e));try{for(i.s();!(r=i.n()).done;)o=r.value,t.indexOf(o)<0&&rt.call(e,o)&&(n[o]=e[o])}catch(a){i.e(a)}finally{i.f()}}return n}(e,["type"])})),r=n[0].type;this.mutationCb({id:t,type:r,commands:o}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),at=function(){function e(t){En(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new G,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return Mn(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,o={id:t,styleIds:[]},r=[],a=In(e);try{for(a.s();!(n=a.n()).done;){var s=n.value,l=void 0;if(this.styleMirror.has(s))l=this.styleMirror.getId(s);else{l=this.styleMirror.add(s);var c=Array.from(s.rules||CSSRule);r.push({styleId:l,rules:c.map((function(e,t){return{rule:i(e),index:t}}))})}o.styleIds.push(l)}}catch(u){a.e(u)}finally{a.f()}r.length>0&&(o.styles=r),this.adoptedStyleSheetCb(o)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),st=Object.defineProperty,lt=Object.defineProperties,ct=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,ft=function(e,t,n){return t in e?st(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ht=function(e,t){for(var n in t||(t={}))pt.call(t,n)&&ft(e,n,t[n]);if(ut){var o,r=In(ut(t));try{for(r.s();!(o=r.n()).done;){n=o.value;dt.call(t,n)&&ft(e,n,t[n])}}catch(i){r.e(i)}finally{r.f()}}return e},gt=function(e,t){return lt(e,ct(t))};function mt(e){return gt(ht({},e),{timestamp:Date.now()})}var vt,bt,yt,wt=!1,xt=new a;function kt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,o=e.checkoutEveryNth,r=e.blockClass,i=void 0===r?"rr-block":r,s=e.blockSelector,l=void 0===s?null:s,c=e.ignoreClass,u=void 0===c?"rr-ignore":c,p=e.maskTextClass,d=void 0===p?"rr-mask":p,f=e.maskTextSelector,h=void 0===f?null:f,g=e.inlineStylesheet,m=void 0===g||g,v=e.maskAllInputs,b=e.maskInputOptions,y=e.slimDOMOptions,w=e.maskInputFn,x=e.maskTextFn,k=e.hooks,S=e.packFn,C=e.sampling,I=void 0===C?{}:C,L=e.dataURLOptions,T=void 0===L?{}:L,E=e.mousemoveWait,A=e.recordCanvas,P=void 0!==A&&A,R=e.recordCrossOriginIframes,N=void 0!==R&&R,D=e.userTriggeredOnInput,B=void 0!==D&&D,_=e.collectFonts,H=void 0!==_&&_,q=e.inlineImages,G=void 0!==q&&q,K=e.plugins,Z=e.keepIframeSrcFn,Y=void 0===Z?function(){return!1}:Z,J=e.ignoreCSSAttributes,Q=void 0===J?new Set([]):J,$=!N||window.parent===window,ee=!1;if(!$)try{window.parent.document,ee=!1}catch(ye){ee=!0}if($&&!t)throw new Error("emit function is required");void 0!==E&&void 0===I.mousemove&&(I.mousemove=E),xt.reset();var te=!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==b?b:{password:!0},ne=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};!function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var r=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===r)return!0}while(r=r&&r.parentNode);return!1})}();var oe,re=0,ie=function(e){var t,n=In(K||[]);try{for(n.s();!(t=n.n()).done;){var o=t.value;o.eventProcessor&&(e=o.eventProcessor(e))}}catch(r){n.e(r)}finally{n.f()}return S&&(e=S(e)),e};vt=function(e,r){var i;if((null==(i=me[0])?void 0:i.isFrozen())&&e.type!==V.FullSnapshot&&!(e.type===V.IncrementalSnapshot&&e.data.source===X.Mutation)&&me.forEach((function(e){return e.unfreeze()})),$)null==t||t(ie(e),r);else if(ee){var a={type:"rrweb",event:ie(e),isCheckout:r};window.parent.postMessage(a,"*")}if(e.type===V.FullSnapshot)oe=e,re=0;else if(e.type===V.IncrementalSnapshot){if(e.data.source===X.Mutation&&e.data.isAttachIframe)return;re++;var s=o&&re>=o,l=n&&e.timestamp-oe.timestamp>n;(s||l)&&bt(!0)}};var ae,se=function(e){vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.Mutation},e)}))},le=function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.Scroll},e)}))},ce=function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.CanvasMutation},e)}))},ue=new at({mutationCb:se,adoptedStyleSheetCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.AdoptedStyleSheet},e)}))}}),pe=new Re({mirror:xt,mutationCb:se,stylesheetManager:ue,recordCrossOriginIframes:N,wrappedEmit:vt}),de=In(K||[]);try{for(de.s();!(ae=de.n()).done;){var fe=ae.value;fe.getMirror&&fe.getMirror({nodeMirror:xt,crossOriginIframeMirror:pe.crossOriginIframeMirror,crossOriginIframeStyleMirror:pe.crossOriginIframeStyleMirror})}}catch(we){de.e(we)}finally{de.f()}yt=new it({recordCanvas:P,mutationCb:ce,win:window,blockClass:i,blockSelector:l,mirror:xt,sampling:I.canvas,dataURLOptions:T});var he=new ze({mutationCb:se,scrollCb:le,bypassOptions:{blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:h,inlineStylesheet:m,maskInputOptions:te,dataURLOptions:T,maskTextFn:x,maskInputFn:w,recordCanvas:P,inlineImages:G,sampling:I,slimDOMOptions:ne,iframeManager:pe,stylesheetManager:ue,canvasManager:yt,keepIframeSrcFn:Y},mirror:xt});bt=function(){var e,t,n,o,r,s,c,u,p,f,g,v,b=arguments.length>0&&void 0!==arguments[0]&&arguments[0];vt(mt({type:V.Meta,data:{href:window.location.href,width:F(),height:j()}}),b),ue.reset(),me.forEach((function(e){return e.lock()}));var y=function(e,t){var n=t||{},o=n.mirror,r=void 0===o?new a:o,i=n.blockClass,s=void 0===i?"rr-block":i,l=n.blockSelector,c=void 0===l?null:l,u=n.maskTextClass,p=void 0===u?"rr-mask":u,d=n.maskTextSelector,f=void 0===d?null:d,h=n.inlineStylesheet,g=void 0===h||h,m=n.inlineImages,v=void 0!==m&&m,b=n.recordCanvas,y=void 0!==b&&b,w=n.maskAllInputs,x=void 0!==w&&w,k=n.maskTextFn,S=n.maskInputFn,C=n.slimDOM,I=void 0!==C&&C,L=n.dataURLOptions,T=n.preserveWhiteSpace,E=n.onSerialize,M=n.onIframeLoad,A=n.iframeLoadTimeout,P=n.onStylesheetLoad,R=n.stylesheetLoadTimeout,N=n.keepIframeSrcFn;return O(e,{doc:e,mirror:r,blockClass:s,blockSelector:c,maskTextClass:p,maskTextSelector:f,skipChild:!1,inlineStylesheet:g,maskInputOptions:!0===x?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===x?{password:!0}:x,maskTextFn:k,maskInputFn:S,slimDOMOptions:!0===I||"all"===I?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===I,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===I?{}:I,dataURLOptions:L,inlineImages:v,recordCanvas:y,preserveWhiteSpace:T,onSerialize:E,onIframeLoad:M,iframeLoadTimeout:A,onStylesheetLoad:P,stylesheetLoadTimeout:R,keepIframeSrcFn:void 0===N?function(){return!1}:N,newlyAddedElement:!1})}(document,{mirror:xt,blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:h,inlineStylesheet:m,maskAllInputs:te,maskTextFn:x,slimDOM:ne,dataURLOptions:T,recordCanvas:P,inlineImages:G,onSerialize:function(e){U(e,xt)&&pe.addIframe(e),z(e,xt)&&ue.trackLinkElement(e),W(e)&&he.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){pe.attachIframe(e,t),he.observeAttachShadow(e)},onStylesheetLoad:function(e,t){ue.attachLinkElement(e,t)},keepIframeSrcFn:Y});if(!y)return console.warn("Failed to snapshot the document");vt(mt({type:V.FullSnapshot,data:{node:y,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===(e=document)||void 0===e?void 0:e.documentElement.scrollLeft)||(null==(u=null==(c=null===(t=document)||void 0===t?void 0:t.body)?void 0:c.parentElement)?void 0:u.scrollLeft)||(null==(p=null===(n=document)||void 0===n?void 0:n.body)?void 0:p.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===(o=document)||void 0===o?void 0:o.documentElement.scrollTop)||(null==(g=null==(f=null===(r=document)||void 0===r?void 0:r.body)?void 0:f.parentElement)?void 0:g.scrollTop)||(null==(v=null===(s=document)||void 0===s?void 0:s.body)?void 0:v.scrollTop)||0}}})),me.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,xt.getId(document))};try{var ge=[];ge.push(M("DOMContentLoaded",(function(){vt(mt({type:V.DomContentLoaded,data:{}}))})));var ve=function(e){var t;return Ae({mutationCb:se,mousemoveCb:function(e,t){return vt(mt({type:V.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.MouseInteraction},e)}))},scrollCb:le,viewportResizeCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.ViewportResize},e)}))},inputCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.Input},e)}))},mediaInteractionCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.StyleDeclaration},e)}))},canvasMutationCb:ce,fontCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.Font},e)}))},selectionCb:function(e){vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.Selection},e)}))},blockClass:i,ignoreClass:u,maskTextClass:d,maskTextSelector:h,maskInputOptions:te,inlineStylesheet:m,sampling:I,recordCanvas:P,inlineImages:G,userTriggeredOnInput:B,collectFonts:H,doc:e,maskInputFn:w,maskTextFn:x,keepIframeSrcFn:Y,blockSelector:l,slimDOMOptions:ne,dataURLOptions:T,mirror:xt,iframeManager:pe,stylesheetManager:ue,shadowDomManager:he,canvasManager:yt,ignoreCSSAttributes:Q,plugins:(null==(t=null==K?void 0:K.filter((function(e){return e.observer})))?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return vt(mt({type:V.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},k)};pe.addLoadListener((function(e){ge.push(ve(e.contentDocument))}));var be=function(){bt(),ge.push(ve(document)),wt=!0};return"interactive"===document.readyState||"complete"===document.readyState?be():ge.push(M("load",(function(){vt(mt({type:V.Load,data:{}})),be()}),window)),function(){ge.forEach((function(e){return e()})),wt=!1}}catch(ge){console.warn(ge)}}return kt.addCustomEvent=function(e,t){if(!wt)throw new Error("please add custom event after start recording");vt(mt({type:V.Custom,data:{tag:e,payload:t}}))},kt.freezePage=function(){me.forEach((function(e){return e.freeze()}))},kt.takeFullSnapshot=function(e){if(!wt)throw new Error("please take full snapshot after start recording");bt(e)},kt.mirror=xt,kt}();function Nn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Dn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function jn(e){return jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jn(e)}function Fn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fn(Object(n),!0).forEach((function(t){Hn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,qn(o.key),o)}}function Hn(e,t,n){return(t=qn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qn(e){var t=function(e,t){if("object"!=jn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=jn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==jn(t)?t:String(t)}var Un=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Hn(this,"startDate",void 0),Hn(this,"events",[]),Hn(this,"bufferSize",0),Hn(this,"stopFunction",void 0),Hn(this,"customOptions",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setOptions",value:function(e){this.customOptions=e}},{key:"start",value:function(){this.stop(),this.startDate=Date.now();var e=this.events;try{this.stopFunction=Rn(Bn(Bn(Bn({},{inlineStylesheet:!0,blockClass:"gl-block",ignoreClass:"gl-ignore",maskTextClass:"gl-mask",dataURLOptions:{quality:.7},recordCanvas:!1,sampling:{scroll:150,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!0,TouchEnd:!1}},collectFonts:!1,recordCrossOriginIframes:!1}),this.customOptions),{},{emit:function(t){var n=function(e){var t=JSON.stringify(e);if(t.length>4e6){var n,o=/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim,r=Nn(t.matchAll(o));try{for(r.s();!(n=r.n()).done;){var i=n.value;t="image/"===i[1].toLocaleLowerCase().slice(0,6)?t.replace(i[0],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAQSURBVHgBAQUA+v8ABRg5/wHSAVZN1mnaAAAAAElFTkSuQmCC"):t.replace(i[0],"")}}catch(a){r.e(a)}finally{r.f()}}return{event:JSON.parse(t),size:t.length}}(t).event;e.push(n)}}))}catch(t){console.error(t)}}},{key:"stop",value:function(){this.stopFunction&&this.stopFunction(),this.startDate=void 0,this.events=[],this.bufferSize=0}},{key:"getReplayData",value:function(){return{startDate:this.startDate,events:this.events,baseUrl:window.location.origin,width:window.innerWidth,height:window.innerHeight,isMobile:w(),type:"rrweb"}}}])&&_n(t.prototype,n),o&&_n(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function zn(e){return zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zn(e)}function Wn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Vn(o.key),o)}}function Gn(e,t,n){return(t=Vn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vn(e){var t=function(e,t){if("object"!=zn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=zn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zn(t)?t:String(t)}Hn(Un,"instance",void 0);var Xn=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Gn(this,"rerender",void 0),Gn(this,"svgElement",null),Gn(this,"path",null),Gn(this,"strPath",void 0),Gn(this,"strokeWidth",12),Gn(this,"strokeWidthRect",6),Gn(this,"bufferSize",4),Gn(this,"buffer",[]),Gn(this,"startPoint",null),Gn(this,"tool","rect"),Gn(this,"color","#EB144C"),Gn(this,"mouseDown",null),Gn(this,"mouseMove",null),Gn(this,"mouseUp",null),Gn(this,"resizeListener",null),Gn(this,"pathBuffer",[]);var o=this;this.rerender=t,this.svgElement=document.querySelector(".bb-capture-svg"),this.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px"),this.resizeListener=function(e){o.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px")},window.addEventListener("resize",this.resizeListener,!0),this.mouseDown=function(e){e.preventDefault();var t=document.querySelector(".bb-capture-toolbar-item-colorpicker");t&&(t.style.display="none"),o.fadeOutToolbar(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseDownPen(e),"rect"===o.tool&&o.mouseDownRect(e)},this.mouseMove=function(e){e.preventDefault(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseMovePen(e),"rect"===o.tool&&o.mouseMoveRect(e)},this.mouseUp=function(e){e.preventDefault(),o.fadeInToolbar(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseUpPen(e),"rect"===o.tool&&o.mouseUpRect(e)},this.svgElement.addEventListener("mousedown",this.mouseDown),this.svgElement.addEventListener("mousemove",this.mouseMove),this.svgElement.addEventListener("mouseup",this.mouseUp),this.svgElement.addEventListener("touchstart",this.mouseDown,!1),this.svgElement.addEventListener("touchmove",this.mouseMove,!1),this.svgElement.addEventListener("touchend",this.mouseUp,!1),setTimeout((function(){n.rerender()}),100)}var t,n,o;return t=e,n=[{key:"clear",value:function(){if(this.svgElement)for(;this.svgElement.firstChild;)this.svgElement.firstChild.remove()}},{key:"destroy",value:function(){this.svgElement.removeEventListener("mousedown",this.mouseDown),this.svgElement.removeEventListener("mousemove",this.mouseMove),this.svgElement.removeEventListener("mouseup",this.mouseUp),this.svgElement.removeEventListener("touchstart",this.mouseDown),this.svgElement.removeEventListener("touchmove",this.mouseMove),this.svgElement.removeEventListener("touchend",this.mouseUp),window.removeEventListener("resize",this.resizeListener)}},{key:"mouseUpPen",value:function(){this.path&&(this.path=null)}},{key:"mouseUpRect",value:function(){this.path&&(this.path=null)}},{key:"mouseMovePen",value:function(e){this.path&&(this.appendToBuffer(this.getMousePosition(e)),this.updateSvgPath())}},{key:"mouseMoveRect",value:function(e){if(this.path){var t=this.getMousePosition(e),n=Math.abs(t.x-this.startPoint.x),o=Math.abs(t.y-this.startPoint.y),r=t.x,i=t.y;t.x>this.startPoint.x&&(r=this.startPoint.x),t.y>this.startPoint.y&&(i=this.startPoint.y),this.path.setAttributeNS(null,"x",r),this.path.setAttributeNS(null,"y",i),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",o)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var o=this.getMousePosition(e);this.appendToBuffer(o),this.strPath="M"+o.x+" "+o.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,o,r=0,i=0,a=0;for(o=e;o<t;o++)a++,r+=(n=this.buffer[o]).x,i+=n.y;return{x:r/a,y:i/a}}return null}},{key:"updateSvgPath",value:function(){var e=this.getAveragePoint(0);if(e){this.strPath+=" L"+e.x+" "+e.y;for(var t="",n=2;n<this.buffer.length;n+=2)t+=" L"+(e=this.getAveragePoint(n)).x+" "+e.y;this.path.setAttribute("d",this.strPath+t)}}},{key:"appendToBuffer",value:function(e){for(this.buffer.push(e);this.buffer.length>this.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}],n&&Wn(t.prototype,n),o&&Wn(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Kn(e){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kn(e)}function Zn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Jn(o.key),o)}}function Yn(e,t,n){return(t=Jn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jn(e){var t=function(e,t){if("object"!=Kn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Kn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kn(t)?t:String(t)}var Qn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Yn(this,"keys",{37:1,38:1,39:1,40:1}),Yn(this,"supportsPassive",!1),Yn(this,"wheelOpt",!!this.supportsPassive&&{passive:!1}),Yn(this,"wheelEvent","onwheel"in document.createElement("div")?"wheel":"mousewheel"),Yn(this,"scrollDisabled",!1);var t=this;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){t.supportsPassive=!0,t.wheelOpt=!!t.supportsPassive&&{passive:!1}}}))}catch(n){}}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"disableScroll",value:function(){var e=this.getInstance();e.scrollDisabled||(e.scrollDisabled=!0,window.addEventListener("DOMMouseScroll",e.preventDefault,!1),window.addEventListener(e.wheelEvent,e.preventDefault,e.wheelOpt),window.addEventListener("touchmove",e.preventDefault,e.wheelOpt),window.addEventListener("keydown",e.preventDefaultForScrollKeys,!1))}},{key:"enableScroll",value:function(){var e=this.getInstance();e.scrollDisabled&&(e.scrollDisabled=!1,window.removeEventListener("DOMMouseScroll",e.preventDefault,!1),window.removeEventListener(e.wheelEvent,e.preventDefault,e.wheelOpt),window.removeEventListener("touchmove",e.preventDefault,e.wheelOpt),window.removeEventListener("keydown",e.preventDefaultForScrollKeys,!1))}}],(n=[{key:"preventDefault",value:function(e){e.preventDefault()}},{key:"preventDefaultForScrollKeys",value:function(e){if(this.keys&&this.keys[e.keyCode])return this.preventDefault(e),!1}}])&&Zn(t.prototype,n),o&&Zn(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function $n(e){return $n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$n(e)}function eo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,no(o.key),o)}}function to(e,t,n){return(t=no(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function no(e){var t=function(e,t){if("object"!=$n(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=$n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$n(t)?t:String(t)}Yn(Qn,"instance",void 0);var oo=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),to(this,"type","screenshot"),to(this,"dragCursor",null),to(this,"screenRecorder",null),to(this,"callback",null),to(this,"screenDrawer",null),to(this,"escListener",null),to(this,"pageLeaveListener",null),to(this,"overrideLanguage",Mr.getInstance().overrideLanguage),to(this,"showNextStep",(function(){this.showWidgetUI(),this.callback&&(Bt.getInstance().sendMessage({name:"set-form-data",data:{formKey:"capture",data:{value:this.type,dirty:!0}}}),this.callback(!0))})),this.type=t}var t,n,o;return t=e,n=[{key:"hideWidgetUI",value:function(){var e=document.querySelector(".bb-feedback-button");e&&(e.style.display="none");var t=document.querySelector(".bb-feedback-dialog-container");t&&(t.style.display="none")}},{key:"showWidgetUI",value:function(){"screenshot"===this.type&&Qn.enableScroll(),this.screenRecorder&&this.screenRecorder.stopScreenRecording(),this.unregisterListeners(),this.cleanupMousePointer(),this.screenDrawer&&this.screenDrawer.destroy();var e=document.querySelector(".bb-capture-toolbar");e&&e.remove();var t=document.querySelector(".bb-capture-svg");t&&t.classList.add("bb-capture-svg--preview");var n=document.querySelector(".bb-capture-preview");n&&n.remove();var o=document.querySelector(".bb-feedback-button");o&&(o.style.display="flex");var r=document.querySelector(".bb-feedback-dialog-container");r&&(r.style.display="block");var i=document.querySelector(".bb-capture-dismiss");i&&(i.style.display="none");var a=document.querySelector(".bb-capture-toolbar-item-colorpicker");a&&(a.style.display="none");var s=document.querySelector(".bb-capture-editor-borderlayer");s&&(s.style.display="none")}},{key:"clear",value:function(){var e=document.querySelector(".bb-capture-editor");e&&e.remove()}},{key:"setMouseMove",value:function(e,t){this.dragCursor&&(this.dragCursor.style.left="".concat(e+6,"px"),this.dragCursor.style.top="".concat(t-26,"px"),this.dragCursor.style.right=null)}},{key:"mouseMoveEventHandler",value:function(e){var t=e.clientX,n=e.clientY;this.setMouseMove(t,n)}},{key:"touchMoveEventHandler",value:function(e){var t=e.touches[0].clientX,n=e.touches[0].clientY;this.setMouseMove(t,n)}},{key:"setupMousePointer",value:function(){var e=this;this.dragCursor=document.querySelector(".bb-capture-editor-drag-info");var t=document.querySelector(".bb-capture-svg");t.addEventListener("mouseenter",(function(t){e.dragCursor.style.opacity=1})),t.addEventListener("mouseleave",(function(t){e.dragCursor.style.opacity=0})),document.documentElement.addEventListener("mousemove",this.mouseMoveEventHandler.bind(this)),document.documentElement.addEventListener("touchmove",this.touchMoveEventHandler.bind(this))}},{key:"cleanupMousePointer",value:function(){document.documentElement.removeEventListener("mousemove",this.mouseMoveEventHandler),document.documentElement.removeEventListener("touchmove",this.touchMoveEventHandler),this.dragCursor&&this.dragCursor.remove()}},{key:"createEditorUI",value:function(){var e=document.createElement("div");e.className="bb-capture-editor",e.innerHTML='\n <div class="bb-capture-editor-borderlayer"></div>\n <svg class="bb-capture-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" xml:space="preserve"></svg>\n <div class="bb-capture-dismiss">'.concat(d("dismiss"),"</div>\n <div class='bb-capture-editor-drag-info'>").concat(d("rect"),'</div>\n <div class="bb-capture-toolbar">\n ').concat("capture"===this.type?'<div class="bb-capture-toolbar-item bb-capture-item-rec bb-capture-toolbar-item-recording" data-type="recording">\n '.concat(d("recorderon"),"\n ").concat(d("recorderoff"),'\n <span class="bb-tooltip bb-tooltip-screen-recording"></span>\n </div>\n <div class="bb-capture-toolbar-item bb-capture-item-rec" data-type="mic">\n ').concat(d("mic"),'\n <span class="bb-tooltip bb-tooltip-audio-recording"></span>\n </div>\n <div class="bb-capture-toolbar-item-timer bb-capture-item-rec">2:00</div>\n <div class="bb-capture-toolbar-item-spacer"></div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="pointer">\n ').concat(d("pointer"),"\n </div>"):"",'\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool bb-capture-toolbar-item--active" data-type="rect">\n ').concat(d("rect"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="pen">\n ').concat(d("pen"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="blur">\n ').concat(d("blur"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem" data-type="colorpicker">\n <div class="bb-capture-toolbar-item-selectedcolor"></div>\n <span class="bb-tooltip">').concat(lo.translateText("pickAColor"),'</span>\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="undo">\n ').concat(d("undo"),'\n <span class="bb-tooltip">').concat(lo.translateText("undo"),"</span>\n </div>\n ").concat("capture"!==this.type?'<div class="bb-capture-button-next">'.concat(lo.translateText("next"),"</div>"):"",'\n </div>\n <div class="bb-capture-toolbar-item-colorpicker">\n <div class="bb-capture-toolbar-item-color" data-color="#EB144C"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#FF6705"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#FDB903"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#9900EE"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#00D082"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#0A93E4"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#CCCCCC"></div>\n </div>\n <div class="bb-capture-preview">\n <div class="bb-capture-preview-inner">\n <video controls muted autoplay></video>\n <div class="bb-capture-preview-buttons">\n <div class="bb-capture-preview-retrybutton">').concat(lo.translateText("retry"),'</div>\n <div class="bb-capture-preview-sendbutton">').concat(lo.translateText("next"),"</div>\n </div>\n </div>\n </div>\n "),document.body.appendChild(e),e.setAttribute("dir",lo.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,o=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,o="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&o&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(Mr.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),Qn.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new Xn(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),o=document.querySelectorAll(".bb-capture-toolbar-item-color"),r=document.querySelector(".bb-capture-toolbar-item-colorpicker"),i=function(){var i=o[a],s=i.getAttribute("data-color");i.style.backgroundColor=s,i.onclick=function(){i&&(t.screenDrawer.setColor(s),r&&(r.style.display="none"),n.style.backgroundColor=i.style.backgroundColor,e.setPenColor(s))}},a=0;a<o.length;a++)i()}},{key:"dismiss",value:function(){this.showWidgetUI(),this.callback&&this.callback(!1)}},{key:"setupToolbar",value:function(){var e=this;document.querySelector(".bb-capture-dismiss").onclick=function(){e.dismiss()};var t=document.querySelector(".bb-capture-button-next");t&&(t.onclick=this.showNextStep.bind(this));for(var n=document.querySelector(".bb-capture-toolbar-item-colorpicker"),o=document.querySelector(".bb-capture-svg"),r=function(t,n){for(var r=document.querySelectorAll(".bb-capture-toolbar-item-tool"),i=0;i<r.length;i++)r[i].classList.remove("bb-capture-toolbar-item--active");if(n.classList.add("bb-capture-toolbar-item--active"),e.screenDrawer.setTool(t),e.dragCursor.innerHTML="","pointer"===t)o.style.pointerEvents="none";else{o.style.pointerEvents="auto";try{var a=n.querySelector("svg").cloneNode(!0);a&&e.dragCursor&&e.dragCursor.appendChild(a)}catch(s){}}},i=document.querySelectorAll(".bb-capture-toolbar-item"),a=function(){var t=i[s];t.onclick=function(){var o=t.getAttribute("data-type");n&&"colorpicker"!==o&&(n.style.display="none"),"mic"===o&&e.screenRecorder.toggleAudio(),"recording"===o&&(e.screenRecorder.isRecording?e.screenRecorder.stopScreenRecording():(e.screenRecorder.startScreenRecording(),r("pointer",document.querySelector(".bb-capture-toolbar-item[data-type='pointer']")))),("capture"!==e.type||e.screenRecorder.isRecording)&&("pen"!==o&&"blur"!==o&&"rect"!==o&&"pointer"!==o||r(o,t),"colorpicker"===o&&("flex"===n.style.display?n.style.display="none":n.style.display="flex"),"undo"===o&&e.screenDrawer.removeLastAddedPathFromSvg())}},s=0;s<i.length;s++)a()}},{key:"captureScreenDrawerRerender",value:function(){if(this.screenDrawer)for(var e="bb-capture-editor-item-inactive",t=document.querySelectorAll(".bb-capture-toolbar-item"),n=0;n<t.length;n++){var o=t[n];"undo"===o.getAttribute("data-type")&&(null!=this.screenDrawer.pathBuffer&&this.screenDrawer.pathBuffer.length>0?o.classList.remove(e):o.classList.add(e))}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&Mr.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),o=document.querySelector(".bb-tooltip-screen-recording"),r=document.querySelector(".bb-tooltip-audio-recording"),i=document.querySelector(".bb-capture-editor"),a="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(i.classList.add(a),i.classList.remove(s)):(i.classList.add(s),i.classList.remove(a));var l=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",l.style.display=this.screenRecorder.file?"none":"flex";for(var c=0;c<n.length;c++){var u=n[c];switch(u.getAttribute("data-type")){case"mic":this.screenRecorder.audioAvailable&&this.screenRecorder.available?(u.classList.remove(e),this.screenRecorder.audioMuted?(u.classList.add("bb-capture-toolbar-item--inactivecross"),r.innerHTML=lo.translateText("unmute")):(u.classList.remove("bb-capture-toolbar-item--inactivecross"),r.innerHTML=lo.translateText("mute"))):(u.classList.add(e),u.classList.add("bb-capture-toolbar-item--inactivecross"),r.innerHTML=lo.translateText("browserNotSupported"));break;case"recording":this.screenRecorder.available?(u.classList.remove(e),this.screenRecorder.isRecording?(u.setAttribute("data-active","true"),o.innerHTML=lo.translateText("stopRecording"),t.style.display="block"):(u.setAttribute("data-active","false"),o.innerHTML=lo.translateText("startRecording"),t.style.display="none")):(u.classList.add(e),o.innerHTML=lo.translateText("browserNotSupported"))}}}}},{key:"setupScreenRecording",value:function(){var e=this;document.querySelector(".bb-capture-preview-sendbutton").onclick=this.showNextStep.bind(this),document.querySelector(".bb-capture-preview-retrybutton").onclick=function(){e.screenRecorder.clearPreview(),e.screenDrawer&&e.screenDrawer.clear()},this.screenRecorder=new Ct(this.captureRenderer.bind(this),lo.translateText("accessToScreenSharingDenied"))}}],o=[{key:"setPenColor",value:function(e){for(var t=document.querySelectorAll(".bb-pen-tip"),n=0;n<t.length;n++)t[n].style.fill=e}}],n&&eo(t.prototype,n),o&&eo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ro(e){return ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ro(e)}function io(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,so(o.key),o)}}function ao(e,t,n){return(t=so(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function so(e){var t=function(e,t){if("object"!=ro(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=ro(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ro(t)?t:String(t)}var lo=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ao(this,"overrideLanguage",""),ao(this,"isRTLLayout",!1)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"translateText",value:function(e){if(!e)return"";var t=nt.getInstance().getFlowConfig().staticTranslations;return t&&t[e]?t[e]:e}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e}},{key:"updateRTLSupport",value:function(){var e=nt.getInstance().getFlowConfig();this.isRTLLayout=!1,e&&e.localizationOptions&&e.localizationOptions.rtl&&(this.isRTLLayout=!0),a.getInstance().updateFeedbackButtonState(),Bt.getInstance().updateFrameStyle()}},{key:"getActiveLanguage",value:function(){var e="en";return"undefined"!=typeof navigator&&(e=navigator.language.toLowerCase()),this.overrideLanguage&&""!==this.overrideLanguage&&(e=this.overrideLanguage.toLowerCase()),e}}])&&io(t.prototype,n),o&&io(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function co(e){return co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},co(e)}function uo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,fo(o.key),o)}}function po(e,t,n){return(t=fo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fo(e){var t=function(e,t){if("object"!=co(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=co(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==co(t)?t:String(t)}ao(lo,"instance",void 0);var ho=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),po(this,"shortCutListener",void 0)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"start",value:function(){this.shortCutListener||(this.shortCutListener=document.addEventListener("keyup",(function(e){var t,n,o=(void 0!==(t=e).key?n=t.key:void 0!==t.keyIdentifier?n=t.keyIdentifier:void 0!==t.keyCode&&(n=t.keyCode),n);!e.ctrlKey||"u"!==o&&"U"!==o&&85!==o||Mr.startFeedbackFlowWithOptions("bugreporting",{autostartDrawing:!0})})))}},{key:"stop",value:function(){this.shortCutListener&&(document.removeEventListener("keyup",this.shortCutListener),this.shortCutListener=void 0)}}])&&uo(t.prototype,n),o&&uo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function go(e){return go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},go(e)}function mo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,bo(o.key),o)}}function vo(e,t,n){return(t=bo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bo(e){var t=function(e,t){if("object"!=go(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=go(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==go(t)?t:String(t)}po(ho,"instance",void 0);var yo=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),vo(this,"formPreFill",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=null)&&mo(t.prototype,n),o&&mo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wo(e){return wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wo(e)}function xo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,So(o.key),o)}}function ko(e,t,n){return(t=So(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function So(e){var t=function(e,t){if("object"!=wo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=wo(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wo(t)?t:String(t)}vo(yo,"instance",void 0);var Co=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ko(this,"notificationContainer",null),ko(this,"notifications",[]),ko(this,"unreadCount",0),ko(this,"unreadNotificationsKey","unread-notifications"),ko(this,"isTabActive",!0),ko(this,"showNotificationBadge",!0)}var t,n,o;return t=e,n=[{key:"updateTabBarNotificationCount",value:function(){hn.notifyEvent("unread-count-changed",this.unreadCount)}},{key:"injectNotificationUI",value:function(){if(!this.notificationContainer){var e=document.createElement("div");e.className="gleap-notification-container gleap-font",document.body.appendChild(e),this.notificationContainer=e,this.updateContainerStyle(),this.reloadNotificationsFromCache()}}},{key:"reloadNotificationsFromCache",value:function(){var e=C(this.unreadNotificationsKey);e&&e.length>0&&(e.length>2?this.notifications=e.splice(0,e.length-2):this.notifications=e,this.renderNotifications())}},{key:"setNotificationCount",value:function(e){Bt.getInstance().isOpened()?(this.unreadCount=0,this.updateTabBarNotificationCount()):this.unreadCount=e,this.updateTabBarNotificationCount(),a.getInstance().updateNotificationBadge(this.unreadCount)}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find((function(t){return e.outbound===t.outbound}))||(this.notifications.push(e),e.sound&&jo.ping()),this.notifications.length>2&&this.notifications.shift(),I(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);var t=document.createElement("div");t.onclick=function(){e.clearAllNotifications()},t.className="gleap-notification-close",t.innerHTML=d("dismiss"),this.notificationContainer.appendChild(t);for(var n,o,r=function(){var t=e.notifications[i];n=(n=t.data.text).replaceAll("{{name}}",Ge.getInstance().getName());var r=document.createElement("div");r.onclick=function(){t.data.conversation?Mr.openConversation(t.data.conversation.shareToken,!0):t.data.news?Mr.openNewsArticle(t.data.news.id,!0):t.data.checklist?Mr.openChecklist(t.data.checklist.id,!0):Mr.open()},t.data.news?(r.className="gleap-notification-item-news",r.innerHTML='\n <div class="gleap-notification-item-news-container">\n '.concat(t.data.coverImageUrl&&""!==t.data.coverImageUrl&&!t.data.coverImageUrl.includes("NewsImagePlaceholder")?'<img class="gleap-notification-item-news-image" src="'.concat(t.data.coverImageUrl,'" />'):"",'\n <div class="gleap-notification-item-news-content">\n <div class="gleap-notification-item-news-content-title">').concat(n,"</div>\n ").concat(t.data.previewText&&t.data.previewText.length>0?'<div class="gleap-notification-item-news-preview">'.concat(t.data.previewText,"</div>"):"".concat(t.data.sender?'\n <div class="gleap-notification-item-news-sender">\n '.concat(t.data.sender.profileImageUrl&&'<img src="'.concat(t.data.sender.profileImageUrl,'" />')," ").concat(t.data.sender.name,"</div>"):""),"\n </div>\n </div>")):t.data.checklist?((o=Math.round(t.data.currentStep/t.data.totalSteps*100))<100&&(o+=4),r.className="gleap-notification-item-checklist",r.innerHTML='\n <div class="gleap-notification-item-checklist-container">\n <div class="gleap-notification-item-checklist-content">\n <div class="gleap-notification-item-checklist-content-title">'.concat(t.data.text,'</div>\n <div class="gleap-notification-item-checklist-content-progress">\n <div class="gleap-notification-item-checklist-content-progress-inner" style="width: ').concat(o,'%;"></div>\n </div>\n <div class="gleap-notification-item-checklist-content-next">\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4 12H20M20 12L14 6M20 12L14 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n ').concat(t.data.nextStepTitle,"\n </div>\n </div>\n </div>")):(r.className="gleap-notification-item",r.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&'<img src="'.concat(t.data.sender.profileImageUrl,'" />'),'\n <div class="gleap-notification-item-container">\n ').concat(t.data.sender?'<div class="gleap-notification-item-sender">'.concat(t.data.sender.name,"</div>"):"",'\n <div class="gleap-notification-item-content">').concat(n,"</div>\n </div>")),e.notificationContainer.appendChild(r)},i=0;i<this.notifications.length;i++)r()}}},{key:"clearAllNotifications",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],I(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=nt.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==a.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==a.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===a.getInstance().buttonHidden?e.feedbackButtonPosition===a.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):a.getInstance().buttonHidden&&this.notificationContainer.classList.add(n),this.notificationContainer.setAttribute("dir",lo.getInstance().isRTLLayout?"rtl":"ltr")}}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&xo(t.prototype,n),o&&xo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Io(e){return Io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Io(e)}function Lo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function To(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lo(Object(n),!0).forEach((function(t){Oo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Eo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Mo(o.key),o)}}function Oo(e,t,n){return(t=Mo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mo(e){var t=function(e,t){if("object"!=Io(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Io(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Io(t)?t:String(t)}ko(Co,"instance",void 0);var Ao=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Oo(this,"bannerUrl","https://outboundmedia.gleap.io"),Oo(this,"bannerContainer",null),Oo(this,"bannerData",null),this.startCommunication()}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setBannerUrl",value:function(e){this.bannerUrl=e}},{key:"startCommunication",value:function(){var e=this;window.addEventListener("message",(function(t){if(t.origin===e.bannerUrl)try{var n,o,r,i,a,s,l,c,u=JSON.parse(t.data);"banner-loaded"===u.name&&e.bannerData&&e.sendMessage({name:"banner-data",data:e.bannerData}),"banner-height"===u.name&&document.documentElement.style.setProperty("--gleap-margin-top",u.data.height+"px"),"banner-data-set"===u.name&&(document.body.classList.add("gleap-b-shown"),"floating"===(null===(n=e.bannerData)||void 0===n?void 0:n.format)&&document.body.classList.add("gleap-b-f")),"banner-close"===u.name&&e.removeBannerUI(),"start-conversation"===u.name&&Mr.startBot(null===(o=u.data)||void 0===o?void 0:o.botId),"start-custom-action"===u.name&&Mr.triggerCustomAction(null===(r=u.data)||void 0===r?void 0:r.action),"show-form"===u.name&&Mr.startFeedbackFlow(null===(i=u.data)||void 0===i?void 0:i.formId),"show-survey"===u.name&&Mr.showSurvey(null===(a=u.data)||void 0===a?void 0:a.formId,null===(s=u.data)||void 0===s?void 0:s.surveyFormat),"show-news-article"===u.name&&Mr.openNewsArticle(null===(l=u.data)||void 0===l?void 0:l.articleId),"show-help-article"===u.name&&Mr.openHelpCenterArticle(null===(c=u.data)||void 0===c?void 0:c.articleId)}catch(p){}}))}},{key:"removeBannerUI",value:function(){this.bannerContainer&&(document.body.removeChild(this.bannerContainer),this.bannerContainer=null),document.body.classList.remove("gleap-b-shown"),document.body.classList.remove("gleap-b-f")}},{key:"injectBannerUI",value:function(e){if(this.bannerContainer||!document.body)return!1;this.bannerData=e;var t=document.createElement("div");t.className="gleap-b",t.innerHTML='<iframe src="'.concat(this.bannerUrl,'" class="gleap-b-frame" scrolling="no" title="Gleap Banner" role="dialog" frameborder="0"></iframe>'),document.body.appendChild(t),this.bannerContainer=t}},{key:"sendMessage",value:function(e){try{var t=document.querySelector(".gleap-b-frame");t&&t.contentWindow&&t.contentWindow.postMessage(JSON.stringify(To(To({},e),{},{type:"banner"})),"*")}catch(n){}}},{key:"showBanner",value:function(e){this.injectBannerUI(e)}}])&&Eo(t.prototype,n),o&&Eo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Po(e){return Po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Po(e)}function Ro(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Do(o.key),o)}}function No(e,t,n){return(t=Do(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Do(e){var t=function(e,t){if("object"!=Po(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Po(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Po(t)?t:String(t)}Oo(Ao,"instance",void 0);var jo=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,o=[{key:"playSound",value:function(e){this.settings.play=e}},{key:"ping",value:function(){try{if(!this.settings.play)return;this.audio||(this.audio=new Audio("https://js.gleap.io/res/ping.mp3"));var e=this.audio.play();void 0!==e&&e.then((function(e){})).catch((function(e){}))}catch(t){}}}],(n=null)&&Ro(t.prototype,n),o&&Ro(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Fo(e){return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fo(e)}function Bo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ho(o.key),o)}}function _o(e,t,n){return(t=Ho(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ho(e){var t=function(e,t){if("object"!=Fo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Fo(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Fo(t)?t:String(t)}No(jo,"audio",void 0),No(jo,"settings",{play:!0});var qo=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),_o(this,"tags",[])}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getTags",value:function(){return this.tags}},{key:"setTags",value:function(e){this.tags=e}}])&&Bo(t.prototype,n),o&&Bo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();_o(qo,"instance",void 0);class Uo{constructor(e){var t,n,o,r,i,a,s,l,c,u,p;this.overlay=document.createElement("div"),this.overlay.className=e.className||"_ext-element-overlay",this.overlay.style.background=(null===(t=e.style)||void 0===t?void 0:t.background)||"rgba(250, 240, 202, 0.2)",this.overlay.style.borderColor=(null===(n=e.style)||void 0===n?void 0:n.borderColor)||"#F95738",this.overlay.style.borderStyle=(null===(o=e.style)||void 0===o?void 0:o.borderStyle)||"solid",this.overlay.style.borderRadius=(null===(r=e.style)||void 0===r?void 0:r.borderRadius)||"1px",this.overlay.style.borderWidth=(null===(i=e.style)||void 0===i?void 0:i.borderWidth)||"1px",this.overlay.style.boxSizing=(null===(a=e.style)||void 0===a?void 0:a.boxSizing)||"border-box",this.overlay.style.cursor=(null===(s=e.style)||void 0===s?void 0:s.cursor)||"crosshair",this.overlay.style.position=(null===(l=e.style)||void 0===l?void 0:l.position)||"absolute",this.overlay.style.zIndex=(null===(c=e.style)||void 0===c?void 0:c.zIndex)||"2147483647",this.overlay.style.margin=(null===(u=e.style)||void 0===u?void 0:u.margin)||"0px",this.overlay.style.padding=(null===(p=e.style)||void 0===p?void 0:p.padding)||"0px",this.shadowContainer=document.createElement("div"),this.shadowContainer.className="_ext-element-overlay-container",this.shadowContainer.style.position="absolute",this.shadowContainer.style.top="0px",this.shadowContainer.style.left="0px",this.shadowContainer.style.margin="0px",this.shadowContainer.style.padding="0px",this.shadowRoot=this.shadowContainer.attachShadow({mode:"open"})}addToDOM(e,t){this.usingShadowDOM=t,t?(e.insertBefore(this.shadowContainer,e.firstChild),this.shadowRoot.appendChild(this.overlay)):e.appendChild(this.overlay)}removeFromDOM(){this.setBounds({x:0,y:0,width:0,height:0}),this.overlay.remove(),this.usingShadowDOM&&this.shadowContainer.remove()}captureCursor(){this.overlay.style.pointerEvents="auto"}ignoreCursor(){this.overlay.style.pointerEvents="none"}setBounds({x:e,y:t,width:n,height:o}){this.overlay.style.left=e+"px",this.overlay.style.top=t+"px",this.overlay.style.width=n+"px",this.overlay.style.height=o+"px"}}class zo{constructor(e){this.handleMouseMove=e=>{this.mouseX=e.clientX,this.mouseY=e.clientY},this.handleClick=e=>{var t;this.target&&(null===(t=this.options)||void 0===t?void 0:t.onClick)&&this.options.onClick(this.target),e.preventDefault()},this.tick=()=>{this.updateTarget(),this.tickReq=window.requestAnimationFrame(this.tick)},this.active=!1,this.overlay=new Uo(null!=e?e:{})}start(e){var t,n;return!this.active&&(this.active=!0,this.options=e,document.addEventListener("mousemove",this.handleMouseMove,!0),document.addEventListener("click",this.handleClick,!0),this.overlay.addToDOM(null!==(t=e.parentElement)&&void 0!==t?t:document.body,null===(n=e.useShadowDOM)||void 0===n||n),this.tick(),!0)}stop(){this.active=!1,this.options=void 0,document.removeEventListener("mousemove",this.handleMouseMove,!0),document.removeEventListener("click",this.handleClick,!0),this.overlay.removeFromDOM(),this.target=void 0,this.mouseX=void 0,this.mouseY=void 0,this.tickReq&&window.cancelAnimationFrame(this.tickReq)}updateTarget(){var e,t;if(void 0===this.mouseX||void 0===this.mouseY)return;this.overlay.ignoreCursor();const n=document.elementFromPoint(this.mouseX,this.mouseY);if(this.overlay.captureCursor(),!n||n===this.target)return;if((null===(e=this.options)||void 0===e?void 0:e.elementFilter)&&!this.options.elementFilter(n))return this.target=void 0,void this.overlay.setBounds({x:0,y:0,width:0,height:0});this.target=n;const o=(e=>{const t=e.getBoundingClientRect();return{x:window.pageXOffset+t.left,y:window.pageYOffset+t.top,width:e.offsetWidth,height:e.offsetHeight}})(n);this.overlay.setBounds(o),(null===(t=this.options)||void 0===t?void 0:t.onHover)&&this.options.onHover(n)}}var Wo=n(924);function Go(e){return Go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Go(e)}function Vo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Zo(o.key),o)}}function Xo(e,t,n){return t&&Vo(e.prototype,t),n&&Vo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ko(e,t,n){return(t=Zo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zo(e){var t=function(e,t){if("object"!=Go(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Go(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Go(t)?t:String(t)}const Yo=Xo((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ko(this,"picker",null),Ko(this,"onElementPicked",null),Ko(this,"stopPicker",(function(){if(t.picker)return t.picker.stop(),void(t.picker=null)})),Ko(this,"startPicker",(function(){t.stopPicker();var e=t;t.picker=new zo({style:{borderColor:"#2142E7",background:"transparent",borderWidth:"4px",borderRadius:"5px"}}),t.picker.start({useShadowDOM:!1,onClick:function(t){try{var n=(0,Wo.A)(t);e.onElementPicked&&e.onElementPicked(n)}catch(o){console.error("Error while getting unique selector",o)}},elementFilter:function(e){return!e.classList.contains("gleap-admin-collapse-ui")&&!e.closest(".gleap-admin-collapse-ui")}})})),Ko(this,"setMode",(function(e){t.mode=e,"navigate"===e&&t.stopPicker(),"picker"===e&&t.startPicker()}))}));function Jo(e){return Jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jo(e)}function Qo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function $o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qo(Object(n),!0).forEach((function(t){tr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function er(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,nr(o.key),o)}}function tr(e,t,n){return(t=nr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nr(e){var t=function(e,t){if("object"!=Jo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Jo(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jo(t)?t:String(t)}var or=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),tr(this,"libraryInstance",null),tr(this,"lastUrl",void 0),tr(this,"injectedFrame",!1),tr(this,"gleapFrameContainer",null),tr(this,"gleapCollapseUI",null),tr(this,"injectedCollapseUI",!1),tr(this,"gleapFrame",null),tr(this,"configData",null),tr(this,"adminHelper",null),tr(this,"status","navigate"),tr(this,"toggleCollapseUI",(function(){var e="gleap-admin-collapse-ui-active",n="gleap-admin-frame-container-active",o=function(e,t){return e&&e.classList.contains(t)};(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])||o(t.gleapCollapseUI,e)&&o(t.gleapFrameContainer,n))&&(t.gleapCollapseUI&&t.gleapCollapseUI.classList.toggle(e),t.gleapFrameContainer&&t.gleapFrameContainer.classList.toggle(n))})),tr(this,"injectCollapseUI",(function(){if(!t.injectedCollapseUI){t.injectedCollapseUI=!0;var e=document.createElement("div");e.className="gleap-admin-collapse-ui",e.innerHTML='<div class="gleap-admin-collapse-ui-icon">\n '.concat(d("arrowdown"),"\n </div>"),document.body.appendChild(e),t.gleapCollapseUI=e,e.addEventListener("click",(function(){t.toggleCollapseUI()}))}})),tr(this,"injectFrame",(function(){var e;if(!t.injectedFrame){t.injectedFrame=!0;var n=document.createElement("div");n.className="gleap-admin-frame-container",n.innerHTML='<iframe src="https://app.gleap.io/'.concat("tooltips"===(null==t||null===(e=t.configData)||void 0===e?void 0:e.type)?"tooltipbuilder":"producttourbuilder",'" class="gleap-admin-frame" scrolling="no" title="Gleap Admin Window" allow="autoplay; encrypted-media; fullscreen;" frameborder="0"></iframe>'),document.body.appendChild(n),t.gleapFrameContainer=n,t.gleapFrame=document.querySelector(".gleap-admin-frame")}}))}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.sendMessageToTourBuilder({name:"page-changed",data:{page:e}}))}},{key:"startPageListener",value:function(){var e=this;setInterval((function(){e.logCurrentPage()}),1e3)}},{key:"initAdminHelper",value:function(){var e=this;e.adminHelper=new Yo;try{e.adminHelper.onElementPicked=function(t){e.toggleCollapseUI(!0),e.sendMessageToTourBuilder({name:"element-picked",data:{selector:t}})}}catch(t){console.log(t)}e.injectFrame(),e.injectCollapseUI(),e.setFrameHeight("loading")}},{key:"setFrameHeight",value:function(e){if(this.gleapFrameContainer){var t="";t="picker"===e||"navigate"===e?"65px":"editor"===e?"100vh":"0px",this.gleapFrameContainer.style.height=t}}},{key:"start",value:function(){var e=this;if("undefined"!=typeof window&&!window.gleapAdminDisabled){var t=this;window.addEventListener("message",(function(n){if(n.origin&&"https://app.gleap.io"!==!n.origin)try{var o=JSON.parse(n.data);if("admin"===o.type&&("load"===o.name&&(t.configData=o.data,t.initAdminHelper()),"smartlink-search-result"===o.name&&e.sendMessageToTourBuilder({name:"smartlink-search-result",data:o.data})),"tourbuilder"===o.type){if("loaddata"===o.name&&e.sendMessageToTourBuilder({name:"data",data:t.configData}),"smartlink-search"===o.name&&e.sendMessage({name:"smartlink-search",data:o.data}),"save"===o.name&&e.sendMessage({name:"save",data:o.data}),"click"===o.name)try{document.querySelector(o.data.selector).click()}catch(r){console.log(r)}"status-changed"===o.name&&(t.status=o.data,e.setFrameHeight(t.status),t.adminHelper.stopPicker(),"picker"===t.status&&t.adminHelper.startPicker())}}catch(i){}})),this.sendMessage({name:"init"}),this.startPageListener()}}},{key:"sendMessage",value:function(e){try{window&&window.opener&&window.opener.postMessage(JSON.stringify($o($o({},e),{},{type:"admin"})),"*")}catch(t){}}},{key:"sendMessageToTourBuilder",value:function(e){try{this.gleapFrame&&this.gleapFrame.contentWindow&&this.gleapFrame.contentWindow.postMessage(JSON.stringify($o($o({},e),{},{type:"tourbuilder"})),"*")}catch(t){}}}])&&er(t.prototype,n),o&&er(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function rr(e){return rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rr(e)}function ir(e){return function(e){if(Array.isArray(e))return ar(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ar(e,t)}(e)||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 ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function lr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sr(Object(n),!0).forEach((function(t){cr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cr(e,t,n){return t=function(e){var t=function(e,t){if("object"!=rr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=rr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rr(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}tr(or,"instance",void 0);var ur=function(){var e={};function t(){e=lr({animate:!0,allowClose:!0,overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function n(t){return t?e[t]:e}function o(e,t,n,o){return(e/=o/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function r(e){var t='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap((function(e){var n=e.matches(t),o=Array.from(e.querySelectorAll(t));return[].concat(ir(n?[e]:[]),o)})).filter((function(e){return"none"!==getComputedStyle(e).pointerEvents&&function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)}))}function i(e){if(e&&!function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(e)){var t=n("smoothScroll");e.scrollIntoView({behavior:!t||a(e)?"auto":"smooth",inline:"center",block:"center"})}}function a(e){if(e&&e.parentElement){var t=e.parentElement;return t.scrollHeight>t.clientHeight}}var s={};function l(e,t){s[e]=t}function c(e){return e?s[e]:s}function u(){s={}}var p={};function d(e,t){p[e]=t}function f(e){var t;null==(t=p[e])||t.call(p)}function h(e){if(e){var t=e.getBoundingClientRect(),n={x:t.x,y:t.y,width:t.width,height:t.height};l("__activeStagePosition",n),m(n)}}function g(e){var t=function(e){var t=window.innerWidth,o=window.innerHeight,r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("gleap-tour-overlay","gleap-tour-overlay-animated"),r.setAttribute("viewBox","0 0 ".concat(t," ").concat(o)),r.setAttribute("xmlSpace","preserve"),r.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("preserveAspectRatio","xMinYMin slice"),r.style.fillRule="evenodd",r.style.clipRule="evenodd",r.style.strokeLinejoin="round",r.style.strokeMiterlimit="2",r.style.zIndex="10000",r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%";var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",v(e)),i.style.fill=n("overlayColor")||"rgb(0,0,0)",i.style.opacity="".concat(n("overlayOpacity")),i.style.pointerEvents="auto",i.style.cursor="auto",r.appendChild(i),r}(e);document.body.appendChild(t),S(t,(function(e){"path"===e.target.tagName&&f("overlayClick")})),l("__overlaySvg",t)}function m(e){var t=c("__overlaySvg");if(t){var n=t.firstElementChild;if("path"!==(null==n?void 0:n.tagName))throw new Error("no path element found in stage svg");n.setAttribute("d",v(e))}else g(e)}function v(e){var t=window.innerWidth,o=window.innerHeight,r=n("stagePadding")||0,i=n("stageRadius")||0,a=e.width+2*r,s=e.height+2*r,l=Math.min(i,a/2,s/2),c=Math.floor(Math.max(l,0)),u=e.x-r+c,p=e.y-r,d=a-2*c,f=s-2*c;return"M".concat(t,",0L0,0L0,").concat(o,"L").concat(t,",").concat(o,"L").concat(t,",0Z\n M").concat(u,",").concat(p," h").concat(d," a").concat(c,",").concat(c," 0 0 1 ").concat(c,",").concat(c," v").concat(f," a").concat(c,",").concat(c," 0 0 1 -").concat(c,",").concat(c," h-").concat(d," a").concat(c,",").concat(c," 0 0 1 -").concat(c,",-").concat(c," v-").concat(f," a").concat(c,",").concat(c," 0 0 1 ").concat(c,",-").concat(c," z")}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,r=e.element,a=r;if("string"==typeof a)try{a=document.querySelector(r)}catch(u){var s=r.replace(/(#[^#\s]+)/g,(function(e){return e.replace(/:/g,"\\:")}));a=document.querySelector(s)}r&&!a&&t>=0?setTimeout((function(){C(),b(e,t-100)}),100):(a||(a=function(){var e=document.getElementById("gleap-tour-dummy-element");if(e)return e;var t=document.createElement("div");return t.id="gleap-tour-dummy-element",t.style.width="0",t.style.height="0",t.style.pointerEvents="none",t.style.opacity="0",t.style.position="fixed",t.style.top="50%",t.style.left="50%",document.body.appendChild(t),t}()),function(e,t){var r,a,s=400,u=Date.now(),p=c("__activeStep"),d=c("__activeElement")||e,f=!d||d===e,g="gleap-tour-dummy-element"===e.id,v="gleap-tour-dummy-element"===d.id,b=n("animate"),y=t.onHighlightStarted||n("onHighlightStarted"),w=(null==t?void 0:t.onHighlighted)||n("onHighlighted"),x=(null==p?void 0:p.onDeselected)||n("onDeselected"),k=n(),S=c();!f&&x&&x(v?void 0:d,p,{config:k,state:S});y&&y(g?void 0:e,t,{config:k,state:S});var L=!f&&b,T=!1;C(),l("previousStep",p),l("previousElement",d),l("activeStep",t),l("activeElement",e);var E=function r(){if(c("__transitionCallback")===r){var i=Date.now()-u,a=s-i<=s/2;t.popover&&a&&!T&&L&&(I(e,t),T=!0),n("animate")&&i<s?function(e,t,n,r){var i=c("__activeStagePosition"),a=i||n.getBoundingClientRect(),s=r.getBoundingClientRect();m(i={x:o(e,a.x,s.x-a.x,t),y:o(e,a.y,s.y-a.y,t),width:o(e,a.width,s.width-a.width,t),height:o(e,a.height,s.height-a.height,t)}),l("__activeStagePosition",i)}(i,s,d,e):(h(e),w&&w(g?void 0:e,t,{config:n(),state:c()}),l("__transitionCallback",void 0),l("__previousStep",p),l("__previousElement",d),l("__activeStep",t),l("__activeElement",e)),window.requestAnimationFrame(r)}};l("__transitionCallback",E),window.requestAnimationFrame(E),i(e),!L&&t.popover&&I(e,t);d.classList.remove("gleap-tour-active-element","gleap-tour-no-interaction"),d.removeAttribute("aria-haspopup"),d.removeAttribute("aria-expanded"),d.removeAttribute("aria-controls"),null!==(r=null!==(a=t.disableActiveInteraction)&&void 0!==a?a:n("disableActiveInteraction"))&&void 0!==r&&r&&e.classList.add("gleap-tour-no-interaction");e.classList.add("gleap-tour-active-element"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded","true"),e.setAttribute("aria-controls","gleap-tour-popover-content")}(a,e))}function y(){var e=c("__activeElement"),t=c("__activeStep");e&&(h(e),function(){var e=c("__activeStagePosition"),t=c("__overlaySvg");if(e)if(t){var n=window.innerWidth,o=window.innerHeight;t.setAttribute("viewBox","0 0 ".concat(n," ").concat(o))}else console.warn("No stage svg found.")}(),O(e,t))}function w(){var e=c("__resizeTimeout");e&&window.cancelAnimationFrame(e),l("__resizeTimeout",window.requestAnimationFrame(y))}function x(e){var t;if(c("isInitialized")&&("Tab"===e.key||9===e.keyCode)){var n=c("__activeElement"),o=null==(t=c("popover"))?void 0:t.wrapper,i=r([].concat(ir(o?[o]:[]),ir(n?[n]:[]))),a=i[0],s=i[i.length-1];if(e.preventDefault(),e.shiftKey){var l=i[i.indexOf(document.activeElement)-1]||s;null==l||l.focus()}else{var u=i[i.indexOf(document.activeElement)+1]||a;null==u||u.focus()}}}function k(e){var t;(null==(t=n("allowKeyboardControl"))||t)&&("Escape"===e.key?f("escapePress"):"ArrowRight"===e.key?f("arrowRightPress"):"ArrowLeft"===e.key&&f("arrowLeftPress"))}function S(e,t,n){var o=function(t,o){var r=t.target;e.contains(r)&&(n&&!n(r)||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()),null==o||o(t))},r=!0;document.addEventListener("pointerdown",o,r),document.addEventListener("mousedown",o,r),document.addEventListener("pointerup",o,r),document.addEventListener("mouseup",o,r),document.addEventListener("click",(function(e){o(e,t)}),r)}function C(){var e=c("popover");e&&(e.wrapper.style.display="none")}function I(e,t){var o,a,s=c("popover");s&&document.body.removeChild(s.wrapper),s=function(){var e=document.createElement("div");e.classList.add("gleap-tour-popover");var t=document.createElement("div");t.classList.add("gleap-tour-popover-arrow");var n=document.createElement("div");n.id="gleap-tour-popover-title",n.classList.add("gleap-tour-popover-title"),n.style.display="none",n.innerText="Popover Title";var o=document.createElement("div");o.id="gleap-tour-popover-description",o.classList.add("gleap-tour-popover-description"),o.style.display="none",o.innerText="Popover description is here";var r=document.createElement("button");r.type="button",r.classList.add("gleap-tour-popover-close-btn"),r.setAttribute("aria-label","Close"),r.innerHTML="&times;";var i=document.createElement("div");i.classList.add("gleap-tour-popover-footer");var a=document.createElement("span");a.classList.add("gleap-tour-popover-progress-text"),a.innerText="";var s=document.createElement("span");s.classList.add("gleap-tour-popover-navigation-btns");var l=document.createElement("button");l.type="button",l.classList.add("gleap-tour-popover-prev-btn"),l.innerHTML="&larr; Previous";var c=document.createElement("button");return c.type="button",c.classList.add("gleap-tour-popover-next-btn"),c.innerHTML="Next &rarr;",s.appendChild(l),s.appendChild(c),i.appendChild(a),i.appendChild(s),e.appendChild(r),e.appendChild(t),e.appendChild(n),e.appendChild(o),e.appendChild(i),{wrapper:e,arrow:t,title:n,description:o,footer:i,previousButton:l,nextButton:c,closeButton:r,footerButtons:s,progress:a}}(),document.body.appendChild(s.wrapper);var u=t.popover||{},p=u.title,d=u.description,h=u.showButtons,g=u.disableButtons,m=u.showProgress,v=u.nextBtnText,b=void 0===v?n("nextBtnText")||"Next":v,y=u.prevBtnText,w=void 0===y?n("prevBtnText")||"Previous":y,x=u.progressText,k=void 0===x?n("progressText")||"{current} of {total}":x;s.nextButton.innerHTML=b,s.previousButton.innerHTML=w,s.progress.innerHTML=k,p?(s.title.innerHTML=p,s.title.style.display="block"):s.title.style.display="none",d?(s.description.innerHTML=d,s.description.style.display="block"):s.description.style.display="none";var C=h||n("showButtons"),I=m||n("showProgress")||!1,L=(null==C?void 0:C.includes("next"))||(null==C?void 0:C.includes("previous"))||I;s.closeButton.style.display=C.includes("close")?"block":"none",L?(s.footer.style.display="flex",s.progress.style.display=I?"block":"none",s.nextButton.style.display=C.includes("next")?"block":"none",s.previousButton.style.display=C.includes("previous")?"block":"none"):s.footer.style.display="none";var T=g||n("disableButtons")||[];(null==T?void 0:T.includes("next"))&&(s.nextButton.disabled=!0,s.nextButton.classList.add("gleap-tour-popover-btn-disabled")),(null==T?void 0:T.includes("previous"))&&(s.previousButton.disabled=!0,s.previousButton.classList.add("gleap-tour-popover-btn-disabled")),(null==T?void 0:T.includes("close"))&&(s.closeButton.disabled=!0,s.closeButton.classList.add("gleap-tour-popover-btn-disabled"));var E=s.wrapper;E.style.display="block",E.style.left="",E.style.top="",E.style.bottom="",E.style.right="",E.id="gleap-tour-popover-content",E.setAttribute("role","dialog"),E.setAttribute("aria-labelledby","gleap-tour-popover-title"),E.setAttribute("aria-describedby","gleap-tour-popover-description"),s.arrow.className="gleap-tour-popover-arrow";var M=(null==(o=t.popover)?void 0:o.popoverClass)||n("popoverClass")||"";E.className="gleap-tour-popover ".concat(M).trim(),S(s.wrapper,(function(o){var r,i,a,s=o.target,l=(null==(r=t.popover)?void 0:r.onNextClick)||n("onNextClick"),u=(null==(i=t.popover)?void 0:i.onPrevClick)||n("onPrevClick"),p=(null==(a=t.popover)?void 0:a.onCloseClick)||n("onCloseClick");return s.classList.contains("gleap-tour-popover-next-btn")?l?l(e,t,{config:n(),state:c()}):f("nextClick"):s.classList.contains("gleap-tour-popover-prev-btn")?u?u(e,t,{config:n(),state:c()}):f("prevClick"):s.classList.contains("gleap-tour-popover-close-btn")?p?p(e,t,{config:n(),state:c()}):f("closeClick"):void 0}),(function(e){return!(null==s?void 0:s.description.contains(e))&&!(null==s?void 0:s.title.contains(e))&&"string"==typeof e.className&&e.className.includes("gleap-tour-popover")})),l("popover",s);var A=(null==(a=t.popover)?void 0:a.onPopoverRender)||n("onPopoverRender");A&&A(s,{config:n(),state:c()}),O(e,t),i(E);var P=e.classList.contains("gleap-tour-dummy-element"),R=r([E].concat(ir(P?[]:[e])));R.length>0&&R[0].focus()}function L(){var e=c("popover");if(null==e?void 0:e.wrapper){var t=e.wrapper.getBoundingClientRect(),o=n("stagePadding")||0,r=n("popoverOffset")||0;return{width:t.width+o+r,height:t.height+o+r,realWidth:t.width,realHeight:t.height}}}function T(e,t){var n=t.elementDimensions,o=t.popoverDimensions,r=t.popoverPadding,i=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.top-r,window.innerHeight-o.realHeight-i.width),i.width):"end"===e?Math.max(Math.min(n.top-(null==o?void 0:o.realHeight)+n.height+r,window.innerHeight-(null==o?void 0:o.realHeight)-i.width),i.width):"center"===e?Math.max(Math.min(n.top+n.height/2-(null==o?void 0:o.realHeight)/2,window.innerHeight-(null==o?void 0:o.realHeight)-i.width),i.width):0}function E(e,t){var n=t.elementDimensions,o=t.popoverDimensions,r=t.popoverPadding,i=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.left-r,window.innerWidth-o.realWidth-i.width),i.width):"end"===e?Math.max(Math.min(n.left-(null==o?void 0:o.realWidth)+n.width+r,window.innerWidth-(null==o?void 0:o.realWidth)-i.width),i.width):"center"===e?Math.max(Math.min(n.left+n.width/2-(null==o?void 0:o.realWidth)/2,window.innerWidth-(null==o?void 0:o.realWidth)-i.width),i.width):0}function O(e,t){var o=c("popover");if(o){var r=(null==t?void 0:t.popover)||{},i=r.align,a=void 0===i?"start":i,s=r.side,l=void 0===s?"left":s,u=a,p="gleap-tour-dummy-element"===e.id?"over":l,d=n("stagePadding")||0,f=L(),h=o.arrow.getBoundingClientRect(),g=e.getBoundingClientRect(),m=g.top-f.height,v=m>=0,b=window.innerHeight-(g.bottom+f.height),y=b>=0,w=g.left-f.width,x=w>=0,k=window.innerWidth-(g.right+f.width),S=k>=0,C=!(v||y||x||S),I=p;if("top"===p&&v?S=x=y=!1:"bottom"===p&&y?S=x=v=!1:"left"===p&&x?S=v=y=!1:"right"===p&&S&&(x=v=y=!1),"over"===p){var O=window.innerWidth/2-f.realWidth/2,M=window.innerHeight/2-f.realHeight/2;o.wrapper.style.left="".concat(O,"px"),o.wrapper.style.right="auto",o.wrapper.style.top="".concat(M,"px"),o.wrapper.style.bottom="auto"}else if(C){var A=window.innerWidth/2-(null==f?void 0:f.realWidth)/2;o.wrapper.style.left="".concat(A,"px"),o.wrapper.style.right="auto",o.wrapper.style.bottom="".concat(10,"px"),o.wrapper.style.top="auto"}else if(x){var P=Math.min(w,window.innerWidth-(null==f?void 0:f.realWidth)-h.width),R=T(u,{elementDimensions:g,popoverDimensions:f,popoverPadding:d,popoverArrowDimensions:h});o.wrapper.style.left="".concat(P,"px"),o.wrapper.style.top="".concat(R,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.right="auto",I="left"}else if(S){var N=Math.min(k,window.innerWidth-(null==f?void 0:f.realWidth)-h.width),D=T(u,{elementDimensions:g,popoverDimensions:f,popoverPadding:d,popoverArrowDimensions:h});o.wrapper.style.right="".concat(N,"px"),o.wrapper.style.top="".concat(D,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.left="auto",I="right"}else if(v){var j=Math.min(m,window.innerHeight-f.realHeight-h.width),F=E(u,{elementDimensions:g,popoverDimensions:f,popoverPadding:d,popoverArrowDimensions:h});o.wrapper.style.top="".concat(j,"px"),o.wrapper.style.left="".concat(F,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.right="auto",I="top"}else if(y){var B=Math.min(b,window.innerHeight-(null==f?void 0:f.realHeight)-h.width),_=E(u,{elementDimensions:g,popoverDimensions:f,popoverPadding:d,popoverArrowDimensions:h});o.wrapper.style.left="".concat(_,"px"),o.wrapper.style.bottom="".concat(B,"px"),o.wrapper.style.top="auto",o.wrapper.style.right="auto",I="bottom"}C?o.arrow.classList.add("gleap-tour-popover-arrow-none"):function(e,t,n){var o=c("popover");if(!o)return;var r=n.getBoundingClientRect(),i=L(),a=o.arrow,s=i.width,l=window.innerWidth,u=r.width,p=r.left,d=i.height,f=window.innerHeight,h=r.top,g=r.height;a.className="gleap-tour-popover-arrow";var m=t,v=e;"top"===t?(p+u<=0?(m="right",v="end"):p+u-s<=0&&(m="top",v="start"),p>=l?(m="left",v="end"):p+s>=l&&(m="top",v="end")):"bottom"===t?(p+u<=0?(m="right",v="start"):p+u-s<=0&&(m="bottom",v="start"),p>=l?(m="left",v="start"):p+s>=l&&(m="bottom",v="end")):"left"===t?(h+g<=0?(m="bottom",v="end"):h+g-d<=0&&(m="left",v="start"),h>=f?(m="top",v="end"):h+d>=f&&(m="left",v="end")):"right"===t&&(h+g<=0?(m="bottom",v="start"):h+g-d<=0&&(m="right",v="start"),h>=f?(m="top",v="start"):h+d>=f&&(m="right",v="end"));m?(a.classList.add("gleap-tour-popover-arrow-side-".concat(m)),a.classList.add("gleap-tour-popover-arrow-align-".concat(v))):a.classList.add("gleap-tour-popover-arrow-none")}(u,I,e)}}return function(){function e(){n("allowClose")&&h()}function o(){var e=c("activeIndex"),t=n("steps")||[];if(void 0!==e){var o=e+1;t[o]?f(o):h()}}function r(){var e=c("activeIndex"),t=n("steps")||[];if(void 0!==e){var o=e-1;t[o]?f(o):h()}}function i(){var e;if(!c("__transitionCallback")){var t=c("activeIndex"),o=c("__activeStep"),i=c("__activeElement");if("CLICK"!==o.mode)if(void 0!==t&&void 0!==o)if(void 0!==c("activeIndex")){var a=(null==(e=o.popover)?void 0:e.onPrevClick)||n("onPrevClick");if(a)return a(i,o,{config:n(),state:c()});r()}}}function a(){var e;if(!c("__transitionCallback")){var t=c("activeIndex"),r=c("__activeStep"),i=c("__activeElement");if("CLICK"!==r.mode&&void 0!==t&&void 0!==r){var a=(null==(e=r.popover)?void 0:e.onNextClick)||n("onNextClick");if(a)return a(i,r,{config:n(),state:c()});o()}}}function s(){c("isInitialized")||(l("isInitialized",!0),document.body.classList.add("gleap-tour-active",n("animate")?"gleap-tour-fade":"gleap-tour-simple"),window.addEventListener("keyup",k,!1),window.addEventListener("keydown",x,!1),window.addEventListener("resize",w),window.addEventListener("scroll",w),d("overlayClick",e),d("escapePress",e),d("arrowLeftPress",i),d("arrowRightPress",a))}function f(){var e,t,o,r,i,a,s,c,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,p=n("steps");if(!p)return console.error("No steps to drive through"),void h();if(p[u]){l("__activeOnDestroyed",document.activeElement),l("activeIndex",u);var d=p[u],g=p[u+1],m=p[u-1],v=(null==(e=d.popover)?void 0:e.doneBtnText)||n("doneBtnText")||"Done",y=n("allowClose"),w=void 0!==(null==(t=d.popover)?void 0:t.showProgress)?null==(o=d.popover)?void 0:o.showProgress:n("showProgress"),x=((null==(r=d.popover)?void 0:r.progressText)||n("progressText")||"{{current}} of {{total}}").replace("{{current}}","".concat(u+1)).replace("{{total}}","".concat(p.length)),k=(null==(i=d.popover)?void 0:i.showButtons)||n("showButtons"),S=["next","previous"].concat(ir(y?["close"]:[])).filter((function(e){return!(null==k?void 0:k.length)||k.includes(e)})),C=(null==(a=d.popover)?void 0:a.onNextClick)||n("onNextClick"),I=(null==(s=d.popover)?void 0:s.onPrevClick)||n("onPrevClick"),L=(null==(c=d.popover)?void 0:c.onCloseClick)||n("onCloseClick");b(lr(lr({},d),{},{popover:lr({showButtons:S,nextBtnText:g?void 0:v,disableButtons:ir(m?[]:["previous"]),showProgress:w,progressText:x,onNextClick:C||function(){g?f(u+1):h()},onPrevClick:I||function(){f(u-1)},onCloseClick:L||function(){h()}},(null==d?void 0:d.popover)||{})}))}else h()}function h(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=c("__activeElement"),o=c("__activeStep"),r=c("__activeOnDestroyed"),i=n("onDestroyStarted");if(e&&i){i(!t||"gleap-tour-dummy-element"===(null==t?void 0:t.id)?void 0:t,o,{config:n(),state:c()})}else{var a,s,l,d=(null==o?void 0:o.onDeselected)||n("onDeselected"),f=n("onDestroyed");if(document.body.classList.remove("gleap-tour-active","gleap-tour-fade","gleap-tour-simple"),window.removeEventListener("keyup",k),window.removeEventListener("resize",w),window.removeEventListener("scroll",w),(s=c("popover"))&&(null==(a=s.wrapper.parentElement)||a.removeChild(s.wrapper)),function(){var e;null==(e=document.getElementById("gleap-tour-dummy-element"))||e.remove(),document.querySelectorAll(".gleap-tour-active-element").forEach((function(e){e.classList.remove("gleap-tour-active-element","gleap-tour-no-interaction"),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls")}))}(),(l=c("__overlaySvg"))&&l.remove(),p={},u(),t&&o){var h="gleap-tour-dummy-element"===t.id;d&&d(h?void 0:t,o,{config:n(),state:c()}),f&&f(h?void 0:t,o,{config:n(),state:c()})}r&&r.focus()}}return t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{isActive:function(){return c("isInitialized")||!1},refresh:w,drive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;s(),f(e)},setConfig:t,setSteps:function(e){u(),t(lr(lr({},n()),{},{steps:e}))},getConfig:n,getState:c,getActiveIndex:function(){return c("activeIndex")},isFirstStep:function(){return 0===c("activeIndex")},isLastStep:function(){var e=n("steps")||[],t=c("activeIndex");return void 0!==t&&t===e.length-1},getActiveStep:function(){return c("activeStep")},getActiveElement:function(){return c("activeElement")},getPreviousElement:function(){return c("previousElement")},getPreviousStep:function(){return c("previousStep")},moveNext:o,movePrevious:r,moveTo:function(e){(n("steps")||[])[e]?f(e):h()},hasNextStep:function(){var e=n("steps")||[],t=c("activeIndex");return void 0!==t&&e[t+1]},hasPreviousStep:function(){var e=n("steps")||[],t=c("activeIndex");return void 0!==t&&e[t-1]},highlight:function(e){s(),b(lr(lr({},e),{},{popover:e.popover?lr({showButtons:[],showProgress:!1,progressText:""},e.popover):void 0}))},destroy:function(){h(!1)}}}}();const pr=ur;function dr(e){return dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dr(e)}function fr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fr(Object(n),!0).forEach((function(t){mr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,vr(o.key),o)}}function mr(e,t,n){return(t=vr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vr(e){var t=function(e,t){if("object"!=dr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=dr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==dr(t)?t:String(t)}var br=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),mr(this,"productTourData",void 0),mr(this,"productTourId",void 0),mr(this,"onCompletion",void 0),mr(this,"unmuted",!1)}var t,n,o;return t=e,n=[{key:"startWithConfig",value:function(e,t,n){return this.productTourId=e,this.productTourData=t,this.onCompletion=n,this.start()}},{key:"start",value:function(){var e=this.productTourData;if(e){this.unmuted=!1;for(var t=e.steps,n=this,o=[],r=0;r<t.length;r++){var i=t[r],a="CLICK"===i.mode,s="INPUT"===i.mode,l="",c=!1;if("video-pointer"===i.type)l='<div class="gleap-tour-video">\n <video class="gleap-tour-video-obj" muted autoplay>\n <source src="'.concat(i.videoUrl,'" type="video/mp4">\n </video>\n <div class="gleap-tour-video-playpause">').concat(d("unmute"),"</div>\n </div>");else{var u="";e.sender&&e.sender.firstName&&(c=!0,u='<div class="gleap-tour-sender">\n <div class="gleap-tour-sender-image" style="background-image: url(\''.concat(e.sender.profileImageUrl,'\');"></div>\n <div class="gleap-tour-sender-name">').concat(e.sender.firstName,"</div>\n </div>")),l="".concat(u,'<div class="gleap-tour-message">').concat(i.message,"</div>")}var p={disableActiveInteraction:!a&&!s,mode:i.mode,popover:hr({description:l,popoverClass:"gleap-tour-popover-".concat(i.type," ").concat(!c&&"gleap-tour-popover-no-sender"," ").concat(e.allowClose&&"gleap-tour-popover-can-close")},a?{showButtons:[]}:{})};i.selector&&i.selector.length>0&&(p.element=i.selector),o.push(p)}var f=["next","close"];e.backButton&&f.push("previous");var h=pr(mr(mr(mr(mr(mr(mr(mr(mr({showProgress:!0,steps:o},"showProgress",t.length>1),"allowClose",e.allowClose),"nextBtnText",e.nextText),"doneBtnText",e.doneText),"prevBtnText",e.prevText),"showButtons",f),"onDestroyStarted",(function(){h.hasNextStep()?h.destroy():(h.destroy(),n.onCompletion&&n.onCompletion({tourId:n.productTourId})),document.removeEventListener("click",g)})),"onPopoverRender",(function(e){if(e)for(var t=document.querySelectorAll(".gleap-tour-popover-description img, .gleap-tour-popover-description video"),o=function(){setTimeout((function(){h.refresh()}),500),setTimeout((function(){h.refresh()}),750)},r=0;r<t.length;r++){var i=t[r];"IMG"===i.tagName?(i.addEventListener("load",(function(){o()})),i.addEventListener("error",(function(){o()}))):"VIDEO"===i.tagName&&(i.addEventListener("canplaythrough",(function(){o()})),i.addEventListener("error",(function(){o()})))}var a="gleap-tour-video--playing",s=document.querySelector(".gleap-tour-video-playpause"),l=document.querySelector(".gleap-tour-video-obj");if(l){var c=l.closest(".gleap-tour-video");n.unmuted&&l&&(l.pause(),l.muted=!1,l.play(),c.classList.add(a)),l.addEventListener("ended",(function(){s.innerHTML=d("replay"),s.classList.add("gleap-tour-video-svg--fullscreen"),c.classList.remove(a)})),l.addEventListener("play",(function(){console.log("Video started"),s.classList.remove("gleap-tour-video-svg--fullscreen")})),s&&s.addEventListener("click",(function(){return u()}));var u=function(){l.muted?(n.unmuted=!0,l.pause(),l.currentTime=0,l.muted=!1,l.play(),s.innerHTML=d("mute"),c.classList.add(a)):l.paused?(l.muted=!1,l.play(),s.innerHTML=d("mute"),c.classList.add(a)):(l.pause(),s.innerHTML=d("unmute"),c.classList.remove(a))}}})));h.drive(),document.addEventListener("click",g)}function g(e){try{var n=document.querySelector(".gleap-tour-popover");if(n&&!n.contains(e.target)){var o,r=h.getActiveIndex(),i=t[r],a=h.getActiveElement();if("CLICK"===(null==i?void 0:i.mode)&&(null==e?void 0:e.target)!==a&&!a.contains(null==e?void 0:e.target))return;a&&"INPUT"===a.tagName||"INPUT"===i.mode||null!=e&&null!==(o=e.target)&&void 0!==o&&o.id.includes("tooltip-svg")||h.moveNext()}}catch(s){}}}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&gr(t.prototype,n),o&&gr(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function yr(e){return yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yr(e)}function wr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Cr(o.key),o)}}function xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function kr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(n),!0).forEach((function(t){Sr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sr(e,t,n){return(t=Cr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cr(e){var t=function(e,t){if("object"!=yr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=yr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==yr(t)?t:String(t)}mr(br,"instance",void 0),"undefined"!=typeof HTMLCanvasElement&&HTMLCanvasElement.prototype&&void 0===HTMLCanvasElement.prototype.__originalGetContext&&(HTMLCanvasElement.prototype.__originalGetContext=HTMLCanvasElement.prototype.getContext,HTMLCanvasElement.prototype.getContext=function(e,t){return this.__originalGetContext(e,kr(kr({},t),{},{preserveDrawingBuffer:!0}))});var Ir=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Sr(this,"initialized",!1),Sr(this,"offlineMode",!1),Sr(this,"disablePageTracking",!1),Sr(this,"disableInAppNotifications",!1),Sr(this,"globalData",{screenRecordingData:null,webReplay:null,snapshotPosition:{x:0,y:0}}),"undefined"!=typeof window&&(zt.getInstance(),Yt.getInstance().start(),on.getInstance().start(),or.getInstance().start())}var t,n,o;return t=e,n=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){Bt.getInstance().destroy(),nt.getInstance().start().then((function(){a.getInstance().refresh(),Co.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}},{key:"performActions",value:function(t){for(var n=0;n<t.length;n++){var o,r=t[n];r&&r.actionType&&("notification"===r.actionType?"widget"===(null==r||null===(o=r.data)||void 0===o||null===(o=o.checklist)||void 0===o?void 0:o.popupType)?e.openChecklist(r.data.checklist.id,!0):this.disableInAppNotifications||e.showNotification(r):"banner"===r.actionType?e.showBanner(r):"tour"===r.actionType?e.startProductTourWithConfig(r.outbound,r.data):e.showSurvey(r.actionType,r.format))}}},{key:"setGlobalDataItem",value:function(e,t){this.globalData[e]=t}},{key:"getGlobalDataItem",value:function(e){return this.globalData[e]}},{key:"takeCurrentReplay",value:function(){var e=Un.getInstance().getReplayData();this.setGlobalDataItem("webReplay",e)}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"setEnvironment",value:function(e){zt.getInstance().environment=e}},{key:"setTags",value:function(e){qo.getInstance().setTags(e)}},{key:"setUrlHandler",value:function(e){Bt.getInstance().setUrlHandler(e)}},{key:"setOfflineMode",value:function(e){this.getInstance().offlineMode=e}},{key:"setDisableInAppNotifications",value:function(e){this.getInstance().disableInAppNotifications=e}},{key:"setDisablePageTracking",value:function(e){this.getInstance().disablePageTracking=e}},{key:"disableConsoleLogOverwrite",value:function(){Yt.getInstance().stop()}},{key:"setAiTools",value:function(e){nt.getInstance().setAiTools(e)}},{key:"attachNetworkLogs",value:function(e){b.getInstance().externalRequests=x(e)}},{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";Yt.getInstance().addLog(e,t)}},{key:"initialize",value:function(t){var n=this.getInstance();if(n.initialized)console.warn("Gleap already initialized.");else{n.initialized=!0;var o=Ge.getInstance();o.sdkKey=t,o.setOnSessionReady((function(){setTimeout((function(){nt.getInstance().start().then((function(){Ye.getInstance().start(),L((function(){a.getInstance().injectFeedbackButton(),Co.getInstance().injectNotificationUI(),e.checkForUrlParams(),hn.notifyEvent("initialized")}))})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),o.startSession()}}},{key:"checkForUrlParams",value:function(){if("undefined"!=typeof window&&window.location.search)try{var t=new URLSearchParams(window.location.search),n=t.get("gleap_widget");n&&n.length>0&&e.open();var o=t.get("gleap_feedback");o&&o.length>0&&e.startFeedbackFlow(o);var r=t.get("gleap_survey"),i=t.get("gleap_survey_format");r&&r.length>0&&e.showSurvey(r,"survey_full"===i?"survey_full":"survey");var a=t.get("gleap_tour");if(a&&a.length>0){var s=parseInt(t.get("gleap_tour_delay"));isNaN(s)&&(s=4),setTimeout((function(){e.startProductTour(a)}),1e3*s)}}catch(l){}}},{key:"destroy",value:function(){Un.getInstance().stop(),Ye.getInstance().stop(),Bt.getInstance().destroy(),a.getInstance().toggleFeedbackButton(!1),Co.getInstance().clearAllNotifications(!0),Ge.getInstance().clearSession(0,!1),Ao.getInstance().removeBannerUI()}},{key:"closeBanner",value:function(){Ao.getInstance().removeBannerUI()}},{key:"setUseCookies",value:function(e){Ge.getInstance().useCookies=e}},{key:"identify",value:function(e,t,n){return Ge.getInstance().identifySession(e,x(t),n)}},{key:"updateContact",value:function(e){return Ge.getInstance().updateSession(x(e))}},{key:"clearIdentity",value:function(){Ge.getInstance().clearSession()}},{key:"getIdentity",value:function(){return Ge.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=Ge.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return Bt.getInstance().isOpened()}},{key:"hide",value:function(){Bt.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){b.getInstance().setMaxRequests(e)}},{key:"startNetworkLogger",value:function(){b.getInstance().start()}},{key:"setNetworkLogsBlacklist",value:function(e){b.getInstance().setBlacklist(e)}},{key:"setNetworkLogPropsToIgnore",value:function(e){b.getInstance().setFilters(e)}},{key:"setReplayOptions",value:function(e){Un.getInstance().setOptions(e)}},{key:"close",value:function(){Bt.getInstance().hideWidget()}},{key:"open",value:function(){Bt.getInstance().setAppMode("widget"),Bt.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){Ye.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){Ye.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=x(e);yo.getInstance().formPreFill=t,Bt.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){hn.on(e,t)}},{key:"enableShortcuts",value:function(e){e?ho.getInstance().start():ho.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){a.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){zt.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){zt.setAppBuildNumber(e)}},{key:"setWSApiUrl",value:function(e){Ge.getInstance().wsApiUrl=e}},{key:"setApiUrl",value:function(e){Ge.getInstance().apiUrl=e}},{key:"setBannerUrl",value:function(e){Ao.getInstance().setBannerUrl(e)}},{key:"setFrameUrl",value:function(e){Bt.getInstance().frameUrl=e}},{key:"setTicketAttribute",value:function(e,t){cn.getInstance().setTicketAttribute(e,t)}},{key:"unsetTicketAttribute",value:function(e){cn.getInstance().unsetTicketAttribute(e)}},{key:"clearTicketAttributes",value:function(){cn.getInstance().clearTicketAttributes()}},{key:"attachCustomData",value:function(e){cn.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){cn.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){cn.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){cn.getInstance().clearCustomData()}},{key:"playSound",value:function(e){jo.playSound(e)}},{key:"showTabNotificationBadge",value:function(e){var t=Co.getInstance();t.showNotificationBadge=e,t.updateTabBarNotificationCount()}},{key:"setLanguage",value:function(t){lo.getInstance().setOverrideLanguage(t),e.getInstance().initialized&&setTimeout((function(){e.getInstance().softReInitialize(),e.updateContact({lang:t})}),1e3)}},{key:"registerCustomAction",value:function(e){xn.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){xn.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:a.FEEDBACK_BUTTON_BOTTOM_LEFT;L((function(){!function(e,t,n,o,r,i,s,l){var c=p(e),d=p(n),f=p(r),h=p(t),g="#ffffff"===f,m=u(t,"#ffffff"===h?-35:-15),v=u(r,g?100:-120),b=u(r,g?30:-12),y=u(r,g?80:-30),w=(o=parseInt(o,10),Math.round(1.05*o)),x=Math.round(.8*o),k=Math.round(.6*o),S=Math.round(.4*o),C=Math.round(.25*o),I=57+s;l===a.FEEDBACK_BUTTON_CLASSIC_BOTTOM?I=s+15:(l&&l.includes("CLASSIC")||l===a.FEEDBACK_BUTTON_NONE)&&(I=s);var L='\n .gleap-font, .gleap-font * {\n font-style: normal;\n font-variant-caps: normal;\n font-variant-ligatures: normal;\n font-variant-numeric: normal;\n font-variant-east-asian: normal;\n font-weight: normal;\n font-stretch: normal;\n font-size: 100%;\n line-height: 1;\n font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n }\n .gleap-frame-container {\n right: '.concat(i,"px;\n bottom: ").concat(61+s,"px;\n width: calc(100% - 40px);\n max-width: 410px;\n position: fixed;\n z-index: ").concat(2147483631,";\n visibility: visible;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n border-radius: ").concat(x,"px;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n user-select: none;\n pointer-events: none;\n transition: max-width 0.3s ease-out;\n }\n\n :root {\n --gleap-margin-top: 50px;\n }\n\n .gleap-tooltip-anchor {\n position: relative;\n display: inline-block;\n float: left;\n max-width: 0px;\n width: 17px;\n }\n\n .gleap-tooltip-hotspot {\n position: absolute;\n display: block;\n width: 17px;\n height: 17px;\n cursor: pointer;\n top: 0px;\n left: 0px;\n }\n\n @keyframes gleap-pulse {\n 0% {\n transform: scale(0);\n opacity: 0.25;\n }\n 45% {\n transform: scale(2.5);\n opacity: 0;\n }\n 100% {\n transform: scale(0);\n opacity: 0;\n }\n }\n\n .gleap-tooltip-hotspot-animation {\n position: absolute;\n border-radius: 17px;\n opacity: 0.25;\n display: block;\n width: 17px;\n height: 17px;\n cursor: pointer;\n top: 0px;\n left: 0px;\n animation: gleap-pulse 5s infinite;\n }\n\n .gleap-tooltip-hotspot svg {\n width: 17px;\n height: 17px;\n object-fit: contain;\n display: block;\n }\n\n .gleap-tooltip-inner {\n position: relative;\n overflow: visible;\n font-size: 14px;\n font-weight: normal;\n color: #000;\n line-height: 1.3;\n }\n\n .gleap-tooltip {\n position: absolute;\n background-color: #fff;\n color: #000;\n font-size: 15px;\n line-height: 18px;\n padding: 16px;\n padding-top: 8px;\n padding-bottom: 8px;\n border-radius: 4px;\n max-width: min(350px, 80vw);\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s, visibility 0.2s;\n z-index: ").concat(2147483700,";\n }\n\n .gleap-tooltip a {\n color: ").concat(e,";\n text-decoration: underline;\n display: inline !important;\n margin: 0px !important;\n padding: 0px !important;\n }\n\n .gleap-tooltip ul {\n padding-left: 16px;\n }\n\n .gleap-tooltip b {\n font-weight: 600;\n }\n\n .gleap-tooltip h2 {\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n margin-top: 8px;\n margin-bottom: 8px;\n }\n\n .gleap-tooltip h3 {\n font-size: 16px;\n line-height: 18px;\n font-weight: 600;\n margin-top: 8px;\n margin-bottom: 8px;\n }\n\n .gleap-tooltip p {\n padding: 0px;\n margin-top: 8px;\n margin-bottom: 8px;\n }\n\n .gleap-tooltip img {\n max-width: 100%;\n max-height: 300px;\n width: 100%;\n height: auto;\n object-fit: cover;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 4px;\n }\n\n .gleap-tooltip iframe,\n .gleap-tooltip video {\n max-width: 100%;\n width: 100%;\n height: auto;\n min-height: 200px;\n display: block;\n border: none;\n outline: none;\n padding: 0px;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 4px;\n }\n\n .gleap-tooltip-arrow {\n position: absolute;\n width: 20px;\n height: 20px;\n }\n\n .gleap-tooltip-arrow svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n\n .gleap-b-frame {\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: auto;\n padding: 0px;\n margin: 0px;\n }\n\n .gleap-b-shown {\n transition: margin 0.3s ease-out;\n margin-top: var(--gleap-margin-top);\n position: relative;\n z-index: 10000;\n }\n\n .gleap-b-f {\n margin-top: 0px;\n }\n\n .gleap-b {\n display: none;\n position: absolute;\n top: calc(-1 * var(--gleap-margin-top));\n left: 0px;\n width: 100vw;\n height: var(--gleap-margin-top);\n }\n\n @keyframes gleapSlideIn {\n from {\n top: calc(-1 * var(--gleap-margin-top));\n }\n to {\n top: 10px;\n }\n }\n\n .gleap-b-f .gleap-b {\n position: fixed;\n top: 10px;\n animation: gleapSlideIn .25s ease-out forwards;\n max-width: 800px;\n width: calc(100% - 20px);\n left: 50%;\n z-index: ").concat(2147483699,";\n transform: translateX(-50%);\n border-radius: ").concat(S,"px;\n overflow: hidden;\n box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15), 0px 5px 5px rgba(0, 0, 0, 0.05);\n }\n\n .gleap-b-shown .gleap-b {\n display: block;\n }\n\n .gleap-image-view {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n z-index: ").concat(2147483699,";\n background-color: ").concat(f,"cc;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .gleap-image-view-image {\n width: 90%;\n height: auto;\n max-width: 90%;\n max-height: 90%;\n object-fit: contain;\n }\n\n .gleap-image-view-close {\n position: fixed;\n top: 20px;\n right: 20px;\n width: 32px;\n height: 32px;\n opacity: 0.8;\n z-index: ").concat(2147483740,";\n box-shadow: 0px 5px 18px rgba(0, 0, 0, 0.16);\n cursor: pointer;\n }\n\n .gleap-image-view-close:hover {\n opacity: 1;\n }\n\n .gleap-image-view-close svg path {\n fill: ").concat(r,";\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(61+s,'px;\n }\n\n .gleap-frame-container--loading iframe {\n opacity: 0;\n }\n\n .gleap-frame-container--loading::before {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 130deg,\n ').concat(m," 0%,\n ").concat(t,' 100%\n );\n }\n \n .gleap-frame-container--loading::after {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 180deg,\n transparent 60%,\n ').concat(r,"1A 70%,\n ").concat(r," 100%\n );\n }\n\n .gleap-frame-container--loading-nogradient::before {\n max-height: 340px;\n background: ").concat(t," !important;\n }\n\n .gleap-frame-container--loading-nofade::after {\n display: none !important;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(s,"px !important;\n }\n\n .gleap-frame-container--extended {\n max-width: 690px !important;\n }\n\n .gleap-frame-container--survey-full {\n position: fixed;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n width: 100vw !important;\n max-width: 100vw !important;\n height: 100vh !important;\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(6px);\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n max-height: 100vh !important;\n border-radius: 0 !important;\n animation-name: none !important;\n }\n\n .gleap-frame-container--survey-full .gleap-frame-container-inner {\n max-width: 640px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(x,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(61+s,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(i,"px;\n bottom: ").concat(61+s,"px;\n }\n\n .gleap-frame-container--animate {\n pointer-events: auto !important;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n @keyframes gleapFadeInUpMobile {\n from {\n opacity: 0;\n transform: translate3d(0, 10%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-notification-container {\n position: fixed;\n bottom: ").concat(I,"px;\n right: ").concat(i,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n width: 100%;\n max-width: min(340px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+i,"px;\n right: initial !important;\n }\n\n [dir=rtl].gleap-notification-container {\n left: ").concat(4+i,"px;\n right: initial !important;\n }\n\n [dir=rtl].gleap-notification-container--left {\n left: initial !important;\n right: ").concat(i,"px !important;\n align-items: flex-start !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(s,"px;\n }\n\n .gleap-notification-item {\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-close {\n border-radius: 100%;\n width: 28px;\n height: 28px;\n background-color: ").concat(v,";\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 8px;\n cursor: pointer;\n visibility: hidden;\n pointer-events: none;\n }\n\n .gleap-notification-container:hover .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n }\n\n .gleap-notification-close svg {\n width: 45%;\n height: 45%;\n object-fit: contain;\n fill: ").concat(r,";\n }\n\n .gleap-notification-item-checklist-container {\n display: flex;\n animation: fadeIn;\n animation-duration: .45s;\n background-color: ").concat(r,";\n border-radius: ").concat(v,";\n box-sizing: border-box;\n cursor: pointer;\n flex-direction: column;\n overflow: hidden;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(k,"px;\n margin-bottom: 12px;\n }\n\n .gleap-notification-item-checklist-content {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n padding: 15px;\n width: 100%;\n width: min(310px, 70vw);\n max-width: min(310px, 70vw);\n }\n\n .gleap-notification-item-checklist-content-title {\n color: ").concat(f,";\n font-size: 15px;\n font-weight: 500;\n line-height: 21px;\n margin-bottom: 10px;\n max-width: 100%;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-checklist-content-progress {\n width: 100%;\n height: 8px;\n border-radius: 8px;\n background-color: ").concat(b,";\n }\n\n .gleap-notification-item-checklist-content-progress-inner {\n height: 100%;\n border-radius: 8px;\n background-color: ").concat(e,";\n }\n\n .gleap-notification-item-checklist-content-next {\n color: ").concat(v,";\n font-size: 15px;\n font-weight: normal;\n line-height: 21px;\n margin-top: 10px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: flex;\n align-items: center;\n }\n\n .gleap-notification-item-checklist-content-next svg {\n height: 18px;\n margin-right: 5px;\n width: auto;\n }\n\n .gleap-notification-item-checklist-content-next b {\n font-size: 15px;\n font-weight: normal;\n color: ").concat(f,";\n }\n\n .gleap-notification-item-news {\n width: 100%;\n cursor: pointer;\n }\n\n .gleap-notification-item-news-content {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n padding: 15px;\n }\n\n .gleap-notification-item-news-preview {\n color: ").concat(v,";\n font-size: 15px;\n line-height: 21px;\n font-weight: 400;\n overflow-wrap: break-word;\n word-break: break-word;\n display: block;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-news-sender {\n display: flex;\n align-items: center;\n color: ").concat(v,";\n font-size: 15px;\n line-height: 21px;\n font-weight: 400;\n }\n \n .gleap-notification-item-news-content-title {\n color: ").concat(f,";\n font-size: 15px;\n font-weight: 500;\n line-height: 21px;\n margin-bottom: 6px;\n max-width: 100%;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-news-sender img {\n border-radius: 100%;\n height: 20px;\n margin-right: 8px;\n object-fit: cover;\n width: 20px;\n }\n\n [dir=rtl] .gleap-notification-item-news-sender img {\n margin-left: 8px;\n margin-right: 0px !important;\n }\n\n .gleap-notification-item-news-container {\n display: flex;\n animation: fadeIn;\n animation-duration: .45s;\n background-color: ").concat(r,";\n border-radius: ").concat(v,";\n box-sizing: border-box;\n cursor: pointer;\n flex-direction: column;\n overflow: hidden;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(k,"px;\n margin-bottom: 12px;\n }\n\n .gleap-notification-item-news-image {\n background-color: ").concat(v,";\n height: 170px;\n max-height: 170px;\n object-fit: cover;\n width: 100%;\n }\n\n .gleap-notification-item-news:hover .gleap-notification-item-news-content-title {\n color: ").concat(e,";\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n cursor: pointer;\n }\n\n .gleap-notification-item img {\n width: 32px;\n height: 32px;\n min-width: 32px;\n border-radius: 100%;\n object-fit: cover;\n margin-right: 8px;\n margin-bottom: 12px;\n cursor: pointer;\n }\n\n [dir=rtl] .gleap-notification-item img {\n margin-left: 8px;\n margin-right: 0px !important;\n }\n\n .gleap-notification-item-container {\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(k,"px;\n border-bottom-left-radius: 0px;\n padding: 20px;\n background-color: ").concat(r,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n line-height: 21px;\n color: ").concat(f,';\n position: relative;\n }\n\n .gleap-notification-item-container::after {\n content: " ";\n position: absolute;\n bottom: 0px;\n width: 0px;\n height: 0px;\n left: -6px;\n border-style: solid;\n border-width: 0px 0px 10px 6px;\n border-color: transparent transparent ').concat(r,";\n }\n\n .gleap-notification-item-sender {\n color: ").concat(v,";\n line-height: 20px;\n }\n\n .gleap-notification-item-content {\n line-height: 20px;\n color: ").concat(f,";\n margin-top: 4px;\n min-width: min(200px, 50vw);\n word-wrap: break-word;\n word-break: break-word;\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+s,"px);\n max-height: ").concat(700,'px;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: calc(100vh - 40px);\n }\n \n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(x,"px);\n top: ").concat(x,"px;\n background-color: ").concat(r,";\n z-index: -1;\n }\n \n .gleap-frame-container iframe {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n display: block;\n pointer-events: auto;\n }\n \n .gleap-frame-container--hidden {\n display: none !important;\n pointer-events: none;\n animation: none !important;\n }\n \n .bb-feedback-button {\n margin: 0px;\n position: fixed;\n bottom: ").concat(s,"px;\n right: ").concat(i,"px;\n border-radius: 30px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n color: #000000;\n z-index: ").concat(2147483630,";\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 0px;\n }\n\n [dir=rtl].bb-feedback-button {\n bottom: ").concat(s,"px;\n right: auto;\n left: ").concat(i,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(s,"px;\n right: auto;\n left: ").concat(i,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(s,"px;\n right: ").concat(i,'px;\n left: auto;\n }\n \n .bb-feedback-button--disabled {\n display: none !important;\n }\n\n .bb-feedback-button--hidden {\n display: none !important;\n }\n \n .bb-feedback-button-text {\n padding: 8px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n background-color: #fff;\n border-radius: 8px;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 99;\n }\n \n .bb-feedback-button-text:before {\n content: "";\n position: absolute;\n box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n transform: rotate(315deg);\n bottom: 16px;\n right: -4px;\n border-width: 10px;\n border-style: solid;\n border-color: transparent #fff #fff transparent;\n }\n \n .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n display: none;\n }\n \n .bb-feedback-button-text:after {\n content: "";\n position: absolute;\n bottom: 12px;\n right: 0px;\n background-color: #fff;\n width: 5px;\n height: 30px;\n }\n \n .bb-feedback-button-text-title {\n font-family: sans-serif;\n font-size: 14px;\n color: #666;\n line-height: 18px;\n max-width: 220px;\n }\n \n .bb-feedback-button-text-title b {\n color: #000000;\n font-weight: 600;\n }\n\n .bb-notification-bubble {\n position: absolute;\n top: -5px;\n right: -5px;\n min-width: 20px;\n padding: 0px 4px;\n height: 20px;\n border-radius: 20px;\n background-color: red;\n color: #fff;\n font-size: 11px;\n font-family: sans-serif;\n text-align: center;\n line-height: 20px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 48px;\n height: 48px;\n border-radius: 48px;\n background-color: #485bff;\n transition: box-shadow, transform 0.2s ease-in-out;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n position: relative;\n }\n \n .bb-feedback-button-classic {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n top: 50%;\n right: 0px;\n position: fixed;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n padding: 9px 20px;\n text-align: center;\n background-color: #485bff;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: sans-serif;\n font-size: 16px;\n color: #fff;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n \n .bb-feedback-button-classic--left {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n top: 50%;\n right: 0px;\n left: auto;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n }\n \n .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n right: ').concat(i,"px;\n left: auto;\n }\n \n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n left: ").concat(i,"px;\n right: auto;\n }\n\n .bb-feedback-button--classic-button-style {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n \n .bb-feedback-button--open.bb-feedback-button--classic-button-style {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeOutRight;\n }\n \n .bb-feedback-button .bb-logo-logo {\n position: absolute;\n width: 30px;\n height: 30px;\n top: 9px;\n left: 9px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n position: absolute;\n width: 14px;\n height: 14px;\n top: 17px;\n left: 17px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button--open .bb-logo-arrowdown {\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button--open .bb-logo-logo {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button-icon:hover {\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n transform: scale(1.1);\n }\n \n .bb-feedback-button--open .bb-feedback-button-text {\n animation-name: bbFadeOutDown;\n }\n \n .bb-feedback-button--open .bb-feedback-button-icon {\n display: flex;\n }\n \n .bb-capture-svg {\n position: fixed;\n z-index: ").concat(2147483614,";\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n padding: 0px;\n margin: 0px;\n cursor: crosshair;\n }\n\n .bb-capture-svg--preview {\n cursor: auto !important;\n }\n \n .bb-rec-on-circle {\n animation-name: bbRecIconFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-rec-on-cont {\n animation-name: bbRecIconContFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-capture-editor-drag-info {\n position: fixed;\n top: -200px;\n left: 0px;\n z-index: ").concat(2147483616,";\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-editor-drag-info svg {\n width: 24px;\n height: 24px;\n }\n \n .bb-capture-editor-borderlayer {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n border: 4px solid ").concat(e,";\n cursor: crosshair;\n z-index: ").concat(2147483610,";\n box-sizing: border-box;\n pointer-events: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n background-color: rgba(0, 0, 0, 0.8);\n }\n\n .bb-capture-editor-recording .bb-capture-editor-borderlayer {\n border: 4px solid #eb144c !important;\n }\n \n .bb-capture-editor-recording .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-editor-item-inactive {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-svg {\n pointer-events: none !important;\n }\n \n .bb-capture-toolbar {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,";\n background-color: #fff;\n padding: 5px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-dismiss {\n position: fixed;\n top: 0px;\n right: 0px;\n z-index: ").concat(2147483618,";\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n width: 36px;\n height: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ").concat(e,";\n border-bottom-left-radius: ").concat(C,"px;\n }\n\n [dir=rtl] .bb-capture-dismiss {\n top: 0px;\n left: 0px;\n right: auto;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: ").concat(C,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(c,';\n }\n \n .bb-capture-dismiss svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n \n .bb-capture-button-next {\n font-family: sans-serif;\n box-sizing: border-box;\n font-weight: 600;\n text-align: center;\n width: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n margin: 0px;\n line-height: 36px;\n padding: 0px 12px;\n font-size: 15px;\n margin-left: 12px;\n }\n\n [dir=rtl].bb-capture-editor .bb-capture-button-next {\n margin-left: auto;\n margin-right: 12px;\n }\n \n .bb-capture-toolbar-item-spacer {\n width: 1px;\n height: 38px;\n min-width: 1px;\n margin: 0px 5px;\n }\n \n .bb-capture-toolbar-item {\n width: 42px;\n height: 38px;\n min-width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n margin-right: 5px;\n }\n \n .bb-capture-toolbar-item svg {\n width: 23px;\n height: 23px;\n object-fit: contain;\n }\n \n .bb-capture-toolbar-item-selectedcolor {\n border-radius: 100%;\n width: 20px;\n height: 20px;\n background-color: #db4035;\n }\n \n .bb-capture-toolbar-item[data-type="undo"] svg {\n width: 18px;\n height: 18px;\n }\n \n .bb-capture-toolbar-item[data-active="true"] {\n position: relative;\n }\n \n .bb-capture-preview {\n display: none;\n background-color: rgba(0, 0, 0, 0.6);\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n z-index: ').concat(2147483620,";\n }\n \n .bb-capture-preview-inner {\n background-color: #fff;\n padding: 0px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n flex-direction: column;\n max-width: 640px;\n width: 100%;\n margin: 20px;\n }\n \n .bb-capture-preview-inner video {\n border-radius: 8px 8px 0px 0px;\n display: block;\n border: 0px;\n outline: none;\n width: 100%;\n max-height: 60vh;\n }\n \n .bb-capture-preview-buttons {\n display: flex;\n justify-content: space-between;\n padding: 14px;\n }\n \n .bb-capture-preview-retrybutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-sendbutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-retrybutton:hover,\n .bb-capture-preview-sendbutton:hover {\n opacity: 0.9;\n }\n \n .bb-capture-toolbar-item-recording {\n margin-right: 0px;\n }\n \n .bb-capture-toolbar-item-recording svg {\n width: 33px;\n height: 33px;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n position: fixed;\n top: 70px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,';\n background-color: #fff;\n display: none;\n padding: 10px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n }\n \n .bb-capture-toolbar-item-color {\n width: 20px;\n height: 20px;\n border-radius: 100%;\n margin-right: 12px;\n box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-toolbar-item-color:hover {\n box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n }\n \n .bb-capture-toolbar-item-color:last-of-type {\n margin-right: 0px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n margin-right: auto;\n margin-left: 12px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n margin-right: auto;\n margin-left: 0px;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n display: none;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n display: none;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #eee;\n }\n \n .bb-capture-toolbar-item:hover svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #f8f8f8;\n }\n \n .bb-capture-toolbar-item--active svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--inactivecross::before {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 3px;\n width: 26px;\n margin: auto;\n border-radius: 4px;\n background-color: #e80000;\n transform: rotate(45deg);\n }\n \n .bb-capture-toolbar-item--inactivecross svg {\n fill: #eee;\n }\n \n .bb-capture-toolbar-item-timer {\n text-align: left;\n line-height: 32px;\n font-size: 14px;\n font-family: sans-serif;\n margin: 5px;\n min-width: 40px;\n display: none;\n }\n \n .bb-capture-toolbar-item .bb-tooltip {\n background-color: #555;\n color: #fff;\n visibility: hidden;\n font-size: 14px;\n font-family: sans-serif;\n text-align: center;\n padding: 5px 10px;\n position: absolute;\n z-index: 1;\n top: 45px;\n left: 0px;\n transform: translateX(calc(-50% + 21px));\n opacity: 0;\n transition: opacity 0.3s;\n white-space: nowrap;\n }\n \n .bb-capture-toolbar-item .bb-tooltip::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n transform: rotate(180deg);\n border-color: #555 transparent transparent transparent;\n }\n \n .bb-capture-toolbar-item:hover .bb-tooltip {\n visibility: visible;\n opacity: 1;\n }\n \n .bb-capture-options {\n display: none;\n }\n \n .bb-capture-options--active {\n display: flex;\n }\n\n @keyframes bbFadeOutRight {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbFadeOutDown {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n }\n \n @keyframes bbFadeInOpacity {\n from {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n @keyframes bbZoomOut {\n from {\n opacity: 1;\n }\n \n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbZoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n 50% {\n opacity: 1;\n }\n }\n \n @keyframes bbRecIconContFade {\n 0% {\n fill: #b10802;\n }\n 50% {\n fill: #ff0000;\n }\n 100% {\n fill: #b10802;\n }\n } \n .bb-capture-preview-retrybutton {\n color: ').concat(f,";\n border-radius: ").concat(w,"px;\n background-color: ").concat(b,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(y,";\n }\n @keyframes bb-suc-fill {\n 100% {\n box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n }\n }\n .bb-capture-toolbar-item-spacer {\n background-color: ").concat(b,";\n }\n .bb-tooltip {\n border-radius: ").concat(S,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(y,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(c,";\n background-color: ").concat(e,";\n border-radius: ").concat(w,"px;\n }\n .bb-capture-button-next {\n color: ").concat(c,";\n background-color: ").concat(e,";\n border-radius: ").concat(C,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(r,";\n border-radius: ").concat(S,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(v,";\n }\n .bb-svg-path {\n fill: ").concat(f,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(S,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(r,";\n border-radius: ").concat(S,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(r,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(b,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(S,"px;\n border-top-right-radius: ").concat(S,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(d,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(d,";\n }\n .bb-feedback-button-icon {\n background-color: ").concat(n,";\n }\n .bb-feedback-button-classic {\n background-color: ").concat(n,";\n color: ").concat(d,";\n }\n\n @media only screen and (max-width: 450px) {\n [dir=rtl].gleap-frame-container,\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n max-width: 100vw;\n min-height: 100vh;\n min-height: -webkit-fill-available;\n max-height: -webkit-fill-available;\n top: 0px;\n bottom: 0px;\n border-radius: 0px;\n animation-name: gleapFadeInUpMobile;\n }\n\n .gleap-frame-container-inner {\n width: 100vw;\n height: 100%;\n }\n\n .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n max-height: calc(var(--glvh, 1vh) * 100) !important;\n }\n\n .gleap-frame-container--survey {\n height: auto !important;\n top: initial !important;\n bottom: 0px !important;\n min-height: initial !important;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: 100vh !important;\n }\n\n .bb-tooltip {\n display: none !important;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n top: 75px;\n }\n \n .bb-capture-button-next {\n margin-left: auto;\n }\n \n .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-toolbar {\n top: 15px;\n right: 15px;\n left: 15px;\n width: auto;\n transform: none;\n }\n\n .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-borderlayer {\n border-width: 4px;\n }\n }\n \n @media print {\n .bb-feedback-button {\n display: none !important;\n }\n \n .gleap-frame-container {\n display: none !important;\n }\n }\n\n .gleap-tour-sender {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n margin-bottom: 20px;\n }\n\n .gleap-tour-sender-image {\n width: 32px;\n height: 32px;\n border-radius: 32px;\n margin-right: 10px;\n background-size: cover;\n background-repeat: no-repeat;\n }\n\n .gleap-tour-popover.gleap-tour-popover-post {\n min-width: 550px;\n max-width: 550px;\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-tour-popover.gleap-tour-popover-post {\n min-width: calc(100vw - 40px);\n max-width: calc(100vw - 40px);\n }\n }\n\n .gleap-tour-message,\n .gleap-tour-message p,\n .gleap-tour-message ul {\n color: ").concat(f,";\n }\n\n .gleap-tour-message h2 {\n font-weight: 600;\n font-size: 22px;\n }\n\n .gleap-tour-message h3 {\n font-weight: 600;\n font-size: 18px;\n }\n\n .gleap-tour-message p {\n line-height: 1.3;\n }\n\n .gleap-tour-message ul {\n line-height: 1.3;\n padding-left: 20px;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n\n .gleap-tour-message {\n max-height: calc(80vh - 100px) !important;\n overflow-y: auto;\n min-width: 270px;\n }\n\n .gleap-tour-message iframe {\n width: 100%;\n height: 300px;\n margin-top: 10px;\n margin-bottom: 10px;\n border: none;\n outline: none;\n display: block;\n }\n\n .gleap-tour-sender-name {\n font-size: 15px;\n }\n\n .gleap-tour-video {\n width: 100%;\n max-width: 100%;\n }\n\n .gleap-tour-video-svg--fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0px !important;\n left: 0px !important;\n right: 0px !important;\n bottom: 0px !important;\n }\n\n .gleap-tour-video--playing .gleap-tour-video-playpause {\n opacity: 0;\n }\n \n .gleap-tour-video--playing:hover .gleap-tour-video-playpause {\n opacity: 1;\n }\n\n .gleap-tour-popover-video-pointer {\n padding: 0px !important;\n border-radius: 8px;\n position: relative;\n background-color: transparent !important;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-footer {\n position: absolute;\n top: 0px;\n left: 20px;\n right: 20px;\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-footer button {\n padding: 5px 12px;\n }\n\n .gleap-tour-popover-video-pointer.gleap-tour-popover-can-close .gleap-tour-popover-footer {\n right: 40px !important;\n }\n\n .gleap-tour-popover-video-pointer:hover .gleap-tour-popover-footer {\n opacity: 1;\n }\n\n .gleap-tour-popover-pointer.gleap-tour-popover-no-sender .gleap-tour-message {\n padding-right: 20px;\n }\n\n .gleap-tour-video video {\n width: 100%;\n max-width: 100%;\n height: auto;\n border: none;\n outline: none;\n display: block;\n border-radius: 8px;\n }\n\n .gleap-admin-collapse-ui {\n z-index: ").concat(2147483635,";\n cursor: pointer;\n position: fixed;\n bottom: 75px;\n right: 20px;\n width: 32px;\n height: 32px;\n border-radius: 100%;\n background-color: #fff;\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;\n }\n\n .gleap-admin-collapse-ui svg {\n width: 20px;\n height: 14px;\n margin-top: 6px;\n fill: #000 !important;\n }\n\n .gleap-admin-collapse-ui-active {\n bottom: 20px !important;\n }\n\n .gleap-admin-collapse-ui-active svg {\n transform: rotate(180deg);\n }\n\n .gleap-admin-frame-container-active {\n display: none !important;\n }\n\n .gleap-admin-frame-container {\n position: fixed;\n bottom: 0px;\n left: 0px;\n right: 0px;\n width: 100vw;\n z-index: ").concat(2147483640,";\n }\n\n .gleap-admin-frame {\n width: 100%;\n height: 100%;\n border: none;\n outline: none;\n display: block;\n }\n \n .gleap-tour-message .linktype-link {\n display: inline-block !important;\n background-color: transparent !important;\n color: ").concat(n," !important;\n }\n\n .gleap-tooltip .linktype-button,\n .gleap-tour-message .linktype-button {\n display: inline-block !important;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 10px 20px !important;\n text-decoration: none !important;\n background-color: ").concat(n," !important;\n color: ").concat(d," !important;\n }\n\n .gleap-tour-message img {\n width: 100%;\n max-width: 100%;\n min-height: 260px;\n height: auto;\n margin-top: 10px;\n margin-bottom: 10px;\n object-fit: cover;\n }\n\n .gleap-tour-active .gleap-tour-overlay {\n pointer-events: none;\n }\n \n .gleap-tour-active * {\n pointer-events: none;\n }\n \n .gleap-tour-active .gleap-tour-active-element,\n .gleap-tour-active .gleap-tour-active-element *,\n .gleap-tour-popover,\n .gleap-tour-popover * {\n pointer-events: auto;\n }\n \n @keyframes animate-fade-in {\n 0% {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n .gleap-tour-fade .gleap-tour-overlay {\n animation: animate-fade-in 200ms ease-in-out;\n }\n \n .gleap-tour-fade .gleap-tour-popover {\n animation: animate-fade-in 200ms;\n }\n\n .gleap-tour-video-playpause {\n position: absolute;\n bottom: 8px;\n left: 8px;\n width: 32px;\n height: 32px;\n padding: 4px;\n background-color: rgba(0,0,0,0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 8px;\n transition: opacity 200ms ease-in-out;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-arrow {\n display: none !important;\n }\n\n .gleap-tour-video-playpause svg {\n width: 34px;\n height: auto;\n fill: #fff;\n }\n \n /* Popover styles */\n .gleap-tour-popover {\n all: unset;\n box-sizing: border-box;\n color: #2d2d2d;\n margin: 0;\n padding: 15px;\n border-radius: ").concat(S,'px;\n min-width: 250px;\n max-width: 300px;\n box-shadow: 0 1px 10px #0006;\n z-index: 1000000000;\n position: fixed;\n top: 0;\n right: 0;\n background-color: #fff;\n }\n \n .gleap-tour-popover * {\n font-family: "Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif;\n }\n \n .gleap-tour-popover-title {\n font: 19px / normal sans-serif;\n font-weight: 700;\n display: block;\n position: relative;\n line-height: 1.5;\n zoom: 1;\n margin: 0;\n }\n \n .gleap-tour-popover-close-btn {\n all: unset;\n position: absolute;\n top: 5px;\n right: 5px;\n width: 32px;\n height: 32px;\n cursor: pointer;\n font-size: 30px;\n font-weight: 500;\n line-height: 32px;\n color: #d2d2d2;\n z-index: 1;\n text-align: center;\n transition: color;\n transition-duration: 200ms;\n }\n \n .gleap-tour-popover-close-btn:hover,\n .gleap-tour-popover-close-btn:focus {\n color: #2d2d2d;\n }\n \n .gleap-tour-popover-title[style*="block"] + .gleap-tour-popover-description {\n margin-top: 5px;\n }\n \n .gleap-tour-popover-description {\n margin-bottom: 0;\n font: 15px / normal sans-serif;\n line-height: 1.5;\n font-weight: 400;\n zoom: 1;\n }\n \n .gleap-tour-popover-footer {\n margin-top: 15px;\n text-align: right;\n zoom: 1;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n \n .gleap-tour-popover-progress-text {\n font-size: 13px;\n font-weight: 400;\n color: #727272;\n zoom: 1;\n }\n \n .gleap-tour-popover-footer button {\n background-color: ').concat(e,";\n color: ").concat(c,";\n border-radius: ").concat(C,"px;\n box-sizing: border-box;\n padding: 10px 20px;\n font-size: 14px;\n font-weight: bold;\n line-height: 21px;\n border: none;\n text-align: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: none !important;\n outline: none !important;\n }\n\n .gleap-tour-popover-prev-btn {\n color: ").concat(f," !important;\n background-color: ").concat(b," !important;\n margin-right: 3px;\n }\n\n .gleap-tour-popover-prev-btn:hover {\n background-color: ").concat(e,"22 !important;\n color: ").concat(e,' !important;\n }\n \n .gleap-tour-popover-footer .gleap-tour-popover-btn-disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n \n /* Disable the scrolling of parent element if it has an active element*/\n :not(body):has(> .gleap-tour-active-element) {\n overflow: hidden !important;\n }\n \n .gleap-tour-no-interaction, .gleap-tour-no-interaction * {\n pointer-events: none !important;\n }\n \n .gleap-tour-popover-navigation-btns {\n display: flex;\n flex-grow: 1;\n justify-content: flex-end;\n }\n \n .gleap-tour-popover-navigation-btns button + button {\n margin-left: 4px;\n }\n \n .gleap-tour-popover-arrow {\n content: "";\n position: absolute;\n border: 5px solid #fff;\n }\n \n .gleap-tour-popover-arrow-side-over {\n display: none;\n }\n \n /** Popover Arrow Sides **/\n .gleap-tour-popover-arrow-side-left {\n left: 100%;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-top-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-right {\n right: 100%;\n border-left-color: transparent;\n border-bottom-color: transparent;\n border-top-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-top {\n top: 100%;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-left-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-bottom {\n bottom: 100%;\n border-left-color: transparent;\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-center {\n display: none;\n }\n \n /* Left/Start + Right/Start */\n .gleap-tour-popover-arrow-side-left.gleap-tour-popover-arrow-align-start,\n .gleap-tour-popover-arrow-side-right.gleap-tour-popover-arrow-align-start {\n top: 15px;\n }\n \n /* Top/Start + Bottom/Start */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-start,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-start {\n left: 15px;\n }\n \n /* End/Left + End/Right */\n .gleap-tour-popover-arrow-align-end.gleap-tour-popover-arrow-side-left,\n .gleap-tour-popover-arrow-align-end.gleap-tour-popover-arrow-side-right {\n bottom: 15px;\n }\n \n /* Top/End + Bottom/End */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-end,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-end {\n right: 15px;\n }\n \n /* Left/Center + Right/Center */\n .gleap-tour-popover-arrow-side-left.gleap-tour-popover-arrow-align-center,\n .gleap-tour-popover-arrow-side-right.gleap-tour-popover-arrow-align-center {\n top: 50%;\n margin-top: -5px;\n }\n \n /* Top/Center + Bottom/Center */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-center,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-center {\n left: 50%;\n margin-left: -5px;\n }\n \n /* No arrow */\n .gleap-tour-popover-arrow-none {\n display: none;\n } \n '),T=document.querySelector(".gleap-styles");T&&T.remove();var E=document.createElement("style");E.innerHTML=L,E.className="gleap-styles",document.body.appendChild(E)}(e,t,n,r,o,i,s,l)}))}},{key:"sendSilentCrashReport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,o)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout((function(){t.silentCrashReportSent=!1}),1e4);var r=o?x(o):{},i=Ge.getInstance();if(i.ready){var a=e||{};i.session.email&&(a.reportedBy=i.session.email),new At("CRASH",n,a,!0,r).sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"showSurvey",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"survey";e.startFeedbackFlowWithOptions(t,{hideBackButton:!0,format:n},!0)}},{key:"startClassicForm",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlow",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlowWithOptions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.autostartDrawing,i=n.hideBackButton,a=n.format;if(Ge.getInstance().ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var s="start-feedbackflow";o&&(s="start-survey"),Bt.getInstance().setAppMode(o?a:"widget"),Bt.getInstance().sendMessage({name:s,data:{flow:t,hideBackButton:i,format:a}},!0),r?Bt.getInstance().showDrawingScreen("screenshot"):Bt.getInstance().showWidget()}}},{key:"openConversations",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-conversations",data:{hideBackButton:!e}},!0),Bt.getInstance().showWidget()}},{key:"openConversation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e,hideBackButton:!t}},!0),Bt.getInstance().showWidget())}},{key:"startConversation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.startBot("",t)}},{key:"startBot",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"start-bot",data:{botId:e||"",hideBackButton:!t}},!0),Bt.getInstance().showWidget()}},{key:"openHelpCenterCollection",value:function(e){e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-help-collection",data:{collectionId:e}},!0),Bt.getInstance().showWidget())}},{key:"openHelpCenterArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-help-article",data:{articleId:e,hideBackButton:!t}},!0),Bt.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),Bt.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),Bt.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-news-article",data:{id:e}},!0),Bt.getInstance().showWidget())}},{key:"openChecklists",value:function(){Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-checklists",data:{}},!0),Bt.getInstance().showWidget()}},{key:"startChecklist",value:function(e){return!!e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"start-checklist",data:{outboundId:e}},!0),Bt.getInstance().showWidget(),!0)}},{key:"openChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-checklist",data:{id:e,hideBackButton:!t}},!0),Bt.getInstance().showWidget())}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),Bt.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-feature-requests",data:{}},!0),Bt.getInstance().showWidget()}},{key:"startProductTour",value:function(e){var t=this;Ge.getInstance().startProductTourConfig(e).then((function(n){t.startProductTourWithConfig(e,n)})).catch((function(e){}))}},{key:"startProductTourWithConfig",value:function(t,n){br.getInstance().startWithConfig(t,n,(function(t){var n={tourId:t.tourId};hn.notifyEvent("productTourCompleted",n),e.trackEvent("tour-".concat(t.tourId,"-completed"),n)}))}},{key:"showBanner",value:function(e){try{Ao.getInstance().showBanner(e)}catch(t){}}},{key:"showNotification",value:function(e){Co.getInstance().showNotification(e)}}],n&&wr(t.prototype,n),o&&wr(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();if(Sr(Ir,"invoked",!0),Sr(Ir,"silentCrashReportSent",!1),Sr(Ir,"instance",void 0),"undefined"!=typeof window){var Lr=window.GleapActions;if(Lr&&Lr.length>0)for(var Tr=0;Tr<Lr.length;Tr++){var Er=Lr[Tr];Er&&Er.e&&Ir[Er.e]&&Ir[Er.e].apply(Ir,Er.a)}}var Or=function(e){try{var t=e.split("/"),n=t[2];if("article"===n){var o=t[3];Ir.openHelpCenterArticle(o,!0)}if("collection"===n){var r=t[3];Ir.openHelpCenterCollection(r,!0)}if("flow"===n){var i=t[3];Ir.startFeedbackFlow(i,!0)}if("survey"===n){var a=t[3];Ir.showSurvey(a)}if("bot"===n){var s=t[3];Ir.startBot(s,!0)}if("news"===n){var l=t[3];Ir.openNewsArticle(l,!0)}if("checklist"===n){var c=t[3];Ir.startChecklist(c,!0)}if("tour"===n){var u=t[3];Ir.startProductTour(u)}}catch(p){console.error("Failed to handle Gleap link: ",e)}};const Mr=Ir,Ar=Ir})(),o=o.default})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Gleap=t():e.Gleap=t()}(this,(()=>(()=>{"use strict";var e={561:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getAttributes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["id","class","length"],n=e.attributes;return[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(n)).reduce((function(e,n){return t.indexOf(n.nodeName)>-1||e.push("["+n.nodeName+'="'+n.value+'"]'),e}),[])}},770:(e,t)=>{function n(e){if(!e.hasAttribute("class"))return[];try{return Array.prototype.slice.call(e.classList).filter((function(e){return/^[a-z_-][a-z\d_-]*$/i.test(e)?e:null}))}catch(n){var t=e.getAttribute("class");return(t=t.trim().replace(/\s+/g," ")).split(" ")}}Object.defineProperty(t,"__esModule",{value:!0}),t.getClasses=n,t.getClassSelectors=function(e){return n(e).filter(Boolean).map((function(e){return"."+e}))}},584:(e,t)=>{function n(e,t,o,r,i,a,s){if(a!==s)for(var l=r;l<=i&&i-l+1>=s-a;++l)o[a]=t[l],n(e,t,o,l+1,i,a+1,s);else e.push(o.slice(0,a).join(""))}Object.defineProperty(t,"__esModule",{value:!0}),t.getCombinations=function(e,t){for(var o=[],r=e.length,i=[],a=1;a<=t;++a)n(o,e,i,0,r-1,0,a);return o}},169:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getID=function(e){var t=e.getAttribute("id");if(null!==t&&""!==t)return t.match(/(?:^\d|:)/)?'[id="'+t+'"]':"#"+t;return null}},64:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getNthChild=function(e){var t=0,n=void 0,r=void 0,i=e.parentNode;if(Boolean(i)){var a=i.childNodes,s=a.length;for(n=0;n<s;n++)if(r=a[n],(0,o.isElement)(r)&&(t++,r===e))return":nth-child("+t+")"}return null};var o=n(440)},175:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getParents=function(e){var t=[],n=e;for(;(0,o.isElement)(n);)t.push(n),n=n.parentNode;return t};var o=n(440)},970:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getTag=function(e){return e.tagName.toLowerCase().replace(/:/g,"\\:")}},924:(e,t,n)=>{t.A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.selectorTypes,o=void 0===n?["ID","Class","Tag","NthChild"]:n,r=t.attributesToIgnore,i=void 0===r?["id","class","length"]:r,a=t.excludeRegex,s=void 0===a?null:a,l=[],d=(0,u.getParents)(e),p=!0,f=!1,g=void 0;try{for(var m,v=d[Symbol.iterator]();!(p=(m=v.next()).done);p=!0){var b=h(m.value,o,i,s);Boolean(b)&&l.push(b)}}catch(T){f=!0,g=T}finally{try{!p&&v.return&&v.return()}finally{if(f)throw g}}var y=[],w=!0,x=!1,k=void 0;try{for(var S,C=l[Symbol.iterator]();!(w=(S=C.next()).done);w=!0){var I=S.value;y.unshift(I);var L=y.join(" > ");if((0,c.isUnique)(e,L))return L}}catch(T){x=!0,k=T}finally{try{!w&&C.return&&C.return()}finally{if(x)throw k}}return null};var o=n(169),r=n(770),i=n(584),a=n(561),s=n(64),l=n(970),c=n(213),u=n(175);function d(e,t){var n=e.parentNode.querySelectorAll(t);return 1===n.length&&n[0]===e}function p(e,t){return t.find(d.bind(null,e))}function f(e,t,n){var o=(0,i.getCombinations)(t,3),r=p(e,o);return Boolean(r)||Boolean(n)&&(r=p(e,o=o.map((function(e){return n+e}))),Boolean(r))?r:null}function h(e,t,n,i){var c=void 0,u=function(e,t,n){var i={Tag:l.getTag,NthChild:s.getNthChild,Attributes:function(e){return(0,a.getAttributes)(e,n)},Class:r.getClassSelectors,ID:o.getID};return t.reduce((function(t,n){return t[n]=i[n](e),t}),{})}(e,t,n);i&&i instanceof RegExp&&(u.ID=i.test(u.ID)?null:u.ID,u.Class=u.Class.filter((function(e){return!i.test(e)})));var p=!0,h=!1,g=void 0;try{for(var m,v=t[Symbol.iterator]();!(p=(m=v.next()).done);p=!0){var b=m.value,y=u.ID,w=u.Tag,x=u.Class,k=u.Attributes,S=u.NthChild;switch(b){case"ID":if(Boolean(y)&&d(e,y))return y;break;case"Tag":if(Boolean(w)&&d(e,w))return w;break;case"Class":if(Boolean(x)&&x.length&&(c=f(e,x,w)))return c;break;case"Attributes":if(Boolean(k)&&k.length&&(c=f(e,k,w)))return c;break;case"NthChild":if(Boolean(S))return S}}}catch(C){h=!0,g=C}finally{try{!p&&v.return&&v.return()}finally{if(h)throw g}}return"*"}},440:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.isElement=function(e){var t=void 0;t="object"===("undefined"==typeof HTMLElement?"undefined":n(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===(void 0===e?"undefined":n(e))&&1===e.nodeType&&"string"==typeof e.nodeName;return t}},213:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isUnique=function(e,t){if(!Boolean(t))return!1;var n=e.ownerDocument.querySelectorAll(t);return 1===n.length&&n[0]===e}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};return(()=>{function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i(o.key),o)}}function r(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,n||"default");if("object"!=e(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:String(n)}n.d(o,{default:()=>Pr});var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r(this,"feedbackButton",null),r(this,"injectedFeedbackButton",!1),r(this,"buttonHidden",null),r(this,"lastButtonIcon",null)}var n,o,i;return n=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(o=[{key:"toggleFeedbackButton",value:function(t){this.buttonHidden=!t,e.getInstance().updateFeedbackButtonState(),Co.getInstance().updateContainerStyle()}},{key:"feedbackButtonPressed",value:function(){var e=Bt.getInstance();e.isOpened()?e.hideWidget():(e.setAppMode("widget"),e.showWidget())}},{key:"injectFeedbackButton",value:function(){var e=this;if(!this.injectedFeedbackButton){this.injectedFeedbackButton=!0;var t=document.createElement("div");t.addEventListener("click",(function(){e.feedbackButtonPressed()})),document.body.appendChild(t),this.feedbackButton=t,this.updateFeedbackButtonState()}}},{key:"updateNotificationBadge",value:function(e){var t=document.querySelector(".bb-notification-bubble");if(t){var n="bb-notification-bubble--hidden";e>0?(t.classList.remove(n),t.innerText=e):t.classList.add(n)}}},{key:"refresh",value:function(){document.querySelector(".bb-feedback-button")?(this.updateFeedbackButtonText(),this.updateFeedbackButtonState()):(this.injectedFeedbackButton=!1,this.feedbackButton=null,this.buttonHidden=null,this.lastButtonIcon=null,this.injectFeedbackButton())}},{key:"updateFeedbackButtonText",value:function(){var t=nt.getInstance().getFlowConfig();if(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT){var n=document.querySelector(".bb-feedback-button-classic");n&&(n.innerText=t.widgetButtonText)}}},{key:"updateFeedbackButtonState",value:function(){if(null!==this.feedbackButton){var t=nt.getInstance().getFlowConfig(),n="";n=t.buttonLogo?'<img class="bb-logo-logo" src="'.concat(t.buttonLogo,'" alt="Feedback Button" />'):p("button","#fff"),this.feedbackButton.className="bb-feedback-button gleap-font gl-block",this.feedbackButton.setAttribute("dir",lo.getInstance().isRTLLayout?"rtl":"ltr"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM||t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?(this.feedbackButton.classList.add("bb-feedback-button--classic-button-style"),this.feedbackButton.innerHTML='<div class="bb-feedback-button-classic '.concat(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_LEFT?"bb-feedback-button-classic--left":"").concat(t.feedbackButtonPosition===e.FEEDBACK_BUTTON_CLASSIC_BOTTOM?"bb-feedback-button-classic--bottom":"",'">').concat(t.widgetButtonText,"</div>")):n!==this.lastButtonIcon&&(this.feedbackButton.innerHTML='<div class="bb-feedback-button-icon">'.concat(n).concat(p("arrowdown","#fff"),'</div><div class="bb-notification-bubble bb-notification-bubble--hidden"></div>')),this.lastButtonIcon=n;var o=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(o=!0):e.getInstance().buttonHidden&&(o=!0),o&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),Bt.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var r=Bt.getInstance().appMode;"survey"!==r&&"survey_full"!==r&&"survey_web"!==r||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||Ge.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&t(n.prototype,o),i&&t(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}();function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e,t)||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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}r(a,"FEEDBACK_BUTTON_BOTTOM_RIGHT","BOTTOM_RIGHT"),r(a,"FEEDBACK_BUTTON_BOTTOM_LEFT","BOTTOM_LEFT"),r(a,"FEEDBACK_BUTTON_CLASSIC","BUTTON_CLASSIC"),r(a,"FEEDBACK_BUTTON_CLASSIC_LEFT","BUTTON_CLASSIC_LEFT"),r(a,"FEEDBACK_BUTTON_CLASSIC_BOTTOM","BUTTON_CLASSIC_BOTTOM"),r(a,"FEEDBACK_BUTTON_NONE","BUTTON_NONE"),r(a,"instance",void 0);var u=function(e,t){3===(e=e.replace(/^#/,"")).length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var n=l(e.match(/.{2}/g),3),o=n[0],r=n[1],i=n[2],a=[parseInt(o,16)+t,parseInt(r,16)+t,parseInt(i,16)+t];o=a[0],r=a[1],i=a[2],o=Math.max(Math.min(255,o),0).toString(16),r=Math.max(Math.min(255,r),0).toString(16),i=Math.max(Math.min(255,i),0).toString(16);var s=(o.length<2?"0":"")+o,c=(r.length<2?"0":"")+r,u=(i.length<2?"0":"")+i;return"#".concat(s).concat(c).concat(u)},d=function(e){return(299*parseInt(e.substr(1,2),16)+587*parseInt(e.substr(3,2),16)+114*parseInt(e.substr(5,2),16))/1e3>=160?"#000000":"#ffffff"},p=function(e,t){return"button"===e?'<svg class="bb-logo-logo bb-logo-logo--default" width="145" height="144" viewBox="0 0 145 144" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M38.9534 15H105.047C113.857 15 121 22.1426 121 30.9534L121 89.5238L121 96.015L121 125.541C121 128.759 117.393 130.66 114.739 128.84L90.1188 111.968H38.9534C30.1426 111.968 23 104.826 23 96.015V30.9534C23 22.1426 30.1426 15 38.9534 15Z" fill="white"/>\n </svg>':"unmute"===e?'<svg id="tooltip-svg-unmute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path id="tooltip-svg-unmute-path" d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.1 386.2C556.7 352 576 306.3 576 256c0-60.1-27.7-113.8-70.9-149c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C507.3 170.7 528 210.9 528 256c0 39.1-15.6 74.5-40.9 100.5L449 326.6c19-17.5 31-42.7 31-70.6c0-30.1-13.9-56.9-35.4-74.5c-10.3-8.4-25.4-6.8-33.8 3.5s-6.8 25.4 3.5 33.8C425.1 227.6 432 241 432 256s-6.9 28.4-17.7 37.3c-1.3 1-2.4 2.2-3.4 3.4L352 250.6V64c0-12.6-7.4-24-18.9-29.2s-25-3.1-34.4 5.3L197.8 129.8 38.8 5.1zM352 373.3L82.9 161.3C53.8 167.4 32 193.1 32 224v64c0 35.3 28.7 64 64 64h67.8L298.7 471.9c9.4 8.4 22.9 10.4 34.4 5.3S352 460.6 352 448V373.3z"/></svg>':"mute"===e?'<svg id="tooltip-svg-mute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path id="tooltip-svg-mute-path" d="M533.6 32.5C598.5 85.3 640 165.8 640 256s-41.5 170.8-106.4 223.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C557.5 398.2 592 331.2 592 256s-34.5-142.2-88.7-186.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM473.1 107c43.2 35.2 70.9 88.9 70.9 149s-27.7 113.8-70.9 149c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C475.3 341.3 496 301.1 496 256s-20.7-85.3-53.2-111.8c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zm-60.5 74.5C434.1 199.1 448 225.9 448 256s-13.9 56.9-35.4 74.5c-10.3 8.4-25.4 6.8-33.8-3.5s-6.8-25.4 3.5-33.8C393.1 284.4 400 271 400 256s-6.9-28.4-17.7-37.3c-10.3-8.4-11.8-23.5-3.5-33.8s23.5-11.8 33.8-3.5zM301.1 34.8C312.6 40 320 51.4 320 64V448c0 12.6-7.4 24-18.9 29.2s-25 3.1-34.4-5.3L131.8 352H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h67.8L266.7 40.1c9.4-8.4 22.9-10.4 34.4-5.3z"/></svg>':"replay"===e?'<svg id="tooltip-svg-replay" width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path id="tooltip-svg-replay-path" d="M48.5 224H40C26.7 224 16 213.3 16 200V72C16 62.3 21.8 53.5 30.8 49.8C39.8 46.1 50.1 48.1 57 55L98.6 96.6C186.2 10.1 327.3 10.4 414.4 97.6C501.9 185.1 501.9 326.9 414.4 414.4C326.9 501.9 185.1 501.9 97.6 414.4C85.1 401.9 85.1 381.6 97.6 369.1C110.1 356.6 130.4 356.6 142.9 369.1C205.4 431.6 306.7 431.6 369.2 369.1C431.7 306.6 431.7 205.3 369.2 142.8C307 80.6 206.5 80.3 143.9 141.8L185 183C191.9 189.9 193.9 200.2 190.2 209.2C186.5 218.2 177.7 224 168 224H48.5Z" />\n </svg>':"dismiss"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M294.6 166.6L317.3 144 272 98.7l-22.6 22.6L160 210.7 70.6 121.4 48 98.7 2.7 144l22.6 22.6L114.7 256 25.4 345.4 2.7 368 48 413.3l22.6-22.6L160 301.3l89.4 89.4L272 413.3 317.3 368l-22.6-22.6L205.3 256l89.4-89.4z"/></svg>':"blur"===e?'<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">\n <path class="bb-svg-path" d="m602.25 1200c238.2 0 435.95-193.26 435.95-435.95 0-269.66-220.23-615.73-435.95-764.05-220.23 161.8-440.45 485.39-440.45 764.05 0 242.7 197.75 435.95 440.45 435.95zm-260.68-382.02c0 112.36 89.887 206.74 206.74 206.74v62.922c-148.32 0-274.16-121.35-274.16-269.66z" fill="#333"/>\n</svg>':"pen"===e?'<svg width="1072px" height="1034px" viewBox="0 0 1072 1034" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-907.000000, -217.000000)" fill-rule="nonzero">\n <g transform="translate(907.268457, 217.009827)">\n <g transform="translate(132.335119, 0.000000)" fill="#000" class="bb-svg-path">\n <path d="M20.3764235,730.530173 L10.1884235,720.342173 C-0.791576454,709.362173 -3.16357645,692.432173 4.37592355,678.858173 L83.1809235,537.018173 C71.7589235,502.979173 82.3098335,463.998173 112.254924,440.706173 L655.334924,18.3161733 C689.951924,-8.6058267 739.197924,-5.5388267 770.214924,25.4684733 L913.774924,169.028473 C944.782924,200.040473 947.848924,249.286473 920.927224,283.908473 L498.537224,826.988473 C496.322424,829.836173 493.935624,832.543173 491.384924,835.090073 C467.271924,859.207073 432.513924,866.195073 402.232924,856.063073 L260.382924,934.868073 C246.804924,942.407173 229.874924,940.036073 218.894924,929.055573 L208.706924,918.867573 L20.3764235,730.530173 Z M866.006424,241.190173 C871.393124,234.264373 870.779824,224.417173 864.576724,218.213173 L721.016724,74.6531733 C714.813624,68.4500733 704.965724,67.8367733 698.043724,73.2234733 L154.963724,495.613473 C147.381724,501.507973 146.018424,512.433473 151.912924,520.015473 C152.358234,520.585783 152.834804,521.128773 153.346524,521.636573 L417.586524,785.886573 C424.379524,792.675673 435.391524,792.675673 442.180524,785.886573 C442.692244,785.374853 443.168804,784.831873 443.610224,784.265473 L866.006424,241.190173 Z M342.796424,809.480173 L129.746424,596.430173 L77.9264235,689.707173 L249.516424,861.297173 L342.796424,809.480173 Z"></path>\n </g>\n <g transform="translate(-0.000000, 755.530173)" fill="#EB144C">\n <path d="M124.711543,0 L313.042043,188.3374 L233.288043,268.0914 C222.003043,279.3764 204.483043,281.5324 190.800043,273.3219 L16.8900429,168.9719 C-2.51595711,157.3309 -5.80895711,130.5499 10.1908429,114.5499 L124.711543,0 Z" class="bb-pen-tip"></path>\n </g>\n </g>\n </g>\n </g>\n</svg>':"rect"===e?'<svg width="339px" height="241px" viewBox="0 0 339 241" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-0.000865, 0.000000)" fill-rule="nonzero">\n <g transform="translate(0.000865, 0.000000)" fill="#000000" class="bb-svg-path">\n <path d="M339,0 L339,241 L0,241 L0,0 L339,0 Z M312.826351,26.168387 L26.1855674,26.168387 L26.1855674,214.41156 L312.826351,214.41156 L312.826351,26.168387 Z"></path>\n </g>\n <g transform="translate(0.000000, 83.206095)" fill="#EB144C" class="bb-pen-tip">\n <path d="M0,0 L26.186,26.186 L26.1864325,131.205465 L131.204,131.205 L157.792,157.793 L0.000865118243,157.793905 L0,0 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"pointer"===e?'<svg width="1200pt" height="1200pt" version="1.1" viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">\n <path d="m1050.7 508.95-225.94 157.5 160.31 160.31c4.4531 4.4531 6.9141 10.43 6.9141 16.758s-2.4609 12.305-6.9141 16.758l-126.09 126.09c-4.4531 4.4531-10.43 6.9141-16.758 6.9141-6.3281 0-12.188-2.4609-16.758-6.9141l-160.2-160.43-157.62 225.94c-3.3984 4.9219-9.0234 7.8516-14.883 7.8516-0.70313 0-1.5234 0-2.2266-0.11719-6.7969-0.82031-12.422-5.2734-14.766-11.719l-333.16-880.55c-2.5781-6.6797-0.9375-14.297 4.2188-19.336 5.0391-5.0391 12.656-6.6797 19.336-4.2188l880.66 333.05c6.3281 2.3438 10.781 8.0859 11.602 14.766 0.82031 6.7969-2.1094 13.359-7.7344 17.344z" fill="#333"/>\n </svg>':"clip"===e?'<svg width="600px" height="1126px" viewBox="0 0 600 1126" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-0.002000, 0.501000)" fill="#333333" fill-rule="nonzero">\n <path d="M225.002,1124.999 C165.33,1124.999 108.102,1101.292 65.902,1059.097 C23.707,1016.902 5.68434189e-14,959.671 5.68434189e-14,899.997 L5.68434189e-14,299.997 C5.68434189e-14,220.431 31.605,144.127 87.867,87.867 C144.129,31.605 220.437,-4.26325641e-14 299.997,-4.26325641e-14 C379.557,-4.26325641e-14 455.867,31.605 512.127,87.867 C568.389,144.129 599.994,220.437 599.994,299.997 L599.994,1012.497 C599.994,1025.895 592.8456,1038.274 581.244,1044.974 C569.642,1051.6732 555.346,1051.6732 543.744,1044.974 C532.142,1038.2748 524.994,1025.896 524.994,1012.497 L524.994,299.997 C524.994,240.325 501.287,183.097 459.092,140.897 C416.897,98.702 359.666,74.995 299.992,74.995 C240.318,74.995 183.092,98.702 140.892,140.897 C98.697,183.092 74.99,240.323 74.99,299.997 L74.99,899.997 C74.99,953.587 103.58,1003.107 149.99,1029.897 C196.4,1056.694 253.58,1056.694 299.99,1029.897 C346.4,1003.104 374.99,953.585 374.99,899.997 L374.99,337.497 C374.99,310.704 360.697,285.942 337.49,272.544 C314.283,259.149 285.697,259.149 262.49,272.544 C239.283,285.942 224.99,310.704 224.99,337.497 L224.99,824.997 C224.99,838.395 217.8416,850.774 206.24,857.474 C194.638,864.1732 180.342,864.1732 168.74,857.474 C157.138,850.7748 149.99,838.396 149.99,824.997 L149.99,337.497 C149.99,283.907 178.58,234.387 224.99,207.597 C271.4,180.8 328.58,180.8 374.99,207.597 C421.4,234.39 449.99,283.909 449.99,337.497 L449.99,899.997 C449.99,959.669 426.283,1016.897 384.088,1059.097 C341.893,1101.292 284.662,1124.999 224.988,1124.999 L225.002,1124.999 Z" id="Path"></path>\n </g>\n </g>\n</svg>':"mic"===e?'<svg\n width="1200pt"\n height="1200pt"\n version="1.1"\n viewBox="0 0 1200 1200"\n xmlns="http://www.w3.org/2000/svg"\n >\n <g class="bb-svg-path">\n <path\n d="m600 862.5c144.75 0 262.5-117.75 262.5-262.5v-300c0-144.75-117.75-262.5-262.5-262.5s-262.5 117.75-262.5 262.5v300c0 144.75 117.75 262.5 262.5 262.5z"\n />\n <path\n d="m1012.5 600c0-20.707-16.793-37.5-37.5-37.5s-37.5 16.793-37.5 37.5c0 186.11-151.41 337.5-337.5 337.5s-337.5-151.39-337.5-337.5c0-20.707-16.793-37.5-37.5-37.5s-37.5 16.793-37.5 37.5c0 214.8 165.08 391.57 375 410.6v114.4c0 20.727 16.793 37.5 37.5 37.5s37.5-16.773 37.5-37.5v-114.4c209.92-19.031 375-195.8 375-410.6z"\n />\n </g>\n </svg>':"camera"===e?'<svg width="1155px" height="1004px" viewBox="0 0 1155 1004" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g fill="#333333" fill-rule="nonzero">\n <g transform="translate(128.324095, 0.000000)">\n <path d="M42.7803063,0.00413459787 C31.4357421,0.00413459787 20.5549853,4.41399115 12.5336107,12.2572687 C4.51223664,20.1005462 0.00420584816,30.741831 0.00420584816,41.8370305 L0.00420584816,251.00151 C-0.156199045,262.200455 4.27736739,272.989996 12.315738,280.963903 C20.3585574,288.938257 31.3288589,293.431222 42.7803063,293.431222 C54.2317532,293.431222 65.2018267,288.938592 73.2448746,280.963903 C81.2832452,272.989549 85.7172445,262.200455 85.5564062,251.00151 L85.5564062,83.6699265 L256.660808,83.6699265 C268.112255,83.8267939 279.145066,79.4909873 287.298762,71.6298611 C295.452913,63.7643845 300.04718,53.0359758 300.04718,41.8370305 C300.04718,30.6380854 295.453255,19.9098998 287.298762,12.0441998 C279.144611,4.18307356 268.112255,-0.153157091 256.660808,0.00413459787 L42.7803063,0.00413459787 Z"></path>\n <path d="M983.227131,710.59444 C971.895913,710.764382 961.099907,715.326799 953.20401,723.279287 C945.312674,731.227538 940.964345,741.91668 941.119476,752.99849 L941.119476,920.330075 L770.015075,920.330075 C758.563631,920.173205 747.530815,924.509015 739.377123,932.370139 C731.222968,940.235615 726.628705,950.964028 726.628705,962.16297 C726.628705,973.361918 731.222627,984.090105 739.377123,991.955802 C747.531272,999.816926 758.563631,1004.15316 770.015075,1003.99587 L983.895579,1003.99587 C995.24014,1003.99587 1006.1209,999.586011 1014.14227,991.742733 C1022.16365,983.899455 1026.67168,973.258169 1026.67168,962.16297 L1026.67168,752.99849 C1026.83208,741.690223 1022.30053,730.801401 1014.11489,722.812989 C1005.93394,714.825472 994.790363,710.415949 983.227131,710.59444 L983.227131,710.59444 Z"></path>\n <path d="M983.227131,375.93127 C971.895913,376.101212 961.099907,380.66363 953.20401,388.61612 C945.312674,396.56437 940.964345,407.253512 941.119476,418.335325 L941.119476,585.66691 C940.959072,596.865853 945.39264,607.655394 953.431008,615.629303 C961.47383,623.603658 972.444131,628.096618 983.895579,628.096618 C995.347023,628.096618 1006.3171,623.603989 1014.36015,615.629303 C1022.39852,607.654947 1026.83251,596.865853 1026.67168,585.66691 L1026.67168,418.335325 C1026.83208,407.027056 1022.30053,396.138232 1014.11489,388.149822 C1005.93394,380.162305 994.790363,375.752783 983.227131,375.93127 L983.227131,375.93127 Z"></path>\n <path d="M769.974012,0.00413459787 C758.522563,-0.152733184 747.489752,4.18307356 739.336055,12.0441998 C731.181906,19.9096767 726.587637,30.6380854 726.587637,41.8370305 C726.587637,53.0359758 731.181564,63.7641611 739.336055,71.6298611 C747.490209,79.4909873 758.522563,83.8272181 769.974012,83.6699265 L941.078414,83.6699265 L941.078414,251.00151 C940.918009,262.200455 945.351572,272.989996 953.389945,280.963903 C961.432763,288.938257 972.403063,293.431222 983.854512,293.431222 C995.30596,293.431222 1006.27603,288.938592 1014.31908,280.963903 C1022.35745,272.989549 1026.79145,262.200455 1026.63061,251.00151 L1026.63061,41.8370305 C1026.63061,30.7426118 1022.12133,20.1017733 1014.10121,12.2572687 C1006.08109,4.41276405 995.199876,0.00413459787 983.854512,0.00413459787 L769.974012,0.00413459787 Z"></path>\n <path d="M427.765208,0.00413459787 C416.31376,-0.152733184 405.280949,4.18307356 397.127256,12.0441998 C388.973102,19.9096767 384.378838,30.6380854 384.378838,41.8370305 C384.378838,53.0359758 388.972761,63.7641611 397.127256,71.6298611 C405.281406,79.4909873 416.31376,83.8272181 427.765208,83.6699265 L598.86961,83.6699265 C610.321058,83.8267939 621.35387,79.4909873 629.507562,71.6298611 C637.661716,63.7643845 642.255985,53.0359758 642.255985,41.8370305 C642.255985,30.6380854 637.662058,19.9098998 629.507562,12.0441998 C621.353413,4.18307356 610.321058,-0.153157091 598.86961,0.00413459787 L427.765208,0.00413459787 Z"></path>\n </g>\n <g transform="translate(0.000000, 427.000000)">\n <path d="M768.516184,22.1826583 C752.659627,13.73125 732.573775,13.73125 717.773442,24.29375 L562.379192,124.6375 L562.379192,31.6875 C562.379192,13.7330104 548.635081,0 530.666079,0 L31.7131123,0 C13.7441105,0 0,13.7330104 0,31.6875 L0,475.3125 C0,493.26699 13.7441105,507 31.7131123,507 L530.666079,507 C548.635081,507 562.379192,493.26699 562.379192,475.3125 L562.379192,382.3625 L717.773442,482.70625 C726.231681,487.9875 735.742444,491.157658 745.257258,491.157658 C753.715498,491.157658 761.113815,489.046567 769.572406,484.820862 C786.485185,475.313732 796,458.414612 796,439.400352 L796,68.6566021 C794.943601,48.5869719 785.428963,31.6878521 768.516184,22.1807219 L768.516184,22.1826583 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"recorderon"===e?'<svg width="1251px" height="1251px" viewBox="0 0 1251 1251" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g>\n <circle fill="#E31810" cx="625.5" cy="625.5" r="625.5"></circle>\n <circle fill="#F71008" cx="625" cy="625" r="507"></circle>\n <g transform="translate(175.000000, 449.000000)" fill="#FFFFFF" fill-rule="nonzero">\n <path d="M0,347.097493 L0,4.90250696 L135.528311,4.90250696 C161.471024,4.90250696 183.639743,9.49741034 202.034469,18.6872171 C220.429194,27.8770239 234.46286,40.8541449 244.135466,57.6185803 C253.808072,74.3830156 258.644376,94.0714804 258.644376,116.683975 C258.644376,139.40786 253.724206,158.929238 243.883867,175.248107 C234.043527,191.566976 219.814173,204.070682 201.195803,212.759227 C182.577434,221.447772 160.073248,225.792044 133.683247,225.792044 L42.9396629,225.792044 L42.9396629,167.64563 L121.941933,167.64563 C135.807866,167.64563 147.325536,165.751973 156.494943,161.964659 C165.66435,158.177344 172.51345,152.496373 177.042243,144.921744 C181.571035,137.347116 183.835432,127.934526 183.835432,116.683975 C183.835432,105.322032 181.571035,95.7423543 177.042243,87.9449425 C172.51345,80.1475308 165.636395,74.2159282 156.411077,70.1501349 C147.185759,66.0843416 135.584222,64.051445 121.606467,64.051445 L72.6284142,64.051445 L72.6284142,347.097493 L0,347.097493 Z M185.512762,191.37204 L270.888889,347.097493 L190.712487,347.097493 L107.181424,191.37204 L185.512762,191.37204 Z"></path>\n <polygon points="309.166667 347.097493 309.166667 4.90250696 540.126846 4.90250696 540.126846 64.5527072 381.634607 64.5527072 381.634607 146.091356 528.244113 146.091356 528.244113 205.741556 381.634607 205.741556 381.634607 287.447293 540.796296 287.447293 540.796296 347.097493"></polygon>\n <path d="M901,124.638783 L827.757943,124.638783 C826.420189,115.158428 823.68894,106.709759 819.564197,99.2927757 C815.439454,91.8757921 810.144176,85.5462611 803.678363,80.3041825 C797.212549,75.0621039 789.77129,71.0468948 781.354585,68.2585551 C772.93788,65.4702155 763.824427,64.0760456 754.014228,64.0760456 C736.288981,64.0760456 720.849065,68.4537389 707.69448,77.2091255 C694.539894,85.964512 684.339516,98.6793409 677.093346,115.353612 C669.847176,132.027883 666.224091,152.243346 666.224091,176 C666.224091,200.425856 669.875046,220.948035 677.176956,237.56654 C684.478866,254.185044 694.707113,266.732573 707.861699,275.209125 C721.016285,283.685678 736.233242,287.923954 753.51257,287.923954 C763.21129,287.923954 772.213263,286.641318 780.518488,284.076046 C788.823714,281.510773 796.209233,277.746515 802.675047,272.78327 C809.14086,267.820025 814.519748,261.769328 818.81171,254.631179 C823.103672,247.493029 826.08575,239.351077 827.757943,230.205323 L901,230.539924 C899.104848,246.26616 894.394837,261.406844 886.869968,275.961977 C879.3451,290.51711 869.256201,303.510773 856.603274,314.942966 C843.950346,326.375158 828.900608,335.409379 811.45406,342.045627 C794.007513,348.681876 774.303504,352 752.342035,352 C721.796641,352 694.512024,345.084918 670.488184,331.254753 C646.464343,317.424588 627.512821,297.404309 613.633619,271.193916 C599.754416,244.983523 592.814815,213.252218 592.814815,176 C592.814815,138.636248 599.838026,106.849176 613.884448,80.6387833 C627.93087,54.4283904 646.993871,34.4359949 671.073451,20.661597 C695.153031,6.88719899 722.242559,0 752.342035,0 C772.185393,0 790.607387,2.78833967 807.608016,8.36501901 C824.608646,13.9416984 839.686254,22.0557668 852.840839,32.7072243 C865.995425,43.3586819 876.72533,56.3802281 885.030556,71.7718631 C893.335782,87.1634981 898.65893,104.785805 901,124.638783 Z"></path>\n </g>\n </g>\n </g>\n</svg>':"recorderoff"===e?'<svg width="1251px" height="1251px" viewBox="0 0 1251 1251" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g class="bb-rec-on-circle" fill="#EEEEEE" fill-rule="nonzero">\n <path d="M625.5,0 C970.954111,0 1251,280.045889 1251,625.5 C1251,970.954111 970.954111,1251 625.5,1251 C280.045889,1251 0,970.954111 0,625.5 C0,280.045889 280.045889,0 625.5,0 Z M626,124 C348.753056,124 124,348.753056 124,626 C124,903.246944 348.753056,1128 626,1128 C903.246944,1128 1128,903.246944 1128,626 C1128,348.753056 903.246944,124 626,124 Z"></path>\n </g>\n <g class="bb-rec-on-cont" fill="#E31810" transform="translate(86.000000, 86.000000)" fill-rule="nonzero">\n <path d="M540,0 C241.2,0 0,241.2 0,540 C0,838.8 241.2,1080 540,1080 C838.8,1080 1080,838.8 1080,540 C1080,241.2 838.8,0 540,0 Z M777.6,741.6 C777.6,761.998 761.998,777.6 741.6,777.6 L338.4,777.6 C318.002,777.6 302.4,761.998 302.4,741.6 L302.4,338.4 C302.4,318.002 318.002,302.4 338.4,302.4 L741.6,302.4 C761.998,302.4 777.6,318.002 777.6,338.4 L777.6,741.6 Z"></path>\n </g>\n </g>\n </svg>':"arrowdown"===e?'<svg class="bb-logo-arrowdown" fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m50 77.637c-1.3477 0-2.6953-0.51562-3.7266-1.543l-44.73-44.73c-2.0586-2.0586-2.0586-5.3945 0-7.4531 2.0586-2.0586 5.3945-2.0586 7.4531 0l41.004 41 41.004-41c2.0586-2.0586 5.3945-2.0586 7.4531 0 2.0586 2.0586 2.0586 5.3945 0 7.4531l-44.73 44.727c-1.0312 1.0312-2.3789 1.5469-3.7266 1.5469z"/>\n </svg>'):"arrowleft"===e?'<svg fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m70.988 1.6211c2.1875-2.168 5.7344-2.168 7.9297 0 2.1836 2.168 2.1836 5.7227 0 7.8906l-46.016 40.445 46.016 40.5c2.1836 2.168 2.1836 5.668 0 7.8906-2.1953 2.168-5.7383 2.168-7.9297 0l-50.039-44.109c-1.168-1.168-1.668-2.7227-1.5898-4.2773-0.078125-1.5 0.42188-3.0547 1.5898-4.2227l50.039-44.109z" fill-rule="evenodd"/>\n </svg>'):"close"===e?'<svg fill="'.concat(t,'" width="100pt" height="100pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">\n <path d="m72.812 33.02l-5.832-5.832-16.98 16.875-16.98-16.875-5.832 5.832 16.875 16.98-16.875 16.98 5.832 5.832 16.98-16.875 16.98 16.875 5.832-5.832-16.875-16.98z"/>\n </svg>'):"undo"===e?'<svg width="62px" height="60px" viewBox="0 0 62 60" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g class="bb-svg-path" transform="translate(-0.000500, 0.001926)" fill-rule="nonzero">\n <path d="M28.0005,51.6270739 C24.9653,51.0684839 22.0825,49.8731739 19.5396,48.1192739 L13.8208,53.8380739 C17.9536,57.0060739 22.8403,59.0333739 28.0008,59.7286739 L28.0005,51.6270739 Z" id="Path"></path>\n <path d="M2.2705,33.9980739 C2.96581,39.1582739 4.9932,44.0450739 8.1611,48.1780739 L13.8799,42.4592739 C12.126,39.9162739 10.9307,37.0334739 10.3721,33.9983739 L2.2705,33.9980739 Z" id="Path"></path>\n <path d="M61.7305,33.9980739 L53.6289,33.9980739 C53.07031,37.0332739 51.875,39.9160739 50.1211,42.4589739 L55.8399,48.1777739 C59.0079,44.0449739 61.0352,39.1582739 61.7305,33.9977739 L61.7305,33.9980739 Z" id="Path"></path>\n <path d="M4.0005,24.9980739 L24.0005,24.9980739 L24.0005,16.9980739 L14.27,16.9980739 C17.6762,12.3613739 22.7622,9.24417393 28.442,8.31057393 C34.1178,7.38088393 39.934,8.70901393 44.645,12.0175739 C49.352,15.3222739 52.5786,20.3417739 53.6294,25.9975739 L61.731,25.9975739 C60.6646,18.0834739 56.4888,10.9235739 50.129,6.09957393 C43.7657,1.27147393 35.746,-0.818426068 27.836,0.290973932 C19.9298,1.39647393 12.793,5.61127393 8,11.9979739 L8,0.997973932 L-3.55271368e-15,0.997973932 L-3.55271368e-15,20.9979739 C-3.55271368e-15,22.0604739 0.42188,23.0760739 1.1719,23.8260739 C1.92192,24.5760739 2.9375,24.9979739 4,24.9979739 L4.0005,24.9980739 Z" id="Path"></path>\n <path d="M36.0005,51.6270739 L36.0005,59.7286739 C41.1607,59.0333639 46.0475,57.0059739 50.1805,53.8380739 L44.4617,48.1192739 C41.9187,49.8731739 39.0359,51.0684739 36.0008,51.6270739 L36.0005,51.6270739 Z" id="Path"></path>\n </g>\n </g>\n </svg>':"circle-dot"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"/></svg>'):"circle-question"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3h58.3c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24V250.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1H222.6c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"/></svg>'):"circle-info"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216 192V224h24 48 24v24 88h8 24v48H296 216 192V336h24zm72-144H224V128h64v64z"/></svg>'):"circle-exclamation"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm24-384v24V264v24H232V264 152 128h48zM232 368V320h48v48H232z"/></svg>'):"circle-up"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM384 256H304V384H208V256H128V224L256 96 384 224v32z"/></svg>'):"circle-right"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="'.concat(t,'" d="M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM256 384l0-80-128 0 0-96 128 0 0-80 32 0L416 256 288 384l-32 0z"/></svg>'):""};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,m(o.key),o)}}function g(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==f(t)?t:String(t)}var v=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),g(this,"startTimestamp",Date.now()),g(this,"requestId",0),g(this,"requests",{}),g(this,"externalRequests",[]),g(this,"maxRequests",30),g(this,"filters",[]),g(this,"defaultBlacklist",["gleap.io"]),g(this,"blacklist",[]),g(this,"initialized",!1),g(this,"stopped",!1),g(this,"loadAllResources",!1)}var t,n,o;return t=e,n=[{key:"setLoadAllResources",value:function(e){this.loadAllResources=e}},{key:"isContentTypeSupported",value:function(e){if("string"!=typeof e)return!1;if(""===e)return!0;e=e.toLocaleLowerCase();for(var t=["text/","xml","json"],n=0;n<t.length;n++)if(e.includes(t[n]))return!0;return!1}},{key:"getRequests",value:function(){var e=JSON.parse(JSON.stringify(Object.values(this.requests)));if(this.externalRequests&&this.externalRequests.length>0&&(e=e.concat(this.externalRequests)),this.filters&&this.filters.length>0)for(var t=0;t<e.length;t++){var n=e[t];if(n&&n.request&&n.request.headers)for(var o=0;o<this.filters.length;o++)delete n.request.headers[this.filters[o]];if(n&&n.request&&n.request.payload){var r=n.request.payload;try{r=JSON.parse(n.request.payload)}catch(c){}if(r){for(o=0;o<this.filters.length;o++)delete r[this.filters[o]];n.request.payload=JSON.stringify(r)}}if(n&&n.response&&n.response.responseText)try{var i=JSON.parse(n.response.responseText);for(o=0;o<this.filters.length;o++)delete i[this.filters[o]];n.response.responseText=JSON.stringify(i)}catch(c){}}try{if("undefined"!=typeof window&&window.performance){var a=window.performance.getEntriesByType("resource");for(t=0;t<a.length;t++){var s=a[t];s&&s.name&&(this.loadAllResources||["xmlhttprequest","fetch"].indexOf(s.initiatorType)>-1)&&!e.find((function(e){return e.url===s.name}))&&e.push({type:"RESOURCE",date:new Date(this.startTimestamp+s.startTime),url:s.name,duration:Math.round(s.duration),initiatorType:s.initiatorType})}}}catch(u){}var l=this.blacklist.concat(this.defaultBlacklist);if(l&&l.length>0)try{e=e.filter((function(e){for(var t=0;t<l.length;t++)if(e&&e.url&&e.url.includes(l[t]))return!1;return!0}))}catch(u){}return e}},{key:"setMaxRequests",value:function(e){e>70&&(e=70),this.maxRequests=e}},{key:"setStopped",value:function(e){this.stopped=e}},{key:"setFilters",value:function(e){this.filters=this.filters.concat(e||[])}},{key:"setBlacklist",value:function(e){this.blacklist=this.blacklist.concat(e||[])}},{key:"cleanRequests",value:function(){var e=Object.keys(this.requests);if(e.length>this.maxRequests)for(var t=e.slice(0,e.length-this.maxRequests),n=0;n<t.length;n++)delete this.requests[t[n]]}},{key:"calcRequestTime",value:function(e){if(e&&this.requests&&this.requests[e]){var t=this.requests[e].date;t&&(this.requests[e].duration=(new Date).getTime()-t.getTime())}}},{key:"getTextContentSize",value:function(e){var t=0;try{t=(new TextEncoder).encode(e).length}catch(n){try{t=encodeURI(s).split(/%..|./).length-1}catch(n){try{t=new Blob([e]).size}catch(n){t=e.length}}}return t/1024/1024}},{key:"cleanupContentSize",value:function(e){return this.getTextContentSize(e)>.15?"<content_too_large>":e}},{key:"cleanupPayload",value:function(e){if(null==e)return"{}";try{if(void 0!==("undefined"==typeof TextDecoder?"undefined":f(TextDecoder))&&ArrayBuffer.isView(e))return(new TextDecoder).decode(e)}catch(t){}return e}},{key:"preparePayload",value:function(e){var t=this.cleanupPayload(e);return this.cleanupContentSize(t)}},{key:"start",value:function(){var e=this;if(!this.initialized){this.initialized=!0;var t=this;this.interceptNetworkRequests({onFetch:function(n,o){if(!e.stopped&&o&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[o]={url:n[0].url,date:new Date,request:{payload:"",headers:void 0!==n[0].headers?Object.fromEntries(n[0].headers.entries()):{}},type:void 0!==n[0].method?n[0].method:""};else if(n.length>=2&&n[1]){var r=n[1]&&n[1].method?n[1].method:"GET";e.requests[o]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:r,url:n[0],date:new Date}}else e.requests[o]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,o){if(!e.stopped&&o&&e.requests&&e.requests[o]){try{e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:"",responseText:"<request_still_open>"},e.calcRequestTime(o)}catch(i){}try{var r="";n.headers&&void 0!==n.headers.get&&(r=n.headers.get("content-type")),e.isContentTypeSupported(r)?n.text().then((function(r){e.requests[o]&&(e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(r)}),e.calcRequestTime(o),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[o]&&(e.requests[o].success=!0,e.requests[o].response={status:n.status,statusText:n.statusText,responseText:"<content_type_not_supported>"}),e.calcRequestTime(o),e.cleanRequests())}catch(i){}}},onFetchFailed:function(t,n){!e.stopped&&n&&e.requests&&e.requests[n]&&(e.requests[n].success=!1,e.calcRequestTime(n),e.cleanRequests())},onOpen:function(t,n){e.stopped||(t&&t.bbRequestId&&n.length>=2&&e.requests&&(e.requests[t.bbRequestId]={type:n[0],url:n[1],date:new Date}),e.cleanRequests())},onSend:function(t,n){e.stopped||(t&&t.bbRequestId&&e.requests&&e.requests[t.bbRequestId]&&(e.requests[t.bbRequestId].request={payload:e.preparePayload(n.length>0?n[0]:"{}"),headers:t.requestHeaders}),e.cleanRequests())},onError:function(t,n){!e.stopped&&e.requests&&t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests[t.currentTarget.bbRequestId]&&(e.requests[t.currentTarget.bbRequestId].success=!1,e.calcRequestTime(t.bbRequestId)),e.cleanRequests()},onLoad:function(t,n){if(!e.stopped){if(t&&t.currentTarget&&t.currentTarget.bbRequestId&&e.requests&&e.requests[t.currentTarget.bbRequestId]){var o=t.currentTarget,r=o.responseType,i="<"+r+">";""!==r&&"text"!==r||(i=e.cleanupContentSize(o.responseText)),e.requests[o.bbRequestId].success=!0,e.requests[o.bbRequestId].response={status:o.status,statusText:o.statusText,responseText:i},e.calcRequestTime(o.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,o=XMLHttpRequest.prototype.open,r=XMLHttpRequest.prototype.send;return void 0===XMLHttpRequest.prototype.gleapSetRequestHeader&&(XMLHttpRequest.prototype.gleapSetRequestHeader=XMLHttpRequest.prototype.setRequestHeader),XMLHttpRequest.prototype.gleapSetRequestHeader&&(XMLHttpRequest.prototype.setRequestHeader=function(e,t){this.requestHeaders||(this.requestHeaders={}),this.requestHeaders&&this.requestHeaders.hasOwnProperty(e)||(this.requestHeaders[e]||(this.requestHeaders[e]=[]),this.requestHeaders[e].push(t),this.gleapSetRequestHeader(e,t))}),XMLHttpRequest.prototype.open=function(){return this.bbRequestId=++n.requestId,e.onOpen&&e.onOpen(this,arguments),e.onLoad&&this.addEventListener("load",e.onLoad.bind(e)),e.onError&&this.addEventListener("error",e.onError.bind(e)),o.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),r.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var o=++n.requestId;return e.onFetch(arguments,o),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,o)}return t})).catch((function(t){throw e.onFetchFailed(t,o),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var o=new FileReader;o.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},o.onerror=function(e){n(e)},o.readAsText(e)}))}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&h(t.prototype,n),o&&h(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();g(v,"instance",void 0);const b=v;var y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:400;return new Promise((function(o,r){var i=0===e.indexOf("data:image/jpeg"),a=new Image;a.src=e,a.onerror=function(){r()},a.onload=function(){var e=document.createElement("canvas"),r=t,s=n;t>a.width/1.5&&(r=a.width/1.5),n>a.height/1.5&&(s=a.height/1.5);var l=a.width,c=a.height;l>c?l>r&&(c*=r/l,l=r):c>s&&(l*=s/c,c=s),e.width=l,e.height=c,e.getContext("2d").drawImage(a,0,0,l,c),o(i?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},w=function(){return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))},x=function(e){if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},k=function(e,t){return e.length>t?e.slice(0,t)+"...":e},S=function(e){try{var t=e.split("."),n=!1,o=t[t.length-2];return"co"!==o&&"com"!==o&&"gv"!==o&&"ac"!==o&&"edu"!==o&&"gov"!==o&&"mil"!==o&&"net"!==o&&"org"!==o||(n=!0),(t=t.slice(n?-3:-2)).join(".")}catch(r){}return e},C=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},I=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(o){}else localStorage.removeItem(n)},L=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",(function(){e()}))};const T=Math.min,O=Math.max,E=Math.round,M=Math.floor,A=e=>({x:e,y:e}),P={left:"right",right:"left",bottom:"top",top:"bottom"},R={start:"end",end:"start"};function N(e,t,n){return O(e,T(t,n))}function D(e,t){return"function"==typeof e?e(t):e}function j(e){return e.split("-")[0]}function F(e){return e.split("-")[1]}function B(e){return"x"===e?"y":"x"}function _(e){return"y"===e?"height":"width"}function H(e){return["top","bottom"].includes(j(e))?"y":"x"}function U(e){return B(H(e))}function q(e){return e.replace(/start|end/g,(e=>R[e]))}function z(e){return e.replace(/left|right|bottom|top/g,(e=>P[e]))}function W(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function G(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function V(e,t,n){let{reference:o,floating:r}=e;const i=H(t),a=U(t),s=_(a),l=j(t),c="y"===i,u=o.x+o.width/2-r.width/2,d=o.y+o.height/2-r.height/2,p=o[s]/2-r[s]/2;let f;switch(l){case"top":f={x:u,y:o.y-r.height};break;case"bottom":f={x:u,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:d};break;case"left":f={x:o.x-r.width,y:d};break;default:f={x:o.x,y:o.y}}switch(F(t)){case"start":f[a]-=p*(n&&c?-1:1);break;case"end":f[a]+=p*(n&&c?-1:1)}return f}async function X(e,t){var n;void 0===t&&(t={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=D(t,e),h=W(f),g=s[p?"floating"===d?"reference":"floating":d],m=G(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{...a.floating,x:o,y:r}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=G(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(m.top-w.top+h.top)/y.y,bottom:(w.bottom-m.bottom+h.bottom)/y.y,left:(m.left-w.left+h.left)/y.x,right:(w.right-m.right+h.right)/y.x}}const K=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:o,elements:r}=e,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=j(n),s=F(n),l="y"===H(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=D(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof h&&(f="end"===s?-1*h:h),l?{x:f*u,y:p*c}:{x:p*c,y:f*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}};function Z(e){return Q(e)?(e.nodeName||"").toLowerCase():"#document"}function Y(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function J(e){var t;return null==(t=(Q(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Q(e){return e instanceof Node||e instanceof Y(e).Node}function $(e){return e instanceof Element||e instanceof Y(e).Element}function ee(e){return e instanceof HTMLElement||e instanceof Y(e).HTMLElement}function te(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Y(e).ShadowRoot)}function ne(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=se(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function oe(e){return["table","td","th"].includes(Z(e))}function re(e){const t=ie(),n=se(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function ie(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function ae(e){return["html","body","#document"].includes(Z(e))}function se(e){return Y(e).getComputedStyle(e)}function le(e){return $(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ce(e){if("html"===Z(e))return e;const t=e.assignedSlot||e.parentNode||te(e)&&e.host||J(e);return te(t)?t.host:t}function ue(e){const t=ce(e);return ae(t)?e.ownerDocument?e.ownerDocument.body:e.body:ee(t)&&ne(t)?t:ue(t)}function de(e,t,n){var o;void 0===t&&(t=[]),void 0===n&&(n=!0);const r=ue(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),a=Y(r);return i?t.concat(a,a.visualViewport||[],ne(r)?r:[],a.frameElement&&n?de(a.frameElement):[]):t.concat(r,de(r,[],n))}function pe(e){const t=se(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ee(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,s=E(n)!==i||E(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function fe(e){return $(e)?e:e.contextElement}function he(e){const t=fe(e);if(!ee(t))return A(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=pe(t);let a=(i?E(n.width):n.width)/o,s=(i?E(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ge=A(0);function me(e){const t=Y(e);return ie()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:ge}function ve(e,t,n,o){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=e.getBoundingClientRect(),i=fe(e);let a=A(1);t&&(o?$(o)&&(a=he(o)):a=he(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Y(e))&&t}(i,n,o)?me(i):A(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,u=r.width/a.x,d=r.height/a.y;if(i){const e=Y(i),t=o&&$(o)?Y(o):o;let n=e,r=n.frameElement;for(;r&&o&&t!==n;){const e=he(r),t=r.getBoundingClientRect(),o=se(r),i=t.left+(r.clientLeft+parseFloat(o.paddingLeft))*e.x,a=t.top+(r.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Y(r),r=n.frameElement}}return G({width:u,height:d,x:l,y:c})}const be=[":popover-open",":modal"];function ye(e){return be.some((t=>{try{return e.matches(t)}catch(n){return!1}}))}function we(e){return ve(J(e)).left+le(e).scrollLeft}function xe(e,t,n){let o;if("viewport"===t)o=function(e,t){const n=Y(e),o=J(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const e=ie();(!e||e&&"fixed"===t)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)o=function(e){const t=J(e),n=le(e),o=e.ownerDocument.body,r=O(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=O(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+we(e);const s=-n.scrollTop;return"rtl"===se(o).direction&&(a+=O(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}(J(e));else if($(t))o=function(e,t){const n=ve(e,!0,"fixed"===t),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=ee(e)?he(e):A(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:r*i.x,y:o*i.y}}(t,n);else{const n=me(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return G(o)}function ke(e,t){const n=ce(e);return!(n===t||!$(n)||ae(n))&&("fixed"===se(n).position||ke(n,t))}function Se(e,t,n){const o=ee(t),r=J(t),i="fixed"===n,a=ve(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=A(0);if(o||!o&&!i)if(("body"!==Z(t)||ne(r))&&(s=le(t)),o){const e=ve(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else r&&(l.x=we(r));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Ce(e,t){return ee(e)&&"fixed"!==se(e).position?t?t(e):e.offsetParent:null}function Ie(e,t){const n=Y(e);if(!ee(e)||ye(e))return n;let o=Ce(e,t);for(;o&&oe(o)&&"static"===se(o).position;)o=Ce(o,t);return o&&("html"===Z(o)||"body"===Z(o)&&"static"===se(o).position&&!re(o))?n:o||function(e){let t=ce(e);for(;ee(t)&&!ae(t);){if(re(t))return t;t=ce(t)}return null}(e)||n}const Le={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i="fixed"===r,a=J(o),s=!!t&&ye(t.floating);if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=A(1);const u=A(0),d=ee(o);if((d||!d&&!i)&&(("body"!==Z(o)||ne(a))&&(l=le(o)),ee(o))){const e=ve(o);c=he(o),u.x=e.x+o.clientLeft,u.y=e.y+o.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:J,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let o=de(e,[],!1).filter((e=>$(e)&&"body"!==Z(e))),r=null;const i="fixed"===se(e).position;let a=i?ce(e):e;for(;$(a)&&!ae(a);){const t=se(a),n=re(a);n||"fixed"!==t.position||(r=null),(i?!n&&!r:!n&&"static"===t.position&&r&&["absolute","fixed"].includes(r.position)||ne(a)&&!n&&ke(e,a))?o=o.filter((e=>e!==a)):r=t,a=ce(a)}return t.set(e,o),o}(t,this._c):[].concat(n),o],a=i[0],s=i.reduce(((e,n)=>{const o=xe(t,n,r);return e.top=O(o.top,e.top),e.right=T(o.right,e.right),e.bottom=T(o.bottom,e.bottom),e.left=O(o.left,e.left),e}),xe(t,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:Ie,getElementRects:async function(e){const t=this.getOffsetParent||Ie,n=this.getDimensions;return{reference:Se(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=pe(e);return{width:t,height:n}},getScale:he,isElement:$,isRTL:function(e){return"rtl"===se(e).direction}};function Te(e,t,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=fe(e),u=r||i?[...c?de(c):[],...de(t)]:[];u.forEach((e=>{r&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,o=null;const r=J(e);function i(){var e;clearTimeout(n),null==(e=o)||e.disconnect(),o=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f={rootMargin:-M(u)+"px "+-M(r.clientWidth-(c+d))+"px "+-M(r.clientHeight-(u+p))+"px "+-M(c)+"px",threshold:O(0,T(1,l))||1};let h=!0;function g(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}h=!1}try{o=new IntersectionObserver(g,{...f,root:r.ownerDocument})}catch(m){o=new IntersectionObserver(g,f)}o.observe(e)}(!0),i}(c,n):null;let p,f=-1,h=null;a&&(h=new ResizeObserver((e=>{let[o]=e;o&&o.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let g=l?ve(e):null;return l&&function t(){const o=ve(e);!g||o.x===g.x&&o.y===g.y&&o.width===g.width&&o.height===g.height||n();g=o,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{r&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Oe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=D(e,t),c={x:n,y:o},u=await X(t,l),d=H(j(r)),p=B(d);let f=c[p],h=c[d];if(i){const e="y"===p?"bottom":"right";f=N(f+u["y"===p?"top":"left"],f,f-u[e])}if(a){const e="y"===d?"bottom":"right";h=N(h+u["y"===d?"top":"left"],h,h-u[e])}const g=s.fn({...t,[p]:f,[d]:h});return{...g,data:{x:g.x-n,y:g.y-o}}}}},Ee=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...m}=D(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=j(r),b=j(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(b||!g?[z(s)]:function(e){const t=z(e);return[q(e),t,q(t)]}(s));p||"none"===h||w.push(...function(e,t,n,o){const r=F(e);let i=function(e,t,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:o:t?o:r;case"left":case"right":return t?i:a;default:return[]}}(j(e),"start"===n,o);return r&&(i=i.map((e=>e+"-"+r)),t&&(i=i.concat(i.map(q)))),i}(s,g,h,y));const x=[s,...w],k=await X(t,m),S=[];let C=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&S.push(k[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const o=F(e),r=U(e),i=_(r);let a="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=z(a)),[a,z(a)]}(r,a,y);S.push(k[e[0]],k[e[1]])}if(C=[...C,{placement:r,overflows:S}],!S.every((e=>e<=0))){var I,L;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(L=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(f){case"bestFit":{var T;const e=null==(T=C.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},Me=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=D(e,t)||{};if(null==c)return{};const d=W(u),p={x:n,y:o},f=U(r),h=_(f),g=await a.getDimensions(c),m="y"===f,v=m?"top":"left",b=m?"bottom":"right",y=m?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[f]-p[f]-i.floating[h],x=p[f]-i.reference[f],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=k?k[y]:0;S&&await(null==a.isElement?void 0:a.isElement(k))||(S=s.floating[y]||i.floating[h]);const C=w/2-x/2,I=S/2-g[h]/2-1,L=T(d[v],I),O=T(d[b],I),E=L,M=S-g[h]-O,A=S/2-g[h]/2+C,P=N(E,A,M),R=!l.arrow&&null!=F(r)&&A!==P&&i.reference[h]/2-(A<E?L:O)-g[h]/2<0,j=R?A<E?A-E:A-M:0;return{[f]:p[f]+j,data:{[f]:P,centerOffset:A-P-j,...R&&{alignmentOffset:j}},reset:R}}}),Ae=(e,t,n)=>{const o=new Map,r={platform:Le,...n},i={...r.platform,_c:o};return(async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:d}=V(c,o,l),p=o,f={},h=0;for(let g=0;g<s.length;g++){const{name:n,fn:i}=s[g],{x:m,y:v,data:b,reset:y}=await i({x:u,y:d,initialPlacement:o,placement:p,strategy:r,middlewareData:f,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=m?m:u,d=null!=v?v:d,f={...f,[n]:{...f[n],...b}},y&&h<=50&&(h++,"object"==typeof y&&(y.placement&&(p=y.placement),y.rects&&(c=!0===y.rects?await a.getElementRects({reference:e,floating:t,strategy:r}):y.rects),({x:u,y:d}=V(c,p,l))),g=-1)}return{x:u,y:d,placement:p,strategy:r,middlewareData:f}})(e,t,{...r,platform:i})};function Pe(e){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pe(e)}function Re(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,De(o.key),o)}}function Ne(e,t,n){return(t=De(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function De(e){var t=function(e,t){if("object"!=Pe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Pe(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pe(t)?t:String(t)}function je(e){return function(e){if(Array.isArray(e))return Fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Fe(e,t)}(e)||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 Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}var Be=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ne(this,"tooltips",[]),Ne(this,"filteredTooltips",[]),Ne(this,"lastUrl",null),Ne(this,"elementToFloatingUIMap",new WeakMap),Ne(this,"elementToTooltipMap",new WeakMap),Ne(this,"nextId",0),Ne(this,"linkTooltip",(function(e,n){if(!e.hasAttribute("data-gleap-tooltip")){var o=t.nextId++;if(e.setAttribute("data-gleap-tooltip",o),e){var r=null;if("hotspot"===n.mode){var i=document.createElement("div");i.setAttribute("data-gleap-tooltip-anchor",o),i.classList.add("gleap-tooltip-anchor"),e.setAttribute("data-gleap-tooltip-mode","hotspot"),t.canEmbed(e)?e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i):e.parentNode.insertBefore(i,e.nextSibling);var a=document.createElement("div");a.classList.add("gleap-tooltip-hotspot"),a.setAttribute("data-gleap-tooltip-hotspot",o),a.innerHTML="".concat(p(n.icon,n.color)).concat(n.animated?'<div style="background-color: '.concat(n.color,'" class="gleap-tooltip-hotspot-animation"></div>'):""),i.appendChild(a),t.repositionHotspot(e,n),r=a,t.elementToTooltipMap.set(e,n)}else r=e;var s=t.createTooltip(r,n.html,n);t.elementToFloatingUIMap.set(e,s)}}})),Ne(this,"updateFilteredTooltips",(function(){t.filteredTooltips=t.getFilteredTooltips(),t.checkForTooltips()})),Ne(this,"getFilteredTooltips",(function(){if(!t.tooltips)return[];var e=window.location.href;return t.tooltips.filter((function(t){if(!t.page||0===t.page.length)return!0;var n=t.pageType,o=t.page;switch(n){case"is":return e===o;case"isnot":return e!==o;case"contains":return e.includes(o);case"notcontains":return!e.includes(o);case"startswith":return e.startsWith(o);case"endswith":return e.endsWith(o);default:return!1}}))})),Ne(this,"checkForTooltips",(function(){for(var e=0;e<t.filteredTooltips.length;e++){var n=t.filteredTooltips[e];try{for(var o=document.querySelectorAll(n.selector),r=0;r<o.length;r++){var i=o[r];i&&t.linkTooltip(i,n)}}catch(a){}}})),Ne(this,"load",(function(){var e=t,n=Ge.getInstance(),o=new XMLHttpRequest;o.open("GET",n.apiUrl+"/config/"+n.sdkKey+"/tooltips"),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("Api-Token",n.sdkKey);try{o.setRequestHeader("Gleap-Id",n.session.gleapId),o.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(r){}o.onerror=function(){console.error("Failed to fetch tooltips")},o.onreadystatechange=function(t){if(4===o.readyState&&200===o.status)try{e.tooltips=JSON.parse(o.responseText),e.updateFilteredTooltips()}catch(r){console.error("Failed to parse tooltips",r)}},o.send()}))}var t,n,o;return t=e,n=[{key:"processNodeInsertion",value:function(e){var t=this;e.nodeType===Node.ELEMENT_NODE&&(this.checkNodeTooltip(e),e.childNodes&&e.childNodes.forEach((function(e){t.processNodeInsertion(e)})))}},{key:"checkNodeTooltip",value:function(e){var t=this;this.filteredTooltips.length>0&&this.filteredTooltips.forEach((function(n){n.selector&&e.matches(n.selector)&&t.linkTooltip(e,n)}))}},{key:"start",value:function(){var e=this,t=this;if(window){var n,o,r,i=(n=t.updateHotspotPositions.bind(t),o=250,r=null,function(){if(!r){var e=this,t=arguments;r=setTimeout((function(){n.call.apply(n,[e].concat(je(t))),r=null}),o)}});window.addEventListener("resize",i),this.observer=new MutationObserver((function(n){t.lastUrl!==window.location.href&&(t.lastUrl=window.location.href,t.filteredTooltips=t.getFilteredTooltips()),n.forEach((function(n){n.addedNodes.forEach((function(e){e.nodeType===Node.ELEMENT_NODE&&t.processNodeInsertion(e)})),n.removedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE&&e.elementToFloatingUIMap.has(t)){var n=e.elementToFloatingUIMap.get(t);n&&(n.tooltip&&n.tooltip.remove(),n.cleanup(),e.elementToFloatingUIMap.delete(t))}e.elementToTooltipMap.has(t)&&e.elementToTooltipMap.delete(t)}))}))})),this.observer.observe(document.body,{childList:!0,subtree:!0})}}},{key:"updateHotspotPositions",value:function(){var e=this;document.querySelectorAll("[data-gleap-tooltip-mode='hotspot']").forEach((function(t){var n=e.elementToTooltipMap.get(t);n&&e.repositionHotspot(t,n)}))}},{key:"createTooltip",value:function(e,t,n){var o=document.createElement("div");o.className="gleap-tooltip",o.innerHTML='<div class="gleap-tooltip-inner">\n '.concat(t,'\n <div class="gleap-tooltip-arrow">\n <svg width="116" height="56" viewBox="0 0 116 56" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M57.75 0.74998L115.5 0.680177L66.8726 49.3076C61.7958 54.3844 53.5646 54.3844 48.4878 49.3076L4.05618e-05 0.819784L57.75 0.74998Z" fill="white"/>\n </svg>\n </div>\n </div>'),document.body.appendChild(o);var r,i=o.querySelector(".gleap-tooltip-arrow"),a=Te(e,o,(function(){Ae(e,o,{placement:"left"===n.posX?"left":"right",middleware:[K(10),Ee(),Oe(),Me({element:i})]}).then((function(e){var t=e.x,n=e.y,r=e.middlewareData,a=e.placement;try{if(Object.assign(o.style,{left:"".concat(t,"px"),top:"".concat(n,"px")}),r.arrow){var s={left:"",top:"",transform:""};null!=r.arrow.x&&(s.left="".concat(r.arrow.x,"px"),"bottom"===a?(s.transform="translateY(-7px) rotate(180deg)",s.top="".concat(-20,"px")):"top"===a&&(s.transform="translateY(7px) rotate(0deg)",s.top="100%")),null!=r.arrow.y&&(s.top="".concat(r.arrow.y,"px"),"right"===a?(s.transform="translateX(-7px) rotate(90deg)",s.left="".concat(-20,"px")):"left"===a&&(s.transform="translateX(7px) rotate(270deg)",s.left="100%")),Object.assign(i.style,s)}}catch(l){}}))}));function s(){clearTimeout(r),o.style.visibility="visible",o.style.opacity="1",o.style.pointerEvents="auto"}function l(){r=setTimeout((function(){o.style.opacity="0",setTimeout((function(){o.style.visibility="hidden",o.style.pointerEvents="none"}),200)}),500)}return e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",l),o.addEventListener("mouseenter",s),o.addEventListener("mouseleave",l),{cleanup:a,tooltip:o}}},{key:"canEmbed",value:function(e){var t=new Set(["area","base","br","embed","hr","img","input","source","track","wbr","canvas"]);return e&&!t.has(e.tagName.toLowerCase())}},{key:"repositionHotspot",value:function(e,t){if(e&&t){var n=e.getAttribute("data-gleap-tooltip");if(n){var o=document.querySelector('[data-gleap-tooltip-hotspot="'.concat(n,'"]'));if(o){t.posX||(t.posX="right"),t.posY||(t.posY="center"),t.offsetX||(t.offsetX=4),t.offsetY||(t.offsetY=0);var r=e.getBoundingClientRect();try{var i=document.createRange();i.selectNodeContents(e);var a=window.getComputedStyle(e),s=i.getBoundingClientRect().width+parseFloat(a.paddingLeft);s<r.width&&(r.width=s)}catch(f){}var l=document.querySelector('[data-gleap-tooltip-anchor="'.concat(n,'"]')).getBoundingClientRect(),c=l.left-r.left,u=l.top-r.top,d=0,p=0;switch(t.posX){case"left":p=-1*(t.offsetX+17);break;case"right":p=r.width+t.offsetX}switch(t.posY){case"top":d=0+t.offsetY;break;case"bottom":d=r.height-17+t.offsetY;break;case"center":d=r.height/2-8.5+t.offsetY}o&&(o.style.position="absolute",o.style.top=d-u+"px",o.style.left=p-c+"px")}}}}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e,this.instance.start()),this.instance}}],n&&Re(t.prototype,n),o&&Re(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(Object(n),!0).forEach((function(t){ze(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,We(o.key),o)}}function ze(e,t,n){return(t=We(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function We(e){var t=function(e,t){if("object"!=_e(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=_e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_e(t)?t:String(t)}Ne(Be,"instance",void 0);var Ge=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ze(this,"apiUrl","https://api.gleap.io"),ze(this,"wsApiUrl","wss://ws.gleap.io"),ze(this,"sdkKey",null),ze(this,"updatingSession",!1),ze(this,"useCookies",!1),ze(this,"session",{gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0}),ze(this,"ready",!1),ze(this,"onSessionReadyListener",[]),ze(this,"setOnSessionReady",(function(e){t.ready?e():t.onSessionReadyListener.push(e)})),ze(this,"injectSession",(function(e){e&&t.session&&(e.setRequestHeader("Api-Token",t.sdkKey),e.setRequestHeader("Gleap-Id",t.session.gleapId),e.setRequestHeader("Gleap-Hash",t.session.gleapHash))})),ze(this,"clearSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t.session&&t.session.gleapHash&&hn.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash));try{I("session-".concat(t.sdkKey),null)}catch(r){}if(t.useCookies)try{!function(e){try{var t=S(window.location.host.split(":")[0]);document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; Domain="+t}catch(r){}}("session-".concat(t.sdkKey))}catch(r){}if(t.ready=!1,t.session={gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0},Bt.getInstance().sendMessage({name:"session-cleared"},!0),Co.getInstance().clearAllNotifications(!1),Co.getInstance().setNotificationCount(0),Ao.getInstance().removeBannerUI(),n&&!isNaN(e)){var o=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*o)}})),ze(this,"validateSession",(function(e){e&&e.gleapId&&(t.session&&t.session.gleapHash&&hn.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),I("session-".concat(t.sdkKey),e),t.useCookies&&function(e,t,n){try{var o="";if(n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3),o="; expires="+r.toUTCString()}var i=S(window.location.host.split(":")[0]);document.cookie=e+"="+(t||"")+o+"; path=/; domain="+i}catch(a){}}("session-".concat(t.sdkKey),encodeURIComponent(JSON.stringify(e)),365),t.session=e,t.ready=!0,t.session&&t.session.gleapHash&&hn.notifyEvent("register-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),t.notifySessionReady())})),ze(this,"startSession",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;try{if(t.useCookies){var n=function(e){try{for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var r=n[o];" "==r.charAt(0);)r=r.substring(1,r.length);if(0==r.indexOf(t))return r.substring(t.length,r.length)}}catch(i){}return null}("session-".concat(t.sdkKey));if(n){var o=JSON.parse(decodeURIComponent(n));t.validateSession(o)}}}catch(s){}if(!(t.session&&t.session.gleapId&&t.session.gleapId.length>0)){var r=C("session-".concat(t.sdkKey));r&&t.validateSession(r)}var i=t,a=new XMLHttpRequest;a.open("POST",i.apiUrl+"/sessions"),a.setRequestHeader("Content-Type","application/json;charset=UTF-8"),a.setRequestHeader("Api-Token",i.sdkKey);try{t.session&&t.session.gleapId&&t.session.gleapHash&&(a.setRequestHeader("Gleap-Id",t.session.gleapId),a.setRequestHeader("Gleap-Hash",t.session.gleapHash))}catch(s){}a.onreadystatechange=function(t){if(4===a.readyState)if(200===a.status||201===a.status)try{var n=JSON.parse(a.responseText);i.validateSession(n),Ye.getInstance().restart(),Be.getInstance().load()}catch(s){}else 429!==a.status&&i.clearSession(e,!0)},a.send(JSON.stringify({lang:lo.getInstance().getActiveLanguage()}))})),ze(this,"checkIfSessionNeedsUpdate",(function(e,n){if(!t.session||!t.session.userId||!e)return!0;try{if(t.session.userId.toString()!==e.toString())return!0}catch(o){}return t.checkIfSessionDataNeedsUpdate(n)})),ze(this,"checkIfSessionDataNeedsUpdate",(function(e){if(e)for(var n=Object.keys(e),o=0;o<n.length;o++){var r=n[o];if(JSON.stringify(t.session[r])!==JSON.stringify(e[r])&&(!t.session.customData||JSON.stringify(t.session.customData[r])!==JSON.stringify(e[r])))return!0}return!1})),ze(this,"updateSession",(function(e){if(t.checkIfSessionDataNeedsUpdate(e)){var n=t;return new Promise((function(o,r){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return r("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",n.apiUrl+"/sessions/partialupdate"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",n.sdkKey);try{t.setRequestHeader("Gleap-Id",n.session.gleapId),t.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(i){}t.onerror=function(){r()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var a=JSON.parse(t.responseText);n.validateSession(a),o(a)}catch(i){r(i)}else r()},t.send(JSON.stringify({data:Ue(Ue({},e),{},{lang:lo.getInstance().getActiveLanguage()}),type:"js",sdkVersion:"14.1.6",ws:!0}))}))}))}})),ze(this,"identifySession",(function(e,n,o){if(t.checkIfSessionNeedsUpdate(e,n)){var r=t;return new Promise((function(i,a){t.setOnSessionReady((function(){if(!r.session.gleapId||!r.session.gleapHash)return a("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",r.apiUrl+"/sessions/identify"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",r.sdkKey);try{t.setRequestHeader("Gleap-Id",r.session.gleapId),t.setRequestHeader("Gleap-Hash",r.session.gleapHash)}catch(l){}t.onerror=function(){a()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var n=JSON.parse(t.responseText);r.validateSession(n),Ye.getInstance().restart(),Be.getInstance().load(),i(n)}catch(l){a(l)}else a()};var s=Ue({},n);n.customData&&(delete s.customData,s=Ue(Ue({},s),n.customData)),t.send(JSON.stringify(Ue(Ue({},s),{},{userId:e,userHash:o,lang:lo.getInstance().getActiveLanguage()})))}))}))}})),ze(this,"startProductTourConfig",(function(e){var n=t;return new Promise((function(o,r){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return r("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",n.apiUrl+"/outbound/producttours"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",n.sdkKey);try{t.setRequestHeader("Gleap-Id",n.session.gleapId),t.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(i){}t.onerror=function(){r()},t.onreadystatechange=function(e){if(4===t.readyState)if(200===t.status||201===t.status)try{var n=JSON.parse(t.responseText);n&&n.config&&o(n.config)}catch(i){r(i)}else r()},t.send(JSON.stringify({outboundId:e}))}))}))}))}var t,n,o;return t=e,n=[{key:"getName",value:function(){try{return this.session.name?this.session.name.split(" ")[0].split("@")[0].split(".")[0].split("+")[0]:""}catch(e){return this.session.name}}},{key:"getSession",value:function(){return this.session}},{key:"getGleapId",value:function(){return this.session&&this.session.gleapId?this.session.gleapId:null}},{key:"isUser",value:function(){return!(!this.session||!this.session.userId)}},{key:"notifySessionReady",value:function(){if(this.onSessionReadyListener.length>0)for(var e=0;e<this.onSessionReadyListener.length;e++)this.onSessionReadyListener[e]();this.onSessionReadyListener=[],Bt.getInstance().sendSessionUpdate()}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&qe(t.prototype,n),o&&qe(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ve(e){return Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ve(e)}function Xe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ze(o.key),o)}}function Ke(e,t,n){return(t=Ze(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ze(e){var t=function(e,t){if("object"!=Ve(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Ve(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ve(t)?t:String(t)}ze(Ge,"instance",void 0);var Ye=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ke(this,"eventArray",[]),Ke(this,"streamedEventArray",[]),Ke(this,"eventMaxLength",500),Ke(this,"errorCount",0),Ke(this,"streamingEvents",!1),Ke(this,"lastUrl",void 0),Ke(this,"mainLoopTimeout",null),Ke(this,"socket",null),Ke(this,"connectedWebSocketGleapId",null),Ke(this,"connectionTimeout",null),Ke(this,"pingWS",null),Ke(this,"handleOpenBound",null),Ke(this,"handleErrorBound",null),Ke(this,"handleMessageBound",null),Ke(this,"handleCloseBound",null),Ke(this,"runEventStreamLoop",(function(){var e=t;t.streamEvents(),t.mainLoopTimeout=setTimeout((function(){e.runEventStreamLoop()}),2500)})),Ke(this,"streamEvents",(function(){if(!(!Ge.getInstance().ready||t.streamingEvents||t.errorCount>2)&&0!==t.streamedEventArray.length&&t.socket&&t.socket.readyState===t.socket.OPEN){var e=t;t.streamingEvents=!0;var n=new XMLHttpRequest;n.open("POST",Ge.getInstance().apiUrl+"/sessions/ping"),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),Ge.getInstance().injectSession(n),n.onerror=function(){e.errorCount++,e.streamingEvents=!1},n.onreadystatechange=function(t){4===n.readyState&&(200===n.status||201===n.status?e.errorCount=0:e.errorCount++,e.streamingEvents=!1)};var o=zt.getInstance().getSessionDuration();n.send(JSON.stringify({time:o,events:t.streamedEventArray,opened:Bt.getInstance().isOpened(),type:"js",sdkVersion:"14.1.6",ws:!0})),t.streamedEventArray=[]}})),this.handleOpenBound=this.handleOpen.bind(this),this.handleErrorBound=this.handleError.bind(this),this.handleMessageBound=this.handleMessage.bind(this),this.handleCloseBound=this.handleClose.bind(this)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"cleanupWebSocket",value:function(){this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=null),this.pingWS&&clearInterval(this.pingWS),this.socket&&(this.socket.removeEventListener("open",this.handleOpenBound),this.socket.removeEventListener("error",this.handleErrorBound),this.socket.removeEventListener("message",this.handleMessageBound),this.socket.removeEventListener("close",this.handleCloseBound),this.socket.close(),this.socket=null)}},{key:"initWebSocket",value:function(){this.cleanupWebSocket(),this.connectedWebSocketGleapId=Ge.getInstance().session.gleapId,Ge.getInstance().session&&Ge.getInstance().sdkKey&&(this.socket=new WebSocket("".concat(Ge.getInstance().wsApiUrl,"?gleapId=").concat(Ge.getInstance().session.gleapId,"&gleapHash=").concat(Ge.getInstance().session.gleapHash,"&apiKey=").concat(Ge.getInstance().sdkKey,"&sdkVersion=").concat("14.1.6")),this.socket.addEventListener("open",this.handleOpenBound),this.socket.addEventListener("message",this.handleMessageBound),this.socket.addEventListener("error",this.handleErrorBound),this.socket.addEventListener("close",this.handleCloseBound))}},{key:"handleOpen",value:function(e){var t=this;this.pingWS=setInterval((function(){t.socket.readyState===t.socket.OPEN&&(t.socket.send("PING"),t.socket.send(9))}),1e4),this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=null)}},{key:"handleMessage",value:function(e){this.processMessage(JSON.parse(e.data))}},{key:"handleError",value:function(e){}},{key:"handleClose",value:function(e){var t=this;setTimeout((function(){t.initWebSocket()}),5e3)}},{key:"processMessage",value:function(e){try{if("update"===e.name){var t=e.data,n=t.a,o=t.u;Bt.getInstance().isOpened()||(n&&Ar.getInstance().performActions(n),null!=o&&Co.getInstance().setNotificationCount(o))}}catch(r){}}},{key:"getEventArray",value:function(){return this.eventArray}},{key:"stop",value:function(){this.cleanupMainLoop()}},{key:"resetErrorCountLoop",value:function(){var e=this;setInterval((function(){e.errorCount=0}),6e4)}},{key:"cleanupMainLoop",value:function(){this.mainLoopTimeout&&(clearInterval(this.mainLoopTimeout),this.mainLoopTimeout=null)}},{key:"restart",value:function(){this.connectedWebSocketGleapId!==Ge.getInstance().session.gleapId&&this.initWebSocket(),this.cleanupMainLoop(),this.trackInitialEvents(),this.runEventStreamLoop()}},{key:"start",value:function(){this.startPageListener(),this.resetErrorCountLoop()}},{key:"trackInitialEvents",value:function(){e.getInstance().logEvent("sessionStarted"),e.getInstance().logCurrentPage()}},{key:"logCurrentPage",value:function(){if(!Ar.getInstance().disablePageTracking){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.logEvent("pageView",{page:e}))}}},{key:"startPageListener",value:function(){var e=this;setInterval((function(){e.logCurrentPage()}),1e3)}},{key:"logEvent",value:function(e,t){var n={name:e,date:new Date};t&&(n.data=x(t)),this.eventArray.push(n),this.streamedEventArray.push(n),this.eventArray.length>this.eventMaxLength&&this.eventArray.shift(),this.streamedEventArray.length>this.eventMaxLength&&this.streamedEventArray.shift()}}])&&Xe(t.prototype,n),o&&Xe(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Je(e){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(e)}function Qe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,et(o.key),o)}}function $e(e,t,n){return(t=et(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function et(e){var t=function(e,t){if("object"!=Je(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Je(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Je(t)?t:String(t)}Ke(Ye,"instance",void 0);var tt=function(e,t){var n=parseInt(e);return isNaN(n)?t:n},nt=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$e(this,"flowConfig",null),$e(this,"projectActions",null),$e(this,"onConfigLoadedListener",[]),$e(this,"aiTools",[]),$e(this,"onConfigLoaded",(function(e){null!==t.flowConfig?e():t.onConfigLoadedListener.push(e)})),$e(this,"setAiTools",(function(e){t.aiTools=e})),$e(this,"getAiTools",(function(){return t.aiTools})),$e(this,"start",(function(){var e=Ge.getInstance(),n=C("config-".concat(e.sdkKey,"-").concat(lo.getInstance().getActiveLanguage()));return n?(t.applyConfig(n),t.loadConfigFromServer().catch((function(e){})),Promise.resolve()):t.loadConfigFromServer()})),$e(this,"loadConfigFromServer",(function(){var e=t;return new Promise((function(t,n){var o=Ge.getInstance(),r=new XMLHttpRequest,i=lo.getInstance().getActiveLanguage();r.open("GET",o.apiUrl+"/config/"+o.sdkKey+"?lang="+i),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.injectSession(r),r.onerror=function(){n()},r.onreadystatechange=function(a){if(4===r.readyState){if(200===r.status||201===r.status)try{var s=JSON.parse(r.responseText);try{I("config-".concat(o.sdkKey,"-").concat(i),s)}catch(l){}return e.applyConfig(s),t()}catch(a){}n()}},r.send()}))}))}var t,n,o;return t=e,n=[{key:"getFlowConfig",value:function(){return this.flowConfig}},{key:"applyStylesFromConfig",value:function(){var e=this.flowConfig;Ar.setStyles(e.color?e.color:"#485BFF",e.headerColor?e.headerColor:"#485BFF",e.buttonColor?e.buttonColor:"#485BFF",e.backgroundColor?e.backgroundColor:"#FFFFFF",tt(e.borderRadius,20),tt(e.buttonX,20),tt(e.buttonY,20),e.feedbackButtonPosition)}},{key:"notifyConfigLoaded",value:function(){if(this.onConfigLoadedListener.length>0)for(var e=0;e<this.onConfigLoadedListener.length;e++)this.onConfigLoadedListener[e]();this.onConfigLoadedListener=[]}},{key:"applyConfig",value:function(e){try{var t=e.flowConfig;this.flowConfig=t,this.applyStylesFromConfig(),Bt.getInstance().sendConfigUpdate(),a.getInstance().updateFeedbackButtonState(),Co.getInstance().updateContainerStyle(),t.enableWebReplays?qn.getInstance().start():qn.getInstance().stop(),t.enableNetworkLogs&&b.getInstance().start(),b.getInstance().setLoadAllResources(!!t.sendNetworkResources),t.networkLogPropsToIgnore&&b.getInstance().setFilters(t.networkLogPropsToIgnore),t.networkLogBlacklist&&b.getInstance().setBlacklist(t.networkLogBlacklist),lo.getInstance().updateRTLSupport(),Ar.enableShortcuts(!!t.enableShortcuts),this.notifyConfigLoaded()}catch(n){}}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Qe(t.prototype,n),o&&Qe(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();$e(nt,"instance",void 0);var ot=["//fonts.googleapis.com","//cdn.jsdelivr.net","//cdnjs.cloudflare.com","//ajax.googleapis.com","//use.typekit.net",".amazonaws.com","//jssdk.gleap.io",".gstatic.com"];function rt(e){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rt(e)}function it(){it=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new M(o||[]);return r(a,"_invoke",{value:L(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="suspendedYield",h="executing",g="completed",m={};function v(){}function b(){}function y(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(A([])));k&&k!==n&&o.call(k,a)&&(w=k);var S=y.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function n(r,i,a,s){var l=d(e[r],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==rt(u)&&o.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var i;r(this,"_invoke",{value:function(e,o){function r(){return new t((function(t,r){n(e,o,t,r)}))}return i=i?i.then(r,r):r()}})}function L(t,n,o){var r=p;return function(i,a){if(r===h)throw new Error("Generator is already running");if(r===g){if("throw"===i)throw a;return{value:e,done:!0}}for(o.method=i,o.arg=a;;){var s=o.delegate;if(s){var l=T(s,o);if(l){if(l===m)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===p)throw r=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=h;var c=d(t,n,o);if("normal"===c.type){if(r=o.done?g:f,c.arg===m)continue;return{value:c.arg,done:o.done}}"throw"===c.type&&(r=g,o.method="throw",o.arg=c.arg)}}}function T(t,n){var o=n.method,r=t.iterator[o];if(r===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),m;var i=d(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function n(){for(;++r<t.length;)if(o.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(rt(t)+" is not iterable")}return b.prototype=y,r(S,"constructor",{value:y,configurable:!0}),r(y,"constructor",{value:b,configurable:!0}),b.displayName=c(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(I.prototype),c(I.prototype,s,(function(){return this})),t.AsyncIterator=I,t.async=function(e,n,o,r,i){void 0===i&&(i=Promise);var a=new I(u(e,n,o,r),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=A,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(o,r){return s.type="throw",s.arg=t,n.next=o,r&&(n.method="next",n.arg=e),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:A(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),m}},t}function at(e,t,n,o,r,i,a){try{var s=e[i](a),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(o,r)}function st(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function a(e){at(i,o,r,a,s,"next",e)}function s(e){at(i,o,r,a,s,"throw",e)}a(void 0)}))}}var lt=function(e){var t="",n=window.document.doctype;if(n&&(t="<!DOCTYPE "+n.name+(n.publicId?' PUBLIC "'+n.publicId+'"':"")+(!n.publicId&&n.systemId?" SYSTEM":"")+(n.systemId?' "'+n.systemId+'"':"")+">"),e&&e.childNodes&&e.childNodes.length>0)for(var o=0;o<e.childNodes.length;o++)e.childNodes[o]&&(t+=e.childNodes[o].outerHTML);return t},ct=function(e,t,n){return o=e,r=/url\((.*?)\)/g,i=function(e){return new Promise((function(o,r){if(!e)return o(e);var i=e.substr(4,e.length-5).replaceAll("'","").replaceAll('"',"");if(0===i.indexOf("http")||0===i.indexOf("//")||0===i.indexOf("data"))return o(e);try{var a=i;return t&&(a=new URL(i,t+"/").href),n?o("url("+a+")"):ut(a).then((function(e){return o("url("+e+")")}))}catch(s){return o(e)}}))},new Promise((function(e,t){var n=[];o.replace(r,(function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];var a=i.apply(void 0,[e].concat(o));n.push(a)})),Promise.all(n).then((function(t){e(o.replace(r,(function(){return t.shift()})))})).catch((function(){t()}))}));var o,r,i},ut=function(e){return new Promise((function(t,n){if(e){var o=new XMLHttpRequest;o.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.onerror=function(){n()},e.readAsDataURL(o.response)},o.onerror=function(e){t()},o.open("GET",e),o.responseType="blob",o.send()}else t()}))},dt=function(e){return new Promise((function(t,n){if(e&&e.src){if(function(e){if(!e)return!1;for(var t=0;t<ot.length;t++)if(-1!==e.indexOf(ot[t]))return!0;return!1}(e.src))return t();var o=new XMLHttpRequest;o.onload=function(){var n=new FileReader;n.onloadend=function(){!function(e,t,n,o){y(e,500,500).then((function(e){t.src=e,n()})).catch((function(){console.warn("BB: Image resize failed."),n()}))}(n.result,e,t)},n.onerror=function(){t()},n.readAsDataURL(o.response)},o.onerror=function(e){t()};var r=e.src;o.open("GET",r),o.responseType="blob",o.send()}else t()}))},pt=function(e,t,n,o){var r=null;t.ownerNode&&(r=e.querySelector('[bb-styleid="'+o+'"]'));try{if(r){var i=null;if(""!=n){var a=e.querySelector("head"),s=window.document.createElement("style");a.appendChild(s),s.type="text/css",s.styleSheet?s.styleSheet.cssText=n:s.appendChild(window.document.createTextNode(n)),i=s}else{var l=window.document.createElement("link");l.rel="stylesheet",l.type=t.type,l.href=t.href,l.media=t.media,i=l}i&&(r.parentNode.insertBefore(i,r),r.remove())}}catch(c){}},ft=function(e){var t=null;try{e.cssRules?t=e.cssRules:e.rules&&(t=e.rules)}catch(r){}var n="";if(t)for(var o in t)t[o].cssText&&(n+=t[o].cssText);return n},ht=function(e,t){for(var n,o=[],r=function(){var e=document.styleSheets[i];if(e.media&&"print"===e.media.mediaText)return 1;var r=ft(e);if(e&&e.ownerNode)if(""!=r){var a=document.getElementsByTagName("base");n=a.length?a[0].href.substr(location.origin.length,999):window.location.href.split(/[?#]/)[0],e.href&&(n=e.href);var s=n.substring(0,n.lastIndexOf("/"));o.push(ct(r,s,t).then((function(t){return{styletext:t,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}})))}else o.push(Promise.resolve({styletext:r,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}))},i=0;i<document.styleSheets.length;i++)r();return Promise.all(o).then((function(t){if(t)for(var n=0;n<t.length;n++)pt(e,t[n].stylesheet,t[n].styletext,t[n].styleId);return!0}))},gt=function(e,t){return new Promise((function(n,o){return t?ht(e,t).then((function(){n()})).catch((function(){n()})):function(e){for(var t=e.querySelectorAll("img"),n=[],o=0;o<t.length;o++){var r=t[o];n.push(dt(r))}return Promise.all(n)}(e).then((function(){return ht(e,t).then((function(){n()}))})).catch((function(){console.warn("Gleap: Failed with resolving local resources. Please contact the Gleap support team."),n()}))}))},mt=function(e,t,n){if(void 0!==e.adoptedStyleSheets)for(var o=0;o<e.adoptedStyleSheets.length;o++){var r=e.adoptedStyleSheets[o],i=ft(r),a=window.document.createElement("style");a.type="text/css",a.styleSheet?a.styleSheet.cssText=i:a.appendChild(window.document.createTextNode(i)),n&&a.setAttribute("bb-shadow-child",n),t.insertBefore(a,t.firstElementChild)}},vt=function(e){if(e&&"function"==typeof e.getAnimations){var t=e.getAnimations(),n={};return t.forEach((function(t){var o,r=(null===(o=t.effect)||void 0===o?void 0:o.getKeyframes())||[],i=r[r.length-1]||{};Object.keys(i).forEach((function(t){"offset"!==t&&(n[t]=getComputedStyle(e)[t])}))})),0===Object.keys(n).length?null:JSON.stringify(n)}return null},bt=function(){var e=st(it().mark((function e(t){var n,o,r,i;return it().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=1,o=function(){var e=st(it().mark((function e(t,r,i){var a,s,l,c,u,d,p,f,h;return it().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=function(){var e=st(it().mark((function e(t,n,r){return it().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=6;break}return e.next=3,o(t,n,r);case 3:t=!t.nextElementSibling||t.nextElementSibling.nextSibling!==t.nextSibling&&null!==t.nextSibling?t.nextSibling:t.nextElementSibling,e.next=0;break;case 6:case"end":return e.stop()}}),e)})));return function(t,n,o){return e.apply(this,arguments)}}(),s=t.cloneNode(),null!=(l=vt(t))&&s.setAttribute("bb-web-animations",l),void 0===s.setAttribute){e.next=20;break}if(i&&s.setAttribute("bb-shadow-child",i),!(t instanceof HTMLCanvasElement)){e.next=20;break}return e.prev=7,c=t.getBoundingClientRect(),e.next=11,y(t.toDataURL(),1400,1400);case 11:u=e.sent,s.setAttribute("bb-canvas-data",u),s.setAttribute("bb-canvas-height",c.height),s.setAttribute("bb-canvas-width",c.width),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(7),console.warn("Gleap: Failed to clone canvas data.",e.t0);case 20:if(t.nodeType==Node.ELEMENT_NODE&&("IFRAME"!=(d=t.tagName?t.tagName.toUpperCase():t.tagName)&&"VIDEO"!=d&&"EMBED"!=d&&"IMG"!=d&&"SVG"!=d||(p=t.getBoundingClientRect(),s.setAttribute("bb-element",!0),s.setAttribute("bb-height",p.height),s.setAttribute("bb-width",p.width)),(t.scrollTop>0||t.scrollLeft>0)&&(s.setAttribute("bb-scrollpos",!0),s.setAttribute("bb-scrolltop",t.scrollTop),s.setAttribute("bb-scrollleft",t.scrollLeft)),"SELECT"!==d&&"TEXTAREA"!==d&&"INPUT"!==d||(f=t.value,("value"===t.getAttribute("gleap-ignore")||t.classList.contains("gl-mask"))&&(f=new Array(f.length+1).join("*")),s.setAttribute("bb-data-value",f),"checkbox"!==t.type&&"radio"!==t.type||!t.checked||s.setAttribute("bb-data-checked",!0))),r.appendChild(s),!t.shadowRoot){e.next=29;break}return h=n,n++,e.next=27,a(t.shadowRoot.firstChild,s,h);case 27:mt(t.shadowRoot,s,h),void 0!==s.setAttribute&&s.setAttribute("bb-shadow-parent",h);case 29:return e.next=31,a(t.firstChild,s);case 31:case"end":return e.stop()}}),e,null,[[7,17]])})));return function(t,n,o){return e.apply(this,arguments)}}(),r=document.createDocumentFragment(),e.next=5,o(t,r);case 5:return(i=r.querySelector("head"))||(i=r),mt(window.document,i),e.abrupt("return",r);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),yt=function(e){return new Promise(function(){var t=st(it().mark((function t(n,o){var r,i,a,s,l,c,u,d,p,f,h,g,m,v,b;return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(r=window.document.querySelectorAll("style, link"),i=0;i<r.length;++i)r[i].setAttribute("bb-styleid",i);return t.next=4,bt(window.document.documentElement);case 4:for(a=t.sent,s=a.querySelectorAll("link[rel=import]"),i=0;i<s.length;++i)if((l=s[i])&&l.childNodes&&l.childNodes.length>0){for(c=l.childNodes;c.length>0;)l.parentNode.insertBefore(c[0],l);l.remove()}for(u=a.querySelectorAll("script, noscript"),i=0;i<u.length;++i)u[i].remove();for(d="",p=a.querySelectorAll("base"),i=0;i<p.length;++i)p[i].href&&(d=p[i].href),p[i].remove();for(f=window.location.href.substring(0,window.location.href.lastIndexOf("/")),h=f+"/",d&&(d.startsWith("http")?h=d:(h=f+d).endsWith("/")||(h+="/")),(g=window.document.createElement("base")).href=h,(m=a.querySelector("head")).insertBefore(g,m.firstChild),v=a.querySelectorAll(".bb-feedback-dialog-container, .bb-capture-editor-borderlayer"),i=0;i<v.length;++i)v[i].remove();for(b=a.querySelectorAll("[bb-element=true]"),i=0;i<b.length;++i)b[i]&&(b[i].style.height=b[i].getAttribute("bb-height")+"px");gt(a,e).then((function(){var e=lt(a);n({html:e,baseUrl:f,width:window.innerWidth,height:window.innerHeight,isMobile:w()})}));case 24:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())};function wt(e){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wt(e)}function xt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,St(o.key),o)}}function kt(e,t,n){return(t=St(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function St(e){var t=function(e,t){if("object"!=wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=wt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wt(t)?t:String(t)}var Ct=function(){function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),kt(this,"rerender",void 0),kt(this,"stream",void 0),kt(this,"mediaRecorder",void 0),kt(this,"audioMuted",!1),kt(this,"audioAvailable",!0),kt(this,"available",!0),kt(this,"isRecording",!1),kt(this,"file",null),kt(this,"maxRecordTime",120),kt(this,"recordTime",0),kt(this,"recordingTimer",null),kt(this,"permissionErrorText",""),kt(this,"startScreenRecording",(function(){var e=this;if(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia||this.isRecording)return this.available=!1,void this.rerender();navigator.mediaDevices.getDisplayMedia({video:{width:{ideal:Math.min(window.screen.width,3072)},height:{ideal:Math.min(window.screen.height,1728)},frameRate:{ideal:10,max:24},displaySurface:"monitor"},selfBrowserSurface:"include",audio:!0}).then((function(t){e.stream=t,e.audioMuted?(e.audioAvailable=!1,e.handleRecord({stream:t})):e.startAudioRecording(),e.rerender()})).catch((function(t){window.alert(e.permissionErrorText),e.rerender()}))})),kt(this,"stopScreenRecording",(function(){this.mediaRecorder&&this.stream&&this.isRecording&&(this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null),this.mediaRecorder.stop(),this.stream.getTracks().forEach((function(e){e.stop()})),this.rerender())})),kt(this,"startAudioRecording",(function(){var e=this;this.stream&&navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then((function(t){for(var n=0;n<t.getAudioTracks().length;n++)e.stream.addTrack(t.getAudioTracks()[n]);e.audioMuted=!1,e.audioAvailable=!0,e.handleRecord({stream:e.stream}),e.rerender()})).catch((function(t){e.audioAvailable=!1,e.handleRecord({stream:e.stream}),e.rerender()}))})),kt(this,"toggleAudio",(function(){if(this.audioMuted=!this.audioMuted,this.rerender(),this.stream)for(var e=this.stream.getAudioTracks(),t=0;t<e.length;t++){e[t].enabled=!this.audioMuted}})),kt(this,"clearPreview",(function(){document.querySelector(".bb-capture-preview video").src=null,this.file=null,this.rerender()})),kt(this,"handleRecord",(function(e){var t=e.stream,n=this,o=[];this.mediaRecorder=new MediaRecorder(t,{mimeType:this.getSupportedMimeType()}),this.isRecording=!0,this.recordTime=0;var r=document.querySelector(".bb-capture-toolbar-item-timer");this.recordingTimer=setInterval((function(){n.recordTime++;var e=n.maxRecordTime-n.recordTime;e>0?r.innerHTML=n.formatTime(e):(r.innerHTML="2:00",n.stopScreenRecording())}),1e3),this.mediaRecorder.ondataavailable=function(e){e.data.size>0&&o.push(e.data)},t.getVideoTracks()[0].onended=function(){n.prepareRecording(o)},this.mediaRecorder.onstop=function(){n.prepareRecording(o)},this.mediaRecorder.start(200),n.rerender()})),kt(this,"prepareRecording",(function(e){var t=new Blob(e,{type:this.getSupportedMimeType()}),n=this.getSupportedMimeType(),o=n.includes("mp4")?"mp4":"webm";this.file=new File([t],"screen-recording.".concat(o),{type:n});var r=document.querySelector(".bb-capture-preview video");r&&(r.src=URL.createObjectURL(t),this.audioAvailable=!0,this.isRecording=!1,this.rerender())})),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){o.rerender()}),100)}var t,n,o;return t=e,(n=[{key:"getSupportedMimeType",value:function(){for(var e=0,t=["video/webm","audio/webm","video/webm;codecs=vp8","video/webm;codecs=daala","video/webm;codecs=h264","audio/webm;codecs=opus","video/mp4"];e<t.length;e++){var n=t[e];if(MediaRecorder.isTypeSupported(n))return n}return"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9<e?":":":0")+e}}])&&xt(t.prototype,n),o&&xt(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function It(e){return It="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},It(e)}function Lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lt(Object(n),!0).forEach((function(t){Et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ot(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Mt(o.key),o)}}function Et(e,t,n){return(t=Mt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mt(e){var t=function(e,t){if("object"!=It(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=It(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==It(t)?t:String(t)}kt(Ct,"uploadScreenRecording",(function(e){return new Promise((function(t,n){null==e&&t(null);var o=new XMLHttpRequest;o.open("POST",Ge.getInstance().apiUrl+"/uploads/sdk"),Ge.getInstance().injectSession(o);var r=new FormData;r.append("file",e),o.send(r),o.onerror=function(){n()},o.onreadystatechange=function(){4==o.readyState&&(200==o.status?t(JSON.parse(o.response).fileUrl):n())}}))}));var At=function(){function e(t,n,o,r,i,a,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Et(this,"excludeData",{}),Et(this,"type","BUG"),Et(this,"priority","LOW"),Et(this,"customData",{}),Et(this,"ticketAttributes",{}),Et(this,"metaData",{}),Et(this,"consoleLog",[]),Et(this,"networkLogs",[]),Et(this,"customEventLog",[]),Et(this,"formData",{}),Et(this,"isSilent",!1),Et(this,"outboundId",void 0),Et(this,"screenshotData",void 0),Et(this,"webReplay",void 0),Et(this,"screenRecordingUrl",void 0),Et(this,"spamToken",void 0),this.type=t,this.priority=n,this.formData=o,this.isSilent=r,this.excludeData=i,this.outboundId=a,this.spamToken=s}var t,n,o;return t=e,n=[{key:"takeSnapshot",value:function(){var e=this,t=Ar.getInstance();this.customData=cn.getInstance().getCustomData(),this.metaData=zt.getInstance().getMetaData(),this.consoleLog=Yt.getInstance().getLogs(),this.networkLogs=b.getInstance().getRequests(),this.customEventLog=Ye.getInstance().getEventArray(),this.ticketAttributes=cn.getInstance().getTicketAttributes();var n=[],o=t.getGlobalDataItem("webReplay");null!==o&&(this.webReplay=o);var r,i=t.getGlobalDataItem("screenRecordingData");if(null!=i){var a=Ct.uploadScreenRecording(i).then((function(t){t&&(e.screenRecordingUrl=t)}));n.push(a)}if(!this.excludeData||!this.excludeData.screenshot){var s=(r=t.isLiveMode(),yt(r)).then((function(n){if(n){var o=t.getGlobalDataItem("snapshotPosition");n.x=o.x,n.y=o.y,e.screenshotData=n}}));n.push(s)}return Promise.all(n)}},{key:"getData",value:function(){var e={type:this.type,priority:this.priority,customData:this.customData,metaData:this.metaData,consoleLog:this.consoleLog,networkLogs:this.networkLogs,customEventLog:this.customEventLog,formData:Tt(Tt({},this.ticketAttributes),this.formData),isSilent:this.isSilent,outbound:this.outboundId,screenshotData:this.screenshotData,webReplay:this.webReplay,screenRecordingUrl:this.screenRecordingUrl,spamToken:this.spamToken},t=Uo.getInstance().getTags();if(t&&t.length>0&&(e.tags=t),this.excludeData)for(var n=Object.keys(this.excludeData),o=0;o<n.length;o++){var r=n[o];!0===this.excludeData[r]&&(e[r]&&delete e[r],"screenshot"===r&&delete e.screenshotData,"replays"===r&&delete e.webReplay)}return e}},{key:"getTicketData",value:function(){var e=this;return new Promise((function(t,n){e.takeSnapshot().then((function(){var n=e.getData();t(n)})).catch((function(e){console.log("Failed to take snapshot",e),n()}))}))}},{key:"sendFeedback",value:function(){var e=this;return new Promise((function(t,n){e.takeSnapshot().then((function(){var o=e.getData(),r=new XMLHttpRequest;r.open("POST",Ge.getInstance().apiUrl+"/bugs/v2"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),Ge.getInstance().injectSession(r),r.onerror=function(e){n()},r.onreadystatechange=function(e){if(4===r.readyState)if(200===r.status||201===r.status)try{var o=JSON.parse(r.responseText);t(o)}catch(i){n()}else n()},r.send(JSON.stringify(o))})).catch((function(e){console.log("Failed to take snapshot",e),n()}))}))}}],n&&Ot(t.prototype,n),o&&Ot(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Pt(e){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(e)}function Rt(e){return function(e){if(Array.isArray(e))return Nt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nt(e,t)}(e)||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 Nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Dt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ft(o.key),o)}}function jt(e,t,n){return(t=Ft(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ft(e){var t=function(e,t){if("object"!=Pt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Pt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pt(t)?t:String(t)}var Bt=function(){function e(){var t=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),jt(this,"frameUrl","https://messenger-app.gleap.io"),jt(this,"gleapFrameContainer",null),jt(this,"gleapFrame",null),jt(this,"comReady",!1),jt(this,"injectedFrame",!1),jt(this,"widgetOpened",!1),jt(this,"listeners",[]),jt(this,"appMode","widget"),jt(this,"markerManager",void 0),jt(this,"escListener",void 0),jt(this,"frameHeight",0),jt(this,"queue",[]),jt(this,"urlHandler",(function(e,t){if(e&&e.length>0)if(t){var n=window.open(e,"_blank");!n||n.closed||void 0===n.closed?window.location.href=e:n.focus()}else window.location.href=e})),jt(this,"autoWhiteListCookieManager",(function(){window&&window.cmp_block_ignoredomains&&window.cmp_block_ignoredomains.concat(["messenger-app.gleap.io"])})),jt(this,"injectFrame",(function(){t.injectedFrame||(t.injectedFrame=!0,t.autoWhiteListCookieManager(),L((function(){nt.getInstance().onConfigLoaded((function(){nt.getInstance().applyStylesFromConfig();var e=document.createElement("div");e.className="gleap-frame-container gleap-frame-container--hidden gl-block",e.innerHTML='<div class="gleap-frame-container-inner"><iframe src="'.concat(t.frameUrl,'" class="gleap-frame" scrolling="yes" allow="autoplay; encrypted-media; fullscreen; microphone *;" frameborder="0"></iframe></div>'),document.body.appendChild(e),t.gleapFrameContainer=e,t.gleapFrame=document.querySelector(".gleap-frame"),t.updateFrameStyle(),"widget"===t.appMode&&t.showFrameContainer(!0)}))})))})),jt(this,"showImage",(function(e){L((function(){var t=document.createElement("div");t.className="gleap-image-view",t.innerHTML='<div class="gleap-image-view-close">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm97.9-320l-17 17-47 47 47 47 17 17L320 353.9l-17-17-47-47-47 47-17 17L158.1 320l17-17 47-47-47-47-17-17L192 158.1l17 17 47 47 47-47 17-17L353.9 192z"/></svg>\n </div><img class="gleap-image-view-image" src="'.concat(e,'" />'),document.body.appendChild(t);var n=function(){t.remove()};t.querySelector(".gleap-image-view-close").addEventListener("click",(function(){n()})),t.addEventListener("click",(function(e){e.target===t&&n()}))}))})),jt(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--extended",o="gleap-frame-container--survey-full",r="gleap-frame-container--classic",i="gleap-frame-container--classic-left",s="gleap-frame-container--modern-left",l="gleap-frame-container--no-button",c=[r,i,n,s,l,e,o],u=0;u<c.length;u++)t.gleapFrameContainer.classList.remove(c[u]);var d=void 0,p=nt.getInstance().getFlowConfig();p.feedbackButtonPosition!==a.FEEDBACK_BUTTON_CLASSIC&&p.feedbackButtonPosition!==a.FEEDBACK_BUTTON_CLASSIC_BOTTOM||(d=r),p.feedbackButtonPosition===a.FEEDBACK_BUTTON_CLASSIC_LEFT&&(d=i),p.feedbackButtonPosition===a.FEEDBACK_BUTTON_BOTTOM_LEFT&&(d=s),null===a.getInstance().buttonHidden?p.feedbackButtonPosition===a.FEEDBACK_BUTTON_NONE&&(d=l):a.getInstance().buttonHidden&&(d=l),d&&t.gleapFrameContainer.classList.add(d),"survey"===t.appMode&&t.gleapFrameContainer.classList.add(e),"survey_full"!==t.appMode&&"survey_web"!==t.appMode||t.gleapFrameContainer.classList.add(o),"extended"===t.appMode&&t.gleapFrameContainer.classList.add(n),t.gleapFrameContainer.setAttribute("dir",lo.getInstance().isRTLLayout?"rtl":"ltr")}})),this.startCommunication(),"undefined"!=typeof window){var n=function(){try{document.documentElement.style.setProperty("--glvh",.01*window.innerHeight+"px")}catch(e){}};try{window.addEventListener("resize",n),n()}catch(o){}}}var t,n,o;return t=e,n=[{key:"setUrlHandler",value:function(e){this.urlHandler=e}},{key:"isSurvey",value:function(){return"survey"===this.appMode||"survey_full"===this.appMode||"survey_web"===this.appMode}},{key:"setAppMode",value:function(e){this.appMode=e,this.updateFrameStyle();var t=document.querySelector(".gleap-frame-container-inner");"widget"!==this.appMode&&"survey_full"!==this.appMode&&"survey_web"!==this.appMode||!t||(t.style.maxHeight="".concat(700,"px"))}},{key:"registerEscListener",value:function(){var e=this;this.escListener||(this.escListener=function(t){"Escape"===(t=t||window.event).key&&e.hideWidget()},document.addEventListener("keydown",this.escListener))}},{key:"unregisterEscListener",value:function(){this.escListener&&(document.removeEventListener("keydown",this.escListener),this.escListener=null)}},{key:"destroy",value:function(){this.gleapFrame&&this.gleapFrame.remove(),this.gleapFrameContainer&&this.gleapFrameContainer.remove(),this.injectedFrame=!1,this.widgetOpened=!1,this.markerManager=void 0,this.gleapFrameContainer=null,this.gleapFrame=null}},{key:"isOpened",value:function(){return this.widgetOpened||null!=this.markerManager}},{key:"showFrameContainer",value:function(e){var t=this;if(this.gleapFrameContainer){var n=nt.getInstance().getFlowConfig(),o="gleap-frame-container--loading";this.gleapFrameContainer.classList&&(this.gleapFrameContainer.classList.remove("gleap-frame-container--hidden"),e?(this.gleapFrameContainer.classList.add(o),n.disableBGFade&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nofade"),n.disableBGGradient&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nogradient")):this.gleapFrameContainer.classList.remove(o),setTimeout((function(){t.gleapFrameContainer.classList.add("gleap-frame-container--animate")}),500)),this.widgetOpened=!0,this.updateUI()}}},{key:"runWidgetShouldOpenCallback",value:function(){this.gleapFrameContainer&&(this.workThroughQueue(),Ar.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),this.showFrameContainer(!1),this.updateWidgetStatus(),hn.notifyEvent("open"),this.registerEscListener())}},{key:"updateUI",value:function(){Co.getInstance().clearAllNotifications(this.isSurvey()),Co.getInstance().setNotificationCount(0),a.getInstance().updateFeedbackButtonState()}},{key:"showWidget",value:function(){var t=this;setTimeout((function(){t.gleapFrameContainer?t.runWidgetShouldOpenCallback():e.getInstance().injectFrame(),t.updateUI()}),0)}},{key:"updateWidgetStatus",value:function(){this.sendMessage({name:"widget-status-update",data:{isWidgetOpen:this.widgetOpened}})}},{key:"hideMarkerManager",value:function(){this.markerManager&&(this.markerManager.clear(),this.markerManager=null)}},{key:"hideWidget",value:function(){"survey_web"!==this.appMode&&(this.hideMarkerManager(),this.gleapFrameContainer&&(this.gleapFrameContainer.classList.add("gleap-frame-container--hidden"),this.gleapFrameContainer.classList.remove("gleap-frame-container--animate")),this.widgetOpened=!1,this.updateWidgetStatus(),a.getInstance().updateFeedbackButtonState(),hn.notifyEvent("close"),Co.getInstance().reloadNotificationsFromCache(),this.unregisterEscListener(),"undefined"!=typeof window&&void 0!==window.focus&&window.focus())}},{key:"sendMessage",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{this.gleapFrame=document.querySelector(".gleap-frame"),this.comReady&&this.gleapFrame&&this.gleapFrame.contentWindow?this.gleapFrame.contentWindow.postMessage(JSON.stringify(e),"*"):t&&this.queue.push(e)}catch(n){}}},{key:"sendSessionUpdate",value:function(){this.sendMessage({name:"session-update",data:{sessionData:Ge.getInstance().getSession(),apiUrl:Ge.getInstance().apiUrl,sdkKey:Ge.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.sendMessage({name:"config-update",data:{config:nt.getInstance().getFlowConfig(),aiTools:nt.getInstance().getAiTools(),overrideLanguage:lo.getInstance().getOverrideLanguage()}}),this.updateFrameStyle()}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new oo(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){var e=Rt(this.queue);this.queue=[];for(var t=0;t<e.length;t++)this.sendMessage(e[t],!0)}},{key:"startCommunication",value:function(){var e=this;this.addMessageListener((function(t){if("ping"===t.name&&(e.comReady=!0,e.sendConfigUpdate(),e.sendSessionUpdate(),e.workThroughQueue(),setTimeout((function(){e.runWidgetShouldOpenCallback()}),300)),"play-ping"===t.name&&jo.ping(),"open-image"===t.name&&e.showImage(t.data.url),"page-changed"===t.name&&(!t.data||"newsdetails"!==t.data.name&&"appextended"!==t.data.name?"extended"===e.appMode&&e.setAppMode("widget"):e.setAppMode("extended")),"collect-ticket-data"===t.name){var n={customData:cn.getInstance().getCustomData(),metaData:zt.getInstance().getMetaData(),consoleLog:Yt.getInstance().getLogs(),networkLogs:b.getInstance().getRequests(),customEventLog:Ye.getInstance().getEventArray(),formData:cn.getInstance().getTicketAttributes()},o=Uo.getInstance().getTags();o&&o.length>0&&(n.tags=o),e.sendMessage({name:"collect-ticket-data",data:n})}if("height-update"===t.name){e.frameHeight=t.data;var r=document.querySelector(".gleap-frame-container-inner");"survey"!==e.appMode&&"survey_full"!==e.appMode&&"survey_web"!==e.appMode||!r||(r.style.maxHeight="".concat(e.frameHeight,"px"))}if("notify-event"===t.name&&hn.notifyEvent(t.data.type,t.data.data),"cleanup-drawings"===t.name&&e.hideMarkerManager(),"open-url"===t.name){var i=t.data,a=!!t.newTab;e.urlHandler(i,a)}if("run-custom-action"===t.name&&xn.triggerCustomAction(t.data,{shareToken:t.shareToken}),"close-widget"===t.name&&e.hideWidget(),"tool-execution"===t.name&&hn.notifyEvent("tool-execution",t.data),"send-feedback"===t.name){var s=t.data.formData,l=t.data.action,c=t.data.outboundId,u=t.data.spamToken;new At(l.feedbackType,"MEDIUM",s,!1,l.excludeData,c,u).sendFeedback().then((function(t){if(e.sendMessage({name:"feedback-sent",data:t}),hn.notifyEvent("feedback-sent",s),c&&c.length>0){hn.notifyEvent("outbound-sent",{outboundId:c,outbound:l,formData:s});try{delete s.reportedBy}catch(n){}Ar.trackEvent("outbound-".concat(c,"-submitted"),s)}})).catch((function(t){e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),hn.notifyEvent("error-while-sending")}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl||t.origin===Ao.getInstance().bannerUrl)try{for(var n=JSON.parse(t.data),o=0;o<e.listeners.length;o++)e.listeners[o]&&e.listeners[o](n)}catch(r){}}))}},{key:"addMessageListener",value:function(e){this.listeners.push(e)}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Dt(t.prototype,n),o&&Dt(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function _t(e){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_t(e)}function Ht(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,qt(o.key),o)}}function Ut(e,t,n){return(t=qt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qt(e){var t=function(e,t){if("object"!=_t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=_t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_t(t)?t:String(t)}jt(Bt,"instance",void 0);var zt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ut(this,"sessionStart",new Date),Ut(this,"appBuildNumber",""),Ut(this,"appVersionCode",""),Ut(this,"environment","prod")}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"setAppVersionCode",value:function(e){this.getInstance().appVersionCode=e}},{key:"setAppBuildNumber",value:function(e){this.getInstance().appBuildNumber=e}}],(n=[{key:"getSessionDuration",value:function(){var e=new Date;return Math.round((e.getTime()-this.sessionStart.getTime())/1e3)}},{key:"getMetaData",value:function(){var e,t,n,o=navigator.userAgent,r=navigator.appName,i=""+parseFloat(navigator.appVersion),a=parseInt(navigator.appVersion,10);-1!==(t=o.indexOf("Opera"))?(r="Opera",i=o.substring(t+6),-1!==(t=o.indexOf("Version"))&&(i=o.substring(t+8))):-1!==(t=o.indexOf("MSIE"))?(r="Microsoft Internet Explorer",i=o.substring(t+5)):-1!==(t=o.indexOf("Chrome"))?(r="Chrome",i=o.substring(t+7)):-1!==(t=o.indexOf("Safari"))?(r="Safari",i=o.substring(t+7),-1!==(t=o.indexOf("Version"))&&(i=o.substring(t+8))):-1!==(t=o.indexOf("Firefox"))?(r="Firefox",i=o.substring(t+8)):(e=o.lastIndexOf(" ")+1)<(t=o.lastIndexOf("/"))&&(r=o.substring(e,t),i=o.substring(t+1),r.toLowerCase()===r.toUpperCase()&&(r=navigator.appName)),-1!==(n=i.indexOf(";"))&&(i=i.substring(0,n)),-1!==(n=i.indexOf(" "))&&(i=i.substring(0,n)),a=parseInt(""+i,10),isNaN(a)&&(i=""+parseFloat(navigator.appVersion),a=parseInt(navigator.appVersion,10));var s="Unknown OS";return-1!==navigator.appVersion.indexOf("Win")&&(s="Windows"),-1!==navigator.appVersion.indexOf("Mac")&&(s="MacOS"),-1!==navigator.appVersion.indexOf("X11")&&(s="UNIX"),-1!==navigator.appVersion.indexOf("Linux")&&(s="Linux"),-1!==navigator.appVersion.indexOf("iPad")&&(s="iPad"),-1!==navigator.appVersion.indexOf("iPhone")&&(s="iPhone"),-1!==navigator.appVersion.indexOf("Android")&&(s="Android"),{browserName:r+"("+i+")",userAgent:o,browser:r,systemName:s,buildVersionNumber:this.appBuildNumber,releaseVersionNumber:this.appVersionCode,sessionDuration:this.getSessionDuration(),devicePixelRatio:window.devicePixelRatio,screenWidth:window.screen.width,screenHeight:window.screen.height,innerWidth:window.innerWidth,innerHeight:window.innerHeight,currentUrl:window.location.href,language:navigator.language||navigator.userLanguage,mobile:w(),sdkVersion:"14.1.6",sdkType:"javascript",environment:this.environment}}}])&&Ht(t.prototype,n),o&&Ht(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Wt(e){return Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wt(e)}function Gt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Vt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(n),!0).forEach((function(t){Kt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Zt(o.key),o)}}function Kt(e,t,n){return(t=Zt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){var t=function(e,t){if("object"!=Wt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Wt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Wt(t)?t:String(t)}Ut(zt,"instance",void 0);var Yt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Kt(this,"logArray",[]),Kt(this,"disabled",!1),Kt(this,"originalConsoleLog",void 0),Kt(this,"logMaxLength",500)}var t,n,o;return t=e,n=[{key:"getLogs",value:function(){return this.logArray}},{key:"stop",value:function(){this.disabled=!0,this.originalConsoleLog&&(window.console=this.originalConsoleLog)}},{key:"addLog",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";!e||e.length<=0||(this.logArray.push({log:k(e,1e3),date:new Date,priority:t}),this.logArray.length>this.logMaxLength&&this.logArray.shift())}},{key:"addLogWithArgs",value:function(e,t){if(e&&!(e.length<=0)){var n="";try{for(var o=0;o<e.length;o++)n+=e[o]+" "}catch(r){}this.addLog(n,t)}}},{key:"start",value:function(){if(!this.disabled){var e,t=this;window.console=(e=window.console,window.console&&e||(e={}),t.originalConsoleLog=e,Vt(Vt({},e),{},{log:function(){t.addLogWithArgs(arguments,"INFO"),e.log&&e.log.apply(e,arguments)},warn:function(){t.addLogWithArgs(arguments,"WARNING"),e.warn&&e.warn.apply(e,arguments)},error:function(){t.addLogWithArgs(arguments,"ERROR"),e.error&&e.error.apply(e,arguments)},info:function(n){t.addLogWithArgs(arguments,"INFO"),e.info&&e.info.apply(e,arguments)}}))}}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Xt(t.prototype,n),o&&Xt(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Jt(e){return Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jt(e)}function Qt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,$t(o.key),o)}}function $t(e){var t=function(e,t){if("object"!=Jt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Jt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jt(t)?t:String(t)}Kt(Yt,"instance",void 0);var en,tn,nn,on=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,n=[{key:"start",value:function(){document.addEventListener("click",(function(e){if(e.target){if("A"===e.target.tagName&&"gleap:"===e.target.protocol){e.preventDefault();var t=e.target.href;Mr(t)}Bt.getInstance().isOpened()||Yt.getInstance().addLog(function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=k(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),o="",r="";if(void 0!==e.getAttribute){var i=e.getAttribute("id");i&&(o=' id="'.concat(i,'"'));var a=e.getAttribute("class");a&&(r=' class="'.concat(a,'"'))}var s=(e.tagName||"").toLowerCase(),l="<",c=">";return t||(l="[",c="]"),"".concat(l).concat(s).concat(o).concat(r).concat(c).concat(n).concat(l,"/").concat(s).concat(c)}(e.target),"CLICK")}}))}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Qt(t.prototype,n),o&&Qt(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}function an(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ln(o.key),o)}}function sn(e,t,n){return(t=ln(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ln(e){var t=function(e,t){if("object"!=rn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=rn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rn(t)?t:String(t)}en=on,nn=void 0,(tn=$t(tn="instance"))in en?Object.defineProperty(en,tn,{value:nn,enumerable:!0,configurable:!0,writable:!0}):en[tn]=nn;var cn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),sn(this,"customData",{}),sn(this,"ticketAttributes",{})}var t,n,o;return t=e,n=[{key:"getCustomData",value:function(){return this.customData}},{key:"attachCustomData",value:function(e){this.customData=Object.assign(this.customData,x(e))}},{key:"setCustomData",value:function(e,t){this.customData[e]=t}},{key:"removeCustomData",value:function(e){delete this.customData[e]}},{key:"clearCustomData",value:function(){this.customData={}}},{key:"setTicketAttribute",value:function(e,t){this.ticketAttributes[e]=t}},{key:"unsetTicketAttribute",value:function(e){delete this.ticketAttributes[e]}},{key:"clearTicketAttributes",value:function(){this.ticketAttributes={}}},{key:"getTicketAttributes",value:function(){return this.ticketAttributes}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&an(t.prototype,n),o&&an(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function un(e){return un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},un(e)}function dn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,fn(o.key),o)}}function pn(e,t,n){return(t=fn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fn(e){var t=function(e,t){if("object"!=un(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=un(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==un(t)?t:String(t)}sn(cn,"instance",void 0);var hn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),pn(this,"eventListeners",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"notifyEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("flow-started"===e){var n=Ar.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var o=this.getInstance().eventListeners[e];if(o)for(var r=0;r<o.length;r++){var i=o[r];i&&i(t)}}},{key:"on",value:function(e,t){var n=this.getInstance();n.eventListeners[e]||(n.eventListeners[e]=[]),n.eventListeners[e].push(t)}}],(n=null)&&dn(t.prototype,n),o&&dn(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function gn(e){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gn(e)}function mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function vn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){yn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,wn(o.key),o)}}function yn(e,t,n){return(t=wn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wn(e){var t=function(e,t){if("object"!=gn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=gn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==gn(t)?t:String(t)}pn(hn,"instance",void 0);var xn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),yn(this,"customActionCallbacks",[])}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"registerCustomAction",value:function(e){var t=this.getInstance();t.customActionCallbacks&&t.customActionCallbacks.push(e)}},{key:"triggerCustomAction",value:function(e,t){var n=this.getInstance();if(n.customActionCallbacks)for(var o=0;o<n.customActionCallbacks.length;o++){var r=n.customActionCallbacks[o];r&&r(vn({name:e},t||{}))}}}],(n=null)&&bn(t.prototype,n),o&&bn(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function kn(){kn=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,o){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new M(o||[]);return r(a,"_invoke",{value:L(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="suspendedYield",h="executing",g="completed",m={};function v(){}function b(){}function y(){}var w={};c(w,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(A([])));k&&k!==n&&o.call(k,a)&&(w=k);var S=y.prototype=v.prototype=Object.create(w);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function n(r,i,a,s){var l=d(e[r],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==Pn(u)&&o.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(l.arg)}var i;r(this,"_invoke",{value:function(e,o){function r(){return new t((function(t,r){n(e,o,t,r)}))}return i=i?i.then(r,r):r()}})}function L(t,n,o){var r=p;return function(i,a){if(r===h)throw new Error("Generator is already running");if(r===g){if("throw"===i)throw a;return{value:e,done:!0}}for(o.method=i,o.arg=a;;){var s=o.delegate;if(s){var l=T(s,o);if(l){if(l===m)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===p)throw r=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=h;var c=d(t,n,o);if("normal"===c.type){if(r=o.done?g:f,c.arg===m)continue;return{value:c.arg,done:o.done}}"throw"===c.type&&(r=g,o.method="throw",o.arg=c.arg)}}}function T(t,n){var o=n.method,r=t.iterator[o];if(r===e)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),m;var i=d(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,m;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,m):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function M(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function A(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function n(){for(;++r<t.length;)if(o.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(Pn(t)+" is not iterable")}return b.prototype=y,r(S,"constructor",{value:y,configurable:!0}),r(y,"constructor",{value:b,configurable:!0}),b.displayName=c(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,c(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},C(I.prototype),c(I.prototype,s,(function(){return this})),t.AsyncIterator=I,t.async=function(e,n,o,r,i){void 0===i&&(i=Promise);var a=new I(u(e,n,o,r),i);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(S),c(S,l,"Generator"),c(S,a,(function(){return this})),c(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var o in t)n.push(o);return n.reverse(),function e(){for(;n.length;){var o=n.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=A,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(o,r){return s.type="throw",s.arg=t,n.next=o,r&&(n.method="next",n.arg=e),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:A(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),m}},t}function Sn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}(e,t)||Ln(e,t)||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 Cn(e){return function(e){if(Array.isArray(e))return Tn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ln(e)||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 In(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ln(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Ln(e,t){if(e){if("string"==typeof e)return Tn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tn(e,t):void 0}}function Tn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function On(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function En(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,An(o.key),o)}}function Mn(e,t,n){return t&&En(e.prototype,t),n&&En(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function An(e){var t=function(e,t){if("object"!=Pn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Pn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pn(t)?t:String(t)}function Pn(e){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(e)}yn(xn,"instance",void 0);var Rn=function(){var e,t;function n(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function o(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function r(e){try{var t=e.rules||e.cssRules;return t?function(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}(Array.from(t).map(i).join("")):null}catch(n){return null}}function i(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=r(e.styleSheet)||t}catch(n){}return t}(t=e||(e={}))[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment";var a=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var n=this.getNode(e);if(n){var o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(t,o)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function s(e){var t=e.maskInputOptions,n=e.tagName,o=e.type,r=e.value,i=e.maskInputFn,a=r||"";return(t[n.toLowerCase()]||t[o])&&(a=i?i(a):"*".repeat(a.length)),a}var l="__rrweb_original__";var c=1,u=new RegExp("[^a-z0-9-_:]"),d=-2;function p(){return c++}var f,h,g=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,m=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,v=/^(data:)([^,]*),(.*)/i;function b(e,t){return(e||"").replace(g,(function(e,n,o,r,i,a){var s=o||i||a,l=n||r||"";if(!s)return e;if(!m.test(s)||v.test(s))return"url(".concat(l).concat(s).concat(l,")");if("/"===s[0])return"url(".concat(l).concat(function(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}(t)+s).concat(l,")");var c=t.split("/"),u=s.split("/");c.pop();for(var d=0,p=u;d<p.length;d++){var f=p[d];"."!==f&&(".."===f?c.pop():c.push(f))}return"url(".concat(l).concat(c.join("/")).concat(l,")")}))}var y=/^[^ \t\n\r\u000c]+/,w=/^[, \t\n\r\u000c]+/;function x(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function k(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function S(){var e=document.createElement("a");return e.href="",e.href}function C(e,t,n,o){return"src"===n||"href"===n&&o&&("use"!==t||"#"!==o[0])||"xlink:href"===n&&o&&"#"!==o[0]||"background"===n&&o&&("table"===t||"td"===t||"th"===t)?x(e,o):"srcset"===n&&o?function(e,t){if(""===t.trim())return t;var n=0;function o(e){var o,r=e.exec(t.substring(n));return r?(o=r[0],n+=o.length,o):""}for(var r=[];o(w),!(n>=t.length);){var i=o(y);if(","===i.slice(-1))i=x(e,i.substring(0,i.length-1)),r.push(i);else{var a="";i=x(e,i);for(var s=!1;;){var l=t.charAt(n);if(""===l){r.push((i+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){n+=1,r.push((i+a).trim());break}"("===l&&(s=!0)}a+=l,n+=1}}}return r.join(", ")}(e,o):"style"===n&&o?b(o,S()):"object"===t&&"data"===n&&o?x(e,o):o}function I(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&I(e.parentNode,t,n);for(var o=e.classList.length;o--;){var r=e.classList[o];if(t.test(r))return!0}return!!n&&I(e.parentNode,t,n)}function L(e,t,n){var o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("string"==typeof t){if(o.classList.contains(t)||o.closest(".".concat(t)))return!0}else if(I(o,t,!0))return!0;return!(!n||!o.matches(n)&&!o.closest(n))}function T(t,n){var o=n.doc,i=n.mirror,a=n.blockClass,c=n.blockSelector,d=n.maskTextClass,p=n.maskTextSelector,g=n.inlineStylesheet,m=n.maskInputOptions,v=void 0===m?{}:m,y=n.maskTextFn,w=n.maskInputFn,x=n.dataURLOptions,I=void 0===x?{}:x,T=n.inlineImages,O=n.recordCanvas,E=n.keepIframeSrcFn,M=n.newlyAddedElement,A=void 0!==M&&M,P=function(e,t){if(t.hasNode(e)){var n=t.getId(e);return 1===n?void 0:n}}(o,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode}:{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:P};case t.ELEMENT_NODE:return function(t,n){for(var o=n.doc,i=n.blockClass,a=n.blockSelector,c=n.inlineStylesheet,d=n.maskInputOptions,p=void 0===d?{}:d,g=n.maskInputFn,m=n.dataURLOptions,v=void 0===m?{}:m,y=n.inlineImages,w=n.recordCanvas,x=n.keepIframeSrcFn,I=n.newlyAddedElement,L=void 0!==I&&I,T=n.rootId,O=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var o=e.classList.length;o--;){var r=e.classList[o];if(t.test(r))return!0}return!!n&&e.matches(n)}(t,i,a),E=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return u.test(t)?"div":t}(t),M={},A=t.attributes.length,P=0;P<A;P++){var R=t.attributes[P];M[R.name]=C(o,E,R.name,R.value)}if("link"===E&&c){var N=Array.from(o.styleSheets).find((function(e){return e.href===t.href})),D=null;N&&(D=r(N)),D&&(delete M.rel,delete M.href,M._cssText=b(D,N.href))}if("style"===E&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(D=r(t.sheet))&&(M._cssText=b(D,S()))}if("input"===E||"textarea"===E||"select"===E){var j=t.value,F=t.checked;"radio"!==M.type&&"checkbox"!==M.type&&"submit"!==M.type&&"button"!==M.type&&j?M.value=s({type:M.type,tagName:E,value:j,maskInputOptions:p,maskInputFn:g}):F&&(M.checked=F)}if("option"===E&&(t.selected&&!p.select?M.selected=!0:delete M.selected),"canvas"===E&&w)if("2d"===t.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var o=0;o<e.height;o+=50){var r=t.getImageData,i=l in r?r[l]:r;if(new Uint32Array(i.call(t,n,o,Math.min(50,e.width-n),Math.min(50,e.height-o)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(t)||(M.rr_dataURL=t.toDataURL(v.type,v.quality));else if(!("__context"in t)){var B=t.toDataURL(v.type,v.quality),_=document.createElement("canvas");_.width=t.width,_.height=t.height,B!==_.toDataURL(v.type,v.quality)&&(M.rr_dataURL=B)}if("img"===E&&y){f||(f=o.createElement("canvas"),h=f.getContext("2d"));var H=t,U=H.crossOrigin;H.crossOrigin="anonymous";var q=function(){try{f.width=H.naturalWidth,f.height=H.naturalHeight,h.drawImage(H,0,0),M.rr_dataURL=f.toDataURL(v.type,v.quality)}catch(e){console.warn("Cannot inline img src=".concat(H.currentSrc,"! Error: ").concat(e))}U?M.crossOrigin=U:H.removeAttribute("crossorigin")};H.complete&&0!==H.naturalWidth?q():H.onload=q}if(("audio"===E||"video"===E)&&(M.rr_mediaState=t.paused?"paused":"played",M.rr_mediaCurrentTime=t.currentTime),L||(t.scrollLeft&&(M.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(M.rr_scrollTop=t.scrollTop)),O){var z=t.getBoundingClientRect(),W=z.width,G=z.height;M={class:M.class,rr_width:"".concat(W,"px"),rr_height:"".concat(G,"px")}}return"iframe"===E&&!x(M.src)&&(t.contentDocument||(M.rr_src=M.src),delete M.src),{type:e.Element,tagName:E,attributes:M,childNodes:[],isSVG:k(t)||void 0,needBlock:O,rootId:T}}(t,{doc:o,blockClass:a,blockSelector:c,inlineStylesheet:g,maskInputOptions:v,maskInputFn:w,dataURLOptions:I,inlineImages:T,recordCanvas:O,keepIframeSrcFn:E,newlyAddedElement:A,rootId:P});case t.TEXT_NODE:return function(t,n){var o,r=n.maskTextClass,i=n.maskTextSelector,a=n.maskTextFn,s=n.rootId,l=t.parentNode&&t.parentNode.tagName,c=t.textContent,u="STYLE"===l||void 0,d="SCRIPT"===l||void 0;if(u&&c){try{t.nextSibling||t.previousSibling||null!==(o=t.parentNode.sheet)&&void 0!==o&&o.cssRules&&(c=function(e){return e.cssRules?Array.from(e.cssRules).map((function(e){return e.cssText||""})).join(""):""}(t.parentNode.sheet))}catch(y){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(y),t)}c=b(c,S())}return d&&(c="SCRIPT_PLACEHOLDER"),!u&&!d&&c&&L(t,r,i)&&(c=a?a(c):c.replace(/[\S]/g,"*")),{type:e.Text,textContent:c||"",isStyle:u,rootId:s}}(t,{maskTextClass:d,maskTextSelector:p,maskTextFn:y,rootId:P});case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:P};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:P};default:return!1}}function O(e){return void 0===e?"":e.toLowerCase()}function E(t,r){var i,a=r.doc,s=r.mirror,l=r.blockClass,c=r.blockSelector,u=r.maskTextClass,f=r.maskTextSelector,h=r.skipChild,g=void 0!==h&&h,m=r.inlineStylesheet,v=void 0===m||m,b=r.maskInputOptions,y=void 0===b?{}:b,w=r.maskTextFn,x=r.maskInputFn,k=r.slimDOMOptions,S=r.dataURLOptions,C=void 0===S?{}:S,I=r.inlineImages,L=void 0!==I&&I,M=r.recordCanvas,A=void 0!==M&&M,P=r.onSerialize,R=r.onIframeLoad,N=r.iframeLoadTimeout,D=void 0===N?5e3:N,j=r.onStylesheetLoad,F=r.stylesheetLoadTimeout,B=void 0===F?5e3:F,_=r.keepIframeSrcFn,H=void 0===_?function(){return!1}:_,U=r.newlyAddedElement,q=void 0!==U&&U,z=r.preserveWhiteSpace,W=void 0===z||z,G=T(t,{doc:a,mirror:s,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:f,inlineStylesheet:v,maskInputOptions:y,maskTextFn:w,maskInputFn:x,dataURLOptions:C,inlineImages:L,recordCanvas:A,keepIframeSrcFn:H,newlyAddedElement:q});if(!G)return console.warn(t,"not serialized"),null;i=s.hasNode(t)?s.getId(t):function(t,n){return!!(n.comment&&t.type===e.Comment||t.type===e.Element&&(n.script&&("script"===t.tagName||"link"===t.tagName&&"preload"===t.attributes.rel&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js"))||n.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(O(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===O(t.attributes.name)||"icon"===O(t.attributes.rel)||"apple-touch-icon"===O(t.attributes.rel)||"shortcut icon"===O(t.attributes.rel)))||"meta"===t.tagName&&(n.headMetaDescKeywords&&O(t.attributes.name).match(/^description|keywords$/)||n.headMetaSocial&&(O(t.attributes.property).match(/^(og|twitter|fb):/)||O(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===O(t.attributes.name))||n.headMetaRobots&&("robots"===O(t.attributes.name)||"googlebot"===O(t.attributes.name)||"bingbot"===O(t.attributes.name))||n.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"]||n.headMetaAuthorship&&("author"===O(t.attributes.name)||"generator"===O(t.attributes.name)||"framework"===O(t.attributes.name)||"publisher"===O(t.attributes.name)||"progid"===O(t.attributes.name)||O(t.attributes.property).match(/^article:/)||O(t.attributes.property).match(/^product:/))||n.headMetaVerification&&("google-site-verification"===O(t.attributes.name)||"yandex-verification"===O(t.attributes.name)||"csrf-token"===O(t.attributes.name)||"p:domain_verify"===O(t.attributes.name)||"verify-v1"===O(t.attributes.name)||"verification"===O(t.attributes.name)||"shopify-checkout-api-token"===O(t.attributes.name)))))}(G,k)||!W&&G.type===e.Text&&!G.isStyle&&!G.textContent.replace(/^\s+|\s+$/gm,"").length?d:p();var V=Object.assign(G,{id:i});if(s.add(t,V),i===d)return null;P&&P(t);var X=!g;if(V.type===e.Element){X=X&&!V.needBlock,delete V.needBlock;var K=t.shadowRoot;K&&o(K)&&(V.isShadowHost=!0)}if((V.type===e.Document||V.type===e.Element)&&X){k.headWhitespace&&V.type===e.Element&&"head"===V.tagName&&(W=!1);for(var Z={doc:a,mirror:s,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:f,skipChild:g,inlineStylesheet:v,maskInputOptions:y,maskTextFn:w,maskInputFn:x,slimDOMOptions:k,dataURLOptions:C,inlineImages:L,recordCanvas:A,preserveWhiteSpace:W,onSerialize:P,onIframeLoad:R,iframeLoadTimeout:D,onStylesheetLoad:j,stylesheetLoadTimeout:B,keepIframeSrcFn:H},Y=0,J=Array.from(t.childNodes);Y<J.length;Y++){(ee=E(J[Y],Z))&&V.childNodes.push(ee)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(t)&&t.shadowRoot)for(var Q=0,$=Array.from(t.shadowRoot.childNodes);Q<$.length;Q++){var ee;(ee=E($[Q],Z))&&(o(t.shadowRoot)&&(ee.isShadow=!0),V.childNodes.push(ee))}}return t.parentNode&&n(t.parentNode)&&o(t.parentNode)&&(V.isShadow=!0),V.type===e.Element&&"iframe"===V.tagName&&function(e,t,n){var o=e.contentWindow;if(o){var r,i=!1;try{r=o.document.readyState}catch(l){return}if("complete"!==r){var a=setTimeout((function(){i||(t(),i=!0)}),n);return void e.addEventListener("load",(function(){clearTimeout(a),i=!0,t()}))}var s="about:blank";if(o.location.href!==s||e.src===s||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}(t,(function(){var e=t.contentDocument;if(e&&R){var n=E(e,{doc:e,mirror:s,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:y,maskTextFn:w,maskInputFn:x,slimDOMOptions:k,dataURLOptions:C,inlineImages:L,recordCanvas:A,preserveWhiteSpace:W,onSerialize:P,onIframeLoad:R,iframeLoadTimeout:D,onStylesheetLoad:j,stylesheetLoadTimeout:B,keepIframeSrcFn:H});n&&R(t,n)}}),D),V.type===e.Element&&"link"===V.tagName&&"stylesheet"===V.attributes.rel&&function(e,t,n){var o,r=!1;try{o=e.sheet}catch(a){return}if(!o){var i=setTimeout((function(){r||(t(),r=!0)}),n);e.addEventListener("load",(function(){clearTimeout(i),r=!0,t()}))}}(t,(function(){if(j){var e=E(t,{doc:a,mirror:s,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:y,maskTextFn:w,maskInputFn:x,slimDOMOptions:k,dataURLOptions:C,inlineImages:L,recordCanvas:A,preserveWhiteSpace:W,onSerialize:P,onIframeLoad:R,iframeLoadTimeout:D,onStylesheetLoad:j,stylesheetLoadTimeout:B,keepIframeSrcFn:H});e&&j(t,e)}}),B),V}function M(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,o={capture:!0,passive:!0};return n.addEventListener(e,t,o),function(){return n.removeEventListener(e,t,o)}}var A="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",P={map:{},getId:function(){return console.error(A),-1},getNode:function(){return console.error(A),null},removeNodeFromMap:function(){console.error(A)},has:function(){return console.error(A),!1},reset:function(){console.error(A)}};function R(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=null,r=0;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var l=Date.now();!r&&!1===n.leading&&(r=l);var c=t-(l-r),u=this;c<=0||c>t?(o&&(clearTimeout(o),o=null),r=l,e.apply(u,a)):!o&&!1!==n.trailing&&(o=setTimeout((function(){r=!1===n.leading?0:Date.now(),o=null,e.apply(u,a)}),c))}}function N(e,t,n,o){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,i=r.Object.getOwnPropertyDescriptor(e,t);return r.Object.defineProperty(e,t,o?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),i&&i.set&&i.set.call(this,e)}}),function(){return N(e,t,i||{},!0)}}function D(e,t,n){try{if(!(t in e))return function(){};var o=e[t],r=n(o);return"function"==typeof r&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=r,function(){e[t]=o}}catch(i){return function(){}}}function j(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function F(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function B(e,t,n,o){if(!e)return!1;var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!r)return!1;if("string"==typeof t){if(r.classList.contains(t)||o&&null!==r.closest("."+t))return!0}else if(I(r,t,o))return!0;return!(!n||!(e.matches(n)||o&&null!==r.closest(n)))}function _(e,t){return t.getId(e)===d}function H(e,t){if(n(e))return!1;var o=t.getId(e);return!t.has(o)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||H(e.parentNode,t))}function U(e){return Boolean(e.changedTouches)}function q(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function z(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function W(e){return Boolean(null==e?void 0:e.shadowRoot)}("undefined"==typeof window?"undefined":Pn(window))<"u"&&window.Proxy&&window.Reflect&&(P=new Proxy(P,{get:function(e,t,n){return"map"===t&&console.error(A),Reflect.get(e,t,n)}}));var G=function(){function e(){On(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return Mn(e,[{key:"getId",value:function(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}(),V=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(V||{}),X=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e}(X||{}),K=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(K||{}),Z=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(Z||{}),Y=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(Y||{}),J=function(e){return e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e}(J||{});function Q(e){return"__ln"in e}var $=function(){function e(){On(this,e),this.length=0,this.head=null}return Mn(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++){var o;t=(null===(o=t)||void 0===o?void 0:o.next)||null}return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Q(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Q(e.nextSibling)&&e.nextSibling.__ln.previous){var o=e.nextSibling.__ln.previous;t.previous=o,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,o&&(o.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;!this.head||(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}]),e}(),ee=function(e,t){return"".concat(e,"@").concat(t)},te=function(){function e(){var t=this;On(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],o=new $,r=function(e){for(var n=e,o=d;o===d;)o=(n=n&&n.nextSibling)&&t.mirror.getId(n);return o},i=function(i){var a,s,l,c,u=null;(null==(s=null==(a=i.getRootNode)?void 0:a.call(i))?void 0:s.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&i.getRootNode().host&&(u=i.getRootNode().host);for(var d=u;(null==(c=null==(l=null===(p=d)||void 0===p?void 0:p.getRootNode)?void 0:l.call(d))?void 0:c.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&d.getRootNode().host;){var p;d=d.getRootNode().host}var f=!(t.doc.contains(i)||d&&t.doc.contains(d));if(i.parentNode&&!f){var h=n(i.parentNode)?t.mirror.getId(u):t.mirror.getId(i.parentNode),g=r(i);if(-1===h||-1===g)return o.addNode(i);var m=E(i,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){q(e,t.mirror)&&t.iframeManager.addIframe(e),z(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),W(i)&&t.shadowDomManager.addShadowRoot(i.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});m&&e.push({parentId:h,nextId:g,node:m})}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());for(var a=0,s=Array.from(t.movedSet.values());a<s.length;a++){var l=s[a];oe(t.removes,l,t.mirror)&&!t.movedSet.has(l.parentNode)||i(l)}for(var c=0,u=Array.from(t.addedSet.values());c<u.length;c++){var p=u[c];!ie(t.droppedSet,p)&&!oe(t.removes,p,t.mirror)||ie(t.movedSet,p)?i(p):t.droppedSet.add(p)}for(var f=null;o.length;){var h=null;if(f){var g=t.mirror.getId(f.value.parentNode),m=r(f.value);-1!==g&&-1!==m&&(h=f)}if(!h)for(var v=o.length-1;v>=0;v--){var b=o.get(v);if(b){var y=t.mirror.getId(b.value.parentNode);if(-1===r(b.value))continue;if(-1!==y){h=b;break}var w=b.value;if(w.parentNode&&w.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var x=w.parentNode.host;if(-1!==t.mirror.getId(x)){h=b;break}}}}if(!h){for(;o.head;)o.removeNode(o.head.value);break}f=h.previous,o.removeNode(h.value),i(h.value)}var k={texts:t.texts.map((function(e){return{id:t.mirror.getId(e.node),value:e.value}})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){return{id:t.mirror.getId(e.node),attributes:e.attributes}})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};!k.texts.length&&!k.attributes.length&&!k.removes.length&&!k.adds.length||(t.texts=[],t.attributes=[],t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(k))}},this.processMutation=function(e){if(!_(e.target,t.mirror))switch(e.type){case"characterData":var r=e.target.textContent;!B(e.target,t.blockClass,t.blockSelector,!1)&&r!==e.oldValue&&t.texts.push({value:L(e.target,t.maskTextClass,t.maskTextSelector)&&r?t.maskTextFn?t.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:e.target});break;case"attributes":var i=e.target,a=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(a=s({maskInputOptions:t.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:a,maskInputFn:t.maskInputFn})),B(e.target,t.blockClass,t.blockSelector,!1)||a===e.oldValue)return;var l=t.attributes.find((function(t){return t.node===e.target}));if("IFRAME"===i.tagName&&"src"===e.attributeName&&!t.keepIframeSrcFn(a)){if(i.contentDocument)return;e.attributeName="rr_src"}if(l||(l={node:e.target,attributes:{}},t.attributes.push(l)),"style"===e.attributeName){var c=t.doc.createElement("span");e.oldValue&&c.setAttribute("style",e.oldValue),(void 0===l.attributes.style||null===l.attributes.style)&&(l.attributes.style={});for(var u=l.attributes.style,d=0,p=Array.from(i.style);d<p.length;d++){var f=p[d],h=i.style.getPropertyValue(f),g=i.style.getPropertyPriority(f);(h!==c.style.getPropertyValue(f)||g!==c.style.getPropertyPriority(f))&&(u[f]=""===g?h:[h,g])}for(var m=0,v=Array.from(c.style);m<v.length;m++){var b=v[m];""===i.style.getPropertyValue(b)&&(u[b]=!1)}}else l.attributes[e.attributeName]=C(t.doc,i.tagName,e.attributeName,a);break;case"childList":if(B(e.target,t.blockClass,t.blockSelector,!0))return;e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(r){var i=t.mirror.getId(r),a=n(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);B(e.target,t.blockClass,t.blockSelector,!1)||_(r,t.mirror)||!function(e,t){return-1!==t.getId(e)}(r,t.mirror)||(t.addedSet.has(r)?(ne(t.addedSet,r),t.droppedSet.add(r)):t.addedSet.has(e.target)&&-1===i||H(e.target,t.mirror)||(t.movedSet.has(r)&&t.movedMap[ee(i,a)]?ne(t.movedSet,r):t.removes.push({parentId:a,id:i,isShadow:!(!n(e.target)||!o(e.target))||void 0})),t.mapRemoves.push(r))}))}},this.genAdds=function(e,n){if(t.mirror.hasNode(e)){if(_(e,t.mirror))return;t.movedSet.add(e);var o=null;n&&t.mirror.hasNode(n)&&(o=t.mirror.getId(n)),o&&-1!==o&&(t.movedMap[ee(t.mirror.getId(e),o)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);B(e,t.blockClass,t.blockSelector,!1)||e.childNodes.forEach((function(e){return t.genAdds(e)}))}}return Mn(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function ne(e,t){e.delete(t),t.childNodes.forEach((function(t){return ne(e,t)}))}function oe(e,t,n){return 0!==e.length&&re(e,t,n)}function re(e,t,n){var o=t.parentNode;if(!o)return!1;var r=n.getId(o);return!!e.some((function(e){return e.id===r}))||re(e,o,n)}function ie(e,t){return 0!==e.size&&ae(e,t)}function ae(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||ae(e,n))}var se=Object.defineProperty,le=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable,fe=function(e,t,n){return t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},he=function(e,t){for(var n in t||(t={}))de.call(t,n)&&fe(e,n,t[n]);if(ue){var o,r=In(ue(t));try{for(r.s();!(o=r.n()).done;){n=o.value;pe.call(t,n)&&fe(e,n,t[n])}}catch(i){r.e(i)}finally{r.f()}}return e},ge=function(e,t){return le(e,ce(t))},me=[],ve=("undefined"==typeof CSSGroupingRule?"undefined":Pn(CSSGroupingRule))<"u",be=("undefined"==typeof CSSMediaRule?"undefined":Pn(CSSMediaRule))<"u",ye=("undefined"==typeof CSSSupportsRule?"undefined":Pn(CSSSupportsRule))<"u",we=("undefined"==typeof CSSConditionRule?"undefined":Pn(CSSConditionRule))<"u";function xe(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(n){return e.target}}function ke(e,t){var n,o,r,i=new te;me.push(i),i.init(e);var a=window.MutationObserver||window.__rrMutationObserver,s=null==(r=null==(o=null===(n=window)||void 0===n?void 0:n.Zone)?void 0:o.__symbol__)?void 0:r.call(o,"MutationObserver");s&&window[s]&&(a=window[s]);var l=new a(i.processMutations.bind(i));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),l}function Se(e){var t=e.mouseInteractionCb,n=e.doc,o=e.mirror,r=e.blockClass,i=e.blockSelector,a=e.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,l=[];return Object.keys(K).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(e){var a=e.toLowerCase(),s=function(e){return function(n){var a=xe(n);if(!B(a,r,i,!0)){var s=U(n)?n.changedTouches[0]:n;if(s){var l=o.getId(a),c=s.clientX,u=s.clientY;t({type:K[e],id:l,x:c,y:u})}}}}(e);l.push(M(a,s,n))})),function(){l.forEach((function(e){return e()}))}}function Ce(e){var t=e.scrollCb,n=e.doc,o=e.mirror,r=e.blockClass,i=e.blockSelector,a=R((function(e){var a=xe(e);if(a&&!B(a,r,i,!0)){var s=o.getId(a);if(a===n){var l=n.scrollingElement||n.documentElement;t({id:s,x:l.scrollLeft,y:l.scrollTop})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}}),e.sampling.scroll||100);return M("scroll",a,n)}function Ie(e,t){var n=he({},e);return t||delete n.userTriggered,n}var Le=["INPUT","TEXTAREA","SELECT"],Te=new WeakMap;function Oe(e){return function(e,t){if(ve&&e.parentRule instanceof CSSGroupingRule||be&&e.parentRule instanceof CSSMediaRule||ye&&e.parentRule instanceof CSSSupportsRule||we&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var o=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(o)}return t}(e,[])}function Ee(e,t,n){var o,r;return e?(e.ownerNode?o=t.getId(e.ownerNode):r=n.getId(e),{styleId:r,id:o}):{}}function Me(e,t){var n,o,r,i=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?i.getId(t):i.getId(t.host);var l="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(r=null==(o=t.ownerDocument)?void 0:o.defaultView)?void 0:r.ShadowRoot,c=Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets");return null!==s&&-1!==s&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null==(e=c.get)?void 0:e.call(this)},set:function(e){var t,n=null==(t=c.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(o){}return n}}),function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}):function(){}}function Ae(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.doc.defaultView;if(!n)return function(){};!function(e,t){var n=e.mutationCb,o=e.mousemoveCb,r=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,u=e.styleDeclarationCb,d=e.canvasMutationCb,p=e.fontCb,f=e.selectionCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),o.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),r.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),i.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),a.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),l.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),c.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),u.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),p.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),f.apply(void 0,arguments)}}(e,t);var o,r=ke(e,e.doc),i=function(e){var t=e.mousemoveCb,n=e.sampling,o=e.doc,r=e.mirror;if(!1===n.mousemove)return function(){};var i,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,l=[],c=R((function(e){var n=Date.now()-i;t(l.map((function(e){return e.timeOffset-=n,e})),e),l=[],i=null}),s),u=R((function(e){var t=xe(e),n=U(e)?e.changedTouches[0]:e,o=n.clientX,a=n.clientY;i||(i=Date.now()),l.push({x:o,y:a,id:r.getId(t),timeOffset:Date.now()-i}),c(("undefined"==typeof DragEvent?"undefined":Pn(DragEvent))<"u"&&e instanceof DragEvent?X.Drag:e instanceof MouseEvent?X.MouseMove:X.TouchMove)}),a,{trailing:!1}),d=[M("mousemove",u,o),M("touchmove",u,o),M("drag",u,o)];return function(){d.forEach((function(e){return e()}))}}(e),a=Se(e),l=Ce(e),c=function(e){var t=e.viewportResizeCb,n=-1,o=-1;return M("resize",R((function(){var e=j(),r=F();(n!==e||o!==r)&&(t({width:Number(r),height:Number(e)}),n=e,o=r)}),200),window)}(e),u=function(e){var t=e.inputCb,n=e.doc,o=e.mirror,r=e.blockClass,i=e.blockSelector,a=e.ignoreClass,l=e.maskInputOptions,c=e.maskInputFn,u=e.sampling,d=e.userTriggeredOnInput;function p(e){var t=xe(e),o=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(Le.indexOf(t.tagName)<0)&&!B(t,r,i,!0)){var u=t.type;if(!t.classList.contains(a)){var p=t.value,h=!1;"radio"===u||"checkbox"===u?h=t.checked:(l[t.tagName.toLowerCase()]||l[u])&&(p=s({maskInputOptions:l,tagName:t.tagName,type:u,value:p,maskInputFn:c})),f(t,Ie({text:p,isChecked:h,userTriggered:o},d));var g=t.name;"radio"===u&&g&&h&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach((function(e){e!==t&&f(e,Ie({text:e.value,isChecked:!h,userTriggered:!1},d))}))}}}function f(e,n){var r=Te.get(e);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){Te.set(e,n);var i=o.getId(e);t(ge(he({},n),{id:i}))}}var h=("last"===u.input?["change"]:["input","change"]).map((function(e){return M(e,p,n)})),g=n.defaultView;if(!g)return function(){h.forEach((function(e){return e()}))};var m=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),v=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&h.push.apply(h,Cn(v.map((function(e){return N(e[0],e[1],{set:function(){p({target:this})}},!1,g)})))),function(){h.forEach((function(e){return e()}))}}(e),d=function(e){var t=e.mediaInteractionCb,n=e.blockClass,o=e.blockSelector,r=e.mirror,i=e.sampling,a=function(e){return R((function(i){var a=xe(i);if(a&&!B(a,n,o,!0)){var s=a.currentTime,l=a.volume,c=a.muted,u=a.playbackRate;t({type:e,id:r.getId(a),currentTime:s,volume:l,muted:c,playbackRate:u})}}),i.media||500)},s=[M("play",a(Y.Play)),M("pause",a(Y.Pause)),M("seeked",a(Y.Seeked)),M("volumechange",a(Y.VolumeChange)),M("ratechange",a(Y.RateChange))];return function(){s.forEach((function(e){return e()}))}}(e),p=function(e,t){var n=e.styleSheetRuleCb,o=e.mirror,r=e.stylesheetManager,i=t.win,a=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=function(e,t){var i=Ee(this,o,r.styleMirror),s=i.id,l=i.styleId;return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,adds:[{rule:e,index:t}]}),a.apply(this,[e,t])};var s,l,c=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=function(e){var t=Ee(this,o,r.styleMirror),i=t.id,a=t.styleId;return(i&&-1!==i||a&&-1!==a)&&n({id:i,styleId:a,removes:[{index:e}]}),c.apply(this,[e])},i.CSSStyleSheet.prototype.replace&&(s=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=function(e){var t=Ee(this,o,r.styleMirror),i=t.id,a=t.styleId;return(i&&-1!==i||a&&-1!==a)&&n({id:i,styleId:a,replace:e}),s.apply(this,[e])}),i.CSSStyleSheet.prototype.replaceSync&&(l=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=function(e){var t=Ee(this,o,r.styleMirror),i=t.id,a=t.styleId;return(i&&-1!==i||a&&-1!==a)&&n({id:i,styleId:a,replaceSync:e}),l.apply(this,[e])});var u={};ve?u.CSSGroupingRule=i.CSSGroupingRule:(be&&(u.CSSMediaRule=i.CSSMediaRule),we&&(u.CSSConditionRule=i.CSSConditionRule),ye&&(u.CSSSupportsRule=i.CSSSupportsRule));var d={};return Object.entries(u).forEach((function(e){var t=Sn(e,2),i=t[0],a=t[1];d[i]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=function(e,t){var a=Ee(this.parentStyleSheet,o,r.styleMirror),s=a.id,l=a.styleId;return(s&&-1!==s||l&&-1!==l)&&n({id:s,styleId:l,adds:[{rule:e,index:[].concat(Cn(Oe(this)),[t||0])}]}),d[i].insertRule.apply(this,[e,t])},a.prototype.deleteRule=function(e){var t=Ee(this.parentStyleSheet,o,r.styleMirror),a=t.id,s=t.styleId;return(a&&-1!==a||s&&-1!==s)&&n({id:a,styleId:s,removes:[{index:[].concat(Cn(Oe(this)),[e])}]}),d[i].deleteRule.apply(this,[e])}})),function(){i.CSSStyleSheet.prototype.insertRule=a,i.CSSStyleSheet.prototype.deleteRule=c,s&&(i.CSSStyleSheet.prototype.replace=s),l&&(i.CSSStyleSheet.prototype.replaceSync=l),Object.entries(u).forEach((function(e){var t=Sn(e,2),n=t[0],o=t[1];o.prototype.insertRule=d[n].insertRule,o.prototype.deleteRule=d[n].deleteRule}))}}(e,{win:n}),f=Me(e,e.doc),h=function(e,t){var n=e.styleDeclarationCb,o=e.mirror,r=e.ignoreCSSAttributes,i=e.stylesheetManager,a=t.win,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=function(e,t,a){var l;if(r.has(e))return s.apply(this,[e,t,a]);var c=Ee(null==(l=this.parentRule)?void 0:l.parentStyleSheet,o,i.styleMirror),u=c.id,d=c.styleId;return(u&&-1!==u||d&&-1!==d)&&n({id:u,styleId:d,set:{property:e,value:t,priority:a},index:Oe(this.parentRule)}),s.apply(this,[e,t,a])};var l=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=function(e){var t;if(r.has(e))return l.apply(this,[e]);var a=Ee(null==(t=this.parentRule)?void 0:t.parentStyleSheet,o,i.styleMirror),s=a.id,c=a.styleId;return(s&&-1!==s||c&&-1!==c)&&n({id:s,styleId:c,remove:{property:e},index:Oe(this.parentRule)}),l.apply(this,[e])},function(){a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=l}}(e,{win:n}),g=e.collectFonts?function(e){var t=e.fontCb,n=e.doc,o=n.defaultView;if(!o)return function(){};var r=[],i=new WeakMap,a=o.FontFace;o.FontFace=function(e,t,n){var o=new a(e,t,n);return i.set(o,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),o};var s=D(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=i.get(n);e&&(t(e),i.delete(n))}),0),e.apply(this,[n])}}));return r.push((function(){o.FontFace=a})),r.push(s),function(){r.forEach((function(e){return e()}))}}(e):function(){},m=function(e){var t=e.doc,n=e.mirror,o=e.blockClass,r=e.blockSelector,i=e.selectionCb,a=!0,s=function(){var e=t.getSelection();if(!(!e||a&&null!=e&&e.isCollapsed)){a=e.isCollapsed||!1;for(var s=[],l=e.rangeCount||0,c=0;c<l;c++){var u=e.getRangeAt(c),d=u.startContainer,p=u.startOffset,f=u.endContainer,h=u.endOffset;B(d,o,r,!0)||B(f,o,r,!0)||s.push({start:n.getId(d),startOffset:p,end:n.getId(f),endOffset:h})}i({ranges:s})}};return s(),M("selectionchange",s)}(e),v=[],b=In(e.plugins);try{for(b.s();!(o=b.n()).done;){var y=o.value;v.push(y.observer(y.callback,n,y.options))}}catch(w){b.e(w)}finally{b.f()}return function(){me.forEach((function(e){return e.reset()})),r.disconnect(),i(),a(),l(),c(),u(),d(),p(),f(),h(),g(),m(),v.forEach((function(e){return e()}))}}for(var Pe=function(){function e(t){On(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return Mn(e,[{key:"getId",value:function(e,t,n,o){var r=n||this.getIdToRemoteIdMap(e),i=o||this.getRemoteIdToIdMap(e),a=r.get(t);return a||(a=this.generateIdFn(),r.set(t,a),i.set(a,t)),a}},{key:"getIds",value:function(e,t){var n=this,o=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,o,r)}))}},{key:"getRemoteId",value:function(e,t,n){var o=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:o.get(t)||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,o=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,o)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),Re=function(){function e(t){On(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Pe(p),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Pe(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return Mn(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){if("rrweb"===e.data.type){if(!e.source)return;var t=this.crossOriginIframeMap.get(e.source);if(!t)return;var n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,o=this;switch(t.type){case V.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e),{timestamp:t.timestamp,type:V.IncrementalSnapshot,data:{source:X.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case V.Meta:case V.Load:case V.DomContentLoaded:return!1;case V.Plugin:return t;case V.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case V.IncrementalSnapshot:switch(t.data.source){case X.Mutation:return t.data.adds.forEach((function(t){o.replaceIds(t,e,["parentId","nextId","previousId"]),o.replaceIdOnNode(t.node,e)})),t.data.removes.forEach((function(t){o.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){o.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){o.replaceIds(t,e,["id"])})),t;case X.Drag:case X.TouchMove:case X.MouseMove:return t.data.positions.forEach((function(t){o.replaceIds(t,e,["id"])})),t;case X.ViewportResize:return!1;case X.MediaInteraction:case X.MouseInteraction:case X.Scroll:case X.CanvasMutation:case X.Input:return this.replaceIds(t.data,e,["id"]),t;case X.StyleSheetRule:case X.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case X.Font:return t;case X.Selection:return t.data.ranges.forEach((function(t){o.replaceIds(t,e,["start","end"])})),t;case X.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach((function(t){o.replaceStyleIds(t,e,["styleId"])})),t}}}},{key:"replace",value:function(e,t,n,o){var r,i=In(o);try{for(i.s();!(r=i.n()).done;){var a=r.value;!Array.isArray(t[a])&&"number"!=typeof t[a]||(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]))}}catch(s){i.e(s)}finally{i.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}}]),e}(),Ne=Object.defineProperty,De=Object.defineProperties,je=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,He=function(e,t,n){return t in e?Ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Ue=function(e,t){for(var n in t||(t={}))Be.call(t,n)&&He(e,n,t[n]);if(Fe){var o,r=In(Fe(t));try{for(r.s();!(o=r.n()).done;){n=o.value;_e.call(t,n)&&He(e,n,t[n])}}catch(i){r.e(i)}finally{r.f()}}return e},qe=function(e,t){return De(e,je(t))},ze=function(){function e(t){On(this,e),this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;var n=this;this.restorePatches.push(D(Element.prototype,"attachShadow",(function(e){return function(t){var o=e.call(this,t);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}})))}return Mn(e,[{key:"addShadowRoot",value:function(e,t){var n=this;!o(e)||this.shadowDoms.has(e)||(this.shadowDoms.add(e),ke(qe(Ue({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),Ce(qe(Ue({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),Me({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e)}),0))}},{key:"observeAttachShadow",value:function(e){if(e.contentWindow){var t=this;this.restorePatches.push(D(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(o){var r=n.call(this,o);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),r}})))}}},{key:"reset",value:function(){this.restorePatches.forEach((function(e){return e()})),this.shadowDoms=new WeakSet}}]),e}(),We="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ge=("undefined"==typeof Uint8Array?"undefined":Pn(Uint8Array))>"u"?[]:new Uint8Array(256),Ve=0;Ve<64;Ve++)Ge[We.charCodeAt(Ve)]=Ve;var Xe=new Map;var Ke=function(e,t,n){if(e&&(Je(e,t)||"object"==Pn(e))){var o=function(e,t){var n=Xe.get(e);return n||(n=new Map,Xe.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),r=o.indexOf(e);return-1===r&&(r=o.length,o.push(e)),r}};function Ze(e,t,n){if(e instanceof Array)return e.map((function(e){return Ze(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){var o=e.constructor.name,r=function(e){var t,n=new Uint8Array(e),o=n.length,r="";for(t=0;t<o;t+=3)r+=We[n[t]>>2],r+=We[(3&n[t])<<4|n[t+1]>>4],r+=We[(15&n[t+1])<<2|n[t+2]>>6],r+=We[63&n[t+2]];return o%3==2?r=r.substring(0,r.length-1)+"=":o%3==1&&(r=r.substring(0,r.length-2)+"=="),r}(e);return{rr_type:o,base64:r}}if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ze(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[Ze(e.data,t,n),e.width,e.height]}:Je(e,t)||"object"==Pn(e)?{rr_type:e.constructor.name,index:Ke(e,t,n)}:e}var Ye=function(e,t,n){return Cn(e).map((function(e){return Ze(e,t,n)}))},Je=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function Qe(e,t,n){var o=[];try{var r=D(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o){for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return B(this,t,n,!0)||"__context"in this||(this.__context=o),e.apply(this,[o].concat(i))}}));o.push(r)}catch(i){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){o.forEach((function(e){return e()}))}}function $e(e,t,n,o,r,i,a){var s,l=[],c=In(Object.getOwnPropertyNames(e));try{var u=function(){var i=s.value;if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))try{if("function"!=typeof e[i])return 1;var c=D(e,i,(function(e){return function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];var u=e.apply(this,l);if(Ke(u,a,this),!B(this.canvas,o,r,!0)){var d=Ye([].concat(l),a,this),p={type:t,property:i,args:d};n(this.canvas,p)}return u}}));l.push(c)}catch(d){var u=N(e,i,{set:function(e){n(this.canvas,{type:t,property:i,args:[e],setter:!0})}});l.push(u)}};for(c.s();!(s=c.n()).done;)u()}catch(d){c.e(d)}finally{c.f()}return l}function et(e,t,n){var o=void 0===t?null:t,r=function(e,t){var n=atob(e);if(t){for(var o=new Uint8Array(n.length),r=0,i=n.length;r<i;++r)o[r]=n.charCodeAt(r);return String.fromCharCode.apply(null,new Uint16Array(o.buffer))}return n}(e,void 0!==n&&n),i=r.indexOf("\n",10)+1,a=r.substring(i)+(o?"//# sourceMappingURL="+o:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var tt=function(e,t,n){var o;return function(r){return o=o||et(e,t,n),new Worker(o,r)}}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixwPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylwW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgdT1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCxsPW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gdihzLGUsbil7Y29uc3QgYT1gJHtzfS0ke2V9YDtpZigiT2Zmc2NyZWVuQ2FudmFzImluIGdsb2JhbFRoaXMpe2lmKGwuaGFzKGEpKXJldHVybiBsLmdldChhKTtjb25zdCB0PW5ldyBPZmZzY3JlZW5DYW52YXMocyxlKTt0LmdldENvbnRleHQoIjJkIik7Y29uc3QgZz1hd2FpdChhd2FpdCB0LmNvbnZlcnRUb0Jsb2IobikpLmFycmF5QnVmZmVyKCksZD11KGcpO3JldHVybiBsLnNldChhLGQpLGR9ZWxzZSByZXR1cm4iIn1jb25zdCBpPXNlbGY7aS5vbm1lc3NhZ2U9YXN5bmMgZnVuY3Rpb24ocyl7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtjb25zdHtpZDplLGJpdG1hcDpuLHdpZHRoOmEsaGVpZ2h0OnQsZGF0YVVSTE9wdGlvbnM6Z309cy5kYXRhLGQ9dihhLHQsZyksaD1uZXcgT2Zmc2NyZWVuQ2FudmFzKGEsdCk7aC5nZXRDb250ZXh0KCIyZCIpLmRyYXdJbWFnZShuLDAsMCksbi5jbG9zZSgpO2NvbnN0IHc9YXdhaXQgaC5jb252ZXJ0VG9CbG9iKGcpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89dShiKTtpZighYy5oYXMoZSkmJmF3YWl0IGQ9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX1lbHNlIHJldHVybiBpLnBvc3RNZXNzYWdlKHtpZDpzLmRhdGEuaWR9KX19KSgpOwoK",null,!1),nt=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,it=function(){function e(t){var n=this;On(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId||!n.rafStamps.invokeId)&&(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var o=t.sampling,r=void 0===o?"all":o,i=t.win,a=t.blockClass,s=t.blockSelector,l=t.recordCanvas,c=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,l&&"all"===r&&this.initCanvasMutationObserver(i,a,s),l&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,a,s,{dataURLOptions:c})}return Mn(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,t,n,o,r){var i=this,a=Qe(t,n,o),s=new Map,l=new tt;l.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,o=n.base64,r=n.type,a=n.width,l=n.height;i.mutationCb({id:t,type:Z["2D"],commands:[{property:"clearRect",args:[0,0,a,l]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:o}],type:r}]},0,0]}]})}};var c,u=1e3/e,d=0;c=requestAnimationFrame((function e(a){d&&a-d<u||(d=a,function(){var e=[];return t.document.querySelectorAll("canvas").forEach((function(t){B(t,n,o,!0)||e.push(t)})),e}().forEach((function(e){return function(e,t,n){return new Promise((function(o,r){var i=function(e){try{s(n.next(e))}catch(u){r(u)}},a=function(e){try{s(n.throw(e))}catch(u){r(u)}},s=function(e){return e.done?o(e.value):Promise.resolve(e.value).then(i,a)};s((n=n.apply(e,t)).next())}))}(i,null,kn().mark((function t(){var n,o,i,a;return kn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=this.mirror.getId(e),!s.get(o)){t.next=3;break}return t.abrupt("return");case 3:return s.set(o,!0),["webgl","webgl2"].includes(e.__context)&&(i=e.getContext(e.__context),!1===(null==(n=null==i?void 0:i.getContextAttributes())?void 0:n.preserveDrawingBuffer)&&(null==i||i.clear(i.COLOR_BUFFER_BIT))),t.next=6,createImageBitmap(e);case 6:a=t.sent,l.postMessage({id:o,bitmap:a,width:e.width,height:e.height,dataURLOptions:r.dataURLOptions},[a]);case 8:case"end":return t.stop()}}),t,this)})))}))),c=requestAnimationFrame(e)})),this.resetObservers=function(){a(),cancelAnimationFrame(c)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var o=Qe(e,t,n),r=function(e,t,n,o){var r,i=[],a=In(Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype));try{var s=function(){var a=r.value;try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])return 1;var s=D(t.CanvasRenderingContext2D.prototype,a,(function(r){return function(){for(var i=this,s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return B(this.canvas,n,o,!0)||setTimeout((function(){var n=Ye([].concat(l),t,i);e(i.canvas,{type:Z["2D"],property:a,args:n})}),0),r.apply(this,l)}}));i.push(s)}catch(c){var l=N(t.CanvasRenderingContext2D.prototype,a,{set:function(t){e(this.canvas,{type:Z["2D"],property:a,args:[t],setter:!0})}});i.push(l)}};for(a.s();!(r=a.n()).done;)s()}catch(l){a.e(l)}finally{a.f()}return function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,o,r){var i=[];return i.push.apply(i,Cn($e(t.WebGLRenderingContext.prototype,Z.WebGL,e,n,o,0,t))),Pn(t.WebGL2RenderingContext)<"u"&&i.push.apply(i,Cn($e(t.WebGL2RenderingContext.prototype,Z.WebGL2,e,n,o,0,t))),function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){o(),r(),i()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var o=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,o)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var o=n.map((function(e){return function(e,t){var n={};for(var o in e)ot.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&nt){var r,i=In(nt(e));try{for(i.s();!(r=i.n()).done;)o=r.value,t.indexOf(o)<0&&rt.call(e,o)&&(n[o]=e[o])}catch(a){i.e(a)}finally{i.f()}}return n}(e,["type"])})),r=n[0].type;this.mutationCb({id:t,type:r,commands:o}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),at=function(){function e(t){On(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new G,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return Mn(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,o={id:t,styleIds:[]},r=[],a=In(e);try{for(a.s();!(n=a.n()).done;){var s=n.value,l=void 0;if(this.styleMirror.has(s))l=this.styleMirror.getId(s);else{l=this.styleMirror.add(s);var c=Array.from(s.rules||CSSRule);r.push({styleId:l,rules:c.map((function(e,t){return{rule:i(e),index:t}}))})}o.styleIds.push(l)}}catch(u){a.e(u)}finally{a.f()}r.length>0&&(o.styles=r),this.adoptedStyleSheetCb(o)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),st=Object.defineProperty,lt=Object.defineProperties,ct=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,dt=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,ft=function(e,t,n){return t in e?st(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ht=function(e,t){for(var n in t||(t={}))dt.call(t,n)&&ft(e,n,t[n]);if(ut){var o,r=In(ut(t));try{for(r.s();!(o=r.n()).done;){n=o.value;pt.call(t,n)&&ft(e,n,t[n])}}catch(i){r.e(i)}finally{r.f()}}return e},gt=function(e,t){return lt(e,ct(t))};function mt(e){return gt(ht({},e),{timestamp:Date.now()})}var vt,bt,yt,wt=!1,xt=new a;function kt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,o=e.checkoutEveryNth,r=e.blockClass,i=void 0===r?"rr-block":r,s=e.blockSelector,l=void 0===s?null:s,c=e.ignoreClass,u=void 0===c?"rr-ignore":c,d=e.maskTextClass,p=void 0===d?"rr-mask":d,f=e.maskTextSelector,h=void 0===f?null:f,g=e.inlineStylesheet,m=void 0===g||g,v=e.maskAllInputs,b=e.maskInputOptions,y=e.slimDOMOptions,w=e.maskInputFn,x=e.maskTextFn,k=e.hooks,S=e.packFn,C=e.sampling,I=void 0===C?{}:C,L=e.dataURLOptions,T=void 0===L?{}:L,O=e.mousemoveWait,A=e.recordCanvas,P=void 0!==A&&A,R=e.recordCrossOriginIframes,N=void 0!==R&&R,D=e.userTriggeredOnInput,B=void 0!==D&&D,_=e.collectFonts,H=void 0!==_&&_,U=e.inlineImages,G=void 0!==U&&U,K=e.plugins,Z=e.keepIframeSrcFn,Y=void 0===Z?function(){return!1}:Z,J=e.ignoreCSSAttributes,Q=void 0===J?new Set([]):J,$=!N||window.parent===window,ee=!1;if(!$)try{window.parent.document,ee=!1}catch(ye){ee=!0}if($&&!t)throw new Error("emit function is required");void 0!==O&&void 0===I.mousemove&&(I.mousemove=O),xt.reset();var te=!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==b?b:{password:!0},ne=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};!function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];var r=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===r)return!0}while(r=r&&r.parentNode);return!1})}();var oe,re=0,ie=function(e){var t,n=In(K||[]);try{for(n.s();!(t=n.n()).done;){var o=t.value;o.eventProcessor&&(e=o.eventProcessor(e))}}catch(r){n.e(r)}finally{n.f()}return S&&(e=S(e)),e};vt=function(e,r){var i;if((null==(i=me[0])?void 0:i.isFrozen())&&e.type!==V.FullSnapshot&&!(e.type===V.IncrementalSnapshot&&e.data.source===X.Mutation)&&me.forEach((function(e){return e.unfreeze()})),$)null==t||t(ie(e),r);else if(ee){var a={type:"rrweb",event:ie(e),isCheckout:r};window.parent.postMessage(a,"*")}if(e.type===V.FullSnapshot)oe=e,re=0;else if(e.type===V.IncrementalSnapshot){if(e.data.source===X.Mutation&&e.data.isAttachIframe)return;re++;var s=o&&re>=o,l=n&&e.timestamp-oe.timestamp>n;(s||l)&&bt(!0)}};var ae,se=function(e){vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.Mutation},e)}))},le=function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.Scroll},e)}))},ce=function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.CanvasMutation},e)}))},ue=new at({mutationCb:se,adoptedStyleSheetCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.AdoptedStyleSheet},e)}))}}),de=new Re({mirror:xt,mutationCb:se,stylesheetManager:ue,recordCrossOriginIframes:N,wrappedEmit:vt}),pe=In(K||[]);try{for(pe.s();!(ae=pe.n()).done;){var fe=ae.value;fe.getMirror&&fe.getMirror({nodeMirror:xt,crossOriginIframeMirror:de.crossOriginIframeMirror,crossOriginIframeStyleMirror:de.crossOriginIframeStyleMirror})}}catch(we){pe.e(we)}finally{pe.f()}yt=new it({recordCanvas:P,mutationCb:ce,win:window,blockClass:i,blockSelector:l,mirror:xt,sampling:I.canvas,dataURLOptions:T});var he=new ze({mutationCb:se,scrollCb:le,bypassOptions:{blockClass:i,blockSelector:l,maskTextClass:p,maskTextSelector:h,inlineStylesheet:m,maskInputOptions:te,dataURLOptions:T,maskTextFn:x,maskInputFn:w,recordCanvas:P,inlineImages:G,sampling:I,slimDOMOptions:ne,iframeManager:de,stylesheetManager:ue,canvasManager:yt,keepIframeSrcFn:Y},mirror:xt});bt=function(){var e,t,n,o,r,s,c,u,d,f,g,v,b=arguments.length>0&&void 0!==arguments[0]&&arguments[0];vt(mt({type:V.Meta,data:{href:window.location.href,width:F(),height:j()}}),b),ue.reset(),me.forEach((function(e){return e.lock()}));var y=function(e,t){var n=t||{},o=n.mirror,r=void 0===o?new a:o,i=n.blockClass,s=void 0===i?"rr-block":i,l=n.blockSelector,c=void 0===l?null:l,u=n.maskTextClass,d=void 0===u?"rr-mask":u,p=n.maskTextSelector,f=void 0===p?null:p,h=n.inlineStylesheet,g=void 0===h||h,m=n.inlineImages,v=void 0!==m&&m,b=n.recordCanvas,y=void 0!==b&&b,w=n.maskAllInputs,x=void 0!==w&&w,k=n.maskTextFn,S=n.maskInputFn,C=n.slimDOM,I=void 0!==C&&C,L=n.dataURLOptions,T=n.preserveWhiteSpace,O=n.onSerialize,M=n.onIframeLoad,A=n.iframeLoadTimeout,P=n.onStylesheetLoad,R=n.stylesheetLoadTimeout,N=n.keepIframeSrcFn;return E(e,{doc:e,mirror:r,blockClass:s,blockSelector:c,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:g,maskInputOptions:!0===x?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===x?{password:!0}:x,maskTextFn:k,maskInputFn:S,slimDOMOptions:!0===I||"all"===I?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===I,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===I?{}:I,dataURLOptions:L,inlineImages:v,recordCanvas:y,preserveWhiteSpace:T,onSerialize:O,onIframeLoad:M,iframeLoadTimeout:A,onStylesheetLoad:P,stylesheetLoadTimeout:R,keepIframeSrcFn:void 0===N?function(){return!1}:N,newlyAddedElement:!1})}(document,{mirror:xt,blockClass:i,blockSelector:l,maskTextClass:p,maskTextSelector:h,inlineStylesheet:m,maskAllInputs:te,maskTextFn:x,slimDOM:ne,dataURLOptions:T,recordCanvas:P,inlineImages:G,onSerialize:function(e){q(e,xt)&&de.addIframe(e),z(e,xt)&&ue.trackLinkElement(e),W(e)&&he.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){de.attachIframe(e,t),he.observeAttachShadow(e)},onStylesheetLoad:function(e,t){ue.attachLinkElement(e,t)},keepIframeSrcFn:Y});if(!y)return console.warn("Failed to snapshot the document");vt(mt({type:V.FullSnapshot,data:{node:y,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===(e=document)||void 0===e?void 0:e.documentElement.scrollLeft)||(null==(u=null==(c=null===(t=document)||void 0===t?void 0:t.body)?void 0:c.parentElement)?void 0:u.scrollLeft)||(null==(d=null===(n=document)||void 0===n?void 0:n.body)?void 0:d.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===(o=document)||void 0===o?void 0:o.documentElement.scrollTop)||(null==(g=null==(f=null===(r=document)||void 0===r?void 0:r.body)?void 0:f.parentElement)?void 0:g.scrollTop)||(null==(v=null===(s=document)||void 0===s?void 0:s.body)?void 0:v.scrollTop)||0}}})),me.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,xt.getId(document))};try{var ge=[];ge.push(M("DOMContentLoaded",(function(){vt(mt({type:V.DomContentLoaded,data:{}}))})));var ve=function(e){var t;return Ae({mutationCb:se,mousemoveCb:function(e,t){return vt(mt({type:V.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.MouseInteraction},e)}))},scrollCb:le,viewportResizeCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.ViewportResize},e)}))},inputCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.Input},e)}))},mediaInteractionCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.StyleDeclaration},e)}))},canvasMutationCb:ce,fontCb:function(e){return vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.Font},e)}))},selectionCb:function(e){vt(mt({type:V.IncrementalSnapshot,data:ht({source:X.Selection},e)}))},blockClass:i,ignoreClass:u,maskTextClass:p,maskTextSelector:h,maskInputOptions:te,inlineStylesheet:m,sampling:I,recordCanvas:P,inlineImages:G,userTriggeredOnInput:B,collectFonts:H,doc:e,maskInputFn:w,maskTextFn:x,keepIframeSrcFn:Y,blockSelector:l,slimDOMOptions:ne,dataURLOptions:T,mirror:xt,iframeManager:de,stylesheetManager:ue,shadowDomManager:he,canvasManager:yt,ignoreCSSAttributes:Q,plugins:(null==(t=null==K?void 0:K.filter((function(e){return e.observer})))?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return vt(mt({type:V.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},k)};de.addLoadListener((function(e){ge.push(ve(e.contentDocument))}));var be=function(){bt(),ge.push(ve(document)),wt=!0};return"interactive"===document.readyState||"complete"===document.readyState?be():ge.push(M("load",(function(){vt(mt({type:V.Load,data:{}})),be()}),window)),function(){ge.forEach((function(e){return e()})),wt=!1}}catch(ge){console.warn(ge)}}return kt.addCustomEvent=function(e,t){if(!wt)throw new Error("please add custom event after start recording");vt(mt({type:V.Custom,data:{tag:e,payload:t}}))},kt.freezePage=function(){me.forEach((function(e){return e.freeze()}))},kt.takeFullSnapshot=function(e){if(!wt)throw new Error("please take full snapshot after start recording");bt(e)},kt.mirror=xt,kt}();function Nn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Dn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}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(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function Dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function jn(e){return jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jn(e)}function Fn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fn(Object(n),!0).forEach((function(t){Hn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Un(o.key),o)}}function Hn(e,t,n){return(t=Un(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Un(e){var t=function(e,t){if("object"!=jn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=jn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==jn(t)?t:String(t)}var qn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Hn(this,"startDate",void 0),Hn(this,"events",[]),Hn(this,"bufferSize",0),Hn(this,"stopFunction",void 0),Hn(this,"customOptions",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setOptions",value:function(e){this.customOptions=e}},{key:"start",value:function(){this.stop(),this.startDate=Date.now();var e=this.events;try{this.stopFunction=Rn(Bn(Bn(Bn({},{inlineStylesheet:!0,blockClass:"gl-block",ignoreClass:"gl-ignore",maskTextClass:"gl-mask",dataURLOptions:{quality:.7},recordCanvas:!1,sampling:{scroll:150,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!0,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!0,TouchEnd:!1}},collectFonts:!1,recordCrossOriginIframes:!1}),this.customOptions),{},{emit:function(t){var n=function(e){var t=JSON.stringify(e);if(t.length>4e6){var n,o=/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim,r=Nn(t.matchAll(o));try{for(r.s();!(n=r.n()).done;){var i=n.value;t="image/"===i[1].toLocaleLowerCase().slice(0,6)?t.replace(i[0],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAQSURBVHgBAQUA+v8ABRg5/wHSAVZN1mnaAAAAAElFTkSuQmCC"):t.replace(i[0],"")}}catch(a){r.e(a)}finally{r.f()}}return{event:JSON.parse(t),size:t.length}}(t).event;e.push(n)}}))}catch(t){console.error(t)}}},{key:"stop",value:function(){this.stopFunction&&this.stopFunction(),this.startDate=void 0,this.events=[],this.bufferSize=0}},{key:"getReplayData",value:function(){return{startDate:this.startDate,events:this.events,baseUrl:window.location.origin,width:window.innerWidth,height:window.innerHeight,isMobile:w(),type:"rrweb"}}}])&&_n(t.prototype,n),o&&_n(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function zn(e){return zn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zn(e)}function Wn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Vn(o.key),o)}}function Gn(e,t,n){return(t=Vn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vn(e){var t=function(e,t){if("object"!=zn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=zn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==zn(t)?t:String(t)}Hn(qn,"instance",void 0);var Xn=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Gn(this,"rerender",void 0),Gn(this,"svgElement",null),Gn(this,"path",null),Gn(this,"strPath",void 0),Gn(this,"strokeWidth",12),Gn(this,"strokeWidthRect",6),Gn(this,"bufferSize",4),Gn(this,"buffer",[]),Gn(this,"startPoint",null),Gn(this,"tool","rect"),Gn(this,"color","#EB144C"),Gn(this,"mouseDown",null),Gn(this,"mouseMove",null),Gn(this,"mouseUp",null),Gn(this,"resizeListener",null),Gn(this,"pathBuffer",[]);var o=this;this.rerender=t,this.svgElement=document.querySelector(".bb-capture-svg"),this.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px"),this.resizeListener=function(e){o.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px")},window.addEventListener("resize",this.resizeListener,!0),this.mouseDown=function(e){e.preventDefault();var t=document.querySelector(".bb-capture-toolbar-item-colorpicker");t&&(t.style.display="none"),o.fadeOutToolbar(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseDownPen(e),"rect"===o.tool&&o.mouseDownRect(e)},this.mouseMove=function(e){e.preventDefault(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseMovePen(e),"rect"===o.tool&&o.mouseMoveRect(e)},this.mouseUp=function(e){e.preventDefault(),o.fadeInToolbar(),"pen"!==o.tool&&"blur"!==o.tool||o.mouseUpPen(e),"rect"===o.tool&&o.mouseUpRect(e)},this.svgElement.addEventListener("mousedown",this.mouseDown),this.svgElement.addEventListener("mousemove",this.mouseMove),this.svgElement.addEventListener("mouseup",this.mouseUp),this.svgElement.addEventListener("touchstart",this.mouseDown,!1),this.svgElement.addEventListener("touchmove",this.mouseMove,!1),this.svgElement.addEventListener("touchend",this.mouseUp,!1),setTimeout((function(){n.rerender()}),100)}var t,n,o;return t=e,n=[{key:"clear",value:function(){if(this.svgElement)for(;this.svgElement.firstChild;)this.svgElement.firstChild.remove()}},{key:"destroy",value:function(){this.svgElement.removeEventListener("mousedown",this.mouseDown),this.svgElement.removeEventListener("mousemove",this.mouseMove),this.svgElement.removeEventListener("mouseup",this.mouseUp),this.svgElement.removeEventListener("touchstart",this.mouseDown),this.svgElement.removeEventListener("touchmove",this.mouseMove),this.svgElement.removeEventListener("touchend",this.mouseUp),window.removeEventListener("resize",this.resizeListener)}},{key:"mouseUpPen",value:function(){this.path&&(this.path=null)}},{key:"mouseUpRect",value:function(){this.path&&(this.path=null)}},{key:"mouseMovePen",value:function(e){this.path&&(this.appendToBuffer(this.getMousePosition(e)),this.updateSvgPath())}},{key:"mouseMoveRect",value:function(e){if(this.path){var t=this.getMousePosition(e),n=Math.abs(t.x-this.startPoint.x),o=Math.abs(t.y-this.startPoint.y),r=t.x,i=t.y;t.x>this.startPoint.x&&(r=this.startPoint.x),t.y>this.startPoint.y&&(i=this.startPoint.y),this.path.setAttributeNS(null,"x",r),this.path.setAttributeNS(null,"y",i),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",o)}}},{key:"mouseDownRect",value:function(e){this.path=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",this.color),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",this.strokeWidthRect),this.startPoint=this.getMousePosition(e),this.appendPathToSvg(this.path)}},{key:"mouseDownPen",value:function(e){var t=this.color+"AA",n=this.strokeWidth;"blur"===this.tool&&(t="#000000",n=40),this.path=document.createElementNS("http://www.w3.org/2000/svg","path"),this.path.setAttribute("fill","none"),this.path.setAttribute("stroke",t),this.path.setAttribute("stroke-linecap","round"),this.path.setAttribute("stroke-width",n),this.buffer=[];var o=this.getMousePosition(e);this.appendToBuffer(o),this.strPath="M"+o.x+" "+o.y,this.path.setAttribute("d",this.strPath),this.appendPathToSvg(this.path)}},{key:"setTool",value:function(e){this.tool=e}},{key:"setColor",value:function(e){this.color=e}},{key:"getMousePosition",value:function(e){return e.touches&&e.touches.length>0?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY}}},{key:"getAveragePoint",value:function(e){var t=this.buffer.length;if(t%2==1||t>=this.bufferSize){var n,o,r=0,i=0,a=0;for(o=e;o<t;o++)a++,r+=(n=this.buffer[o]).x,i+=n.y;return{x:r/a,y:i/a}}return null}},{key:"updateSvgPath",value:function(){var e=this.getAveragePoint(0);if(e){this.strPath+=" L"+e.x+" "+e.y;for(var t="",n=2;n<this.buffer.length;n+=2)t+=" L"+(e=this.getAveragePoint(n)).x+" "+e.y;this.path.setAttribute("d",this.strPath+t)}}},{key:"appendToBuffer",value:function(e){for(this.buffer.push(e);this.buffer.length>this.bufferSize;)this.buffer.shift()}},{key:"appendPathToSvg",value:function(e){this.svgElement.appendChild(e),this.pathBuffer.push(e),this.rerender()}},{key:"removeLastAddedPathFromSvg",value:function(){this.pathBuffer.length<=0||!this.svgElement||(this.svgElement.removeChild(this.pathBuffer[this.pathBuffer.length-1]),this.pathBuffer.pop(),this.rerender())}},{key:"fadeOutToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=0,e.style.pointerEvents="none")}},{key:"fadeInToolbar",value:function(){var e=document.querySelector(".bb-capture-toolbar");e&&(e.style.opacity=1,e.style.pointerEvents="auto")}}],n&&Wn(t.prototype,n),o&&Wn(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Kn(e){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kn(e)}function Zn(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Jn(o.key),o)}}function Yn(e,t,n){return(t=Jn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jn(e){var t=function(e,t){if("object"!=Kn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Kn(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kn(t)?t:String(t)}var Qn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Yn(this,"keys",{37:1,38:1,39:1,40:1}),Yn(this,"supportsPassive",!1),Yn(this,"wheelOpt",!!this.supportsPassive&&{passive:!1}),Yn(this,"wheelEvent","onwheel"in document.createElement("div")?"wheel":"mousewheel"),Yn(this,"scrollDisabled",!1);var t=this;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){t.supportsPassive=!0,t.wheelOpt=!!t.supportsPassive&&{passive:!1}}}))}catch(n){}}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"disableScroll",value:function(){var e=this.getInstance();e.scrollDisabled||(e.scrollDisabled=!0,window.addEventListener("DOMMouseScroll",e.preventDefault,!1),window.addEventListener(e.wheelEvent,e.preventDefault,e.wheelOpt),window.addEventListener("touchmove",e.preventDefault,e.wheelOpt),window.addEventListener("keydown",e.preventDefaultForScrollKeys,!1))}},{key:"enableScroll",value:function(){var e=this.getInstance();e.scrollDisabled&&(e.scrollDisabled=!1,window.removeEventListener("DOMMouseScroll",e.preventDefault,!1),window.removeEventListener(e.wheelEvent,e.preventDefault,e.wheelOpt),window.removeEventListener("touchmove",e.preventDefault,e.wheelOpt),window.removeEventListener("keydown",e.preventDefaultForScrollKeys,!1))}}],(n=[{key:"preventDefault",value:function(e){e.preventDefault()}},{key:"preventDefaultForScrollKeys",value:function(e){if(this.keys&&this.keys[e.keyCode])return this.preventDefault(e),!1}}])&&Zn(t.prototype,n),o&&Zn(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function $n(e){return $n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$n(e)}function eo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,no(o.key),o)}}function to(e,t,n){return(t=no(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function no(e){var t=function(e,t){if("object"!=$n(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=$n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$n(t)?t:String(t)}Yn(Qn,"instance",void 0);var oo=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),to(this,"type","screenshot"),to(this,"dragCursor",null),to(this,"screenRecorder",null),to(this,"callback",null),to(this,"screenDrawer",null),to(this,"escListener",null),to(this,"pageLeaveListener",null),to(this,"overrideLanguage",Ar.getInstance().overrideLanguage),to(this,"showNextStep",(function(){this.showWidgetUI(),this.callback&&(Bt.getInstance().sendMessage({name:"set-form-data",data:{formKey:"capture",data:{value:this.type,dirty:!0}}}),this.callback(!0))})),this.type=t}var t,n,o;return t=e,n=[{key:"hideWidgetUI",value:function(){var e=document.querySelector(".bb-feedback-button");e&&(e.style.display="none");var t=document.querySelector(".bb-feedback-dialog-container");t&&(t.style.display="none")}},{key:"showWidgetUI",value:function(){"screenshot"===this.type&&Qn.enableScroll(),this.screenRecorder&&this.screenRecorder.stopScreenRecording(),this.unregisterListeners(),this.cleanupMousePointer(),this.screenDrawer&&this.screenDrawer.destroy();var e=document.querySelector(".bb-capture-toolbar");e&&e.remove();var t=document.querySelector(".bb-capture-svg");t&&t.classList.add("bb-capture-svg--preview");var n=document.querySelector(".bb-capture-preview");n&&n.remove();var o=document.querySelector(".bb-feedback-button");o&&(o.style.display="flex");var r=document.querySelector(".bb-feedback-dialog-container");r&&(r.style.display="block");var i=document.querySelector(".bb-capture-dismiss");i&&(i.style.display="none");var a=document.querySelector(".bb-capture-toolbar-item-colorpicker");a&&(a.style.display="none");var s=document.querySelector(".bb-capture-editor-borderlayer");s&&(s.style.display="none")}},{key:"clear",value:function(){var e=document.querySelector(".bb-capture-editor");e&&e.remove()}},{key:"setMouseMove",value:function(e,t){this.dragCursor&&(this.dragCursor.style.left="".concat(e+6,"px"),this.dragCursor.style.top="".concat(t-26,"px"),this.dragCursor.style.right=null)}},{key:"mouseMoveEventHandler",value:function(e){var t=e.clientX,n=e.clientY;this.setMouseMove(t,n)}},{key:"touchMoveEventHandler",value:function(e){var t=e.touches[0].clientX,n=e.touches[0].clientY;this.setMouseMove(t,n)}},{key:"setupMousePointer",value:function(){var e=this;this.dragCursor=document.querySelector(".bb-capture-editor-drag-info");var t=document.querySelector(".bb-capture-svg");t.addEventListener("mouseenter",(function(t){e.dragCursor.style.opacity=1})),t.addEventListener("mouseleave",(function(t){e.dragCursor.style.opacity=0})),document.documentElement.addEventListener("mousemove",this.mouseMoveEventHandler.bind(this)),document.documentElement.addEventListener("touchmove",this.touchMoveEventHandler.bind(this))}},{key:"cleanupMousePointer",value:function(){document.documentElement.removeEventListener("mousemove",this.mouseMoveEventHandler),document.documentElement.removeEventListener("touchmove",this.touchMoveEventHandler),this.dragCursor&&this.dragCursor.remove()}},{key:"createEditorUI",value:function(){var e=document.createElement("div");e.className="bb-capture-editor",e.innerHTML='\n <div class="bb-capture-editor-borderlayer"></div>\n <svg class="bb-capture-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" xml:space="preserve"></svg>\n <div class="bb-capture-dismiss">'.concat(p("dismiss"),"</div>\n <div class='bb-capture-editor-drag-info'>").concat(p("rect"),'</div>\n <div class="bb-capture-toolbar">\n ').concat("capture"===this.type?'<div class="bb-capture-toolbar-item bb-capture-item-rec bb-capture-toolbar-item-recording" data-type="recording">\n '.concat(p("recorderon"),"\n ").concat(p("recorderoff"),'\n <span class="bb-tooltip bb-tooltip-screen-recording"></span>\n </div>\n <div class="bb-capture-toolbar-item bb-capture-item-rec" data-type="mic">\n ').concat(p("mic"),'\n <span class="bb-tooltip bb-tooltip-audio-recording"></span>\n </div>\n <div class="bb-capture-toolbar-item-timer bb-capture-item-rec">2:00</div>\n <div class="bb-capture-toolbar-item-spacer"></div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="pointer">\n ').concat(p("pointer"),"\n </div>"):"",'\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool bb-capture-toolbar-item--active" data-type="rect">\n ').concat(p("rect"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="pen">\n ').concat(p("pen"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="blur">\n ').concat(p("blur"),'\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem" data-type="colorpicker">\n <div class="bb-capture-toolbar-item-selectedcolor"></div>\n <span class="bb-tooltip">').concat(lo.translateText("pickAColor"),'</span>\n </div>\n <div class="bb-capture-toolbar-item bb-capture-toolbar-drawingitem bb-capture-toolbar-item-tool" data-type="undo">\n ').concat(p("undo"),'\n <span class="bb-tooltip">').concat(lo.translateText("undo"),"</span>\n </div>\n ").concat("capture"!==this.type?'<div class="bb-capture-button-next">'.concat(lo.translateText("next"),"</div>"):"",'\n </div>\n <div class="bb-capture-toolbar-item-colorpicker">\n <div class="bb-capture-toolbar-item-color" data-color="#EB144C"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#FF6705"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#FDB903"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#9900EE"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#00D082"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#0A93E4"></div>\n <div class="bb-capture-toolbar-item-color" data-color="#CCCCCC"></div>\n </div>\n <div class="bb-capture-preview">\n <div class="bb-capture-preview-inner">\n <video controls muted autoplay></video>\n <div class="bb-capture-preview-buttons">\n <div class="bb-capture-preview-retrybutton">').concat(lo.translateText("retry"),'</div>\n <div class="bb-capture-preview-sendbutton">').concat(lo.translateText("next"),"</div>\n </div>\n </div>\n </div>\n "),document.body.appendChild(e),e.setAttribute("dir",lo.getInstance().isRTLLayout?"rtl":"ltr")}},{key:"unregisterListeners",value:function(){this.escListener&&document.removeEventListener("keydown",this.escListener),this.pageLeaveListener&&window.removeEventListener("beforeunload",this.pageLeaveListener)}},{key:"registerListeners",value:function(){var e=this;this.escListener=function(t){var n=!1,o=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,o="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&o&&e.showNextStep()},document.addEventListener("keydown",this.escListener),this.pageLeaveListener=function(e){e.preventDefault(),e.returnValue=""},window.addEventListener("beforeunload",this.pageLeaveListener)}},{key:"show",value:function(e){this.callback=e,this.registerListeners(),this.hideWidgetUI(),this.createEditorUI(),this.setupMousePointer(),"screenshot"===this.type?(Ar.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),Qn.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new Xn(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),o=document.querySelectorAll(".bb-capture-toolbar-item-color"),r=document.querySelector(".bb-capture-toolbar-item-colorpicker"),i=function(){var i=o[a],s=i.getAttribute("data-color");i.style.backgroundColor=s,i.onclick=function(){i&&(t.screenDrawer.setColor(s),r&&(r.style.display="none"),n.style.backgroundColor=i.style.backgroundColor,e.setPenColor(s))}},a=0;a<o.length;a++)i()}},{key:"dismiss",value:function(){this.showWidgetUI(),this.callback&&this.callback(!1)}},{key:"setupToolbar",value:function(){var e=this;document.querySelector(".bb-capture-dismiss").onclick=function(){e.dismiss()};var t=document.querySelector(".bb-capture-button-next");t&&(t.onclick=this.showNextStep.bind(this));for(var n=document.querySelector(".bb-capture-toolbar-item-colorpicker"),o=document.querySelector(".bb-capture-svg"),r=function(t,n){for(var r=document.querySelectorAll(".bb-capture-toolbar-item-tool"),i=0;i<r.length;i++)r[i].classList.remove("bb-capture-toolbar-item--active");if(n.classList.add("bb-capture-toolbar-item--active"),e.screenDrawer.setTool(t),e.dragCursor.innerHTML="","pointer"===t)o.style.pointerEvents="none";else{o.style.pointerEvents="auto";try{var a=n.querySelector("svg").cloneNode(!0);a&&e.dragCursor&&e.dragCursor.appendChild(a)}catch(s){}}},i=document.querySelectorAll(".bb-capture-toolbar-item"),a=function(){var t=i[s];t.onclick=function(){var o=t.getAttribute("data-type");n&&"colorpicker"!==o&&(n.style.display="none"),"mic"===o&&e.screenRecorder.toggleAudio(),"recording"===o&&(e.screenRecorder.isRecording?e.screenRecorder.stopScreenRecording():(e.screenRecorder.startScreenRecording(),r("pointer",document.querySelector(".bb-capture-toolbar-item[data-type='pointer']")))),("capture"!==e.type||e.screenRecorder.isRecording)&&("pen"!==o&&"blur"!==o&&"rect"!==o&&"pointer"!==o||r(o,t),"colorpicker"===o&&("flex"===n.style.display?n.style.display="none":n.style.display="flex"),"undo"===o&&e.screenDrawer.removeLastAddedPathFromSvg())}},s=0;s<i.length;s++)a()}},{key:"captureScreenDrawerRerender",value:function(){if(this.screenDrawer)for(var e="bb-capture-editor-item-inactive",t=document.querySelectorAll(".bb-capture-toolbar-item"),n=0;n<t.length;n++){var o=t[n];"undo"===o.getAttribute("data-type")&&(null!=this.screenDrawer.pathBuffer&&this.screenDrawer.pathBuffer.length>0?o.classList.remove(e):o.classList.add(e))}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&Ar.getInstance().setGlobalDataItem("screenRecordingData",this.screenRecorder.file);var e="bb-capture-editor-item-inactive",t=document.querySelector(".bb-capture-toolbar-item-timer"),n=document.querySelectorAll(".bb-capture-toolbar-item"),o=document.querySelector(".bb-tooltip-screen-recording"),r=document.querySelector(".bb-tooltip-audio-recording"),i=document.querySelector(".bb-capture-editor"),a="bb-capture-editor-recording",s="bb-capture-editor-notrecording";this.screenRecorder.isRecording?(i.classList.add(a),i.classList.remove(s)):(i.classList.add(s),i.classList.remove(a));var l=document.querySelector(".bb-capture-toolbar");document.querySelector(".bb-capture-preview").style.display=this.screenRecorder.file?"flex":"none",l.style.display=this.screenRecorder.file?"none":"flex";for(var c=0;c<n.length;c++){var u=n[c];switch(u.getAttribute("data-type")){case"mic":this.screenRecorder.audioAvailable&&this.screenRecorder.available?(u.classList.remove(e),this.screenRecorder.audioMuted?(u.classList.add("bb-capture-toolbar-item--inactivecross"),r.innerHTML=lo.translateText("unmute")):(u.classList.remove("bb-capture-toolbar-item--inactivecross"),r.innerHTML=lo.translateText("mute"))):(u.classList.add(e),u.classList.add("bb-capture-toolbar-item--inactivecross"),r.innerHTML=lo.translateText("browserNotSupported"));break;case"recording":this.screenRecorder.available?(u.classList.remove(e),this.screenRecorder.isRecording?(u.setAttribute("data-active","true"),o.innerHTML=lo.translateText("stopRecording"),t.style.display="block"):(u.setAttribute("data-active","false"),o.innerHTML=lo.translateText("startRecording"),t.style.display="none")):(u.classList.add(e),o.innerHTML=lo.translateText("browserNotSupported"))}}}}},{key:"setupScreenRecording",value:function(){var e=this;document.querySelector(".bb-capture-preview-sendbutton").onclick=this.showNextStep.bind(this),document.querySelector(".bb-capture-preview-retrybutton").onclick=function(){e.screenRecorder.clearPreview(),e.screenDrawer&&e.screenDrawer.clear()},this.screenRecorder=new Ct(this.captureRenderer.bind(this),lo.translateText("accessToScreenSharingDenied"))}}],o=[{key:"setPenColor",value:function(e){for(var t=document.querySelectorAll(".bb-pen-tip"),n=0;n<t.length;n++)t[n].style.fill=e}}],n&&eo(t.prototype,n),o&&eo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ro(e){return ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ro(e)}function io(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,so(o.key),o)}}function ao(e,t,n){return(t=so(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function so(e){var t=function(e,t){if("object"!=ro(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=ro(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ro(t)?t:String(t)}var lo=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ao(this,"overrideLanguage",""),ao(this,"isRTLLayout",!1)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"translateText",value:function(e){if(!e)return"";var t=nt.getInstance().getFlowConfig().staticTranslations;return t&&t[e]?t[e]:e}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e}},{key:"updateRTLSupport",value:function(){var e=nt.getInstance().getFlowConfig();this.isRTLLayout=!1,e&&e.localizationOptions&&e.localizationOptions.rtl&&(this.isRTLLayout=!0),a.getInstance().updateFeedbackButtonState(),Bt.getInstance().updateFrameStyle()}},{key:"getActiveLanguage",value:function(){var e="en";return"undefined"!=typeof navigator&&(e=navigator.language.toLowerCase()),this.overrideLanguage&&""!==this.overrideLanguage&&(e=this.overrideLanguage.toLowerCase()),e}}])&&io(t.prototype,n),o&&io(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function co(e){return co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},co(e)}function uo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,fo(o.key),o)}}function po(e,t,n){return(t=fo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fo(e){var t=function(e,t){if("object"!=co(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=co(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==co(t)?t:String(t)}ao(lo,"instance",void 0);var ho=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),po(this,"shortCutListener",void 0)}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"start",value:function(){this.shortCutListener||(this.shortCutListener=document.addEventListener("keyup",(function(e){var t,n,o=(void 0!==(t=e).key?n=t.key:void 0!==t.keyIdentifier?n=t.keyIdentifier:void 0!==t.keyCode&&(n=t.keyCode),n);!e.ctrlKey||"u"!==o&&"U"!==o&&85!==o||Ar.startFeedbackFlowWithOptions("bugreporting",{autostartDrawing:!0})})))}},{key:"stop",value:function(){this.shortCutListener&&(document.removeEventListener("keyup",this.shortCutListener),this.shortCutListener=void 0)}}])&&uo(t.prototype,n),o&&uo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function go(e){return go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},go(e)}function mo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,bo(o.key),o)}}function vo(e,t,n){return(t=bo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bo(e){var t=function(e,t){if("object"!=go(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=go(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==go(t)?t:String(t)}po(ho,"instance",void 0);var yo=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),vo(this,"formPreFill",{})}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=null)&&mo(t.prototype,n),o&&mo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wo(e){return wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wo(e)}function xo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,So(o.key),o)}}function ko(e,t,n){return(t=So(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function So(e){var t=function(e,t){if("object"!=wo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=wo(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wo(t)?t:String(t)}vo(yo,"instance",void 0);var Co=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ko(this,"notificationContainer",null),ko(this,"notifications",[]),ko(this,"unreadCount",0),ko(this,"unreadNotificationsKey","unread-notifications"),ko(this,"isTabActive",!0),ko(this,"showNotificationBadge",!0)}var t,n,o;return t=e,n=[{key:"updateTabBarNotificationCount",value:function(){hn.notifyEvent("unread-count-changed",this.unreadCount)}},{key:"injectNotificationUI",value:function(){if(!this.notificationContainer){var e=document.createElement("div");e.className="gleap-notification-container gleap-font",document.body.appendChild(e),this.notificationContainer=e,this.updateContainerStyle(),this.reloadNotificationsFromCache()}}},{key:"reloadNotificationsFromCache",value:function(){var e=C(this.unreadNotificationsKey);e&&e.length>0&&(e.length>2?this.notifications=e.splice(0,e.length-2):this.notifications=e,this.renderNotifications())}},{key:"setNotificationCount",value:function(e){Bt.getInstance().isOpened()?(this.unreadCount=0,this.updateTabBarNotificationCount()):this.unreadCount=e,this.updateTabBarNotificationCount(),a.getInstance().updateNotificationBadge(this.unreadCount)}},{key:"showNotification",value:function(e){this.notificationContainer&&e&&e.data&&(this.notifications.find((function(t){return e.outbound===t.outbound}))||(this.notifications.push(e),e.sound&&jo.ping()),this.notifications.length>2&&this.notifications.shift(),I(this.unreadNotificationsKey,this.notifications),this.renderNotifications())}},{key:"renderNotifications",value:function(){var e=this;if(this.notificationContainer){this.clearAllNotifications(!0);var t=document.createElement("div");t.onclick=function(){e.clearAllNotifications()},t.className="gleap-notification-close",t.innerHTML=p("dismiss"),this.notificationContainer.appendChild(t);for(var n,o,r=function(){var t=e.notifications[i];n=(n=t.data.text).replaceAll("{{name}}",Ge.getInstance().getName());var r=document.createElement("div");r.onclick=function(){t.data.conversation?Ar.openConversation(t.data.conversation.shareToken,!0):t.data.news?Ar.openNewsArticle(t.data.news.id,!0):t.data.checklist?Ar.openChecklist(t.data.checklist.id,!0):Ar.open()},t.data.news?(r.className="gleap-notification-item-news",r.innerHTML='\n <div class="gleap-notification-item-news-container">\n '.concat(t.data.coverImageUrl&&""!==t.data.coverImageUrl&&!t.data.coverImageUrl.includes("NewsImagePlaceholder")?'<img class="gleap-notification-item-news-image" src="'.concat(t.data.coverImageUrl,'" />'):"",'\n <div class="gleap-notification-item-news-content">\n <div class="gleap-notification-item-news-content-title">').concat(n,"</div>\n ").concat(t.data.previewText&&t.data.previewText.length>0?'<div class="gleap-notification-item-news-preview">'.concat(t.data.previewText,"</div>"):"".concat(t.data.sender?'\n <div class="gleap-notification-item-news-sender">\n '.concat(t.data.sender.profileImageUrl&&'<img src="'.concat(t.data.sender.profileImageUrl,'" />')," ").concat(t.data.sender.name,"</div>"):""),"\n </div>\n </div>")):t.data.checklist?((o=Math.round(t.data.currentStep/t.data.totalSteps*100))<100&&(o+=4),r.className="gleap-notification-item-checklist",r.innerHTML='\n <div class="gleap-notification-item-checklist-container">\n <div class="gleap-notification-item-checklist-content">\n <div class="gleap-notification-item-checklist-content-title">'.concat(t.data.text,'</div>\n <div class="gleap-notification-item-checklist-content-progress">\n <div class="gleap-notification-item-checklist-content-progress-inner" style="width: ').concat(o,'%;"></div>\n </div>\n <div class="gleap-notification-item-checklist-content-next">\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4 12H20M20 12L14 6M20 12L14 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n ').concat(t.data.nextStepTitle,"\n </div>\n </div>\n </div>")):(r.className="gleap-notification-item",r.innerHTML="\n ".concat(t.data.sender&&t.data.sender.profileImageUrl&&'<img src="'.concat(t.data.sender.profileImageUrl,'" />'),'\n <div class="gleap-notification-item-container">\n ').concat(t.data.sender?'<div class="gleap-notification-item-sender">'.concat(t.data.sender.name,"</div>"):"",'\n <div class="gleap-notification-item-content">').concat(n,"</div>\n </div>")),e.notificationContainer.appendChild(r)},i=0;i<this.notifications.length;i++)r()}}},{key:"clearAllNotifications",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],I(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=nt.getInstance().getFlowConfig(),t="gleap-notification-container--left",n="gleap-notification-container--no-button";this.notificationContainer.classList.remove(t),this.notificationContainer.classList.remove(n),e.feedbackButtonPosition!==a.FEEDBACK_BUTTON_CLASSIC_LEFT&&e.feedbackButtonPosition!==a.FEEDBACK_BUTTON_BOTTOM_LEFT||this.notificationContainer.classList.add(t),null===a.getInstance().buttonHidden?e.feedbackButtonPosition===a.FEEDBACK_BUTTON_NONE&&this.notificationContainer.classList.add(n):a.getInstance().buttonHidden&&this.notificationContainer.classList.add(n),this.notificationContainer.setAttribute("dir",lo.getInstance().isRTLLayout?"rtl":"ltr")}}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&xo(t.prototype,n),o&&xo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Io(e){return Io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Io(e)}function Lo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function To(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lo(Object(n),!0).forEach((function(t){Eo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Mo(o.key),o)}}function Eo(e,t,n){return(t=Mo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mo(e){var t=function(e,t){if("object"!=Io(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Io(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Io(t)?t:String(t)}ko(Co,"instance",void 0);var Ao=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Eo(this,"bannerUrl","https://outboundmedia.gleap.io"),Eo(this,"bannerContainer",null),Eo(this,"bannerData",null),this.startCommunication()}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setBannerUrl",value:function(e){this.bannerUrl=e}},{key:"startCommunication",value:function(){var e=this;window.addEventListener("message",(function(t){if(t.origin===e.bannerUrl)try{var n,o,r,i,a,s,l,c,u=JSON.parse(t.data);"banner-loaded"===u.name&&e.bannerData&&e.sendMessage({name:"banner-data",data:e.bannerData}),"banner-height"===u.name&&document.documentElement.style.setProperty("--gleap-margin-top",u.data.height+"px"),"banner-data-set"===u.name&&(document.body.classList.add("gleap-b-shown"),"floating"===(null===(n=e.bannerData)||void 0===n?void 0:n.format)&&document.body.classList.add("gleap-b-f")),"banner-close"===u.name&&e.removeBannerUI(),"start-conversation"===u.name&&Ar.startBot(null===(o=u.data)||void 0===o?void 0:o.botId),"start-custom-action"===u.name&&Ar.triggerCustomAction(null===(r=u.data)||void 0===r?void 0:r.action),"show-form"===u.name&&Ar.startFeedbackFlow(null===(i=u.data)||void 0===i?void 0:i.formId),"show-survey"===u.name&&Ar.showSurvey(null===(a=u.data)||void 0===a?void 0:a.formId,null===(s=u.data)||void 0===s?void 0:s.surveyFormat),"show-news-article"===u.name&&Ar.openNewsArticle(null===(l=u.data)||void 0===l?void 0:l.articleId),"show-help-article"===u.name&&Ar.openHelpCenterArticle(null===(c=u.data)||void 0===c?void 0:c.articleId)}catch(d){}}))}},{key:"removeBannerUI",value:function(){this.bannerContainer&&(document.body.removeChild(this.bannerContainer),this.bannerContainer=null),document.body.classList.remove("gleap-b-shown"),document.body.classList.remove("gleap-b-f")}},{key:"injectBannerUI",value:function(e){if(this.bannerContainer||!document.body)return!1;this.bannerData=e;var t=document.createElement("div");t.className="gleap-b",t.innerHTML='<iframe src="'.concat(this.bannerUrl,'" class="gleap-b-frame" scrolling="no" title="Gleap Banner" role="dialog" frameborder="0"></iframe>'),document.body.appendChild(t),this.bannerContainer=t}},{key:"sendMessage",value:function(e){try{var t=document.querySelector(".gleap-b-frame");t&&t.contentWindow&&t.contentWindow.postMessage(JSON.stringify(To(To({},e),{},{type:"banner"})),"*")}catch(n){}}},{key:"showBanner",value:function(e){this.injectBannerUI(e)}}])&&Oo(t.prototype,n),o&&Oo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Po(e){return Po="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Po(e)}function Ro(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Do(o.key),o)}}function No(e,t,n){return(t=Do(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Do(e){var t=function(e,t){if("object"!=Po(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Po(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Po(t)?t:String(t)}Eo(Ao,"instance",void 0);var jo=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,o=[{key:"playSound",value:function(e){this.settings.play=e}},{key:"ping",value:function(){try{if(!this.settings.play)return;this.audio||(this.audio=new Audio("https://js.gleap.io/res/ping.mp3"));var e=this.audio.play();void 0!==e&&e.then((function(e){})).catch((function(e){}))}catch(t){}}}],(n=null)&&Ro(t.prototype,n),o&&Ro(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Fo(e){return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fo(e)}function Bo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ho(o.key),o)}}function _o(e,t,n){return(t=Ho(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ho(e){var t=function(e,t){if("object"!=Fo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Fo(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Fo(t)?t:String(t)}No(jo,"audio",void 0),No(jo,"settings",{play:!0});var Uo=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),_o(this,"tags",[])}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"getTags",value:function(){return this.tags}},{key:"setTags",value:function(e){this.tags=e}}])&&Bo(t.prototype,n),o&&Bo(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();_o(Uo,"instance",void 0);class qo{constructor(e){var t,n,o,r,i,a,s,l,c,u,d;this.overlay=document.createElement("div"),this.overlay.className=e.className||"_ext-element-overlay",this.overlay.style.background=(null===(t=e.style)||void 0===t?void 0:t.background)||"rgba(250, 240, 202, 0.2)",this.overlay.style.borderColor=(null===(n=e.style)||void 0===n?void 0:n.borderColor)||"#F95738",this.overlay.style.borderStyle=(null===(o=e.style)||void 0===o?void 0:o.borderStyle)||"solid",this.overlay.style.borderRadius=(null===(r=e.style)||void 0===r?void 0:r.borderRadius)||"1px",this.overlay.style.borderWidth=(null===(i=e.style)||void 0===i?void 0:i.borderWidth)||"1px",this.overlay.style.boxSizing=(null===(a=e.style)||void 0===a?void 0:a.boxSizing)||"border-box",this.overlay.style.cursor=(null===(s=e.style)||void 0===s?void 0:s.cursor)||"crosshair",this.overlay.style.position=(null===(l=e.style)||void 0===l?void 0:l.position)||"absolute",this.overlay.style.zIndex=(null===(c=e.style)||void 0===c?void 0:c.zIndex)||"2147483647",this.overlay.style.margin=(null===(u=e.style)||void 0===u?void 0:u.margin)||"0px",this.overlay.style.padding=(null===(d=e.style)||void 0===d?void 0:d.padding)||"0px",this.shadowContainer=document.createElement("div"),this.shadowContainer.className="_ext-element-overlay-container",this.shadowContainer.style.position="absolute",this.shadowContainer.style.top="0px",this.shadowContainer.style.left="0px",this.shadowContainer.style.margin="0px",this.shadowContainer.style.padding="0px",this.shadowRoot=this.shadowContainer.attachShadow({mode:"open"})}addToDOM(e,t){this.usingShadowDOM=t,t?(e.insertBefore(this.shadowContainer,e.firstChild),this.shadowRoot.appendChild(this.overlay)):e.appendChild(this.overlay)}removeFromDOM(){this.setBounds({x:0,y:0,width:0,height:0}),this.overlay.remove(),this.usingShadowDOM&&this.shadowContainer.remove()}captureCursor(){this.overlay.style.pointerEvents="auto"}ignoreCursor(){this.overlay.style.pointerEvents="none"}setBounds({x:e,y:t,width:n,height:o}){this.overlay.style.left=e+"px",this.overlay.style.top=t+"px",this.overlay.style.width=n+"px",this.overlay.style.height=o+"px"}}class zo{constructor(e){this.handleMouseMove=e=>{this.mouseX=e.clientX,this.mouseY=e.clientY},this.handleClick=e=>{var t;this.target&&(null===(t=this.options)||void 0===t?void 0:t.onClick)&&this.options.onClick(this.target),e.preventDefault()},this.tick=()=>{this.updateTarget(),this.tickReq=window.requestAnimationFrame(this.tick)},this.active=!1,this.overlay=new qo(null!=e?e:{})}start(e){var t,n;return!this.active&&(this.active=!0,this.options=e,document.addEventListener("mousemove",this.handleMouseMove,!0),document.addEventListener("click",this.handleClick,!0),this.overlay.addToDOM(null!==(t=e.parentElement)&&void 0!==t?t:document.body,null===(n=e.useShadowDOM)||void 0===n||n),this.tick(),!0)}stop(){this.active=!1,this.options=void 0,document.removeEventListener("mousemove",this.handleMouseMove,!0),document.removeEventListener("click",this.handleClick,!0),this.overlay.removeFromDOM(),this.target=void 0,this.mouseX=void 0,this.mouseY=void 0,this.tickReq&&window.cancelAnimationFrame(this.tickReq)}updateTarget(){var e,t;if(void 0===this.mouseX||void 0===this.mouseY)return;this.overlay.ignoreCursor();const n=document.elementFromPoint(this.mouseX,this.mouseY);if(this.overlay.captureCursor(),!n||n===this.target)return;if((null===(e=this.options)||void 0===e?void 0:e.elementFilter)&&!this.options.elementFilter(n))return this.target=void 0,void this.overlay.setBounds({x:0,y:0,width:0,height:0});this.target=n;const o=(e=>{const t=e.getBoundingClientRect();return{x:window.pageXOffset+t.left,y:window.pageYOffset+t.top,width:e.offsetWidth,height:e.offsetHeight}})(n);this.overlay.setBounds(o),(null===(t=this.options)||void 0===t?void 0:t.onHover)&&this.options.onHover(n)}}var Wo=n(924);function Go(e){return Go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Go(e)}function Vo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Zo(o.key),o)}}function Xo(e,t,n){return t&&Vo(e.prototype,t),n&&Vo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ko(e,t,n){return(t=Zo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zo(e){var t=function(e,t){if("object"!=Go(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Go(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Go(t)?t:String(t)}const Yo=Xo((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ko(this,"picker",null),Ko(this,"onElementPicked",null),Ko(this,"stopPicker",(function(){if(t.picker)return t.picker.stop(),void(t.picker=null)})),Ko(this,"startPicker",(function(){t.stopPicker();var e=t;t.picker=new zo({style:{borderColor:"#2142E7",background:"transparent",borderWidth:"4px",borderRadius:"5px"}}),t.picker.start({useShadowDOM:!1,onClick:function(t){try{var n=(0,Wo.A)(t);e.onElementPicked&&e.onElementPicked(n)}catch(o){console.error("Error while getting unique selector",o)}},elementFilter:function(e){return!e.classList.contains("gleap-admin-collapse-ui")&&!e.closest(".gleap-admin-collapse-ui")}})})),Ko(this,"setMode",(function(e){t.mode=e,"navigate"===e&&t.stopPicker(),"picker"===e&&t.startPicker()}))}));function Jo(e){return Jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jo(e)}function Qo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function $o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qo(Object(n),!0).forEach((function(t){tr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function er(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,nr(o.key),o)}}function tr(e,t,n){return(t=nr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nr(e){var t=function(e,t){if("object"!=Jo(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=Jo(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jo(t)?t:String(t)}var or=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),tr(this,"libraryInstance",null),tr(this,"lastUrl",void 0),tr(this,"injectedFrame",!1),tr(this,"gleapFrameContainer",null),tr(this,"gleapCollapseUI",null),tr(this,"injectedCollapseUI",!1),tr(this,"gleapFrame",null),tr(this,"configData",null),tr(this,"adminHelper",null),tr(this,"status","navigate"),tr(this,"toggleCollapseUI",(function(){var e="gleap-admin-collapse-ui-active",n="gleap-admin-frame-container-active",o=function(e,t){return e&&e.classList.contains(t)};(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])||o(t.gleapCollapseUI,e)&&o(t.gleapFrameContainer,n))&&(t.gleapCollapseUI&&t.gleapCollapseUI.classList.toggle(e),t.gleapFrameContainer&&t.gleapFrameContainer.classList.toggle(n))})),tr(this,"injectCollapseUI",(function(){if(!t.injectedCollapseUI){t.injectedCollapseUI=!0;var e=document.createElement("div");e.className="gleap-admin-collapse-ui",e.innerHTML='<div class="gleap-admin-collapse-ui-icon">\n '.concat(p("arrowdown"),"\n </div>"),document.body.appendChild(e),t.gleapCollapseUI=e,e.addEventListener("click",(function(){t.toggleCollapseUI()}))}})),tr(this,"injectFrame",(function(){var e;if(!t.injectedFrame){t.injectedFrame=!0;var n=document.createElement("div");n.className="gleap-admin-frame-container",n.innerHTML='<iframe src="http://localhost:3000/'.concat("tooltips"===(null==t||null===(e=t.configData)||void 0===e?void 0:e.type)?"tooltipbuilder":"producttourbuilder",'" class="gleap-admin-frame" scrolling="no" title="Gleap Admin Window" allow="autoplay; encrypted-media; fullscreen;" frameborder="0"></iframe>'),document.body.appendChild(n),t.gleapFrameContainer=n,t.gleapFrame=document.querySelector(".gleap-admin-frame")}}))}var t,n,o;return t=e,o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"logCurrentPage",value:function(){var e=window.location.href;e&&e!==this.lastUrl&&(this.lastUrl=e,this.sendMessageToTourBuilder({name:"page-changed",data:{page:e}}))}},{key:"startPageListener",value:function(){var e=this;setInterval((function(){e.logCurrentPage()}),1e3)}},{key:"initAdminHelper",value:function(){var e=this;yr.getInstance().disable(),e.adminHelper=new Yo;try{e.adminHelper.onElementPicked=function(t){e.toggleCollapseUI(!0),e.sendMessageToTourBuilder({name:"element-picked",data:{selector:t}})}}catch(t){console.log(t)}e.injectFrame(),e.injectCollapseUI(),e.setFrameHeight("loading")}},{key:"setFrameHeight",value:function(e){if(this.gleapFrameContainer){var t="";t="picker"===e||"navigate"===e?"65px":"editor"===e?"100vh":"0px",this.gleapFrameContainer.style.height=t}}},{key:"start",value:function(){var e=this;if("undefined"!=typeof window&&!window.gleapAdminDisabled){var t=this;window.addEventListener("message",(function(n){if(n.origin&&"http://localhost:3000"!==!n.origin)try{var o=JSON.parse(n.data);if("admin"===o.type&&("load"===o.name&&(t.configData=o.data,t.initAdminHelper()),"smartlink-search-result"===o.name&&e.sendMessageToTourBuilder({name:"smartlink-search-result",data:o.data})),"tourbuilder"===o.type){var r;if("loaddata"===o.name&&e.sendMessageToTourBuilder({name:"data",data:$o($o({},t.configData),{},{currentPage:window.location.href})}),"highlight-element"===o.name&&(document.querySelectorAll(".gleap-admin-highlight").forEach((function(e){e.classList.remove("gleap-admin-highlight")})),null!=o&&null!==(r=o.data)&&void 0!==r&&r.selector)){var i,a=document.querySelector(null==o||null===(i=o.data)||void 0===i?void 0:i.selector);a&&a.classList.add("gleap-admin-highlight")}if("smartlink-search"===o.name&&e.sendMessage({name:"smartlink-search",data:o.data}),"product-tour-started"===o.name&&e.sendMessage({name:"product-tour-started",data:o.data}),"save"===o.name&&e.sendMessage({name:"save",data:o.data}),"update-steps"===o.name&&e.sendMessage({name:"update-steps",data:o.data}),"click"===o.name)try{document.querySelector(o.data.selector).click()}catch(s){console.log(s)}"status-changed"===o.name&&(t.status=o.data,e.setFrameHeight(t.status),t.adminHelper.stopPicker(),"picker"===t.status&&t.adminHelper.startPicker())}}catch(l){}})),this.sendMessage({name:"init"}),this.startPageListener()}}},{key:"sendMessage",value:function(e){try{window&&window.opener&&window.opener.postMessage(JSON.stringify($o($o({},e),{},{type:"admin"})),"*")}catch(t){}}},{key:"sendMessageToTourBuilder",value:function(e){try{this.gleapFrame&&this.gleapFrame.contentWindow&&this.gleapFrame.contentWindow.postMessage(JSON.stringify($o($o({},e),{},{type:"tourbuilder"})),"*")}catch(t){}}}])&&er(t.prototype,n),o&&er(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function rr(e){return rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rr(e)}function ir(e){return function(e){if(Array.isArray(e))return ar(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ar(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ar(e,t)}(e)||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 ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function lr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sr(Object(n),!0).forEach((function(t){cr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cr(e,t,n){return t=function(e){var t=function(e,t){if("object"!=rr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=rr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rr(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}tr(or,"instance",void 0);var ur=function(){var e={};function t(){e=lr({animate:!0,allowClose:!0,overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000"},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function n(t){return t?e[t]:e}function o(e,t,n,o){return(e/=o/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function r(e){var t='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap((function(e){var n=e.matches(t),o=Array.from(e.querySelectorAll(t));return[].concat(ir(n?[e]:[]),o)})).filter((function(e){return"none"!==getComputedStyle(e).pointerEvents&&function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e)}))}function i(e){if(e&&!function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(e)){var t=n("smoothScroll");e.scrollIntoView({behavior:!t||a(e)?"auto":"smooth",inline:"center",block:"center"})}}function a(e){if(e&&e.parentElement){var t=e.parentElement;return t.scrollHeight>t.clientHeight}}var s={};function l(e,t){s[e]=t}function c(e){return e?s[e]:s}function u(){s={}}var d={};function p(e,t){d[e]=t}function f(e){var t;null==(t=d[e])||t.call(d)}function h(e){if(e){var t=e.getBoundingClientRect(),n={x:t.x,y:t.y,width:t.width,height:t.height};l("__activeStagePosition",n),m(n)}}function g(e){var t=function(e){var t=window.innerWidth,o=window.innerHeight,r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("gleap-tour-overlay","gleap-tour-overlay-animated"),r.setAttribute("viewBox","0 0 ".concat(t," ").concat(o)),r.setAttribute("xmlSpace","preserve"),r.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("preserveAspectRatio","xMinYMin slice"),r.style.fillRule="evenodd",r.style.clipRule="evenodd",r.style.strokeLinejoin="round",r.style.strokeMiterlimit="2",r.style.zIndex="10000",r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%";var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",v(e)),i.style.fill=n("overlayColor")||"rgb(0,0,0)",i.style.opacity="".concat(n("overlayOpacity")),i.style.pointerEvents="auto",i.style.cursor="auto",r.appendChild(i),r}(e);document.body.appendChild(t),S(t,(function(e){"path"===e.target.tagName&&f("overlayClick")})),l("__overlaySvg",t)}function m(e){var t=c("__overlaySvg");if(t){var n=t.firstElementChild;if("path"!==(null==n?void 0:n.tagName))throw new Error("no path element found in stage svg");n.setAttribute("d",v(e))}else g(e)}function v(e){var t=window.innerWidth,o=window.innerHeight,r=n("stagePadding")||0,i=n("stageRadius")||0,a=e.width+2*r,s=e.height+2*r,l=Math.min(i,a/2,s/2),c=Math.floor(Math.max(l,0)),u=e.x-r+c,d=e.y-r,p=a-2*c,f=s-2*c;return"M".concat(t,",0L0,0L0,").concat(o,"L").concat(t,",").concat(o,"L").concat(t,",0Z\n M").concat(u,",").concat(d," h").concat(p," a").concat(c,",").concat(c," 0 0 1 ").concat(c,",").concat(c," v").concat(f," a").concat(c,",").concat(c," 0 0 1 -").concat(c,",").concat(c," h-").concat(p," a").concat(c,",").concat(c," 0 0 1 -").concat(c,",-").concat(c," v-").concat(f," a").concat(c,",").concat(c," 0 0 1 ").concat(c,",-").concat(c," z")}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2e3,r=e.element,a=r;if("string"==typeof a)try{a=document.querySelector(r)}catch(u){var s=r.replace(/(#[^#\s]+)/g,(function(e){return e.replace(/:/g,"\\:")}));a=document.querySelector(s)}r&&!a&&t>=0?setTimeout((function(){C(),b(e,t-100)}),100):(a||(a=function(){var e=document.getElementById("gleap-tour-dummy-element");if(e)return e;var t=document.createElement("div");return t.id="gleap-tour-dummy-element",t.style.width="0",t.style.height="0",t.style.pointerEvents="none",t.style.opacity="0",t.style.position="fixed",t.style.top="50%",t.style.left="50%",document.body.appendChild(t),t}()),function(e,t){var r,a,s=400,u=Date.now(),d=c("__activeStep"),p=c("__activeElement")||e,f=!p||p===e,g="gleap-tour-dummy-element"===e.id,v="gleap-tour-dummy-element"===p.id,b=n("animate"),y=t.onHighlightStarted||n("onHighlightStarted"),w=(null==t?void 0:t.onHighlighted)||n("onHighlighted"),x=(null==d?void 0:d.onDeselected)||n("onDeselected"),k=n(),S=c();!f&&x&&x(v?void 0:p,d,{config:k,state:S});y&&y(g?void 0:e,t,{config:k,state:S});var L=!f&&b,T=!1;C(),l("previousStep",d),l("previousElement",p),l("activeStep",t),l("activeElement",e);var O=function r(){if(c("__transitionCallback")===r){var i=Date.now()-u,a=s-i<=s/2;t.popover&&a&&!T&&L&&(I(e,t),T=!0),n("animate")&&i<s?function(e,t,n,r){var i=c("__activeStagePosition"),a=i||n.getBoundingClientRect(),s=r.getBoundingClientRect();m(i={x:o(e,a.x,s.x-a.x,t),y:o(e,a.y,s.y-a.y,t),width:o(e,a.width,s.width-a.width,t),height:o(e,a.height,s.height-a.height,t)}),l("__activeStagePosition",i)}(i,s,p,e):(h(e),w&&w(g?void 0:e,t,{config:n(),state:c()}),l("__transitionCallback",void 0),l("__previousStep",d),l("__previousElement",p),l("__activeStep",t),l("__activeElement",e)),window.requestAnimationFrame(r)}};l("__transitionCallback",O),window.requestAnimationFrame(O),i(e),!L&&t.popover&&I(e,t);p.classList.remove("gleap-tour-active-element","gleap-tour-no-interaction"),p.removeAttribute("aria-haspopup"),p.removeAttribute("aria-expanded"),p.removeAttribute("aria-controls"),null!==(r=null!==(a=t.disableActiveInteraction)&&void 0!==a?a:n("disableActiveInteraction"))&&void 0!==r&&r&&e.classList.add("gleap-tour-no-interaction");e.classList.add("gleap-tour-active-element"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded","true"),e.setAttribute("aria-controls","gleap-tour-popover-content")}(a,e))}function y(){var e=c("__activeElement"),t=c("__activeStep");e&&(h(e),function(){var e=c("__activeStagePosition"),t=c("__overlaySvg");if(e)if(t){var n=window.innerWidth,o=window.innerHeight;t.setAttribute("viewBox","0 0 ".concat(n," ").concat(o))}else console.warn("No stage svg found.")}(),E(e,t))}function w(){var e=c("__resizeTimeout");e&&window.cancelAnimationFrame(e),l("__resizeTimeout",window.requestAnimationFrame(y))}function x(e){var t;if(c("isInitialized")&&("Tab"===e.key||9===e.keyCode)){var n=c("__activeElement"),o=null==(t=c("popover"))?void 0:t.wrapper,i=r([].concat(ir(o?[o]:[]),ir(n?[n]:[]))),a=i[0],s=i[i.length-1];if(e.preventDefault(),e.shiftKey){var l=i[i.indexOf(document.activeElement)-1]||s;null==l||l.focus()}else{var u=i[i.indexOf(document.activeElement)+1]||a;null==u||u.focus()}}}function k(e){var t;(null==(t=n("allowKeyboardControl"))||t)&&("Escape"===e.key?f("escapePress"):"ArrowRight"===e.key?f("arrowRightPress"):"ArrowLeft"===e.key&&f("arrowLeftPress"))}function S(e,t,n){var o=function(t,o){var r=t.target;e.contains(r)&&(n&&!n(r)||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()),null==o||o(t))},r=!0;document.addEventListener("pointerdown",o,r),document.addEventListener("mousedown",o,r),document.addEventListener("pointerup",o,r),document.addEventListener("mouseup",o,r),document.addEventListener("click",(function(e){o(e,t)}),r)}function C(){var e=c("popover");e&&(e.wrapper.style.display="none")}function I(e,t){var o,a,s=c("popover");s&&document.body.removeChild(s.wrapper),s=function(){var e=document.createElement("div");e.classList.add("gleap-tour-popover");var t=document.createElement("div");t.classList.add("gleap-tour-popover-arrow");var n=document.createElement("div");n.id="gleap-tour-popover-title",n.classList.add("gleap-tour-popover-title"),n.style.display="none",n.innerText="Popover Title";var o=document.createElement("div");o.id="gleap-tour-popover-description",o.classList.add("gleap-tour-popover-description"),o.style.display="none",o.innerText="Popover description is here";var r=document.createElement("button");r.type="button",r.classList.add("gleap-tour-popover-close-btn"),r.setAttribute("aria-label","Close"),r.innerHTML="&times;";var i=document.createElement("div");i.classList.add("gleap-tour-popover-footer");var a=document.createElement("span");a.classList.add("gleap-tour-popover-progress-text"),a.innerText="";var s=document.createElement("span");s.classList.add("gleap-tour-popover-navigation-btns");var l=document.createElement("button");l.type="button",l.classList.add("gleap-tour-popover-prev-btn"),l.innerHTML="&larr; Previous";var c=document.createElement("button");return c.type="button",c.classList.add("gleap-tour-popover-next-btn"),c.innerHTML="Next &rarr;",s.appendChild(l),s.appendChild(c),i.appendChild(a),i.appendChild(s),e.appendChild(r),e.appendChild(t),e.appendChild(n),e.appendChild(o),e.appendChild(i),{wrapper:e,arrow:t,title:n,description:o,footer:i,previousButton:l,nextButton:c,closeButton:r,footerButtons:s,progress:a}}(),document.body.appendChild(s.wrapper);var u=t.popover||{},d=u.title,p=u.description,h=u.showButtons,g=u.disableButtons,m=u.showProgress,v=u.nextBtnText,b=void 0===v?n("nextBtnText")||"Next":v,y=u.prevBtnText,w=void 0===y?n("prevBtnText")||"Previous":y,x=u.progressText,k=void 0===x?n("progressText")||"{current} of {total}":x;s.nextButton.innerHTML=b,s.previousButton.innerHTML=w,s.progress.innerHTML=k,d?(s.title.innerHTML=d,s.title.style.display="block"):s.title.style.display="none",p?(s.description.innerHTML=p,s.description.style.display="block"):s.description.style.display="none";var C=h||n("showButtons"),I=m||n("showProgress")||!1,L=(null==C?void 0:C.includes("next"))||(null==C?void 0:C.includes("previous"))||I;s.closeButton.style.display=C.includes("close")?"block":"none",L?(s.footer.style.display="flex",s.progress.style.display=I?"block":"none",s.nextButton.style.display=C.includes("next")?"block":"none",s.previousButton.style.display=C.includes("previous")?"block":"none"):s.footer.style.display="none";var T=g||n("disableButtons")||[];(null==T?void 0:T.includes("next"))&&(s.nextButton.disabled=!0,s.nextButton.classList.add("gleap-tour-popover-btn-disabled")),(null==T?void 0:T.includes("previous"))&&(s.previousButton.disabled=!0,s.previousButton.classList.add("gleap-tour-popover-btn-disabled")),(null==T?void 0:T.includes("close"))&&(s.closeButton.disabled=!0,s.closeButton.classList.add("gleap-tour-popover-btn-disabled"));var O=s.wrapper;O.style.display="block",O.style.left="",O.style.top="",O.style.bottom="",O.style.right="",O.id="gleap-tour-popover-content",O.setAttribute("role","dialog"),O.setAttribute("aria-labelledby","gleap-tour-popover-title"),O.setAttribute("aria-describedby","gleap-tour-popover-description"),s.arrow.className="gleap-tour-popover-arrow";var M=(null==(o=t.popover)?void 0:o.popoverClass)||n("popoverClass")||"";O.className="gleap-tour-popover ".concat(M).trim(),S(s.wrapper,(function(o){var r,i,a,s=o.target,l=(null==(r=t.popover)?void 0:r.onNextClick)||n("onNextClick"),u=(null==(i=t.popover)?void 0:i.onPrevClick)||n("onPrevClick"),d=(null==(a=t.popover)?void 0:a.onCloseClick)||n("onCloseClick");return s.classList.contains("gleap-tour-popover-next-btn")?l?l(e,t,{config:n(),state:c()}):f("nextClick"):s.classList.contains("gleap-tour-popover-prev-btn")?u?u(e,t,{config:n(),state:c()}):f("prevClick"):s.classList.contains("gleap-tour-popover-close-btn")?d?d(e,t,{config:n(),state:c()}):f("closeClick"):void 0}),(function(e){return!(null==s?void 0:s.description.contains(e))&&!(null==s?void 0:s.title.contains(e))&&"string"==typeof e.className&&e.className.includes("gleap-tour-popover")})),l("popover",s);var A=(null==(a=t.popover)?void 0:a.onPopoverRender)||n("onPopoverRender");A&&A(s,{config:n(),state:c()}),E(e,t),i(O);var P=e.classList.contains("gleap-tour-dummy-element"),R=r([O].concat(ir(P?[]:[e])));R.length>0&&R[0].focus()}function L(){var e=c("popover");if(null==e?void 0:e.wrapper){var t=e.wrapper.getBoundingClientRect(),o=n("stagePadding")||0,r=n("popoverOffset")||0;return{width:t.width+o+r,height:t.height+o+r,realWidth:t.width,realHeight:t.height}}}function T(e,t){var n=t.elementDimensions,o=t.popoverDimensions,r=t.popoverPadding,i=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.top-r,window.innerHeight-o.realHeight-i.width),i.width):"end"===e?Math.max(Math.min(n.top-(null==o?void 0:o.realHeight)+n.height+r,window.innerHeight-(null==o?void 0:o.realHeight)-i.width),i.width):"center"===e?Math.max(Math.min(n.top+n.height/2-(null==o?void 0:o.realHeight)/2,window.innerHeight-(null==o?void 0:o.realHeight)-i.width),i.width):0}function O(e,t){var n=t.elementDimensions,o=t.popoverDimensions,r=t.popoverPadding,i=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.left-r,window.innerWidth-o.realWidth-i.width),i.width):"end"===e?Math.max(Math.min(n.left-(null==o?void 0:o.realWidth)+n.width+r,window.innerWidth-(null==o?void 0:o.realWidth)-i.width),i.width):"center"===e?Math.max(Math.min(n.left+n.width/2-(null==o?void 0:o.realWidth)/2,window.innerWidth-(null==o?void 0:o.realWidth)-i.width),i.width):0}function E(e,t){var o=c("popover");if(o){var r=(null==t?void 0:t.popover)||{},i=r.align,a=void 0===i?"start":i,s=r.side,l=void 0===s?"left":s,u=a,d="gleap-tour-dummy-element"===e.id?"over":l,p=n("stagePadding")||0,f=L(),h=o.arrow.getBoundingClientRect(),g=e.getBoundingClientRect(),m=g.top-f.height,v=m>=0,b=window.innerHeight-(g.bottom+f.height),y=b>=0,w=g.left-f.width,x=w>=0,k=window.innerWidth-(g.right+f.width),S=k>=0,C=!(v||y||x||S),I=d;if("top"===d&&v?S=x=y=!1:"bottom"===d&&y?S=x=v=!1:"left"===d&&x?S=v=y=!1:"right"===d&&S&&(x=v=y=!1),"over"===d){var E=window.innerWidth/2-f.realWidth/2,M=window.innerHeight/2-f.realHeight/2;o.wrapper.style.left="".concat(E,"px"),o.wrapper.style.right="auto",o.wrapper.style.top="".concat(M,"px"),o.wrapper.style.bottom="auto"}else if(C){var A=window.innerWidth/2-(null==f?void 0:f.realWidth)/2;o.wrapper.style.left="".concat(A,"px"),o.wrapper.style.right="auto",o.wrapper.style.bottom="".concat(10,"px"),o.wrapper.style.top="auto"}else if(x){var P=Math.min(w,window.innerWidth-(null==f?void 0:f.realWidth)-h.width),R=T(u,{elementDimensions:g,popoverDimensions:f,popoverPadding:p,popoverArrowDimensions:h});o.wrapper.style.left="".concat(P,"px"),o.wrapper.style.top="".concat(R,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.right="auto",I="left"}else if(S){var N=Math.min(k,window.innerWidth-(null==f?void 0:f.realWidth)-h.width),D=T(u,{elementDimensions:g,popoverDimensions:f,popoverPadding:p,popoverArrowDimensions:h});o.wrapper.style.right="".concat(N,"px"),o.wrapper.style.top="".concat(D,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.left="auto",I="right"}else if(v){var j=Math.min(m,window.innerHeight-f.realHeight-h.width),F=O(u,{elementDimensions:g,popoverDimensions:f,popoverPadding:p,popoverArrowDimensions:h});o.wrapper.style.top="".concat(j,"px"),o.wrapper.style.left="".concat(F,"px"),o.wrapper.style.bottom="auto",o.wrapper.style.right="auto",I="top"}else if(y){var B=Math.min(b,window.innerHeight-(null==f?void 0:f.realHeight)-h.width),_=O(u,{elementDimensions:g,popoverDimensions:f,popoverPadding:p,popoverArrowDimensions:h});o.wrapper.style.left="".concat(_,"px"),o.wrapper.style.bottom="".concat(B,"px"),o.wrapper.style.top="auto",o.wrapper.style.right="auto",I="bottom"}C?o.arrow.classList.add("gleap-tour-popover-arrow-none"):function(e,t,n){var o=c("popover");if(!o)return;var r=n.getBoundingClientRect(),i=L(),a=o.arrow,s=i.width,l=window.innerWidth,u=r.width,d=r.left,p=i.height,f=window.innerHeight,h=r.top,g=r.height;a.className="gleap-tour-popover-arrow";var m=t,v=e;"top"===t?(d+u<=0?(m="right",v="end"):d+u-s<=0&&(m="top",v="start"),d>=l?(m="left",v="end"):d+s>=l&&(m="top",v="end")):"bottom"===t?(d+u<=0?(m="right",v="start"):d+u-s<=0&&(m="bottom",v="start"),d>=l?(m="left",v="start"):d+s>=l&&(m="bottom",v="end")):"left"===t?(h+g<=0?(m="bottom",v="end"):h+g-p<=0&&(m="left",v="start"),h>=f?(m="top",v="end"):h+p>=f&&(m="left",v="end")):"right"===t&&(h+g<=0?(m="bottom",v="start"):h+g-p<=0&&(m="right",v="start"),h>=f?(m="top",v="start"):h+p>=f&&(m="right",v="end"));m?(a.classList.add("gleap-tour-popover-arrow-side-".concat(m)),a.classList.add("gleap-tour-popover-arrow-align-".concat(v))):a.classList.add("gleap-tour-popover-arrow-none")}(u,I,e)}}return function(){function e(){n("allowClose")&&h()}function o(){var e=c("activeIndex"),t=n("steps")||[];if(void 0!==e){var o=e+1;t[o]?f(o):h()}}function r(){var e=c("activeIndex"),t=n("steps")||[];if(void 0!==e){var o=e-1;t[o]?f(o):h()}}function i(){var e;if(!c("__transitionCallback")){var t=c("activeIndex"),o=c("__activeStep"),i=c("__activeElement");if("CLICK"!==o.mode)if(void 0!==t&&void 0!==o)if(void 0!==c("activeIndex")){var a=(null==(e=o.popover)?void 0:e.onPrevClick)||n("onPrevClick");if(a)return a(i,o,{config:n(),state:c()});r()}}}function a(){var e;if(!c("__transitionCallback")){var t=c("activeIndex"),r=c("__activeStep"),i=c("__activeElement");if("CLICK"!==r.mode&&void 0!==t&&void 0!==r){var a=(null==(e=r.popover)?void 0:e.onNextClick)||n("onNextClick");if(a)return a(i,r,{config:n(),state:c()});o()}}}function s(){c("isInitialized")||(l("isInitialized",!0),document.body.classList.add("gleap-tour-active",n("animate")?"gleap-tour-fade":"gleap-tour-simple"),window.addEventListener("keyup",k,!1),window.addEventListener("keydown",x,!1),window.addEventListener("resize",w),window.addEventListener("scroll",w),p("overlayClick",e),p("escapePress",e),p("arrowLeftPress",i),p("arrowRightPress",a))}function f(){var e,t,o,r,i,a,s,c,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,d=n("steps");if(!d)return console.error("No steps to drive through"),void h();if(d[u]){l("__activeOnDestroyed",document.activeElement),l("activeIndex",u);var p=d[u],g=d[u+1],m=d[u-1],v=(null==(e=p.popover)?void 0:e.doneBtnText)||n("doneBtnText")||"Done",y=n("allowClose"),w=void 0!==(null==(t=p.popover)?void 0:t.showProgress)?null==(o=p.popover)?void 0:o.showProgress:n("showProgress"),x=((null==(r=p.popover)?void 0:r.progressText)||n("progressText")||"{{current}} of {{total}}").replace("{{current}}","".concat(u+1)).replace("{{total}}","".concat(d.length)),k=(null==(i=p.popover)?void 0:i.showButtons)||n("showButtons"),S=["next","previous"].concat(ir(y?["close"]:[])).filter((function(e){return!(null==k?void 0:k.length)||k.includes(e)})),C=(null==(a=p.popover)?void 0:a.onNextClick)||n("onNextClick"),I=(null==(s=p.popover)?void 0:s.onPrevClick)||n("onPrevClick"),L=(null==(c=p.popover)?void 0:c.onCloseClick)||n("onCloseClick");b(lr(lr({},p),{},{popover:lr({showButtons:S,nextBtnText:g?void 0:v,disableButtons:ir(m?[]:["previous"]),showProgress:w,progressText:x,onNextClick:C||function(){g?f(u+1):h()},onPrevClick:I||function(){f(u-1)},onCloseClick:L||function(){h()}},(null==p?void 0:p.popover)||{})}))}else h()}function h(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=c("__activeElement"),o=c("__activeStep"),r=c("__activeOnDestroyed"),i=n("onDestroyStarted");if(e&&i){i(!t||"gleap-tour-dummy-element"===(null==t?void 0:t.id)?void 0:t,o,{config:n(),state:c()})}else{var a,s,l,p=(null==o?void 0:o.onDeselected)||n("onDeselected"),f=n("onDestroyed");if(document.body.classList.remove("gleap-tour-active","gleap-tour-fade","gleap-tour-simple"),window.removeEventListener("keyup",k),window.removeEventListener("resize",w),window.removeEventListener("scroll",w),(s=c("popover"))&&(null==(a=s.wrapper.parentElement)||a.removeChild(s.wrapper)),function(){var e;null==(e=document.getElementById("gleap-tour-dummy-element"))||e.remove(),document.querySelectorAll(".gleap-tour-active-element").forEach((function(e){e.classList.remove("gleap-tour-active-element","gleap-tour-no-interaction"),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls")}))}(),(l=c("__overlaySvg"))&&l.remove(),d={},u(),t&&o){var h="gleap-tour-dummy-element"===t.id;p&&p(h?void 0:t,o,{config:n(),state:c()}),f&&f(h?void 0:t,o,{config:n(),state:c()})}r&&r.focus()}}return t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{isActive:function(){return c("isInitialized")||!1},refresh:w,drive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;s(),f(e)},setConfig:t,setSteps:function(e){u(),t(lr(lr({},n()),{},{steps:e}))},getConfig:n,getState:c,getActiveIndex:function(){return c("activeIndex")},isFirstStep:function(){return 0===c("activeIndex")},isLastStep:function(){var e=n("steps")||[],t=c("activeIndex");return void 0!==t&&t===e.length-1},getActiveStep:function(){return c("activeStep")},getActiveElement:function(){return c("activeElement")},getPreviousElement:function(){return c("previousElement")},getPreviousStep:function(){return c("previousStep")},moveNext:o,movePrevious:r,moveTo:function(e){(n("steps")||[])[e]?f(e):h()},hasNextStep:function(){var e=n("steps")||[],t=c("activeIndex");return void 0!==t&&e[t+1]},hasPreviousStep:function(){var e=n("steps")||[],t=c("activeIndex");return void 0!==t&&e[t-1]},highlight:function(e){s(),b(lr(lr({},e),{},{popover:e.popover?lr({showButtons:[],showProgress:!1,progressText:""},e.popover):void 0}))},destroy:function(){h(!1)}}}}();const dr=ur;function pr(e){return pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pr(e)}function fr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function hr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fr(Object(n),!0).forEach((function(t){mr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,vr(o.key),o)}}function mr(e,t,n){return(t=vr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vr(e){var t=function(e,t){if("object"!=pr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=pr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==pr(t)?t:String(t)}var br="gleap-tour-data",yr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),mr(this,"productTourData",void 0),mr(this,"productTourId",void 0),mr(this,"unmuted",!1),mr(this,"currentActiveIndex",void 0),mr(this,"gleapTourObj",void 0),mr(this,"disabled",!1);var t=this;"undefined"!=typeof window&&window.addEventListener("beforeunload",(function(e){t.storeUncompletedTour()}))}var t,n,o;return t=e,n=[{key:"disable",value:function(){this.gleapTourObj&&this.gleapTourObj.destroy(),this.gleapTourObj=void 0,this.disabled=!0}},{key:"startWithConfig",value:function(e,t){if(!this.productTourId&&!this.disabled)return this.productTourId=e,this.productTourData=t,this.currentActiveIndex=0,this.start()}},{key:"loadUncompletedTour",value:function(){try{var e=JSON.parse(localStorage.getItem(br));if(null!=e&&e.tourData&&null!=e&&e.tourId)return e}catch(t){}return null}},{key:"storeUncompletedTour",value:function(){if(this.productTourId&&this.productTourData)try{var e=JSON.parse(JSON.stringify({tourData:this.productTourData,tourId:this.productTourId}));e.tourData.steps=e.tourData.steps.slice(this.currentActiveIndex||0,e.tourData.steps.length),localStorage.setItem(br,JSON.stringify(e))}catch(t){}else this.clearUncompletedTour()}},{key:"clearUncompletedTour",value:function(){try{localStorage.removeItem(br)}catch(e){}}},{key:"start",value:function(){var e=this,t=this.productTourData;if(t){this.unmuted=!1;for(var n=t.steps,o=this,r=[],i=0;i<n.length;i++){var a=n[i],s="CLICK"===a.mode,l="INPUT"===a.mode,c="",u=!1;if("video-pointer"===a.type)c='<div class="gleap-tour-video">\n <video class="gleap-tour-video-obj" muted autoplay>\n <source src="'.concat(a.videoUrl,'" type="video/mp4">\n </video>\n <div class="gleap-tour-video-playpause">').concat(p("unmute"),"</div>\n </div>");else{var d="";t.sender&&t.sender.firstName&&(u=!0,d='<div class="gleap-tour-sender">\n <div class="gleap-tour-sender-image" style="background-image: url(\''.concat(t.sender.profileImageUrl,'\');"></div>\n <div class="gleap-tour-sender-name">').concat(t.sender.firstName,"</div>\n </div>")),c="".concat(d,'<div class="gleap-tour-message">').concat(a.message,"</div>")}var f={disableActiveInteraction:!s&&!l,mode:a.mode,popover:hr({description:c,popoverClass:"gleap-tour-popover-".concat(a.type," ").concat(!u&&"gleap-tour-popover-no-sender"," ").concat(t.allowClose&&"gleap-tour-popover-can-close")},s?{showButtons:[]}:{})};a.selector&&a.selector.length>0&&(f.element=a.selector),r.push(f)}var h=["next","close"];t.backButton&&h.push("previous"),this.gleapTourObj=dr(mr(mr(mr(mr(mr(mr(mr(mr(mr({showProgress:!0,allowKeyboardControl:!1,steps:r},"showProgress",n.length>1),"allowClose",t.allowClose),"nextBtnText",t.nextText),"doneBtnText",t.doneText),"prevBtnText",t.prevText),"showButtons",h),"onHighlightStarted",(function(t,n,o){var r;e.currentActiveIndex=null==o||null===(r=o.state)||void 0===r?void 0:r.activeIndex,e.storeUncompletedTour()})),"onDestroyStarted",(function(){if(e.gleapTourObj.hasNextStep())e.gleapTourObj.destroy();else{e.gleapTourObj.destroy();var t={tourId:o.productTourId};hn.notifyEvent("productTourCompleted",t),Ar.trackEvent("tour-".concat(o.productTourId,"-completed"),t),o.productTourData=void 0,o.productTourId=void 0,o.currentActiveIndex=void 0,o.clearUncompletedTour()}document.removeEventListener("click",g)})),"onPopoverRender",(function(t){if(t)for(var n=document.querySelectorAll(".gleap-tour-popover-description img, .gleap-tour-popover-description video"),r=function(){setTimeout((function(){e.gleapTourObj.refresh()}),500),setTimeout((function(){e.gleapTourObj.refresh()}),750)},i=0;i<n.length;i++){var a=n[i];"IMG"===a.tagName?(a.addEventListener("load",(function(){r()})),a.addEventListener("error",(function(){r()}))):"VIDEO"===a.tagName&&(a.addEventListener("canplaythrough",(function(){r()})),a.addEventListener("error",(function(){r()})))}var s="gleap-tour-video--playing",l=document.querySelector(".gleap-tour-video-playpause"),c=document.querySelector(".gleap-tour-video-obj");if(c){var u=c.closest(".gleap-tour-video");o.unmuted&&c&&(c.pause(),c.muted=!1,c.play(),u.classList.add(s)),c.addEventListener("ended",(function(){l.innerHTML=p("replay"),l.classList.add("gleap-tour-video-svg--fullscreen"),u.classList.remove(s)})),c.addEventListener("play",(function(){l.classList.remove("gleap-tour-video-svg--fullscreen")})),l&&l.addEventListener("click",(function(){return d()}));var d=function(){c.muted?(o.unmuted=!0,c.pause(),c.currentTime=0,c.muted=!1,c.play(),l.innerHTML=p("mute"),u.classList.add(s)):c.paused?(c.muted=!1,c.play(),l.innerHTML=p("mute"),u.classList.add(s)):(c.pause(),l.innerHTML=p("unmute"),u.classList.remove(s))}}}))),this.gleapTourObj.drive(),document.addEventListener("click",g)}function g(e){try{var t=document.querySelector(".gleap-tour-popover");if(t&&!t.contains(e.target)){var r,i=o.gleapTourObj.getActiveIndex(),a=n[i],s=o.gleapTourObj.getActiveElement();if("CLICK"===(null==a?void 0:a.mode)&&(null==e?void 0:e.target)!==s&&!s.contains(null==e?void 0:e.target))return;o.currentActiveIndex=(o.currentActiveIndex||0)+1,o.storeUncompletedTour(),s&&"INPUT"===s.tagName||"INPUT"===a.mode||null!=e&&null!==(r=e.target)&&void 0!==r&&r.id.includes("tooltip-svg")||o.gleapTourObj.moveNext()}}catch(l){}}}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&gr(t.prototype,n),o&&gr(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wr(e){return wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wr(e)}function xr(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ir(o.key),o)}}function kr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Sr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kr(Object(n),!0).forEach((function(t){Cr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Cr(e,t,n){return(t=Ir(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ir(e){var t=function(e,t){if("object"!=wr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=wr(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wr(t)?t:String(t)}mr(yr,"instance",void 0),"undefined"!=typeof HTMLCanvasElement&&HTMLCanvasElement.prototype&&void 0===HTMLCanvasElement.prototype.__originalGetContext&&(HTMLCanvasElement.prototype.__originalGetContext=HTMLCanvasElement.prototype.getContext,HTMLCanvasElement.prototype.getContext=function(e,t){return this.__originalGetContext(e,Sr(Sr({},t),{},{preserveDrawingBuffer:!0}))});var Lr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Cr(this,"initialized",!1),Cr(this,"offlineMode",!1),Cr(this,"disablePageTracking",!1),Cr(this,"disableInAppNotifications",!1),Cr(this,"globalData",{screenRecordingData:null,webReplay:null,snapshotPosition:{x:0,y:0}}),"undefined"!=typeof window&&(zt.getInstance(),Yt.getInstance().start(),on.getInstance().start(),or.getInstance().start())}var t,n,o;return t=e,n=[{key:"isLiveMode",value:function(){if(!0===this.offlineMode)return!1;var e=window.location.hostname;return!(["localhost","127.0.0.1","0.0.0.0","","::1"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")||!e.includes("."))}},{key:"softReInitialize",value:function(){Bt.getInstance().destroy(),nt.getInstance().start().then((function(){a.getInstance().refresh(),Co.getInstance().injectNotificationUI()})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}},{key:"performActions",value:function(t){for(var n=0;n<t.length;n++){var o,r=t[n];r&&r.actionType&&("notification"===r.actionType?"widget"===(null==r||null===(o=r.data)||void 0===o||null===(o=o.checklist)||void 0===o?void 0:o.popupType)?e.openChecklist(r.data.checklist.id,!0):this.disableInAppNotifications||e.showNotification(r):"banner"===r.actionType?e.showBanner(r):"tour"===r.actionType?e.startProductTourWithConfig(r.outbound,r.data):e.showSurvey(r.actionType,r.format))}}},{key:"setGlobalDataItem",value:function(e,t){this.globalData[e]=t}},{key:"getGlobalDataItem",value:function(e){return this.globalData[e]}},{key:"takeCurrentReplay",value:function(){var e=qn.getInstance().getReplayData();this.setGlobalDataItem("webReplay",e)}}],o=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"setEnvironment",value:function(e){zt.getInstance().environment=e}},{key:"setTags",value:function(e){Uo.getInstance().setTags(e)}},{key:"setUrlHandler",value:function(e){Bt.getInstance().setUrlHandler(e)}},{key:"setOfflineMode",value:function(e){this.getInstance().offlineMode=e}},{key:"setDisableInAppNotifications",value:function(e){this.getInstance().disableInAppNotifications=e}},{key:"setDisablePageTracking",value:function(e){this.getInstance().disablePageTracking=e}},{key:"disableConsoleLogOverwrite",value:function(){Yt.getInstance().stop()}},{key:"setAiTools",value:function(e){nt.getInstance().setAiTools(e)}},{key:"attachNetworkLogs",value:function(e){b.getInstance().externalRequests=x(e)}},{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";Yt.getInstance().addLog(e,t)}},{key:"initialize",value:function(t){var n=this.getInstance();if(n.initialized)console.warn("Gleap already initialized.");else{n.initialized=!0;try{!function(){try{if("visualViewport"in window&&/iPad|iPhone|iPod/.test(navigator.userAgent)){var e=function(){try{var e=document.querySelector(".gleap-frame-container-inner iframe");if(!e)return;window.visualViewport.height<t?e.style.setProperty("max-height",window.visualViewport.height+"px","important"):e.style.removeProperty("max-height")}catch(n){}},t=window.innerHeight;window.visualViewport.addEventListener("resize",e),window.addEventListener("orientationchange",(function(){try{t=window.innerHeight,e()}catch(n){}})),e()}}catch(n){}}()}catch(r){}var o=Ge.getInstance();o.sdkKey=t,o.setOnSessionReady((function(){setTimeout((function(){nt.getInstance().start().then((function(){Ye.getInstance().start(),L((function(){a.getInstance().injectFeedbackButton(),Co.getInstance().injectNotificationUI(),e.checkForUncompletedTour(),e.checkForUrlParams(),hn.notifyEvent("initialized")}))})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),o.startSession()}}},{key:"checkForUrlParams",value:function(){if("undefined"!=typeof window&&window.location.search)try{var t=new URLSearchParams(window.location.search),n=t.get("gleap_widget");n&&n.length>0&&e.open();var o=t.get("gleap_conversation");o&&o.length>0&&("true"===o?e.startConversation(!0):e.startBot(o,!0));var r=t.get("gleap_feedback");r&&r.length>0&&e.startFeedbackFlow(r);var i=t.get("gleap_survey"),a=t.get("gleap_survey_format");i&&i.length>0&&e.showSurvey(i,"survey_full"===a?"survey_full":"survey");var s=t.get("gleap_tour");if(s&&s.length>0){var l=parseInt(t.get("gleap_tour_delay"));isNaN(l)&&(l=4),setTimeout((function(){e.startProductTour(s)}),1e3*l)}}catch(c){}}},{key:"destroy",value:function(){qn.getInstance().stop(),Ye.getInstance().stop(),Bt.getInstance().destroy(),a.getInstance().toggleFeedbackButton(!1),Co.getInstance().clearAllNotifications(!0),Ge.getInstance().clearSession(0,!1),Ao.getInstance().removeBannerUI()}},{key:"closeBanner",value:function(){Ao.getInstance().removeBannerUI()}},{key:"setUseCookies",value:function(e){Ge.getInstance().useCookies=e}},{key:"identify",value:function(e,t,n){return Ge.getInstance().identifySession(e,x(t),n)}},{key:"updateContact",value:function(e){return Ge.getInstance().updateSession(x(e))}},{key:"clearIdentity",value:function(){Ge.getInstance().clearSession()}},{key:"getIdentity",value:function(){return Ge.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=Ge.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return Bt.getInstance().isOpened()}},{key:"hide",value:function(){Bt.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){b.getInstance().setMaxRequests(e)}},{key:"startNetworkLogger",value:function(){b.getInstance().start()}},{key:"setNetworkLogsBlacklist",value:function(e){b.getInstance().setBlacklist(e)}},{key:"setNetworkLogPropsToIgnore",value:function(e){b.getInstance().setFilters(e)}},{key:"setReplayOptions",value:function(e){qn.getInstance().setOptions(e)}},{key:"close",value:function(){Bt.getInstance().hideWidget()}},{key:"open",value:function(){Bt.getInstance().setAppMode("widget"),Bt.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){Ye.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){Ye.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=x(e);yo.getInstance().formPreFill=t,Bt.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){hn.on(e,t)}},{key:"enableShortcuts",value:function(e){e?ho.getInstance().start():ho.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){a.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){zt.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){zt.setAppBuildNumber(e)}},{key:"setWSApiUrl",value:function(e){Ge.getInstance().wsApiUrl=e}},{key:"setApiUrl",value:function(e){Ge.getInstance().apiUrl=e}},{key:"setBannerUrl",value:function(e){Ao.getInstance().setBannerUrl(e)}},{key:"setFrameUrl",value:function(e){Bt.getInstance().frameUrl=e}},{key:"setTicketAttribute",value:function(e,t){cn.getInstance().setTicketAttribute(e,t)}},{key:"unsetTicketAttribute",value:function(e){cn.getInstance().unsetTicketAttribute(e)}},{key:"clearTicketAttributes",value:function(){cn.getInstance().clearTicketAttributes()}},{key:"attachCustomData",value:function(e){cn.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){cn.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){cn.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){cn.getInstance().clearCustomData()}},{key:"playSound",value:function(e){jo.playSound(e)}},{key:"showTabNotificationBadge",value:function(e){var t=Co.getInstance();t.showNotificationBadge=e,t.updateTabBarNotificationCount()}},{key:"setLanguage",value:function(t){lo.getInstance().setOverrideLanguage(t),e.getInstance().initialized&&setTimeout((function(){e.getInstance().softReInitialize(),e.updateContact({lang:t})}),1e3)}},{key:"registerCustomAction",value:function(e){xn.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){xn.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:20,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:20,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:a.FEEDBACK_BUTTON_BOTTOM_LEFT;L((function(){!function(e,t,n,o,r,i,s,l){var c=d(e),p=d(n),f=d(r),h=d(t),g="#ffffff"===f,m=u(t,"#ffffff"===h?-35:-15),v=u(r,g?100:-120),b=u(r,g?30:-12),y=u(r,g?80:-30),w=(o=parseInt(o,10),Math.round(1.05*o)),x=Math.round(.8*o),k=Math.round(.6*o),S=Math.round(.4*o),C=Math.round(.25*o),I=57+s;l===a.FEEDBACK_BUTTON_CLASSIC_BOTTOM?I=s+15:(l&&l.includes("CLASSIC")||l===a.FEEDBACK_BUTTON_NONE)&&(I=s);var L='\n .gleap-font, .gleap-font * {\n font-style: normal;\n font-variant-caps: normal;\n font-variant-ligatures: normal;\n font-variant-numeric: normal;\n font-variant-east-asian: normal;\n font-weight: normal;\n font-stretch: normal;\n font-size: 100%;\n line-height: 1;\n font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n }\n .gleap-frame-container {\n right: '.concat(i,"px;\n bottom: ").concat(61+s,"px;\n width: calc(100% - 40px);\n max-width: 410px;\n position: fixed;\n z-index: ").concat(2147483631,";\n visibility: visible;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.16);\n border-radius: ").concat(x,"px;\n overflow: hidden;\n animation-duration: .3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n user-select: none;\n pointer-events: none;\n transition: max-width 0.3s ease-out;\n }\n\n .gleap-admin-highlight {\n box-shadow: 0px 0px 0px 4px red;\n }\n\n :root {\n --gleap-margin-top: 50px;\n }\n\n .gleap-tooltip-anchor {\n position: relative;\n display: inline-block;\n float: left;\n max-width: 0px;\n width: 17px;\n }\n\n .gleap-tooltip-hotspot {\n position: absolute;\n display: block;\n width: 17px;\n height: 17px;\n cursor: pointer;\n top: 0px;\n left: 0px;\n }\n\n @keyframes gleap-pulse {\n 0% {\n transform: scale(0);\n opacity: 0.25;\n }\n 45% {\n transform: scale(2.5);\n opacity: 0;\n }\n 100% {\n transform: scale(0);\n opacity: 0;\n }\n }\n\n .gleap-tooltip-hotspot-animation {\n position: absolute;\n border-radius: 17px;\n opacity: 0.25;\n display: block;\n width: 17px;\n height: 17px;\n cursor: pointer;\n top: 0px;\n left: 0px;\n animation: gleap-pulse 5s infinite;\n }\n\n .gleap-tooltip-hotspot svg {\n width: 17px;\n height: 17px;\n object-fit: contain;\n display: block;\n }\n\n .gleap-tooltip-inner {\n position: relative;\n overflow: visible;\n font-size: 14px;\n font-weight: normal;\n color: #000;\n line-height: 1.3;\n }\n\n .gleap-tooltip {\n position: absolute;\n background-color: #fff;\n color: #000;\n font-size: 15px;\n line-height: 18px;\n padding: 16px;\n padding-top: 8px;\n padding-bottom: 8px;\n border-radius: 4px;\n max-width: min(350px, 80vw);\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.2s, visibility 0.2s;\n z-index: ").concat(2147483700,";\n }\n\n .gleap-tooltip a {\n color: ").concat(e,";\n text-decoration: underline;\n display: inline !important;\n margin: 0px !important;\n padding: 0px !important;\n }\n\n .gleap-tooltip ul {\n padding-left: 16px;\n }\n\n .gleap-tooltip b {\n font-weight: 600;\n }\n\n .gleap-tooltip h2 {\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n margin-top: 8px;\n margin-bottom: 8px;\n }\n\n .gleap-tooltip h3 {\n font-size: 16px;\n line-height: 18px;\n font-weight: 600;\n margin-top: 8px;\n margin-bottom: 8px;\n }\n\n .gleap-tooltip p {\n padding: 0px;\n margin-top: 8px;\n margin-bottom: 8px;\n }\n\n .gleap-tooltip img {\n max-width: 100%;\n max-height: 300px;\n width: 100%;\n height: auto;\n object-fit: cover;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 4px;\n }\n\n .gleap-tooltip iframe,\n .gleap-tooltip video {\n max-width: 100%;\n width: 100%;\n height: auto;\n min-height: 200px;\n display: block;\n border: none;\n outline: none;\n padding: 0px;\n margin-top: 8px;\n margin-bottom: 8px;\n border-radius: 4px;\n }\n\n .gleap-tooltip-arrow {\n position: absolute;\n width: 20px;\n height: 20px;\n }\n\n .gleap-tooltip-arrow svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n\n .gleap-b-frame {\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: auto;\n padding: 0px;\n margin: 0px;\n }\n\n .gleap-b-shown {\n transition: margin 0.3s ease-out;\n margin-top: var(--gleap-margin-top);\n position: relative;\n z-index: 10000;\n }\n\n .gleap-b-f {\n margin-top: 0px;\n }\n\n .gleap-b {\n display: none;\n position: absolute;\n top: calc(-1 * var(--gleap-margin-top));\n left: 0px;\n width: 100vw;\n height: var(--gleap-margin-top);\n }\n\n @keyframes gleapSlideIn {\n from {\n top: calc(-1 * var(--gleap-margin-top));\n }\n to {\n top: 10px;\n }\n }\n\n .gleap-b-f .gleap-b {\n position: fixed;\n top: 10px;\n animation: gleapSlideIn .25s ease-out forwards;\n max-width: 800px;\n width: calc(100% - 20px);\n left: 50%;\n z-index: ").concat(2147483699,";\n transform: translateX(-50%);\n border-radius: ").concat(S,"px;\n overflow: hidden;\n box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.15), 0px 5px 5px rgba(0, 0, 0, 0.05);\n }\n\n .gleap-b-shown .gleap-b {\n display: block;\n }\n\n .gleap-image-view {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n z-index: ").concat(2147483699,";\n background-color: ").concat(f,"cc;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .gleap-image-view-image {\n width: 90%;\n height: auto;\n max-width: 90%;\n max-height: 90%;\n object-fit: contain;\n }\n\n .gleap-image-view-close {\n position: fixed;\n top: 20px;\n right: 20px;\n width: 32px;\n height: 32px;\n opacity: 0.8;\n z-index: ").concat(2147483740,";\n box-shadow: 0px 5px 18px rgba(0, 0, 0, 0.16);\n cursor: pointer;\n }\n\n .gleap-image-view-close:hover {\n opacity: 1;\n }\n\n .gleap-image-view-close svg path {\n fill: ").concat(r,";\n }\n\n [dir=rtl].gleap-frame-container {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(61+s,'px;\n }\n\n .gleap-frame-container--loading iframe {\n opacity: 0;\n }\n\n .gleap-frame-container--loading::before {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 130deg,\n ').concat(m," 0%,\n ").concat(t,' 100%\n );\n }\n \n .gleap-frame-container--loading::after {\n content: " ";\n position: fixed;\n top: 0px;\n left: 0px;\n right: 0px;\n height: 100%;\n height: 100%;\n max-height: 380px;\n background: linear-gradient(\n 180deg,\n transparent 60%,\n ').concat(r,"1A 70%,\n ").concat(r," 100%\n );\n }\n\n .gleap-frame-container--loading-nogradient::before {\n max-height: 340px;\n background: ").concat(t," !important;\n }\n\n .gleap-frame-container--loading-nofade::after {\n display: none !important;\n }\n\n .gleap-frame-container--survey {\n bottom: ").concat(s,"px !important;\n }\n\n .gleap-frame-container--extended {\n max-width: 690px !important;\n }\n\n .gleap-frame-container--survey-full {\n position: fixed;\n top: 0 !important;\n left: 0 !important;\n bottom: 0 !important;\n right: 0 !important;\n width: 100vw !important;\n max-width: 100vw !important;\n height: 100vh !important;\n background-color: rgba(0, 0, 0, 0.5);\n backdrop-filter: blur(6px);\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n max-height: 100vh !important;\n border-radius: 0 !important;\n animation-name: none !important;\n }\n\n .gleap-frame-container--survey-full .gleap-frame-container-inner {\n max-width: 640px !important;\n width: calc(100% - 24px);\n border-radius: ").concat(x,"px;\n overflow: hidden;\n }\n\n .gleap-frame-container--classic {\n right: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--no-button {\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--classic-left {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n [dir=rtl].gleap-frame-container--classic-left {\n left: auto;\n right: ").concat(i,"px;\n bottom: ").concat(s,"px;\n }\n\n .gleap-frame-container--modern-left {\n right: auto;\n left: ").concat(i,"px;\n bottom: ").concat(61+s,"px;\n }\n\n [dir=rtl].gleap-frame-container--modern-left {\n left: auto;\n right: ").concat(i,"px;\n bottom: ").concat(61+s,"px;\n }\n\n .gleap-frame-container--animate {\n pointer-events: auto !important;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n @keyframes gleapFadeInUpMobile {\n from {\n opacity: 0;\n transform: translate3d(0, 10%, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-notification-container {\n position: fixed;\n bottom: ").concat(I,"px;\n right: ").concat(i,"px;\n z-index: ").concat(2147483630,";\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n width: 100%;\n max-width: min(340px, 80vw);\n }\n\n .gleap-notification-container--left {\n left: ").concat(4+i,"px;\n right: initial !important;\n }\n\n [dir=rtl].gleap-notification-container {\n left: ").concat(4+i,"px;\n right: initial !important;\n }\n\n [dir=rtl].gleap-notification-container--left {\n left: initial !important;\n right: ").concat(i,"px !important;\n align-items: flex-start !important;\n }\n\n .gleap-notification-container--no-button {\n bottom: ").concat(s,"px;\n }\n\n .gleap-notification-item {\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n .gleap-notification-close {\n border-radius: 100%;\n width: 28px;\n height: 28px;\n background-color: ").concat(v,";\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 8px;\n cursor: pointer;\n visibility: hidden;\n pointer-events: none;\n }\n\n .gleap-notification-container:hover .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-notification-close {\n visibility: visible;\n pointer-events: auto;\n animation-duration: 0.7s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n }\n\n .gleap-notification-close svg {\n width: 45%;\n height: 45%;\n object-fit: contain;\n fill: ").concat(r,";\n }\n\n .gleap-notification-item-checklist-container {\n display: flex;\n animation: fadeIn;\n animation-duration: .45s;\n background-color: ").concat(r,";\n border-radius: ").concat(v,";\n box-sizing: border-box;\n cursor: pointer;\n flex-direction: column;\n overflow: hidden;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(k,"px;\n margin-bottom: 12px;\n }\n\n .gleap-notification-item-checklist-content {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n padding: 15px;\n width: 100%;\n width: min(310px, 70vw);\n max-width: min(310px, 70vw);\n }\n\n .gleap-notification-item-checklist-content-title {\n color: ").concat(f,";\n font-size: 15px;\n font-weight: 500;\n line-height: 21px;\n margin-bottom: 10px;\n max-width: 100%;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-checklist-content-progress {\n width: 100%;\n height: 8px;\n border-radius: 8px;\n background-color: ").concat(b,";\n }\n\n .gleap-notification-item-checklist-content-progress-inner {\n height: 100%;\n border-radius: 8px;\n background-color: ").concat(e,";\n }\n\n .gleap-notification-item-checklist-content-next {\n color: ").concat(v,";\n font-size: 15px;\n font-weight: normal;\n line-height: 21px;\n margin-top: 10px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: flex;\n align-items: center;\n }\n\n .gleap-notification-item-checklist-content-next svg {\n height: 18px;\n margin-right: 5px;\n width: auto;\n }\n\n .gleap-notification-item-checklist-content-next b {\n font-size: 15px;\n font-weight: normal;\n color: ").concat(f,";\n }\n\n .gleap-notification-item-news {\n width: 100%;\n cursor: pointer;\n }\n\n .gleap-notification-item-news-content {\n align-items: flex-start;\n display: flex;\n flex-direction: column;\n padding: 15px;\n }\n\n .gleap-notification-item-news-preview {\n color: ").concat(v,";\n font-size: 15px;\n line-height: 21px;\n font-weight: 400;\n overflow-wrap: break-word;\n word-break: break-word;\n display: block;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-news-sender {\n display: flex;\n align-items: center;\n color: ").concat(v,";\n font-size: 15px;\n line-height: 21px;\n font-weight: 400;\n }\n \n .gleap-notification-item-news-content-title {\n color: ").concat(f,";\n font-size: 15px;\n font-weight: 500;\n line-height: 21px;\n margin-bottom: 6px;\n max-width: 100%;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n\n .gleap-notification-item-news-sender img {\n border-radius: 100%;\n height: 20px;\n margin-right: 8px;\n object-fit: cover;\n width: 20px;\n }\n\n [dir=rtl] .gleap-notification-item-news-sender img {\n margin-left: 8px;\n margin-right: 0px !important;\n }\n\n .gleap-notification-item-news-container {\n display: flex;\n animation: fadeIn;\n animation-duration: .45s;\n background-color: ").concat(r,";\n border-radius: ").concat(v,";\n box-sizing: border-box;\n cursor: pointer;\n flex-direction: column;\n overflow: hidden;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(k,"px;\n margin-bottom: 12px;\n }\n\n .gleap-notification-item-news-image {\n background-color: ").concat(v,";\n height: 170px;\n max-height: 170px;\n object-fit: cover;\n width: 100%;\n }\n\n .gleap-notification-item-news:hover .gleap-notification-item-news-content-title {\n color: ").concat(e,";\n }\n\n .gleap-notification-item {\n display: flex;\n align-items: flex-end;\n cursor: pointer;\n }\n\n .gleap-notification-item img {\n width: 32px;\n height: 32px;\n min-width: 32px;\n border-radius: 100%;\n object-fit: cover;\n margin-right: 8px;\n margin-bottom: 12px;\n cursor: pointer;\n }\n\n [dir=rtl] .gleap-notification-item img {\n margin-left: 8px;\n margin-right: 0px !important;\n }\n\n .gleap-notification-item-container {\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(k,"px;\n border-bottom-left-radius: 0px;\n padding: 20px;\n background-color: ").concat(r,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n line-height: 21px;\n color: ").concat(f,';\n position: relative;\n }\n\n .gleap-notification-item-container::after {\n content: " ";\n position: absolute;\n bottom: 0px;\n width: 0px;\n height: 0px;\n left: -6px;\n border-style: solid;\n border-width: 0px 0px 10px 6px;\n border-color: transparent transparent ').concat(r,";\n }\n\n .gleap-notification-item-sender {\n color: ").concat(v,";\n line-height: 20px;\n }\n\n .gleap-notification-item-content {\n line-height: 20px;\n color: ").concat(f,";\n margin-top: 4px;\n min-width: min(200px, 50vw);\n word-wrap: break-word;\n word-break: break-word;\n }\n\n .gleap-frame-container-inner {\n position: relative;\n width: 100%;\n height: calc(100vh - ").concat(130+s,"px);\n max-height: ").concat(700,'px;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: calc(100vh - 40px);\n }\n \n .gleap-frame-container-inner:before {\n content: " ";\n position: absolute;\n width: 100%;\n height: calc(100% - ').concat(x,"px);\n top: ").concat(x,"px;\n background-color: ").concat(r,";\n z-index: -1;\n }\n \n .gleap-frame-container iframe {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n display: block;\n pointer-events: auto;\n }\n \n .gleap-frame-container--hidden {\n display: none !important;\n pointer-events: none;\n animation: none !important;\n }\n \n .bb-feedback-button {\n margin: 0px;\n position: fixed;\n bottom: ").concat(s,"px;\n right: ").concat(i,"px;\n border-radius: 30px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background-color: transparent;\n color: #000000;\n z-index: ").concat(2147483630,";\n box-sizing: border-box;\n display: flex;\n align-items: center;\n padding: 0px;\n }\n\n [dir=rtl].bb-feedback-button {\n bottom: ").concat(s,"px;\n right: auto;\n left: ").concat(i,"px;\n }\n \n .bb-feedback-button--bottomleft {\n bottom: ").concat(s,"px;\n right: auto;\n left: ").concat(i,"px;\n }\n\n [dir=rtl].bb-feedback-button--bottomleft {\n bottom: ").concat(s,"px;\n right: ").concat(i,'px;\n left: auto;\n }\n \n .bb-feedback-button--disabled {\n display: none !important;\n }\n\n .bb-feedback-button--hidden {\n display: none !important;\n }\n \n .bb-feedback-button-text {\n padding: 8px 12px;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n background-color: #fff;\n border-radius: 8px;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);\n position: relative;\n z-index: 99;\n }\n \n .bb-feedback-button-text:before {\n content: "";\n position: absolute;\n box-shadow: rgba(0, 0, 0, 0.04) 6px 6px 5px;\n transform: rotate(315deg);\n bottom: 16px;\n right: -4px;\n border-width: 10px;\n border-style: solid;\n border-color: transparent #fff #fff transparent;\n }\n \n .bb-feedback-button--bottomleft .bb-feedback-button-text:before {\n display: none;\n }\n \n .bb-feedback-button-text:after {\n content: "";\n position: absolute;\n bottom: 12px;\n right: 0px;\n background-color: #fff;\n width: 5px;\n height: 30px;\n }\n \n .bb-feedback-button-text-title {\n font-family: sans-serif;\n font-size: 14px;\n color: #666;\n line-height: 18px;\n max-width: 220px;\n }\n \n .bb-feedback-button-text-title b {\n color: #000000;\n font-weight: 600;\n }\n\n .bb-notification-bubble {\n position: absolute;\n top: -5px;\n right: -5px;\n min-width: 20px;\n padding: 0px 4px;\n height: 20px;\n border-radius: 20px;\n background-color: red;\n color: #fff;\n font-size: 11px;\n font-family: sans-serif;\n text-align: center;\n line-height: 20px;\n }\n\n .bb-notification-bubble--hidden {\n display: none;\n }\n \n .bb-feedback-button-icon {\n width: 48px;\n height: 48px;\n border-radius: 48px;\n background-color: #485bff;\n transition: box-shadow, transform 0.2s ease-in-out;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n position: relative;\n }\n \n .bb-feedback-button-classic {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n top: 50%;\n right: 0px;\n position: fixed;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n padding: 9px 20px;\n text-align: center;\n background-color: #485bff;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n font-family: sans-serif;\n font-size: 16px;\n color: #fff;\n box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.25);\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n \n .bb-feedback-button-classic--left {\n top: 50%;\n left: 0px;\n right: auto;\n transform: rotate(90deg) translate(-50%, -100%);\n transform-origin: 0% 0%;\n }\n\n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--left {\n top: 50%;\n right: 0px;\n left: auto;\n transform: rotate(-90deg) translate(50%, -50%);\n transform-origin: 100% 50%;\n }\n \n .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n right: ').concat(i,"px;\n left: auto;\n }\n \n [dir=rtl].bb-feedback-button .bb-feedback-button-classic--bottom {\n top: auto;\n bottom: 0px;\n transform: none;\n left: ").concat(i,"px;\n right: auto;\n }\n\n .bb-feedback-button--classic-button-style {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeInOpacity;\n }\n \n .bb-feedback-button--open.bb-feedback-button--classic-button-style {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-name: bbFadeOutRight;\n }\n \n .bb-feedback-button .bb-logo-logo {\n position: absolute;\n width: 30px;\n height: 30px;\n top: 9px;\n left: 9px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n position: absolute;\n width: 14px;\n height: 14px;\n top: 17px;\n left: 17px;\n object-fit: contain;\n animation-duration: 0.3s;\n animation-fill-mode: both;\n }\n \n .bb-feedback-button .bb-logo-arrowdown {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button--open .bb-logo-arrowdown {\n animation-name: bbZoomIn;\n }\n \n .bb-feedback-button--open .bb-logo-logo {\n animation-name: bbZoomOut;\n }\n \n .bb-feedback-button-icon:hover {\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.25), 0px 0px 20px rgba(0, 0, 0, 0.2);\n transform: scale(1.1);\n }\n \n .bb-feedback-button--open .bb-feedback-button-text {\n animation-name: bbFadeOutDown;\n }\n \n .bb-feedback-button--open .bb-feedback-button-icon {\n display: flex;\n }\n \n .bb-capture-svg {\n position: fixed;\n z-index: ").concat(2147483614,";\n top: 0px;\n left: 0px;\n right: 0px;\n width: 100%;\n height: 100%;\n padding: 0px;\n margin: 0px;\n cursor: crosshair;\n }\n\n .bb-capture-svg--preview {\n cursor: auto !important;\n }\n \n .bb-rec-on-circle {\n animation-name: bbRecIconFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-rec-on-cont {\n animation-name: bbRecIconContFade;\n animation-duration: 2s;\n animation-iteration-count: infinite;\n animation-direction: alternate;\n }\n \n .bb-capture-editor-drag-info {\n position: fixed;\n top: -200px;\n left: 0px;\n z-index: ").concat(2147483616,";\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-editor-drag-info svg {\n width: 24px;\n height: 24px;\n }\n \n .bb-capture-editor-borderlayer {\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n border: 4px solid ").concat(e,";\n cursor: crosshair;\n z-index: ").concat(2147483610,";\n box-sizing: border-box;\n pointer-events: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-borderlayer {\n background-color: rgba(0, 0, 0, 0.8);\n }\n\n .bb-capture-editor-recording .bb-capture-editor-borderlayer {\n border: 4px solid #eb144c !important;\n }\n \n .bb-capture-editor-recording .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-editor-item-inactive {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-toolbar-drawingitem {\n opacity: 0.3;\n cursor: not-allowed !important;\n }\n \n .bb-capture-editor-notrecording .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-notrecording .bb-capture-svg {\n pointer-events: none !important;\n }\n \n .bb-capture-toolbar {\n position: fixed;\n top: 20px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,";\n background-color: #fff;\n padding: 5px;\n display: flex;\n align-items: center;\n border-radius: 8px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n transition: opacity 0.3s ease-in-out;\n }\n \n .bb-capture-dismiss {\n position: fixed;\n top: 0px;\n right: 0px;\n z-index: ").concat(2147483618,";\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n width: 36px;\n height: 36px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: ").concat(e,";\n border-bottom-left-radius: ").concat(C,"px;\n }\n\n [dir=rtl] .bb-capture-dismiss {\n top: 0px;\n left: 0px;\n right: auto;\n border-bottom-left-radius: 0px !important;\n border-bottom-right-radius: ").concat(C,"px;\n }\n \n .bb-capture-dismiss svg path {\n fill: ").concat(c,';\n }\n \n .bb-capture-dismiss svg {\n width: 20px;\n height: 20px;\n object-fit: contain;\n }\n \n .bb-capture-button-next {\n font-family: sans-serif;\n box-sizing: border-box;\n font-weight: 600;\n text-align: center;\n width: auto;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n margin: 0px;\n line-height: 36px;\n padding: 0px 12px;\n font-size: 15px;\n margin-left: 12px;\n }\n\n [dir=rtl].bb-capture-editor .bb-capture-button-next {\n margin-left: auto;\n margin-right: 12px;\n }\n \n .bb-capture-toolbar-item-spacer {\n width: 1px;\n height: 38px;\n min-width: 1px;\n margin: 0px 5px;\n }\n \n .bb-capture-toolbar-item {\n width: 42px;\n height: 38px;\n min-width: 42px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n position: relative;\n margin-right: 5px;\n }\n \n .bb-capture-toolbar-item svg {\n width: 23px;\n height: 23px;\n object-fit: contain;\n }\n \n .bb-capture-toolbar-item-selectedcolor {\n border-radius: 100%;\n width: 20px;\n height: 20px;\n background-color: #db4035;\n }\n \n .bb-capture-toolbar-item[data-type="undo"] svg {\n width: 18px;\n height: 18px;\n }\n \n .bb-capture-toolbar-item[data-active="true"] {\n position: relative;\n }\n \n .bb-capture-preview {\n display: none;\n background-color: rgba(0, 0, 0, 0.6);\n position: fixed;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n z-index: ').concat(2147483620,";\n }\n \n .bb-capture-preview-inner {\n background-color: #fff;\n padding: 0px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n flex-direction: column;\n max-width: 640px;\n width: 100%;\n margin: 20px;\n }\n \n .bb-capture-preview-inner video {\n border-radius: 8px 8px 0px 0px;\n display: block;\n border: 0px;\n outline: none;\n width: 100%;\n max-height: 60vh;\n }\n \n .bb-capture-preview-buttons {\n display: flex;\n justify-content: space-between;\n padding: 14px;\n }\n \n .bb-capture-preview-retrybutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-sendbutton {\n font-family: sans-serif;\n border-radius: 21px;\n box-sizing: border-box;\n padding: 12px 26px;\n font-size: 16px;\n line-height: 19px;\n font-weight: 600;\n text-align: center;\n margin-top: 0px;\n margin-bottom: 0px;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-preview-retrybutton:hover,\n .bb-capture-preview-sendbutton:hover {\n opacity: 0.9;\n }\n \n .bb-capture-toolbar-item-recording {\n margin-right: 0px;\n }\n \n .bb-capture-toolbar-item-recording svg {\n width: 33px;\n height: 33px;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n position: fixed;\n top: 70px;\n left: 50%;\n transform: translateX(-50%);\n z-index: ").concat(2147483618,';\n background-color: #fff;\n display: none;\n padding: 10px;\n box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15), 0px 0px 20px rgba(0, 0, 0, 0.1);\n border-radius: 8px;\n }\n \n .bb-capture-toolbar-item-color {\n width: 20px;\n height: 20px;\n border-radius: 100%;\n margin-right: 12px;\n box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n }\n \n .bb-capture-toolbar-item-color:hover {\n box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.25);\n }\n \n .bb-capture-toolbar-item-color:last-of-type {\n margin-right: 0px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color {\n margin-right: auto;\n margin-left: 12px;\n }\n \n [dir=rtl].bb-capture-editor .bb-capture-toolbar-item-color:last-of-type {\n margin-right: auto;\n margin-left: 0px;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:first-of-type {\n display: none;\n }\n \n .bb-capture-toolbar-item-recording[data-active="true"] svg:nth-of-type(2) {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:first-of-type {\n display: block;\n }\n \n .bb-capture-toolbar-item-recording[data-active="false"] svg:nth-of-type(2) {\n display: none;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #eee;\n }\n \n .bb-capture-toolbar-item:hover svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--active {\n background-color: #f8f8f8;\n }\n \n .bb-capture-toolbar-item--active svg {\n opacity: 1;\n }\n \n .bb-capture-toolbar-item--inactivecross::before {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n height: 3px;\n width: 26px;\n margin: auto;\n border-radius: 4px;\n background-color: #e80000;\n transform: rotate(45deg);\n }\n \n .bb-capture-toolbar-item--inactivecross svg {\n fill: #eee;\n }\n \n .bb-capture-toolbar-item-timer {\n text-align: left;\n line-height: 32px;\n font-size: 14px;\n font-family: sans-serif;\n margin: 5px;\n min-width: 40px;\n display: none;\n }\n \n .bb-capture-toolbar-item .bb-tooltip {\n background-color: #555;\n color: #fff;\n visibility: hidden;\n font-size: 14px;\n font-family: sans-serif;\n text-align: center;\n padding: 5px 10px;\n position: absolute;\n z-index: 1;\n top: 45px;\n left: 0px;\n transform: translateX(calc(-50% + 21px));\n opacity: 0;\n transition: opacity 0.3s;\n white-space: nowrap;\n }\n \n .bb-capture-toolbar-item .bb-tooltip::after {\n content: "";\n position: absolute;\n bottom: 100%;\n left: 50%;\n margin-left: -5px;\n border-width: 5px;\n border-style: solid;\n transform: rotate(180deg);\n border-color: #555 transparent transparent transparent;\n }\n \n .bb-capture-toolbar-item:hover .bb-tooltip {\n visibility: visible;\n opacity: 1;\n }\n \n .bb-capture-options {\n display: none;\n }\n \n .bb-capture-options--active {\n display: flex;\n }\n\n @keyframes bbFadeOutRight {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbFadeOutDown {\n from {\n opacity: 1;\n }\n \n to {\n opacity: 0;\n transform: translate3d(0, 100%, 0);\n }\n }\n \n @keyframes bbFadeInOpacity {\n from {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n @keyframes bbZoomOut {\n from {\n opacity: 1;\n }\n \n 50% {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n to {\n opacity: 0;\n }\n }\n \n @keyframes bbZoomIn {\n from {\n opacity: 0;\n transform: scale3d(0.3, 0.3, 0.3);\n }\n \n 50% {\n opacity: 1;\n }\n }\n \n @keyframes bbRecIconContFade {\n 0% {\n fill: #b10802;\n }\n 50% {\n fill: #ff0000;\n }\n 100% {\n fill: #b10802;\n }\n } \n .bb-capture-preview-retrybutton {\n color: ').concat(f,";\n border-radius: ").concat(w,"px;\n background-color: ").concat(b,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(y,";\n }\n @keyframes bb-suc-fill {\n 100% {\n box-shadow: inset 0px 0px 0px 30px ").concat(e,";\n }\n }\n .bb-capture-toolbar-item-spacer {\n background-color: ").concat(b,";\n }\n .bb-tooltip {\n border-radius: ").concat(S,"px;\n }\n @keyframes bbRecIconFade {\n 0% {\n fill: transparent;\n }\n 50% {\n fill: ").concat(y,";\n }\n 100% {\n fill: transparent;\n }\n }\n .bb-capture-preview-sendbutton {\n color: ").concat(c,";\n background-color: ").concat(e,";\n border-radius: ").concat(w,"px;\n }\n .bb-capture-button-next {\n color: ").concat(c,";\n background-color: ").concat(e,";\n border-radius: ").concat(C,"px;\n }\n .bb-capture-preview-inner {\n background-color: ").concat(r,";\n border-radius: ").concat(S,"px;\n }\n .bb-capture-toolbar-item-timer {\n color: ").concat(v,";\n }\n .bb-svg-path {\n fill: ").concat(f,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(S,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(r,";\n border-radius: ").concat(S,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(r,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(b,";\n }\n .bb-feedback-button-classic {\n border-top-left-radius: ").concat(S,"px;\n border-top-right-radius: ").concat(S,"px;\n }\n .bb-logo-logo--default path {\n fill: ").concat(p,";\n }\n .bb-logo-arrowdown {\n fill: ").concat(p,";\n }\n .bb-feedback-button-icon {\n background-color: ").concat(n,";\n }\n .bb-feedback-button-classic {\n background-color: ").concat(n,";\n color: ").concat(p,";\n }\n\n @media only screen and (max-width: 450px) {\n [dir=rtl].gleap-frame-container,\n .gleap-frame-container {\n left: 0px;\n right: 0px;\n width: 100vw;\n max-width: 100vw;\n min-height: 100vh;\n min-height: -webkit-fill-available;\n max-height: -webkit-fill-available;\n top: 0px;\n bottom: 0px;\n border-radius: 0px;\n animation-name: gleapFadeInUpMobile;\n }\n\n .gleap-frame-container-inner {\n width: 100vw;\n height: 100%;\n }\n\n .gleap-frame-container:not(.gleap-frame-container--survey):not(.gleap-frame-container--survey-full) .gleap-frame-container-inner {\n max-height: calc(var(--glvh, 1vh) * 100) !important;\n }\n\n .gleap-frame-container--survey {\n height: auto !important;\n top: initial !important;\n bottom: 0px !important;\n min-height: initial !important;\n }\n\n .gleap-frame-container--survey .gleap-frame-container-inner {\n height: 100vh !important;\n }\n\n .bb-tooltip {\n display: none !important;\n }\n \n .bb-capture-toolbar-item-colorpicker {\n top: 75px;\n }\n \n .bb-capture-button-next {\n margin-left: auto;\n }\n \n .bb-capture-dismiss {\n display: none;\n }\n \n .bb-capture-toolbar {\n top: 15px;\n right: 15px;\n left: 15px;\n width: auto;\n transform: none;\n }\n\n .bb-capture-editor-drag-info {\n display: none;\n }\n \n .bb-capture-editor-borderlayer {\n border-width: 4px;\n }\n }\n \n @media print {\n .bb-feedback-button {\n display: none !important;\n }\n \n .gleap-frame-container {\n display: none !important;\n }\n }\n\n .gleap-tour-sender {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n margin-bottom: 20px;\n }\n\n .gleap-tour-sender-image {\n width: 32px;\n height: 32px;\n border-radius: 32px;\n margin-right: 10px;\n background-size: cover;\n background-repeat: no-repeat;\n }\n\n .gleap-tour-popover.gleap-tour-popover-post {\n min-width: 550px;\n max-width: 550px;\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-tour-popover.gleap-tour-popover-post {\n min-width: calc(100vw - 40px);\n max-width: calc(100vw - 40px);\n }\n }\n\n .gleap-tour-message,\n .gleap-tour-message p,\n .gleap-tour-message ul {\n color: ").concat(f,";\n }\n\n .gleap-tour-message h2 {\n font-weight: 600;\n font-size: 22px;\n }\n\n .gleap-tour-message h3 {\n font-weight: 600;\n font-size: 18px;\n }\n\n .gleap-tour-message p {\n line-height: 1.3;\n }\n\n .gleap-tour-message ul {\n line-height: 1.3;\n padding-left: 20px;\n margin-top: 10px;\n margin-bottom: 10px;\n }\n\n .gleap-tour-message {\n max-height: calc(80vh - 100px) !important;\n overflow-y: auto;\n min-width: 270px;\n }\n\n .gleap-tour-message::-webkit-scrollbar {\n width: 5px;\n }\n\n .gleap-tour-message::-webkit-scrollbar-track {\n border-radius: 0px;\n }\n \n .gleap-tour-message::-webkit-scrollbar-thumb {\n background: ").concat(y,"; \n border-radius: 5px;\n }\n\n .gleap-tour-message::-webkit-scrollbar-thumb:hover {\n background: ").concat(v,";\n }\n\n @media only screen and (max-width: 450px) {\n .gleap-tour-message {\n min-width: auto !important;\n }\n }\n\n .gleap-tour-message iframe {\n width: 100%;\n height: 300px;\n margin-top: 10px;\n margin-bottom: 10px;\n border: none;\n outline: none;\n display: block;\n }\n\n .gleap-tour-sender-name {\n font-size: 15px;\n }\n\n .gleap-tour-video {\n width: 100%;\n max-width: 100%;\n }\n\n .gleap-tour-video-svg--fullscreen {\n width: 100% !important;\n height: 100% !important;\n top: 0px !important;\n left: 0px !important;\n right: 0px !important;\n bottom: 0px !important;\n }\n\n .gleap-tour-video--playing .gleap-tour-video-playpause {\n opacity: 0;\n }\n \n .gleap-tour-video--playing:hover .gleap-tour-video-playpause {\n opacity: 1;\n }\n\n .gleap-tour-popover-video-pointer {\n padding: 0px !important;\n border-radius: 8px;\n position: relative;\n background-color: transparent !important;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-footer {\n position: absolute;\n top: 0px;\n left: 20px;\n right: 20px;\n opacity: 0;\n transition: opacity 200ms ease-in-out;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-footer button {\n padding: 5px 12px;\n }\n\n .gleap-tour-popover-video-pointer.gleap-tour-popover-can-close .gleap-tour-popover-footer {\n right: 40px !important;\n }\n\n .gleap-tour-popover-video-pointer:hover .gleap-tour-popover-footer {\n opacity: 1;\n }\n\n .gleap-tour-popover-pointer.gleap-tour-popover-no-sender .gleap-tour-message {\n padding-right: 20px;\n }\n\n .gleap-tour-video video {\n width: 100%;\n max-width: 100%;\n height: auto;\n border: none;\n outline: none;\n display: block;\n border-radius: 8px;\n }\n\n .gleap-admin-collapse-ui {\n z-index: ").concat(2147483635,";\n cursor: pointer;\n position: fixed;\n bottom: 75px;\n right: 20px;\n width: 32px;\n height: 32px;\n border-radius: 100%;\n background-color: #fff;\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 10px 36px 0px, rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;\n }\n\n .gleap-admin-collapse-ui svg {\n width: 20px;\n height: 14px;\n margin-top: 6px;\n fill: #000 !important;\n }\n\n .gleap-admin-collapse-ui-active {\n bottom: 20px !important;\n }\n\n .gleap-admin-collapse-ui-active svg {\n transform: rotate(180deg);\n }\n\n .gleap-admin-frame-container-active {\n display: none !important;\n }\n\n .gleap-admin-frame-container {\n position: fixed;\n bottom: 0px;\n left: 0px;\n right: 0px;\n width: 100vw;\n z-index: ").concat(2147483640,";\n }\n\n .gleap-admin-frame {\n width: 100%;\n height: 100%;\n border: none;\n outline: none;\n display: block;\n }\n \n .gleap-tour-message .linktype-link {\n display: inline-block !important;\n background-color: transparent !important;\n color: ").concat(n," !important;\n }\n\n .gleap-tooltip .linktype-button,\n .gleap-tour-message .linktype-button {\n display: inline-block !important;\n border-radius: 5px;\n box-sizing: border-box;\n padding: 10px 20px !important;\n text-decoration: none !important;\n background-color: ").concat(n," !important;\n color: ").concat(p," !important;\n }\n\n .gleap-tour-message img {\n width: 100%;\n max-width: 100%;\n min-height: 260px;\n height: auto;\n margin-top: 10px;\n margin-bottom: 10px;\n object-fit: cover;\n }\n\n .gleap-tour-active .gleap-tour-overlay {\n pointer-events: none;\n }\n \n .gleap-tour-active * {\n pointer-events: none;\n }\n \n .gleap-tour-active .gleap-tour-active-element,\n .gleap-tour-active .gleap-tour-active-element *,\n .gleap-tour-popover,\n .gleap-tour-popover * {\n pointer-events: auto;\n }\n \n @keyframes animate-fade-in {\n 0% {\n opacity: 0;\n }\n \n to {\n opacity: 1;\n }\n }\n \n .gleap-tour-fade .gleap-tour-overlay {\n animation: animate-fade-in 200ms ease-in-out;\n }\n \n .gleap-tour-fade .gleap-tour-popover {\n animation: animate-fade-in 200ms;\n }\n\n .gleap-tour-video-playpause {\n position: absolute;\n bottom: 8px;\n left: 8px;\n width: 32px;\n height: 32px;\n padding: 4px;\n background-color: rgba(0,0,0,0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border-radius: 8px;\n transition: opacity 200ms ease-in-out;\n }\n\n .gleap-tour-popover-video-pointer .gleap-tour-popover-arrow {\n display: none !important;\n }\n\n .gleap-tour-video-playpause svg {\n width: 34px;\n height: auto;\n fill: #fff;\n }\n \n /* Popover styles */\n .gleap-tour-popover {\n all: unset;\n box-sizing: border-box;\n color: #2d2d2d;\n margin: 0;\n padding: 15px;\n border-radius: ").concat(S,'px;\n min-width: 250px;\n max-width: 300px;\n box-shadow: 0 1px 10px #0006;\n z-index: 1000000000;\n position: fixed;\n top: 0;\n right: 0;\n background-color: #fff;\n }\n \n .gleap-tour-popover * {\n font-family: "Helvetica Neue", Inter, ui-sans-serif, "Apple Color Emoji", Helvetica, Arial, sans-serif;\n }\n \n .gleap-tour-popover-title {\n font: 19px / normal sans-serif;\n font-weight: 700;\n display: block;\n position: relative;\n line-height: 1.5;\n zoom: 1;\n margin: 0;\n }\n \n .gleap-tour-popover-close-btn {\n all: unset;\n position: absolute;\n top: 5px;\n right: 5px;\n width: 32px;\n height: 32px;\n cursor: pointer;\n font-size: 30px;\n font-weight: 500;\n line-height: 32px;\n color: #d2d2d2;\n z-index: 1;\n text-align: center;\n transition: color;\n transition-duration: 200ms;\n }\n \n .gleap-tour-popover-close-btn:hover,\n .gleap-tour-popover-close-btn:focus {\n color: #2d2d2d;\n }\n \n .gleap-tour-popover-title[style*="block"] + .gleap-tour-popover-description {\n margin-top: 5px;\n }\n \n .gleap-tour-popover-description {\n margin-bottom: 0;\n font: 15px / normal sans-serif;\n line-height: 1.5;\n font-weight: 400;\n zoom: 1;\n }\n \n .gleap-tour-popover-footer {\n margin-top: 15px;\n text-align: right;\n zoom: 1;\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n \n .gleap-tour-popover-progress-text {\n font-size: 13px;\n font-weight: 400;\n color: #727272;\n zoom: 1;\n }\n \n .gleap-tour-popover-footer button {\n background-color: ').concat(e,";\n color: ").concat(c,";\n border-radius: ").concat(C,"px;\n box-sizing: border-box;\n padding: 10px 20px;\n font-size: 14px;\n font-weight: bold;\n line-height: 21px;\n border: none;\n text-align: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n display: flex;\n justify-content: center;\n align-items: center;\n box-shadow: none !important;\n outline: none !important;\n }\n\n .gleap-tour-popover-prev-btn {\n color: ").concat(f," !important;\n background-color: ").concat(b," !important;\n margin-right: 3px;\n }\n\n .gleap-tour-popover-prev-btn:hover {\n background-color: ").concat(e,"22 !important;\n color: ").concat(e,' !important;\n }\n \n .gleap-tour-popover-footer .gleap-tour-popover-btn-disabled {\n opacity: 0.5;\n pointer-events: none;\n }\n \n /* Disable the scrolling of parent element if it has an active element*/\n :not(body):has(> .gleap-tour-active-element) {\n overflow: hidden !important;\n }\n \n .gleap-tour-no-interaction, .gleap-tour-no-interaction * {\n pointer-events: none !important;\n }\n \n .gleap-tour-popover-navigation-btns {\n display: flex;\n flex-grow: 1;\n justify-content: flex-end;\n }\n \n .gleap-tour-popover-navigation-btns button + button {\n margin-left: 4px;\n }\n \n .gleap-tour-popover-arrow {\n content: "";\n position: absolute;\n border: 5px solid #fff;\n }\n \n .gleap-tour-popover-arrow-side-over {\n display: none;\n }\n \n /** Popover Arrow Sides **/\n .gleap-tour-popover-arrow-side-left {\n left: 100%;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-top-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-right {\n right: 100%;\n border-left-color: transparent;\n border-bottom-color: transparent;\n border-top-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-top {\n top: 100%;\n border-right-color: transparent;\n border-bottom-color: transparent;\n border-left-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-bottom {\n bottom: 100%;\n border-left-color: transparent;\n border-top-color: transparent;\n border-right-color: transparent;\n }\n \n .gleap-tour-popover-arrow-side-center {\n display: none;\n }\n \n /* Left/Start + Right/Start */\n .gleap-tour-popover-arrow-side-left.gleap-tour-popover-arrow-align-start,\n .gleap-tour-popover-arrow-side-right.gleap-tour-popover-arrow-align-start {\n top: 15px;\n }\n \n /* Top/Start + Bottom/Start */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-start,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-start {\n left: 15px;\n }\n \n /* End/Left + End/Right */\n .gleap-tour-popover-arrow-align-end.gleap-tour-popover-arrow-side-left,\n .gleap-tour-popover-arrow-align-end.gleap-tour-popover-arrow-side-right {\n bottom: 15px;\n }\n \n /* Top/End + Bottom/End */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-end,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-end {\n right: 15px;\n }\n \n /* Left/Center + Right/Center */\n .gleap-tour-popover-arrow-side-left.gleap-tour-popover-arrow-align-center,\n .gleap-tour-popover-arrow-side-right.gleap-tour-popover-arrow-align-center {\n top: 50%;\n margin-top: -5px;\n }\n \n /* Top/Center + Bottom/Center */\n .gleap-tour-popover-arrow-side-top.gleap-tour-popover-arrow-align-center,\n .gleap-tour-popover-arrow-side-bottom.gleap-tour-popover-arrow-align-center {\n left: 50%;\n margin-left: -5px;\n }\n \n /* No arrow */\n .gleap-tour-popover-arrow-none {\n display: none;\n } \n '),T=document.querySelector(".gleap-styles");T&&T.remove();var O=document.createElement("style");O.innerHTML=L,O.className="gleap-styles",document.body.appendChild(O)}(e,t,n,r,o,i,s,l)}))}},{key:"sendSilentCrashReport",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,o)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};if(!this.silentCrashReportSent){this.silentCrashReportSent=!0,setTimeout((function(){t.silentCrashReportSent=!1}),1e4);var r=o?x(o):{},i=Ge.getInstance();if(i.ready){var a=e||{};i.session.email&&(a.reportedBy=i.session.email),new At("CRASH",n,a,!0,r).sendFeedback().then((function(){})).catch((function(e){}))}}}},{key:"showSurvey",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"survey";e.startFeedbackFlowWithOptions(t,{hideBackButton:!0,format:n},!0)}},{key:"startClassicForm",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlow",value:function(t,n){e.startFeedbackFlowWithOptions(t,{hideBackButton:!n})}},{key:"startFeedbackFlowWithOptions",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=n.autostartDrawing,i=n.hideBackButton,a=n.format;if(Ge.getInstance().ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var s="start-feedbackflow";o&&(s="start-survey"),Bt.getInstance().setAppMode(o?a:"widget"),Bt.getInstance().sendMessage({name:s,data:{flow:t,hideBackButton:i,format:a}},!0),r?Bt.getInstance().showDrawingScreen("screenshot"):Bt.getInstance().showWidget()}}},{key:"openConversations",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-conversations",data:{hideBackButton:!e}},!0),Bt.getInstance().showWidget()}},{key:"openConversation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e,hideBackButton:!t}},!0),Bt.getInstance().showWidget())}},{key:"startConversation",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e.startBot("",t)}},{key:"startBot",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"start-bot",data:{botId:e||"",hideBackButton:!t}},!0),Bt.getInstance().showWidget()}},{key:"openHelpCenterCollection",value:function(e){e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-help-collection",data:{collectionId:e}},!0),Bt.getInstance().showWidget())}},{key:"openHelpCenterArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-help-article",data:{articleId:e,hideBackButton:!t}},!0),Bt.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),Bt.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),Bt.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-news-article",data:{id:e}},!0),Bt.getInstance().showWidget())}},{key:"openChecklists",value:function(){Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-checklists",data:{}},!0),Bt.getInstance().showWidget()}},{key:"startChecklist",value:function(e){return!!e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"start-checklist",data:{outboundId:e}},!0),Bt.getInstance().showWidget(),!0)}},{key:"openChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-checklist",data:{id:e,hideBackButton:!t}},!0),Bt.getInstance().showWidget())}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),Bt.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){Bt.getInstance().setAppMode("widget"),Bt.getInstance().sendMessage({name:"open-feature-requests",data:{}},!0),Bt.getInstance().showWidget()}},{key:"startProductTour",value:function(e){var t=this;Ge.getInstance().startProductTourConfig(e).then((function(n){t.startProductTourWithConfig(e,n)})).catch((function(e){}))}},{key:"checkForUncompletedTour",value:function(){var e=yr.getInstance().loadUncompletedTour();e&&yr.getInstance().startWithConfig(e.tourId,e.tourData)}},{key:"startProductTourWithConfig",value:function(e,t){yr.getInstance().startWithConfig(e,t)}},{key:"showBanner",value:function(e){try{Ao.getInstance().showBanner(e)}catch(t){}}},{key:"showNotification",value:function(e){Co.getInstance().showNotification(e)}}],n&&xr(t.prototype,n),o&&xr(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();if(Cr(Lr,"invoked",!0),Cr(Lr,"silentCrashReportSent",!1),Cr(Lr,"instance",void 0),"undefined"!=typeof window){var Tr=window.GleapActions;if(Tr&&Tr.length>0)for(var Or=0;Or<Tr.length;Or++){var Er=Tr[Or];Er&&Er.e&&Lr[Er.e]&&Lr[Er.e].apply(Lr,Er.a)}}var Mr=function(e){try{var t=e.split("/"),n=t[2];if("article"===n){var o=t[3];Lr.openHelpCenterArticle(o,!0)}if("collection"===n){var r=t[3];Lr.openHelpCenterCollection(r,!0)}if("flow"===n){var i=t[3];Lr.startFeedbackFlow(i,!0)}if("survey"===n){var a=t[3];Lr.showSurvey(a)}if("bot"===n){var s=t[3];Lr.startBot(s,!0)}if("news"===n){var l=t[3];Lr.openNewsArticle(l,!0)}if("checklist"===n){var c=t[3];Lr.startChecklist(c,!0)}if("tour"===n){var u=t[3];Lr.startProductTour(u)}}catch(d){console.error("Failed to handle Gleap link: ",e)}};const Ar=Lr,Pr=Lr})(),o=o.default})()));