gleap 16.0.0 → 16.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/esm/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};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 r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function o(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(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.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)}e.d(t,{A:()=>wv});var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"feedbackButton",null),o(this,"injectedFeedbackButton",!1),o(this,"buttonHidden",null),o(this,"lastButtonIcon",null),o(this,"showingRedDot",!1)}var t,n,i;return t=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"destroy",value:function(){this.feedbackButton&&(this.feedbackButton.remove(),this.feedbackButton=null),this.buttonHidden=null,this.lastButtonIcon=null,this.injectedFeedbackButton=!1,this.instance=null}},{key:"toggleFeedbackButton",value:function(t){this.buttonHidden=!t,e.getInstance().updateFeedbackButtonState(),_f.getInstance().updateContainerStyle()}},{key:"updateRedDot",value:function(e){var t=er.getInstance();if(this.feedbackButton&&!this.buttonHidden&&!t.isOpened()){var n="bb-feedback-button--red-dot",r=this.feedbackButton.querySelector(".".concat(n));if(e){if(!r){var o=document.createElement("div");o.className=n,this.feedbackButton.appendChild(o)}}else r&&r.remove()}}},{key:"feedbackButtonPressed",value:function(){var e=er.getInstance();e.isOpened()?(e.hideWidget(),this.updateRedDot(this.showingRedDot)):(e.setAppMode("widget"),e.showWidget(),this.updateRedDot(!1))}},{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&&!er.getInstance().isOpened()?(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=tn.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(Wf.getInstance().updateUIVisibility(),null!==this.feedbackButton){var t=tn.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",wf.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 r=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(r=!0):e.getInstance().buttonHidden&&(r=!0),r&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),er.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var o=er.getInstance().appMode;"survey"!==o&&"survey_full"!==o&&"survey_web"!==o||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||Wt.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&r(t.prototype,n),i&&r(t,i),Object.defineProperty(t,"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 r,o,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=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}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,r=new Array(t);n<t;n++)r[n]=e[n];return r}o(a,"FEEDBACK_BUTTON_BOTTOM_RIGHT","BOTTOM_RIGHT"),o(a,"FEEDBACK_BUTTON_BOTTOM_LEFT","BOTTOM_LEFT"),o(a,"FEEDBACK_BUTTON_CLASSIC","BUTTON_CLASSIC"),o(a,"FEEDBACK_BUTTON_CLASSIC_LEFT","BUTTON_CLASSIC_LEFT"),o(a,"FEEDBACK_BUTTON_CLASSIC_BOTTOM","BUTTON_CLASSIC_BOTTOM"),o(a,"FEEDBACK_BUTTON_NONE","BUTTON_NONE"),o(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),r=n[0],o=n[1],i=n[2],a=[parseInt(r,16)+t,parseInt(o,16)+t,parseInt(i,16)+t];r=a[0],o=a[1],i=a[2],r=Math.max(Math.min(255,r),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16),i=Math.max(Math.min(255,i),0).toString(16);var s=(r.length<2?"0":"")+r,c=(o.length<2?"0":"")+o,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>':"drag"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512">\x3c!--!Font Awesome Pro 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--\x3e<path d="M64 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm0 160a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM96 416a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96-288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32 128a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM192 448a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"/></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 h(e){return h="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},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}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"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h(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,r;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 r=0;r<this.filters.length;r++)delete n.request.headers[this.filters[r]];if(n&&n.request&&n.request.payload){var o=n.request.payload;try{o=JSON.parse(n.request.payload)}catch(c){}if(o){for(r=0;r<this.filters.length;r++)delete o[this.filters[r]];n.request.payload=JSON.stringify(o)}}if(n&&n.response&&n.response.responseText)try{var i=JSON.parse(n.response.responseText);for(r=0;r<this.filters.length;r++)delete i[this.filters[r]];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":h(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,r){if(!e.stopped&&r&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[r]={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 o=n[1]&&n[1].method?n[1].method:"GET";e.requests[r]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:o,url:n[0],date:new Date}}else e.requests[r]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,r){if(!e.stopped&&r&&e.requests&&e.requests[r]){try{e.requests[r].success=!0,e.requests[r].response={status:n.status,statusText:"",responseText:"<request_still_open>"},e.calcRequestTime(r)}catch(i){}try{var o="";n.headers&&void 0!==n.headers.get&&(o=n.headers.get("content-type")),e.isContentTypeSupported(o)?n.text().then((function(o){e.requests[r]&&(e.requests[r].success=!0,e.requests[r].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(o)}),e.calcRequestTime(r),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[r]&&(e.requests[r].success=!0,e.requests[r].response={status:n.status,statusText:n.statusText,responseText:"<content_type_not_supported>"}),e.calcRequestTime(r),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 r=t.currentTarget,o=r.responseType,i="<"+o+">";""!==o&&"text"!==o||(i=e.cleanupContentSize(r.responseText)),e.requests[r.bbRequestId].success=!0,e.requests[r.bbRequestId].response={status:r.status,statusText:r.statusText,responseText:i},e.calcRequestTime(r.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,r=XMLHttpRequest.prototype.open,o=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)),r.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),o.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var r=++n.requestId;return e.onFetch(arguments,r),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,r)}return t})).catch((function(t){throw e.onFetchFailed(t,r),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},r.onerror=function(e){n(e)},r.readAsText(e)}))}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();g(v,"instance",void 0);const y=v;var b=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(r,o){var i=0===e.indexOf("data:image/jpeg"),a=new Image;a.src=e,a.onerror=function(){o()},a.onload=function(){var e=document.createElement("canvas"),o=t,s=n;t>a.width/1.5&&(o=a.width/1.5),n>a.height/1.5&&(s=a.height/1.5);var l=a.width,c=a.height;l>c?l>o&&(c*=o/l,l=o):c>s&&(l*=s/c,c=s),e.width=l,e.height=c,e.getContext("2d").drawImage(a,0,0,l,c),r(i?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},w=/(android|iphone|ipod|ipad|blackberry|iemobile|opera mini|webos)/i,k=function(){return x()?"mobile":"desktop"},x=function(){if("undefined"==typeof window)return!1;try{var e="undefined"!=typeof navigator?navigator:void 0;if(null!=e&&e.userAgentData&&"boolean"==typeof e.userAgentData.mobile&&null!==e.userAgentData.mobile)return e.userAgentData.mobile;if(e&&w.test(e.userAgent||e.vendor||""))return!0;if((null==e?void 0:e.maxTouchPoints)>1&&window.matchMedia){var t=window.matchMedia("(hover: none) and (pointer: coarse)");if(null!=t&&t.matches)return!0}}catch(n){}return!1},S=function(e){if(!e)return{};if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},C=function(e,t){return e.length>t?e.slice(0,t)+"...":e},I=function(e){try{var t=e.split("."),n=!1,r=t[t.length-2];return"co"!==r&&"com"!==r&&"gv"!==r&&"ac"!==r&&"edu"!==r&&"gov"!==r&&"mil"!==r&&"net"!==r&&"org"!==r||(n=!0),(t=t.slice(n?-3:-2)).join(".")}catch(o){}return e},E=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},O=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(r){}else localStorage.removeItem(n)},T=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",(function(){e()}))};function L(e){return L="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},L(e)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P(r.key),r)}}function M(e,t,n){return(t=P(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e){var t=function(e,t){if("object"!=L(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=L(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==L(t)?t:String(t)}var R="success",N="error",_=function(){function e(){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),M(this,"validationRequests",new Map),M(this,"validationCache",new Map),M(this,"fetchRequests",new Map),M(this,"fetchCache",new Map),e.instance)return e.instance;e.instance=this}var t,n,r;return t=e,n=[{key:"clearCache",value:function(){this.validationCache.clear(),this.fetchCache.clear(),this.validationRequests.clear(),this.fetchRequests.clear()}},{key:"_getQueryParams",value:function(){var e=Wt.getInstance(),t=null==e?void 0:e.session,n=wf.getInstance().getActiveLanguage()||"en";return"gleapId=".concat((null==t?void 0:t.gleapId)||"","&gleapHash=").concat((null==t?void 0:t.gleapHash)||"","&lang=").concat(n)}},{key:"_getApiUrl",value:function(){var e=Wt.getInstance();return(null==e?void 0:e.apiUrl)||null}},{key:"_makeRequest",value:function(e,t,n){return new Promise((function(r,o){var i=new XMLHttpRequest;i.open(e,t);var a=Wt.getInstance();null==a||a.injectSession(i),n&&i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.onreadystatechange=function(){if(4===i.readyState)if(i.status>=200&&i.status<300)try{var e=i.responseText?JSON.parse(i.responseText):null;r(e)}catch(t){o({status:i.status,statusText:"JSON Parse Error",responseText:i.responseText,error:t})}else o({status:i.status,statusText:i.statusText,responseText:i.responseText})},i.onerror=function(){o({status:0,statusText:"Network Error",responseText:null})},i.send(n?JSON.stringify(n):null)}))}},{key:"_createCacheKey",value:function(e,t){return t?"".concat(e,"::").concat(t):e}},{key:"validateChecklist",value:function(e,t){var n=this,r=this._createCacheKey(e,t),o=this.validationCache.get(r);if(o)return o.status===R?Promise.resolve(o.internalId):Promise.reject(o.error);if(this.validationRequests.has(r))return this.validationRequests.get(r);var i=this._getApiUrl();if(!i){var a=new Error("ChecklistNetworkManager: Gleap API URL not configured.");return this.validationCache.set(r,{status:N,error:a}),Promise.reject(a)}var s="".concat(i,"/outbound/checklists?").concat(this._getQueryParams()),l=this._makeRequest("POST",s,{outboundId:e,sharedKey:t}).then((function(e){if(e&&e.id)return n.validationCache.set(r,{status:R,internalId:e.id}),e.id;var t=new Error("Validation response missing checklist ID.");throw n.validationCache.set(r,{status:N,error:e||t}),t})).catch((function(e){throw n.validationCache.set(r,{status:N,error:e}),e})).finally((function(){n.validationRequests.delete(r)}));return this.validationRequests.set(r,l),l}},{key:"fetchChecklist",value:function(e){var t=this,n=this.fetchCache.get(e);if(n)return n.status===R?Promise.resolve(JSON.parse(JSON.stringify(n.data))):Promise.reject(n.error);if(this.fetchRequests.has(e))return this.fetchRequests.get(e).then((function(e){return JSON.parse(JSON.stringify(e))}));var r=this._getApiUrl();if(!r){var o=new Error("ChecklistNetworkManager: Gleap API URL not configured.");return this.fetchCache.set(e,{status:N,error:o}),Promise.reject(o)}var i="".concat(r,"/outbound/checklists/").concat(e,"?convertTipTap=true&").concat(this._getQueryParams()),a=this._makeRequest("GET",i,null).then((function(n){if(n)return t.fetchCache.set(e,{status:R,data:n}),JSON.parse(JSON.stringify(n));var r=new Error("Empty response received for checklist fetch.");throw t.fetchCache.set(e,{status:N,error:n||r}),r})).catch((function(n){throw t.fetchCache.set(e,{status:N,error:n}),n})).finally((function(){t.fetchRequests.delete(e)}));return this.fetchRequests.set(e,a),a.then((function(e){return JSON.parse(JSON.stringify(e))}))}}],r=[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}],n&&A(t.prototype,n),r&&A(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();M(_,"instance",null);const D=_;function j(e){return j="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},j(e)}function F(){F=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==j(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(j(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function B(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 U(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 U(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t,n,r,o,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(r,o)}var z=function(e,t,n){var r,o,i,a,s,l,c;switch(e){case"meta":null===(r=n.onMeta)||void 0===r||r.call(n,t);break;case"token":null===(o=n.onToken)||void 0===o||o.call(n,t);break;case"tool_start":null===(i=n.onToolStart)||void 0===i||i.call(n,t);break;case"tool_end":null===(a=n.onToolEnd)||void 0===a||a.call(n,t);break;case"done":null===(s=n.onDone)||void 0===s||s.call(n,t);break;case"error":null===(l=n.onError)||void 0===l||l.call(n,t);break;case"handoff":null===(c=n.onHandoff)||void 0===c||c.call(n,t)}},q=function(){var e,t=(e=F().mark((function e(t,n){var r,o,i,a,s,l,c,u,d,p,h,f,g,m,v,y,b,w;return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.body){e.next=3;break}return null===(r=n.onError)||void 0===r||r.call(n,{message:"No response body."}),e.abrupt("return");case 3:o=t.body.getReader(),i=new TextDecoder,a="",s="",l="",e.prev=8;case 9:return e.next=12,o.read();case 12:if(u=e.sent,d=u.done,p=u.value,!d){e.next=17;break}return e.abrupt("break",24);case 17:a+=i.decode(p,{stream:!0}),h=a.split("\n"),a=null!==(c=h.pop())&&void 0!==c?c:"",f=B(h);try{for(f.s();!(g=f.n()).done;)if(m=g.value,(v=m.replace(/\r$/,"")).startsWith("event: "))s=v.slice(7).trim();else if(v.startsWith("data: "))l+=(l?"\n":"")+v.slice(6);else if(""===v){if(s&&l)try{y=JSON.parse(l),z(s,y,n)}catch(k){}s="",l=""}}catch(x){f.e(x)}finally{f.f()}e.next=9;break;case 24:if(s&&l)try{b=JSON.parse(l),z(s,b,n)}catch(S){}e.next=30;break;case 27:e.prev=27,e.t0=e.catch(8),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)&&(null===(w=n.onError)||void 0===w||w.call(n,{message:"Stream interrupted."}));case 30:case"end":return e.stop()}}),e,null,[[8,27]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){H(i,r,o,a,s,"next",e)}function s(e){H(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}();function W(e){return W="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},W(e)}function G(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 V(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 V(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function J(){J=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==W(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(W(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e,t,n,r,o,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(r,o)}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function $(e,t,n){return(t=Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(e){var t=function(e,t){if("object"!=W(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=W(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==W(t)?t:String(t)}var ee="success",te="error",ne=function(){function e(){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$(this,"executeInFlight",new Map),$(this,"messagesCache",new Map),$(this,"messagesRequests",new Map),e.instance)return e.instance;e.instance=this}var t,n,r,o,i;return t=e,n=[{key:"clearCache",value:function(){this.messagesCache.clear(),this.messagesRequests.clear(),this.executeInFlight.clear()}},{key:"_getApiUrl",value:function(){var e=Wt.getInstance();return(null==e?void 0:e.apiUrl)||null}},{key:"_getHeaders",value:function(){var e,t,n=Wt.getInstance(),r={"Content-Type":"application/json"};return null!=n&&n.sdkKey&&(r["Api-Token"]=n.sdkKey),null!=n&&null!==(e=n.session)&&void 0!==e&&e.gleapId&&(r["Gleap-Id"]=n.session.gleapId),null!=n&&null!==(t=n.session)&&void 0!==t&&t.gleapHash&&(r["Gleap-Hash"]=n.session.gleapHash),r}},{key:"_makeRequest",value:function(e,t,n){return new Promise((function(r,o){var i=new XMLHttpRequest;i.open(e,t);var a=Wt.getInstance();null==a||a.injectSession(i),n&&i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.onreadystatechange=function(){if(4===i.readyState)if(i.status>=200&&i.status<300)try{r(i.responseText?JSON.parse(i.responseText):null)}catch(e){o({status:i.status,statusText:"JSON Parse Error",error:e})}else o({status:i.status,statusText:i.statusText,responseText:i.responseText})},i.onerror=function(){return o({status:0,statusText:"Network Error"})},i.send(n?JSON.stringify(n):null)}))}},{key:"streamAgent",value:(o=J().mark((function e(t,n,r,o){var i,a,s,l,c,u,d;return J().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.executeInFlight.get(t)){e.next=2;break}return e.abrupt("return");case 2:if(this.executeInFlight.set(t,!0),i=this._getApiUrl()){e.next=8;break}return this.executeInFlight.delete(t),null===(a=r.onError)||void 0===a||a.call(r,{message:"Gleap API URL not configured."}),e.abrupt("return");case 8:return s="".concat(i,"/v3/shared/agents/").concat(t,"/stream"),l=K(K({},this._getHeaders()),{},{Accept:"text/event-stream"}),e.prev=10,e.next=13,fetch(s,{method:"POST",headers:l,body:JSON.stringify(n),signal:o});case 13:c=e.sent,e.next=23;break;case 16:if(e.prev=16,e.t0=e.catch(10),this.executeInFlight.delete(t),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=21;break}return e.abrupt("return");case 21:return null===(u=r.onError)||void 0===u||u.call(r,{message:"Failed to connect to agent."}),e.abrupt("return");case 23:if(c.ok){e.next=27;break}return this.executeInFlight.delete(t),null===(d=r.onError)||void 0===d||d.call(r,{message:"Server error: ".concat(c.status)}),e.abrupt("return");case 27:return e.next=29,q(c,r);case 29:n.conversationId&&this._invalidateMessagesCache(n.conversationId),this.executeInFlight.delete(t);case 31:case"end":return e.stop()}}),e,this,[[10,16]])})),i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){X(i,n,r,a,s,"next",e)}function s(e){X(i,n,r,a,s,"throw",e)}a(void 0)}))},function(e,t,n,r){return i.apply(this,arguments)})},{key:"executeAgent",value:function(e,t){var n=this;if(this.executeInFlight.get(e))return Promise.reject(new Error("Agent execution already in progress."));var r=this._getApiUrl();if(!r)return Promise.reject(new Error("AgentNetworkManager: Gleap API URL not configured."));this.executeInFlight.set(e,!0);var o="".concat(r,"/v3/shared/agents/").concat(e,"/execute");return this._makeRequest("POST",o,t).then((function(e){return t.conversationId&&n._invalidateMessagesCache(t.conversationId),null!=e&&e.conversationId&&n._invalidateMessagesCache(e.conversationId),e})).finally((function(){n.executeInFlight.delete(e)}))}},{key:"getConversationMessages",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("kai"===e)return Promise.resolve({messages:[]});var i="".concat(t,":").concat(r,":").concat(o),a=this.messagesCache.get(i);if(a)return a.status===ee?Promise.resolve(JSON.parse(JSON.stringify(a.data))):Promise.reject(a.error);if(this.messagesRequests.has(i))return this.messagesRequests.get(i).then((function(e){return JSON.parse(JSON.stringify(e))}));var s=this._getApiUrl();if(!s)return Promise.reject(new Error("AgentNetworkManager: Gleap API URL not configured."));var l="".concat(s,"/v3/shared/agents/").concat(e,"/conversations/").concat(t,"/messages?limit=").concat(r,"&skip=").concat(o),c=this._makeRequest("GET",l,null).then((function(e){return n.messagesCache.set(i,{status:ee,data:e}),JSON.parse(JSON.stringify(e))})).catch((function(e){throw n.messagesCache.set(i,{status:te,error:e}),e})).finally((function(){n.messagesRequests.delete(i)}));return this.messagesRequests.set(i,c),c.then((function(e){return JSON.parse(JSON.stringify(e))}))}},{key:"getConversations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("kai"===e)return Promise.resolve({conversations:[]});var r=this._getApiUrl();return r?this._makeRequest("GET","".concat(r,"/v3/shared/agents/").concat(e,"/conversations?limit=").concat(t,"&skip=").concat(n),null):Promise.reject(new Error("AgentNetworkManager: Gleap API URL not configured."))}},{key:"_invalidateMessagesCache",value:function(e){var t,n=G(this.messagesCache.keys());try{for(n.s();!(t=n.n()).done;){var r=t.value;r.startsWith(e+":")&&this.messagesCache.delete(r)}}catch(s){n.e(s)}finally{n.f()}var o,i=G(this.messagesRequests.keys());try{for(i.s();!(o=i.n()).done;){var a=o.value;a.startsWith(e+":")&&this.messagesRequests.delete(a)}}catch(s){i.e(s)}finally{i.f()}}}],r=[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}],n&&Z(t.prototype,n),r&&Z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();$(ne,"instance",null);const re=ne,oe=Math.min,ie=Math.max,ae=Math.round,se=Math.floor,le=e=>({x:e,y:e}),ce={left:"right",right:"left",bottom:"top",top:"bottom"},ue={start:"end",end:"start"};function de(e,t,n){return ie(e,oe(t,n))}function pe(e,t){return"function"==typeof e?e(t):e}function he(e){return e.split("-")[0]}function fe(e){return e.split("-")[1]}function ge(e){return"x"===e?"y":"x"}function me(e){return"y"===e?"height":"width"}const ve=new Set(["top","bottom"]);function ye(e){return ve.has(he(e))?"y":"x"}function be(e){return ge(ye(e))}function we(e){return e.replace(/start|end/g,(e=>ue[e]))}const ke=["left","right"],xe=["right","left"],Se=["top","bottom"],Ce=["bottom","top"];function Ie(e,t,n,r){const o=fe(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?xe:ke:t?ke:xe;case"left":case"right":return t?Se:Ce;default:return[]}}(he(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(we)))),i}function Ee(e){return e.replace(/left|right|bottom|top/g,(e=>ce[e]))}function Oe(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 Te(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Le(e,t,n){let{reference:r,floating:o}=e;const i=ye(t),a=be(t),s=me(a),l=he(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(fe(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function Ae(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=pe(t,e),f=Oe(h),g=s[p?"floating"===d?"reference":"floating":d],m=Te(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?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=Te(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(m.top-w.top+f.top)/b.y,bottom:(w.bottom-m.bottom+f.bottom)/b.y,left:(m.left-w.left+f.left)/b.x,right:(w.right-m.right+f.right)/b.x}}const Me=new Set(["left","top"]);function Pe(){return"undefined"!=typeof window}function Re(e){return De(e)?(e.nodeName||"").toLowerCase():"#document"}function Ne(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _e(e){var t;return null==(t=(De(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function De(e){return!!Pe()&&(e instanceof Node||e instanceof Ne(e).Node)}function je(e){return!!Pe()&&(e instanceof Element||e instanceof Ne(e).Element)}function Fe(e){return!!Pe()&&(e instanceof HTMLElement||e instanceof Ne(e).HTMLElement)}function Be(e){return!(!Pe()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ne(e).ShadowRoot)}const Ue=new Set(["inline","contents"]);function He(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ue.has(o)}const ze=new Set(["table","td","th"]);function qe(e){return ze.has(Re(e))}const We=[":popover-open",":modal"];function Ge(e){return We.some((t=>{try{return e.matches(t)}catch(n){return!1}}))}const Ve=["transform","translate","scale","rotate","perspective"],Je=["transform","translate","scale","rotate","perspective","filter"],Ye=["paint","layout","strict","content"];function Ke(e){const t=Xe(),n=je(e)?Qe(e):e;return Ve.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Je.some((e=>(n.willChange||"").includes(e)))||Ye.some((e=>(n.contain||"").includes(e)))}function Xe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Ze=new Set(["html","body","#document"]);function $e(e){return Ze.has(Re(e))}function Qe(e){return Ne(e).getComputedStyle(e)}function et(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if("html"===Re(e))return e;const t=e.assignedSlot||e.parentNode||Be(e)&&e.host||_e(e);return Be(t)?t.host:t}function nt(e){const t=tt(e);return $e(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fe(t)&&He(t)?t:nt(t)}function rt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=nt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ne(o);if(i){const e=ot(a);return t.concat(a,a.visualViewport||[],He(o)?o:[],e&&n?rt(e):[])}return t.concat(o,rt(o,[],n))}function ot(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function it(e){const t=Qe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Fe(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ae(n)!==i||ae(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function at(e){return je(e)?e:e.contextElement}function st(e){const t=at(e);if(!Fe(t))return le(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=it(t);let a=(i?ae(n.width):n.width)/r,s=(i?ae(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const lt=le(0);function ct(e){const t=Ne(e);return Xe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:lt}function ut(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=at(e);let a=le(1);t&&(r?je(r)&&(a=st(r)):a=st(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ne(e))&&t}(i,n,r)?ct(i):le(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Ne(i),t=r&&je(r)?Ne(r):r;let n=e,o=ot(n);for(;o&&r&&t!==n;){const e=st(o),t=o.getBoundingClientRect(),r=Qe(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Ne(o),o=ot(n)}}return Te({width:u,height:d,x:l,y:c})}function dt(e,t){const n=et(e).scrollLeft;return t?t.left+n:ut(_e(e)).left+n}function pt(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-dt(e,n),y:n.top+t.scrollTop}}const ht=25;const ft=new Set(["absolute","fixed"]);function gt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ne(e),r=_e(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Xe();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=dt(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=ht&&(i-=a)}else c<=ht&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=_e(e),n=et(e),r=e.ownerDocument.body,o=ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+dt(e);const s=-n.scrollTop;return"rtl"===Qe(r).direction&&(a+=ie(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(_e(e));else if(je(t))r=function(e,t){const n=ut(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Fe(e)?st(e):le(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=ct(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Te(r)}function mt(e,t){const n=tt(e);return!(n===t||!je(n)||$e(n))&&("fixed"===Qe(n).position||mt(n,t))}function vt(e,t,n){const r=Fe(t),o=_e(t),i="fixed"===n,a=ut(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=le(0);function c(){l.x=dt(o)}if(r||!r&&!i)if(("body"!==Re(t)||He(o))&&(s=et(t)),r){const e=ut(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?le(0):pt(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function yt(e){return"static"===Qe(e).position}function bt(e,t){if(!Fe(e)||"fixed"===Qe(e).position)return null;if(t)return t(e);let n=e.offsetParent;return _e(e)===n&&(n=n.ownerDocument.body),n}function wt(e,t){const n=Ne(e);if(Ge(e))return n;if(!Fe(e)){let t=tt(e);for(;t&&!$e(t);){if(je(t)&&!yt(t))return t;t=tt(t)}return n}let r=bt(e,t);for(;r&&qe(r)&&yt(r);)r=bt(r,t);return r&&$e(r)&&yt(r)&&!Ke(r)?n:r||function(e){let t=tt(e);for(;Fe(t)&&!$e(t);){if(Ke(t))return t;if(Ge(t))return null;t=tt(t)}return null}(e)||n}const kt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=_e(r),s=!!t&&Ge(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=le(1);const u=le(0),d=Fe(r);if((d||!d&&!i)&&(("body"!==Re(r)||He(a))&&(l=et(r)),Fe(r))){const e=ut(r);c=st(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?le(0):pt(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:_e,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Ge(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=rt(e,[],!1).filter((e=>je(e)&&"body"!==Re(e))),o=null;const i="fixed"===Qe(e).position;let a=i?tt(e):e;for(;je(a)&&!$e(a);){const t=Qe(a),n=Ke(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&ft.has(o.position)||He(a)&&!n&&mt(e,a))?r=r.filter((e=>e!==a)):o=t,a=tt(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=gt(t,n,o);return e.top=ie(r.top,e.top),e.right=oe(r.right,e.right),e.bottom=oe(r.bottom,e.bottom),e.left=ie(r.left,e.left),e}),gt(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:wt,getElementRects:async function(e){const t=this.getOffsetParent||wt,n=this.getDimensions,r=await n(e.floating);return{reference:vt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=it(e);return{width:t,height:n}},getScale:st,isElement:je,isRTL:function(e){return"rtl"===Qe(e).direction}};function xt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function St(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=at(e),u=o||i?[...c?rt(c):[],...rt(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=_e(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(s||t(),!p||!h)return;const f={rootMargin:-se(d)+"px "+-se(o.clientWidth-(u+p))+"px "+-se(o.clientHeight-(d+h))+"px "+-se(u)+"px",threshold:ie(0,oe(1,l))||1};let g=!0;function m(t){const r=t[0].intersectionRatio;if(r!==l){if(!g)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||xt(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(v){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let g=l?ut(e):null;return l&&function t(){const r=ut(e);g&&!xt(g,r)&&n();g=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Ct=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=he(n),s=fe(n),l="y"===ye(n),c=Me.has(a)?-1:1,u=i&&l?-1:1,d=pe(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},It=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=pe(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),p=ye(he(o)),h=ge(p);let f=u[h],g=u[p];if(a){const e="y"===h?"bottom":"right";f=de(f+d["y"===h?"top":"left"],f,f-d[e])}if(s){const e="y"===p?"bottom":"right";g=de(g+d["y"===p?"top":"left"],g,g-d[e])}const m=l.fn({...t,[h]:f,[p]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:a,[p]:s}}}}}},Et=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=pe(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=he(o),y=ye(s),b=he(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),k=p||(b||!g?[Ee(s)]:function(e){const t=Ee(e);return[we(e),t,we(t)]}(s)),x="none"!==f;!p&&x&&k.push(...Ie(s,g,f,w));const S=[s,...k],C=await l.detectOverflow(t,m),I=[];let E=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&I.push(C[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=fe(e),o=be(e),i=me(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ee(a)),[a,Ee(a)]}(o,a,w);I.push(C[e[0]],C[e[1]])}if(E=[...E,{placement:o,overflows:I}],!I.every((e=>e<=0))){var O,T;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=S[e];if(t){if(!("alignment"===d&&y!==ye(t))||E.every((e=>ye(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}}}let n=null==(T=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:T.placement;if(!n)switch(h){case"bestFit":{var L;const e=null==(L=E.filter((e=>{if(x){const t=ye(e.placement);return t===y||"y"===t}return!0})).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:L[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Ot=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=pe(e,t)||{};if(null==c)return{};const d=Oe(u),p={x:n,y:r},h=be(o),f=me(h),g=await a.getDimensions(c),m="y"===h,v=m?"top":"left",y=m?"bottom":"right",b=m?"clientHeight":"clientWidth",w=i.reference[f]+i.reference[h]-p[h]-i.floating[f],k=p[h]-i.reference[h],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=x?x[b]:0;S&&await(null==a.isElement?void 0:a.isElement(x))||(S=s.floating[b]||i.floating[f]);const C=w/2-k/2,I=S/2-g[f]/2-1,E=oe(d[v],I),O=oe(d[y],I),T=E,L=S-g[f]-O,A=S/2-g[f]/2+C,M=de(T,A,L),P=!l.arrow&&null!=fe(o)&&A!==M&&i.reference[f]/2-(A<T?E:O)-g[f]/2<0,R=P?A<T?A-T:A-L:0;return{[h]:p[h]+R,data:{[h]:M,centerOffset:A-M-R,...P&&{alignmentOffset:R}},reset:P}}}),Tt=(e,t,n)=>{const r=new Map,o={platform:kt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="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:o}),{x:u,y:d}=Le(c,r,l),p=r,h={},f=0;for(let m=0;m<s.length;m++){var g;const{name:n,fn:i}=s[m],{x:v,y,data:b,reset:w}=await i({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:{...a,detectOverflow:null!=(g=a.detectOverflow)?g:Ae},elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=y?y:d,h={...h,[n]:{...h[n],...b}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:d}=Le(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var Lt=function(e,t,n){if(!e||!t||!n)return!0;var r=function(e){return e.replace(/\/$/,"")},o=function(e,t){if(!e||!t)return!1;try{if(e.includes(t))return!0}catch(r){}var n=function(e){if(!e)return null;try{e.startsWith("/")&&(e=e.substring(1));var t=e.replace(/{\w+}/g,"___PLACEHOLDER___");return t=(t=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).replace(/___PLACEHOLDER___/g,"[^&?]+"),new RegExp(t,"i")}catch(r){return null}}(t);if(!n)return!1;try{return n.test(e)}catch(r){return!1}},i=!1;switch(n){case"is":i=r(e)===r(t);break;case"isnot":i=r(e)!==r(t);break;case"contains":i=o(e,t);break;case"startswith":i=e.startsWith(t);break;case"endswith":i=e.endsWith(t);break;case"notcontains":i=!o(e,t);break;default:i=!1}return i},At=function(e,t){var n=t.pageRules&&t.pageRules.length>0?t.pageRules:t.pageFilter?[{pageFilter:t.pageFilter,pageFilterType:t.pageFilterType}]:[];return 0===n.length||n.every((function(t){return Lt(e,t.pageFilter,t.pageFilterType)}))};function Mt(e){return Mt="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},Mt(e)}function Pt(e){return function(e){if(Array.isArray(e))return Rt(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 Rt(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 Rt(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 Rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dt(r.key),r)}}function _t(e,t,n){return(t=Dt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dt(e){var t=function(e,t){if("object"!=Mt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mt(t)?t:String(t)}var jt=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),_t(this,"tooltips",[]),_t(this,"filteredTooltips",[]),_t(this,"lastUrl",null),_t(this,"elementToFloatingUIMap",new WeakMap),_t(this,"elementToTooltipMap",new WeakMap),_t(this,"nextId",0),_t(this,"linkTooltip",(function(e,n){if(!e.hasAttribute("data-gleap-tooltip")){var r=t.nextId++;if(e.setAttribute("data-gleap-tooltip",r),e){var o=null;if("hotspot"===n.mode){var i=document.createElement("div");i.setAttribute("data-gleap-tooltip-anchor",r),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",r),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),o=a,t.elementToTooltipMap.set(e,n)}else o=e;var s=t.createTooltip(o,n.html,n);t.elementToFloatingUIMap.set(e,s)}}})),_t(this,"updateFilteredTooltips",(function(){t.filteredTooltips=t.getFilteredTooltips(),t.checkForTooltips()})),_t(this,"getFilteredTooltips",(function(){if(!t.tooltips)return[];var e=window.location.href;return t.tooltips.filter((function(t){return t.pageRules&&t.pageRules.length>0?At(e,{pageRules:t.pageRules}):!t.page||0===t.page.length||!!Lt(e,t.page,t.pageType)}))})),_t(this,"checkForTooltips",(function(){for(var e=0;e<t.filteredTooltips.length;e++){var n=t.filteredTooltips[e];try{for(var r=document.querySelectorAll(n.selector),o=0;o<r.length;o++){var i=r[o];i&&t.linkTooltip(i,n)}}catch(a){}}})),_t(this,"load",(function(){var e=t,n=Wt.getInstance(),r=new XMLHttpRequest;r.open("GET",n.apiUrl+"/config/"+n.sdkKey+"/tooltips"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.setRequestHeader("Api-Token",n.sdkKey);try{r.setRequestHeader("Gleap-Id",n.session.gleapId),r.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(o){}r.onerror=function(){console.error("Failed to fetch tooltips")},r.onreadystatechange=function(t){if(4===r.readyState&&200===r.status)try{e.tooltips=JSON.parse(r.responseText),e.updateFilteredTooltips()}catch(o){console.error("Failed to parse tooltips",o)}},r.send()}))}var t,n,r;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,r,o,i=(n=t.updateHotspotPositions.bind(t),r=250,o=null,function(){if(!o){var e=this,t=arguments;o=setTimeout((function(){n.call.apply(n,[e].concat(Pt(t))),o=null}),r)}});window.addEventListener("resize",i),window.requestAnimationFrame((function(){e.observer=new MutationObserver((function(n){t.lastUrl!==window.location.href&&(t.lastUrl=window.location.href,t.filteredTooltips=t.getFilteredTooltips()),n.forEach((function(n){if("attributes"===n.type){var r=n.target;r.nodeType===Node.ELEMENT_NODE&&(r.querySelector("[data-gleap-tooltip-hotspot]")||r.hasAttribute("data-gleap-tooltip-mode")||r.hasAttribute("data-gleap-tooltip"))&&t.updateHotspotPositions()}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)}))}))})),e.observer.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class"]})}))}}},{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 r=document.createElement("div");r.className="gleap-tooltip",r.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(r);var o,i=r.querySelector(".gleap-tooltip-arrow"),a=St(e,r,(function(){Tt(e,r,{placement:"left"===n.posX?"left":"right",middleware:[Ct(10),Et(),It(),Ot({element:i})]}).then((function(e){var t=e.x,n=e.y,o=e.middlewareData,a=e.placement;try{if(Object.assign(r.style,{left:"".concat(t,"px"),top:"".concat(n,"px")}),o.arrow){var s={left:"",top:"",transform:""};null!=o.arrow.x&&(s.left="".concat(o.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!=o.arrow.y&&(s.top="".concat(o.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(o),r.style.visibility="visible",r.style.opacity="1",r.style.pointerEvents="auto"}function l(){o=setTimeout((function(){r.style.opacity="0",setTimeout((function(){r.style.visibility="hidden",r.style.pointerEvents="none"}),200)}),500)}return e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",l),r.addEventListener("mouseenter",s),r.addEventListener("mouseleave",l),e.addEventListener("click",l),r.addEventListener("click",l),{cleanup:a,tooltip:r}}},{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:"destroy",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null),document.querySelectorAll(".gleap-tooltip").forEach((function(e){return e.remove()})),document.querySelectorAll("[data-gleap-tooltip-anchor]").forEach((function(e){return e.remove()})),document.querySelectorAll("[data-gleap-tooltip-hotspot]").forEach((function(e){return e.remove()})),document.querySelectorAll("[data-gleap-tooltip]").forEach((function(e){return e.removeAttribute("data-gleap-tooltip")})),document.querySelectorAll("[data-gleap-tooltip-mode]").forEach((function(e){return e.removeAttribute("data-gleap-tooltip-mode")})),this.elementToFloatingUIMap=new WeakMap,this.elementToTooltipMap=new WeakMap,this.tooltips=[],this.filteredTooltips=[]}},{key:"repositionHotspot",value:function(e,t){if(e&&t){var n=e.getAttribute("data-gleap-tooltip");if(n){var r=document.querySelector('[data-gleap-tooltip-hotspot="'.concat(n,'"]'));if(r){t.posX||(t.posX="right"),t.posY||(t.posY="center"),t.offsetX||(t.offsetX=4),t.offsetY||(t.offsetY=0);var o=e.getBoundingClientRect();try{var i=document.createRange();i.selectNodeContents(e);var a=window.getComputedStyle(e),s=i.getBoundingClientRect().width+parseFloat(a.paddingLeft);s<o.width&&(o.width=s)}catch(h){}var l=document.querySelector('[data-gleap-tooltip-anchor="'.concat(n,'"]')).getBoundingClientRect(),c=l.left-o.left,u=l.top-o.top,d=0,p=0;switch(t.posX){case"left":p=-1*(t.offsetX+17);break;case"right":p=o.width+t.offsetX}switch(t.posY){case"top":d=0+t.offsetY;break;case"bottom":d=o.height-17+t.offsetY;break;case"center":d=o.height/2-8.5+t.offsetY}r&&(r.style.position="absolute",r.style.top=d-u+"px",r.style.left=p-c+"px")}}}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e,this.instance.start()),this.instance}}],n&&Nt(t.prototype,n),r&&Nt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ft(e){return Ft="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},Ft(e)}function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){zt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qt(r.key),r)}}function zt(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"!=Ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ft(t)?t:String(t)}_t(jt,"instance",void 0);var Wt=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),zt(this,"apiUrl","https://api.gleap.io"),zt(this,"wsApiUrl","wss://ws.gleap.io"),zt(this,"sdkKey",null),zt(this,"updatingSession",!1),zt(this,"useCookies",!0),zt(this,"localStorageDisabled",!1),zt(this,"session",{gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0}),zt(this,"ready",!1),zt(this,"onSessionReadyListener",[]),zt(this,"setOnSessionReady",(function(e){t.ready?e():t.onSessionReadyListener.push(e)})),zt(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))})),zt(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&&Un.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash));try{O("session-".concat(t.sdkKey),null)}catch(o){}if(t.useCookies)try{!function(e){try{var t=I(window.location.host.split(":")[0]);document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; Domain="+t}catch(o){}}("session-".concat(t.sdkKey))}catch(o){}if(t.ready=!1,t.session={gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0},er.getInstance().sendMessage({name:"session-cleared"},!0),_f.getInstance().clearAllNotifications(!1),_f.getInstance().setNotificationCount(0),Zf.getInstance().removeBannerUI(),og.getInstance().hideModal(),n&&!isNaN(e)){var r=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*r)}})),zt(this,"validateSession",(function(e){var n;if(e&&e.gleapId){var r=!1;(null===(n=t.session)||void 0===n?void 0:n.gleapId)!==(null==e?void 0:e.gleapId)&&(r=!0),t.session&&t.session.gleapHash&&Un.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),t.localStorageDisabled||O("session-".concat(t.sdkKey),e),t.useCookies&&function(e,t,n){try{var r="";if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),r="; expires="+o.toUTCString()}var i=I(window.location.host.split(":")[0]);document.cookie=e+"="+(t||"")+r+"; 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&&Un.notifyEvent("register-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),r&&(setTimeout((function(){D.getInstance().clearCache(),re.getInstance().clearCache(),Kt.getInstance().restart();var e=jt.getInstance();if(e){try{e.destroy()}catch(t){}e.load()}}),0),"function"==typeof window.dispatchEvent&&window.dispatchEvent(new CustomEvent("session-updated"))),t.notifySessionReady()}})),zt(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(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}}catch(i){}return null}("session-".concat(t.sdkKey));if(n){var r=JSON.parse(decodeURIComponent(n));t.validateSession(r)}}}catch(s){}if(!(t.localStorageDisabled||t.session&&t.session.gleapId&&t.session.gleapId.length>0)){var o=E("session-".concat(t.sdkKey));o&&t.validateSession(o)}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)}catch(s){}else 429!==a.status&&i.clearSession(e,!0)},a.send(JSON.stringify({lang:wf.getInstance().getActiveLanguage(),deviceType:k(),platform:"web"}))})),zt(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(r){}return t.checkIfSessionDataNeedsUpdate(n)})),zt(this,"checkIfSessionDataNeedsUpdate",(function(e){if(e)for(var n=Object.keys(e),r=0;r<n.length;r++){var o=n[r];if(JSON.stringify(t.session[o])!==JSON.stringify(e[o])&&(!t.session.customData||JSON.stringify(t.session.customData[o])!==JSON.stringify(e[o])))return!0}return!1})),zt(this,"updateSession",(function(e){if(t.checkIfSessionDataNeedsUpdate(e)){var n=t;return new Promise((function(r,o){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return o("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(){o()},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),r(a)}catch(i){o(i)}else o()},t.send(JSON.stringify({data:Ut(Ut({},e),{},{lang:wf.getInstance().getActiveLanguage(),deviceType:k(),platform:"web"}),type:"js",sdkVersion:"16.0.0",ws:!0}))}))}))}})),zt(this,"identifySession",(function(e,n,r){if(t.checkIfSessionNeedsUpdate(e,n)){var o=t;return new Promise((function(i,a){t.setOnSessionReady((function(){if(!o.session.gleapId||!o.session.gleapHash)return a("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",o.apiUrl+"/sessions/identify"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",o.sdkKey);try{t.setRequestHeader("Gleap-Id",o.session.gleapId),t.setRequestHeader("Gleap-Hash",o.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);o.validateSession(n),i(n)}catch(l){a(l)}else a()};var s=Ut({},n);n.customData&&(delete s.customData,s=Ut(Ut({},s),n.customData)),t.send(JSON.stringify(Ut(Ut({},s),{},{userId:e,userHash:r,lang:wf.getInstance().getActiveLanguage(),deviceType:k(),platform:"web"})))}))}))}})),zt(this,"startProductTourConfig",(function(e){var n=t;return new Promise((function(r,o){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return o("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(){o()},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&&r(n.config)}catch(i){o(i)}else o()},t.send(JSON.stringify({outboundId:e}))}))}))})),zt(this,"validateProductTour",(function(e){var n=t;return new Promise((function(r,o){t.setOnSessionReady((function(){var t;if(!n.session.gleapId||!n.session.gleapHash)return o("Session not ready yet.");var i=new XMLHttpRequest;i.open("POST",n.apiUrl+"/outbound/producttourvalidation"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.setRequestHeader("Api-Token",n.sdkKey);try{i.setRequestHeader("Gleap-Id",n.session.gleapId),i.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(a){}i.onerror=function(){o()},i.onreadystatechange=function(e){if(4===i.readyState)if(200===i.status||201===i.status)try{var t=JSON.parse(i.responseText);t&&"live"===t.status&&t.passedPageFilter?r(t.config):o()}catch(a){o(a)}else o()},i.send(JSON.stringify({outboundId:e,currentUrl:null===(t=window)||void 0===t||null===(t=t.location)||void 0===t?void 0:t.href}))}))}))}))}var t,n,r;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=[],er.getInstance().sendSessionUpdate()}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Ht(t.prototype,n),r&&Ht(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Gt(e){return Gt="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},Gt(e)}function Vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Yt(r.key),r)}}function Jt(e,t,n){return(t=Yt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yt(e){var t=function(e,t){if("object"!=Gt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Gt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Gt(t)?t:String(t)}zt(Wt,"instance",void 0);var Kt=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),Jt(this,"eventArray",[]),Jt(this,"streamedEventArray",[]),Jt(this,"eventMaxLength",500),Jt(this,"errorCount",0),Jt(this,"streamingEvents",!1),Jt(this,"lastUrl",void 0),Jt(this,"mainLoopTimeout",null),Jt(this,"socket",null),Jt(this,"connectedWebSocketGleapId",null),Jt(this,"connectionTimeout",null),Jt(this,"pingWS",null),Jt(this,"handleOpenBound",null),Jt(this,"handleErrorBound",null),Jt(this,"handleMessageBound",null),Jt(this,"handleCloseBound",null),Jt(this,"runEventStreamLoop",(function(){var e=t;t.streamEvents(),t.mainLoopTimeout=setTimeout((function(){e.runEventStreamLoop()}),2500)})),Jt(this,"streamEvents",(function(){if(!(!Wt.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",Wt.getInstance().apiUrl+"/sessions/events"),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),Wt.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 r=ir.getInstance().getSessionDuration();n.send(JSON.stringify({time:r,events:t.streamedEventArray,opened:er.getInstance().isOpened(),type:"js",sdkVersion:"16.0.0",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,r;return t=e,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=Wt.getInstance().session.gleapId,Wt.getInstance().session&&Wt.getInstance().sdkKey&&(this.socket=new WebSocket("".concat(Wt.getInstance().wsApiUrl,"?gleapId=").concat(Wt.getInstance().session.gleapId,"&gleapHash=").concat(Wt.getInstance().session.gleapHash,"&apiKey=").concat(Wt.getInstance().sdkKey,"&sdkVersion=").concat("16.0.0")),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(Qg.getInstance().initialized)return;if("update"===e.name){var t,n=e.data,r=n.a,o=n.u,i=n.ai,a=er.getInstance().isOpened();if(r){var s=["banner","modal"],l=r.filter((function(e){var t;return!a||s.includes(null==e||null===(t=e.actionType)||void 0===t?void 0:t.toLowerCase())}));bv.getInstance().performActions(l)}i&&Wf.getInstance().setConfig({enabled:null!==(t=i.e)&&void 0!==t&&t,placeholder:i.p,quickActions:i.a,style:i.s,agentId:i.g,agentName:i.n}),null!=o&&_f.getInstance().setNotificationCount(o)}if("checklist"===e.name&&null!=e&&e.data&&window){var c,u,d=e.data,p=null!==(c=d.completedSteps)&&void 0!==c?c:[],h=null!==(u=d.completedStepsBefore)&&void 0!==u?u:[];if(p.length>h.length)for(var f=function(e){var t,n=null==d||null===(t=d.steps)||void 0===t?void 0:t.find((function(t){return t.id===p[e]}));if(!n)return 1;var r=e;h.includes(n)||Un.notifyEvent("checklist-step-completed",{checklistId:d.id,outboundId:d.outboundId,stepId:n.id,stepIndex:r,step:n,completedSteps:d.completedSteps,status:d.status,data:d})},g=0;g<p.length;g++)f(g);"done"===d.status&&Un.notifyEvent("checklist-completed",{checklistId:d.id,outboundId:d.outboundId,completedSteps:d.completedSteps,status:d.status,data:d}),"function"==typeof window.dispatchEvent&&window.dispatchEvent(new CustomEvent("checkListUpdate",{detail:e.data}))}}catch(m){}}},{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!==Wt.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(!bv.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=S(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()}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Vt(t.prototype,n),r&&Vt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Xt(e){return Xt="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},Xt(e)}function Zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qt(r.key),r)}}function $t(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"!=Xt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xt(t)?t:String(t)}Jt(Kt,"instance",void 0);var en=function(e,t){var n=parseInt(e);return isNaN(n)?t:n},tn=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),$t(this,"flowConfig",null),$t(this,"projectActions",null),$t(this,"onConfigLoadedListener",[]),$t(this,"onConfigLoaded",(function(e){null!==t.flowConfig?e():t.onConfigLoadedListener.push(e)})),$t(this,"start",(function(){var e=Wt.getInstance(),n=E("config-".concat(e.sdkKey,"-").concat(wf.getInstance().getActiveLanguage()));return n?(t.applyConfig(n),t.loadConfigFromServer().catch((function(e){})),Promise.resolve()):t.loadConfigFromServer()})),$t(this,"loadConfigFromServer",(function(){var e=t;return new Promise((function(t,n){var r=Wt.getInstance(),o=new XMLHttpRequest,i=wf.getInstance().getActiveLanguage();o.open("GET",r.apiUrl+"/config/"+r.sdkKey+"?lang="+i),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.injectSession(o),o.onerror=function(){n()},o.onreadystatechange=function(a){if(4===o.readyState){if(403===o.status&&(!function(e){try{var t="gleap-widget-".concat(e);localStorage.removeItem(t)}catch(n){}}("config-".concat(r.sdkKey,"-").concat(i)),bv.destroy()),200===o.status||201===o.status)try{var s=JSON.parse(o.responseText);try{O("config-".concat(r.sdkKey,"-").concat(i),s)}catch(l){}return e.applyConfig(s),t()}catch(a){}n()}},o.send()}))}))}var t,n,r;return t=e,n=[{key:"getFlowConfig",value:function(){return this.flowConfig}},{key:"applyStylesFromConfig",value:function(){var e=this.flowConfig;bv.setStyles(e.color?e.color:"#485BFF",e.headerColor?e.headerColor:"#485BFF",e.buttonColor?e.buttonColor:"#485BFF",e.backgroundColor?e.backgroundColor:"#FFFFFF",en(e.borderRadius,20),en(e.buttonX,20),en(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(),er.getInstance().sendConfigUpdate(),a.getInstance().updateFeedbackButtonState(),_f.getInstance().updateContainerStyle(),t.enableWebReplays?Qh.getInstance().start():Qh.getInstance().stop(),t.enableNetworkLogs&&y.getInstance().start(),y.getInstance().setLoadAllResources(!!t.sendNetworkResources),t.networkLogPropsToIgnore&&y.getInstance().setFilters(t.networkLogPropsToIgnore),t.networkLogBlacklist&&y.getInstance().setBlacklist(t.networkLogBlacklist),wf.getInstance().updateRTLSupport(),bv.enableShortcuts(!!t.enableShortcuts),e.aiBar&&Wf.getInstance().setConfig(e.aiBar),this.notifyConfigLoaded()}catch(n){}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Zt(t.prototype,n),r&&Zt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();$t(tn,"instance",void 0);function nn(e){return nn="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},nn(e)}function rn(){rn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==nn(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(nn(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function on(e,t,n,r,o,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(r,o)}function an(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){on(i,r,o,a,s,"next",e)}function s(e){on(i,r,o,a,s,"throw",e)}a(void 0)}))}}var sn=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 r=0;r<e.childNodes.length;r++)e.childNodes[r]&&(t+=e.childNodes[r].outerHTML);return t},ln=function(e,t,n){return r=e,o=/url\((.*?)\)/g,i=function(e){return new Promise((function(r,o){if(!e)return r(e);var i=e.substr(4,e.length-5).replaceAll("'","").replaceAll('"',"");if(0===i.indexOf("http")||0===i.indexOf("//")||0===i.indexOf("data"))return r(e);try{var a=i;return t&&(a=new URL(i,t+"/").href),n?r("url("+a+")"):cn(a).then((function(e){return r("url("+e+")")}))}catch(s){return r(e)}}))},new Promise((function(e,t){var n=[];r.replace(o,(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var a=i.apply(void 0,[e].concat(r));n.push(a)})),Promise.all(n).then((function(t){e(r.replace(o,(function(){return t.shift()})))})).catch((function(){t()}))}));var r,o,i},cn=function(e){return new Promise((function(t,n){if(e){var r=new XMLHttpRequest;r.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.onerror=function(){n()},e.readAsDataURL(r.response)},r.onerror=function(e){t()},r.open("GET",e),r.responseType="blob",r.send()}else t()}))},un=function(e){return new Promise((function(t,n){if(e&&e.src){if(function(e){var t=["//fonts.googleapis.com","//cdn.jsdelivr.net","//cdnjs.cloudflare.com","//ajax.googleapis.com","//use.typekit.net",".amazonaws.com","//jssdk.gleap.io",".gstatic.com"];if(!e)return!1;for(var n=0;n<t.length;n++)if(-1!==e.indexOf(t[n]))return!0;return!1}(e.src))return t();var r=new XMLHttpRequest;r.onload=function(){var n=new FileReader;n.onloadend=function(){!function(e,t,n,r){b(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(r.response)},r.onerror=function(e){t()};var o=e.src;r.open("GET",o),r.responseType="blob",r.send()}else t()}))},dn=function(e,t,n,r){var o=null;t.ownerNode&&(o=e.querySelector('[bb-styleid="'+r+'"]'));try{if(o){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&&(o.parentNode.insertBefore(i,o),o.remove())}}catch(c){}},pn=function(e){var t=null;try{e.cssRules?t=e.cssRules:e.rules&&(t=e.rules)}catch(o){}var n="";if(t)for(var r in t)t[r].cssText&&(n+=t[r].cssText+"\n");return function(e){for(var t="",n=0,r=0;r<e.length;r++)"{"===e[r]?(n++,t+=e[r]):"}"===e[r]?n>0&&(n--,t+=e[r]):t+=e[r];return t}(n)},hn=function(e,t){for(var n,r=[],o=function(){var e=document.styleSheets[i];if(e.media&&"print"===e.media.mediaText)return 1;var o=pn(e);if(e&&e.ownerNode)if(""!=o){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("/"));r.push(ln(o,s,t).then((function(t){return{styletext:t,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}})))}else r.push(Promise.resolve({styletext:o,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}))},i=0;i<document.styleSheets.length;i++)o();return Promise.all(r).then((function(t){if(t)for(var n=0;n<t.length;n++)dn(e,t[n].stylesheet,t[n].styletext,t[n].styleId);return!0}))},fn=function(e,t){return new Promise((function(n,r){return t?hn(e,t).then((function(){n()})).catch((function(){n()})):function(e){for(var t=e.querySelectorAll("img"),n=[],r=0;r<t.length;r++){var o=t[r];n.push(un(o))}return Promise.all(n)}(e).then((function(){return hn(e,t).then((function(){n()}))})).catch((function(){console.warn("Gleap: Failed with resolving local resources. Please contact the Gleap support team."),n()}))}))},gn=function(e,t,n){if(void 0!==e.adoptedStyleSheets)for(var r=0;r<e.adoptedStyleSheets.length;r++){var o=e.adoptedStyleSheets[r],i=pn(o),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)}},mn=function(e){if(e&&"function"==typeof e.getAnimations){var t=e.getAnimations(),n={};return t.forEach((function(t){var r,o=(null===(r=t.effect)||void 0===r?void 0:r.getKeyframes())||[],i=o[o.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},vn=function(){var e=an(rn().mark((function e(t){var n,r,o,i;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=1,r=function(){var e=an(rn().mark((function e(t,o,i){var a,s,l,c,u,d,p,h,f;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=function(){var e=an(rn().mark((function e(t,n,o){return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=11;break}return e.prev=1,e.next=4,r(t,n,o);case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:t=!t.nextElementSibling||t.nextElementSibling.nextSibling!==t.nextSibling&&null!==t.nextSibling?t.nextSibling:t.nextElementSibling,e.next=0;break;case 11:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t,n,r){return e.apply(this,arguments)}}(),s=t.cloneNode(),null!=(l=mn(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,b(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||(h=t.value,("value"===t.getAttribute("gleap-ignore")||t.classList.contains("gl-mask"))&&(h=new Array(h.length+1).join("*")),s.setAttribute("bb-data-value",h),"checkbox"!==t.type&&"radio"!==t.type||!t.checked||s.setAttribute("bb-data-checked",!0))),o.appendChild(s),!t.shadowRoot){e.next=29;break}return f=n,n++,e.next=27,a(t.shadowRoot.firstChild,s,f);case 27:gn(t.shadowRoot,s,f),void 0!==s.setAttribute&&s.setAttribute("bb-shadow-parent",f);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,r){return e.apply(this,arguments)}}(),o=document.createDocumentFragment(),e.next=5,r(t,o);case 5:return(i=o.querySelector("head"))||(i=o),gn(window.document,i),e.abrupt("return",o);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),yn=function(e){return new Promise(function(){var t=an(rn().mark((function t(n,r){var o,i,a,s,l,c,u,d,p,h,f,g,m,v,y;return rn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(t.prev=0,o=window.document.querySelectorAll("style, link"),i=0;i<o.length;++i)o[i].setAttribute("bb-styleid",i);return t.next=5,vn(window.document.documentElement);case 5: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(h=window.location.href.substring(0,window.location.href.lastIndexOf("/")),f=h+"/",d&&(d.startsWith("http")?f=d:(f=h+d).endsWith("/")||(f+="/")),(g=window.document.createElement("base")).href=f,(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(y=a.querySelectorAll("[bb-element=true]"),i=0;i<y.length;++i)y[i]&&(y[i].style.height=y[i].getAttribute("bb-height")+"px");fn(a,e).then((function(){var e=sn(a);n({html:e,baseUrl:h,width:window.innerWidth,height:window.innerHeight,isMobile:x()})})),t.next=31;break;case 27:t.prev=27,t.t0=t.catch(0),console.warn("Gleap: Failed to capture screenshot",t.t0),n(null);case 31:case"end":return t.stop()}}),t,null,[[0,27]])})));return function(e,n){return t.apply(this,arguments)}}())};function bn(e){return bn="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},bn(e)}function wn(){wn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==bn(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(bn(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function kn(e,t,n,r,o,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(r,o)}function xn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){kn(i,r,o,a,s,"next",e)}function s(e){kn(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Sn(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 Cn(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 Cn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 Cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function In(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,On(r.key),r)}}function En(e,t,n){return(t=On(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function On(e){var t=function(e,t){if("object"!=bn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=bn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==bn(t)?t:String(t)}var Tn=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),En(this,"rerender",void 0),En(this,"stream",void 0),En(this,"mediaRecorder",void 0),En(this,"audioMuted",!1),En(this,"audioAvailable",!0),En(this,"available",!0),En(this,"isRecording",!1),En(this,"file",null),En(this,"maxRecordTime",e.MAX_RECORD_TIME),En(this,"recordTime",0),En(this,"recordingTimer",null),En(this,"permissionErrorText",""),En(this,"_displayVideoTrack",null),En(this,"_displayStream",null),En(this,"_micStream",null),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){r.rerender()}),e.RERENDER_DELAY)}var t,n,r,o,i,a;return t=e,n=[{key:"getSupportedMimeType",value:function(){var t,n=Sn(e.MIME_TYPES);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(window.MediaRecorder&&MediaRecorder.isTypeSupported(r))return r}}catch(o){n.e(o)}finally{n.f()}return"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9<e?":":":0")+e}},{key:"stopStreamTracks",value:function(e){if(e)try{e.getTracks().forEach((function(e){return e.stop()}))}catch(t){}}},{key:"createMediaStream",value:function(e){var t=e.filter((function(e){return null!==e}));return new MediaStream(t)}},{key:"getFirstVideoTrack",value:function(e){if(!e)return null;var t=e.getVideoTracks();return t.length>0?t[0]:null}},{key:"getFirstAudioTrack",value:function(e){if(!e)return null;var t=e.getAudioTracks();return t.length>0?t[0]:null}},{key:"startScreenRecording",value:(a=xn(wn().mark((function t(){var n,r;return wn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia&&!this.isRecording){t.next=4;break}return this.available=!1,this.rerender(),t.abrupt("return");case 4:return t.prev=4,t.next=7,navigator.mediaDevices.getDisplayMedia({video:{width:{ideal:Math.min(window.screen.width,e.MAX_WIDTH)},height:{ideal:Math.min(window.screen.height,e.MAX_HEIGHT)},frameRate:{ideal:e.IDEAL_FRAME_RATE,max:e.MAX_FRAME_RATE},displaySurface:"monitor"},audio:!1,selfBrowserSurface:"include"});case 7:if(n=t.sent,this._displayStream=n,this._displayVideoTrack=this.getFirstVideoTrack(n),this.audioMuted){t.next=15;break}return t.next=13,this.startAudioRecording();case 13:t.next=19;break;case 15:this.audioAvailable=!1,r=this.createMediaStream([this._displayVideoTrack]),this.stream=r,this.handleRecord({stream:r});case 19:this.rerender(),t.next=26;break;case 22:t.prev=22,t.t0=t.catch(4),window.alert(this.permissionErrorText),this.rerender();case 26:case"end":return t.stop()}}),t,this,[[4,22]])}))),function(){return a.apply(this,arguments)})},{key:"stopScreenRecording",value:function(){if(this.mediaRecorder&&this.stream&&this.isRecording){this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null);try{this.mediaRecorder.stop()}catch(e){}this.stopStreamTracks(this.stream),this._displayStream&&(this.stopStreamTracks(this._displayStream),this._displayStream=null),this._micStream&&(this.stopStreamTracks(this._micStream),this._micStream=null),this._displayVideoTrack=null,this.rerender()}}},{key:"startAudioRecording",value:(i=xn(wn().mark((function e(){var t,n,r,o;return wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._displayVideoTrack){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},video:!1});case 5:t=e.sent,this._micStream=t,n=this.getFirstAudioTrack(t),this.audioMuted=!1,this.audioAvailable=!!n,r=this.createMediaStream([this._displayVideoTrack,n]),this.stream=r,this.handleRecord({stream:r}),this.rerender(),e.next=23;break;case 16:e.prev=16,e.t0=e.catch(2),this.audioAvailable=!1,o=this.createMediaStream([this._displayVideoTrack]),this.stream=o,this.handleRecord({stream:o}),this.rerender();case 23:case"end":return e.stop()}}),e,this,[[2,16]])}))),function(){return i.apply(this,arguments)})},{key:"toggleAudio",value: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}},{key:"clearPreview",value:function(){var t=document.querySelector(e.SELECTORS.PREVIEW_VIDEO);t&&(t.src=null),this.file=null,this.rerender()}},{key:"handleRecord",value:function(t){var n=t.stream,r=this,o=[];this.mediaRecorder=new MediaRecorder(n,{mimeType:this.getSupportedMimeType()}),this.isRecording=!0,this.recordTime=0;var i=document.querySelector(e.SELECTORS.TIMER_LABEL);this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null),this.recordingTimer=setInterval((function(){r.recordTime++;var e=r.maxRecordTime-r.recordTime;i?e>0?i.innerHTML=r.formatTime(e):(i.innerHTML="2:00",r.stopScreenRecording()):e<=0&&r.stopScreenRecording()}),e.TIMER_UPDATE_INTERVAL),this.mediaRecorder.ondataavailable=function(e){e.data&&e.data.size>0&&o.push(e.data)};var a=this.getFirstVideoTrack(n);a&&(a.onended=function(){r.prepareRecording(o)}),this.mediaRecorder.onstop=function(){r.prepareRecording(o)},this.mediaRecorder.start(e.CHUNK_INTERVAL),r.rerender()}},{key:"prepareRecording",value:function(t){var n=this.getSupportedMimeType(),r=new Blob(t,{type:n}),o=n.includes("mp4")?"mp4":"webm";this.file=new File([r],"screen-recording.".concat(o),{type:n});var i=document.querySelector(e.SELECTORS.PREVIEW_VIDEO);i&&(i.src=URL.createObjectURL(r),this.audioAvailable=this.stream?this.stream.getAudioTracks().length>0:this.audioAvailable,this.isRecording=!1,this.rerender())}}],r=[{key:"uploadScreenRecording",value:(o=xn(wn().mark((function e(t){return wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",null);case 2:return e.abrupt("return",new Promise((function(e,n){var r=new XMLHttpRequest;r.open("POST",Wt.getInstance().apiUrl+"/uploads/sdk"),Wt.getInstance().injectSession(r);var o=new FormData;o.append("file",t),r.onerror=function(){n(new Error("Network error during file upload"))},r.onreadystatechange=function(){4==r.readyState&&(200==r.status?e(JSON.parse(r.response).fileUrl):n(new Error("Upload failed with status ".concat(r.status))))},r.send(o)})));case 3:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})}],n&&In(t.prototype,n),r&&In(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ln(e){return Ln="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},Ln(e)}function An(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?An(Object(n),!0).forEach((function(t){Rn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):An(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nn(r.key),r)}}function Rn(e,t,n){return(t=Nn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nn(e){var t=function(e,t){if("object"!=Ln(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ln(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ln(t)?t:String(t)}En(Tn,"MAX_RECORD_TIME",120),En(Tn,"MAX_WIDTH",3072),En(Tn,"MAX_HEIGHT",1728),En(Tn,"IDEAL_FRAME_RATE",10),En(Tn,"MAX_FRAME_RATE",24),En(Tn,"CHUNK_INTERVAL",200),En(Tn,"TIMER_UPDATE_INTERVAL",1e3),En(Tn,"RERENDER_DELAY",100),En(Tn,"MIME_TYPES",["video/webm;codecs=vp9,opus","video/webm;codecs=vp8,opus","video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm","video/mp4"]),En(Tn,"SELECTORS",{PREVIEW_VIDEO:".bb-capture-preview video",TIMER_LABEL:".bb-capture-toolbar-item-timer"});var _n=function(){function e(t,n,r,o,i,a,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Rn(this,"excludeData",{}),Rn(this,"type","BUG"),Rn(this,"priority","LOW"),Rn(this,"customData",{}),Rn(this,"ticketAttributes",{}),Rn(this,"metaData",{}),Rn(this,"consoleLog",[]),Rn(this,"networkLogs",[]),Rn(this,"customEventLog",[]),Rn(this,"formData",{}),Rn(this,"isSilent",!1),Rn(this,"outboundId",void 0),Rn(this,"screenshotData",void 0),Rn(this,"webReplay",void 0),Rn(this,"screenRecordingUrl",void 0),Rn(this,"spamToken",void 0),this.type=t,this.priority=n,this.formData=r,this.isSilent=o,this.excludeData=i,this.outboundId=a,this.spamToken=s}var t,n,r;return t=e,n=[{key:"takeSnapshot",value:function(){var e=this,t=bv.getInstance();this.customData=Cr.getInstance().getCustomData(),this.metaData=ir.getInstance().getMetaData(),this.consoleLog=pr.getInstance().getLogs(),this.networkLogs=y.getInstance().getRequests(),this.customEventLog=Kt.getInstance().getEventArray(),this.ticketAttributes=Cr.getInstance().getTicketAttributes();var n=[],r=t.getGlobalDataItem("webReplay");null!==r&&(this.webReplay=r);var o,i=t.getGlobalDataItem("screenRecordingData");if(null!=i){var a=Tn.uploadScreenRecording(i).then((function(t){t&&(e.screenRecordingUrl=t)}));n.push(a)}if(!this.excludeData||!this.excludeData.screenshot){var s=(o=t.isLiveMode(),yn(o)).then((function(n){if(n){var r=t.getGlobalDataItem("snapshotPosition");n.x=r.x,n.y=r.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:Mn(Mn({},this.ticketAttributes),this.formData),isSilent:this.isSilent,outbound:this.outboundId,screenshotData:this.screenshotData,webReplay:this.webReplay,screenRecordingUrl:this.screenRecordingUrl,spamToken:this.spamToken},t=fg.getInstance().getTags();if(t&&t.length>0&&(e.tags=t),this.excludeData)for(var n=Object.keys(this.excludeData),r=0;r<n.length;r++){var o=n[r];!0===this.excludeData[o]&&(e[o]&&delete e[o],"screenshot"===o&&delete e.screenshotData,"replays"===o&&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 r=e.getData(),o=new XMLHttpRequest;o.open("POST",Wt.getInstance().apiUrl+"/bugs/v2"),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),Wt.getInstance().injectSession(o),o.onerror=function(e){n()},o.onreadystatechange=function(e){if(4===o.readyState)if(200===o.status||201===o.status)try{var r=JSON.parse(o.responseText);t(r)}catch(i){n()}else n()},o.send(JSON.stringify(r))})).catch((function(e){console.log("Failed to take snapshot",e),n()}))}))}}],n&&Pn(t.prototype,n),r&&Pn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Dn(e){return Dn="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},Dn(e)}function jn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bn(r.key),r)}}function Fn(e,t,n){return(t=Bn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bn(e){var t=function(e,t){if("object"!=Dn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Dn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Dn(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),Fn(this,"eventListeners",{})}var t,n,r;return t=e,r=[{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=bv.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var r=this.getInstance().eventListeners[e];if(r)for(var o=0;o<r.length;o++){var i=r[o];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)&&jn(t.prototype,n),r&&jn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Hn(e){return Hn="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},Hn(e)}function zn(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 qn(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 qn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Vn(r.key),r)}}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"!=Hn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Hn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hn(t)?t:String(t)}Fn(Un,"instance",void 0);var Jn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Gn(this,"agentTools",[]),Gn(this,"agentToolCallbacks",[])}var t,n,r;return t=e,r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setAgentTools",value:function(e){this.agentTools=e||[]}},{key:"getAgentTools",value:function(){return this.agentTools}},{key:"registerAgentToolAction",value:function(e){e&&this.agentToolCallbacks.push(e)}},{key:"triggerToolAction",value:function(e){if(e){Un.notifyEvent("agent-tool-executed",e);var t,n=zn(this.agentToolCallbacks);try{for(n.s();!(t=n.n()).done;){var r=t.value;try{r(e)}catch(o){}}}catch(i){n.e(i)}finally{n.f()}}}}])&&Wn(t.prototype,n),r&&Wn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Yn(e){return Yn="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},Yn(e)}function Kn(e){return function(e){if(Array.isArray(e))return Xn(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 Xn(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 Xn(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 Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qn(r.key),r)}}function $n(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"!=Yn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yn(t)?t:String(t)}Gn(Jn,"instance",void 0);var er=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),$n(this,"frameUrl","https://messenger-app.gleap.io"),$n(this,"gleapFrameContainer",null),$n(this,"gleapFrame",null),$n(this,"comReady",!1),$n(this,"injectedFrame",!1),$n(this,"widgetOpened",!1),$n(this,"listeners",[]),$n(this,"appMode","widget"),$n(this,"markerManager",void 0),$n(this,"escListener",void 0),$n(this,"frameHeight",0),$n(this,"sendingFeedback",!1),$n(this,"queue",[]),$n(this,"urlHandler",(function(e,t){if(e&&e.length>0)if(t){var n=window.open(e,"_blank");n&&n.focus()}else window.location.href=e})),$n(this,"autoWhiteListCookieManager",(function(){window&&window.cmp_block_ignoredomains&&window.cmp_block_ignoredomains.concat(["messenger-app.gleap.io"])})),$n(this,"injectFrame",(function(){t.injectedFrame||(t.injectedFrame=!0,t.autoWhiteListCookieManager(),T((function(){tn.getInstance().onConfigLoaded((function(){tn.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 *; display-capture *; camera *;" 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)}))})))})),$n(this,"showImage",(function(e){T((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()}))}))})),$n(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--extended",r="gleap-frame-container--survey-full",o="gleap-frame-container--classic",i="gleap-frame-container--classic-left",s="gleap-frame-container--modern-left",l="gleap-frame-container--no-button",c=[o,i,n,s,l,e,r],u=0;u<c.length;u++)t.gleapFrameContainer.classList.remove(c[u]);var d=void 0,p=tn.getInstance().getFlowConfig();p.feedbackButtonPosition!==a.FEEDBACK_BUTTON_CLASSIC&&p.feedbackButtonPosition!==a.FEEDBACK_BUTTON_CLASSIC_BOTTOM||(d=o),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(r),"extended"===t.appMode&&t.gleapFrameContainer.classList.add(n),t.gleapFrameContainer.setAttribute("dir",wf.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(r){}}}var t,n,r;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,n=this;if(this.gleapFrameContainer){var r=tn.getInstance().getFlowConfig(),o="gleap-frame-container--loading";null!==(t=this.gleapFrameContainer)&&void 0!==t&&t.classList&&(this.gleapFrameContainer.classList.remove("gleap-frame-container--hidden"),e?(this.gleapFrameContainer.classList.add(o),r&&r.disableBGFade&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nofade"),r&&r.disableBGGradient&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nogradient")):this.gleapFrameContainer.classList.remove(o),setTimeout((function(){var e;null===(e=n.gleapFrameContainer)||void 0===e||e.classList.add("gleap-frame-container--animate")}),500)),this.widgetOpened=!0,this.updateUI()}}},{key:"runWidgetShouldOpenCallback",value:function(){this.gleapFrameContainer&&(this.workThroughQueue(),bv.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),this.showFrameContainer(!1),this.updateWidgetStatus(),Un.notifyEvent("open"),this.registerEscListener())}},{key:"updateUI",value:function(){_f.getInstance().clearAllNotifications(this.isSurvey()),a.getInstance().updateNotificationBadge(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(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];"survey_web"!==this.appMode&&(this.hideMarkerManager(),this.gleapFrameContainer&&(this.gleapFrameContainer.classList.add("gleap-frame-container--hidden"),this.gleapFrameContainer.classList.remove("gleap-frame-container--animate")),e&&this.sendMessage({name:"reset-routes",data:{}}),this.widgetOpened=!1,this.updateWidgetStatus(),a.getInstance().updateFeedbackButtonState(),Un.notifyEvent("close"),_f.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:Wt.getInstance().getSession(),apiUrl:Wt.getInstance().apiUrl,sdkKey:Wt.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.comReady&&(this.sendMessage({name:"config-update",data:{config:tn.getInstance().getFlowConfig(),aiTools:Jn.getInstance().getAgentTools(),agentTools:Jn.getInstance().getAgentTools(),overrideLanguage:wf.getInstance().getOverrideLanguage()}}),this.updateFrameStyle())}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new gf(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){var e=Kn(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&&cg.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:Cr.getInstance().getCustomData(),metaData:ir.getInstance().getMetaData(),consoleLog:pr.getInstance().getLogs(),networkLogs:y.getInstance().getRequests(),customEventLog:Kt.getInstance().getEventArray(),formData:Cr.getInstance().getTicketAttributes()},r=fg.getInstance().getTags();r&&r.length>0&&(n.tags=r),e.sendMessage({name:"collect-ticket-data",data:n})}if("height-update"===t.name){e.frameHeight=t.data;var o=document.querySelector(".gleap-frame-container-inner");"survey"!==e.appMode&&"survey_full"!==e.appMode&&"survey_web"!==e.appMode||!o||(o.style.maxHeight="".concat(e.frameHeight,"px"))}if("notify-event"===t.name&&Un.notifyEvent(t.data.type,t.data.data),"cleanup-drawings"===t.name&&e.hideMarkerManager(),"open-url"===t.name){var i=t.data,s=!!t.newTab;e.urlHandler(i,s)}var l;if("start-product-tour"===t.name&&bv.startProductTour(null===(l=t.data)||void 0===l?void 0:l.tourId,!0),"run-custom-action"===t.name&&Mr.triggerCustomAction(t.data,{shareToken:t.shareToken}),"close-widget"===t.name&&e.hideWidget(),"video-call-joined"===t.name&&(a.getInstance().showingRedDot=!0,a.getInstance().updateRedDot(!0)),"video-call-left"===t.name&&(a.getInstance().showingRedDot=!1,a.getInstance().updateRedDot(!1)),"tool-execution"===t.name&&(Un.notifyEvent("tool-execution",t.data),Jn.getInstance().triggerToolAction(t.data)),"checklist-loaded"===t.name){var c,u=t.data;Un.notifyEvent("checklist-loaded",{checklistId:u.id,outboundId:null===(c=u.outbound)||void 0===c?void 0:c.id,completedSteps:u.completedSteps,status:u.status,data:u})}if("checklist-step-completed"===t.name){var d,p=t.data,h=p.checklistData,f=p.step,g=p.index;Un.notifyEvent("checklist-step-completed",{checklistId:h.id,outboundId:null===(d=h.outbound)||void 0===d?void 0:d.id,stepId:f.id,stepIndex:g,step:f,completedSteps:h.completedSteps,status:h.status,data:h})}if("checklist-completed"===t.name){var m,v=t.data;Un.notifyEvent("checklist-completed",{checklistId:v.id,outboundId:null===(m=v.outbound)||void 0===m?void 0:m.id,completedSteps:v.completedSteps,status:v.status,data:v})}if("send-feedback"===t.name){if(e.sendingFeedback)return;e.sendingFeedback=!0;var b=t.data.formData,w=t.data.action,k=t.data.outboundId,x=t.data.spamToken;new _n(w.feedbackType,"MEDIUM",b,!1,w.excludeData,k,x).sendFeedback().then((function(t){if(setTimeout((function(){e.sendingFeedback=!1}),1e3),e.sendMessage({name:"feedback-sent",data:t}),Un.notifyEvent("feedback-sent",b),k&&k.length>0){Un.notifyEvent("outbound-sent",{outboundId:k,outbound:w,formData:b});try{delete b.reportedBy}catch(n){}bv.trackEvent("outbound-".concat(k,"-submitted"),b)}})).catch((function(t){setTimeout((function(){e.sendingFeedback=!1,e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),Un.notifyEvent("error-while-sending")}),1e3)}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl||t.origin===Zf.getInstance().bannerUrl)try{for(var n=JSON.parse(t.data),r=0;r<e.listeners.length;r++)e.listeners[r]&&e.listeners[r](n)}catch(o){}}))}},{key:"addMessageListener",value:function(e){this.listeners.push(e)}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Zn(t.prototype,n),r&&Zn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function tr(e){return tr="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},tr(e)}function nr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,or(r.key),r)}}function rr(e,t,n){return(t=or(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function or(e){var t=function(e,t){if("object"!=tr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=tr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tr(t)?t:String(t)}$n(er,"instance",void 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),rr(this,"sessionStart",new Date),rr(this,"appBuildNumber",""),rr(this,"appVersionCode",""),rr(this,"environment","prod")}var t,n,r;return t=e,r=[{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,r=navigator.userAgent,o=navigator.appName,i=""+parseFloat(navigator.appVersion),a=parseInt(navigator.appVersion,10);-1!==(t=r.indexOf("Opera"))?(o="Opera",i=r.substring(t+6),-1!==(t=r.indexOf("Version"))&&(i=r.substring(t+8))):-1!==(t=r.indexOf("MSIE"))?(o="Microsoft Internet Explorer",i=r.substring(t+5)):-1!==(t=r.indexOf("Chrome"))?(o="Chrome",i=r.substring(t+7)):-1!==(t=r.indexOf("Safari"))?(o="Safari",i=r.substring(t+7),-1!==(t=r.indexOf("Version"))&&(i=r.substring(t+8))):-1!==(t=r.indexOf("Firefox"))?(o="Firefox",i=r.substring(t+8)):(e=r.lastIndexOf(" ")+1)<(t=r.lastIndexOf("/"))&&(o=r.substring(e,t),i=r.substring(t+1),o.toLowerCase()===o.toUpperCase()&&(o=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:o+"("+i+")",userAgent:r,browser:o,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:x(),sdkVersion:"16.0.0",sdkType:"javascript",environment:this.environment}}}])&&nr(t.prototype,n),r&&nr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ar(e){return ar="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},ar(e)}function sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}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){ur(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){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dr(r.key),r)}}function ur(e,t,n){return(t=dr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dr(e){var t=function(e,t){if("object"!=ar(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ar(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ar(t)?t:String(t)}rr(ir,"instance",void 0);var pr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ur(this,"logArray",[]),ur(this,"disabled",!1),ur(this,"originalConsoleLog",void 0),ur(this,"logMaxLength",500)}var t,n,r;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:C(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 r=0;r<e.length;r++)n+=e[r]+" "}catch(o){}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,lr(lr({},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)}}))}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&cr(t.prototype,n),r&&cr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function hr(e){return hr="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},hr(e)}function fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gr(r.key),r)}}function gr(e){var t=function(e,t){if("object"!=hr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=hr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==hr(t)?t:String(t)}ur(pr,"instance",void 0);var mr,vr,yr,br=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,r;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;yv(t)}er.getInstance().isOpened()||pr.getInstance().addLog(function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=C(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),r="",o="";if(void 0!==e.getAttribute){var i=e.getAttribute("id");i&&(r=' id="'.concat(i,'"'));var a=e.getAttribute("class");a&&(o=' class="'.concat(a,'"'))}var s=(e.tagName||"").toLowerCase(),l="<",c=">";return t||(l="[",c="]"),"".concat(l).concat(s).concat(r).concat(o).concat(c).concat(n).concat(l,"/").concat(s).concat(c)}(e.target),"CLICK")}}))}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&fr(t.prototype,n),r&&fr(t,r),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 kr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sr(r.key),r)}}function xr(e,t,n){return(t=Sr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sr(e){var t=function(e,t){if("object"!=wr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=wr(r))return r;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=br,yr=void 0,(vr=gr(vr="instance"))in mr?Object.defineProperty(mr,vr,{value:yr,enumerable:!0,configurable:!0,writable:!0}):mr[vr]=yr;var Cr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),xr(this,"customData",{}),xr(this,"ticketAttributes",{})}var t,n,r;return t=e,n=[{key:"getCustomData",value:function(){return this.customData}},{key:"attachCustomData",value:function(e){this.customData=Object.assign(this.customData,S(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}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&kr(t.prototype,n),r&&kr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ir(e){return Ir="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},Ir(e)}function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Or(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Er(Object(n),!0).forEach((function(t){Lr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ar(r.key),r)}}function Lr(e,t,n){return(t=Ar(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ar(e){var t=function(e,t){if("object"!=Ir(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ir(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ir(t)?t:String(t)}xr(Cr,"instance",void 0);var Mr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Lr(this,"customActionCallbacks",[])}var t,n,r;return t=e,r=[{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 r=0;r<n.customActionCallbacks.length;r++){var o=n.customActionCallbacks[r];o&&o(Or({name:e},t||{}))}}}],(n=null)&&Tr(t.prototype,n),r&&Tr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();Lr(Mr,"instance",void 0);var Pr,Rr=Object.defineProperty,Nr=(e,t,n)=>((e,t,n)=>t in e?Rr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),_r=Object.defineProperty,Dr=(e,t,n)=>((e,t,n)=>t in e?_r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),jr=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(jr||{});const Fr={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Br={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ur={},Hr=()=>!!globalThis.Zone;function zr(e){if(Ur[e])return Ur[e];const t=globalThis[e],n=t.prototype,r=e in Fr?Fr[e]:void 0,o=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),i=e in Br?Br[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a&&!Hr())return Ur[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const o=r.contentWindow;if(!o)return t.prototype;const i=o[e].prototype;return document.body.removeChild(r),i?Ur[e]=i:n}catch{return n}}const qr={};function Wr(e,t,n){var r;const o=`${e}.${String(n)}`;if(qr[o])return qr[o].call(t);const i=zr(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(qr[o]=a,a.call(t)):t[n]}const Gr={};function Vr(e,t,n){const r=`${e}.${String(n)}`;if(Gr[r])return Gr[r].bind(t);const o=zr(e)[n];return"function"!=typeof o?t[n]:(Gr[r]=o,o.bind(t))}const Jr={ownerDocument:function(e){return Wr("Node",e,"ownerDocument")},childNodes:function(e){return Wr("Node",e,"childNodes")},parentNode:function(e){return Wr("Node",e,"parentNode")},parentElement:function(e){return Wr("Node",e,"parentElement")},textContent:function(e){return Wr("Node",e,"textContent")},contains:function(e,t){return Vr("Node",e,"contains")(t)},getRootNode:function(e){return Vr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Wr("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Wr("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Wr("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Wr("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return zr("MutationObserver").constructor},patch:function(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}};function Yr(e){return e.nodeType===e.ELEMENT_NODE}function Kr(e){const t=e&&"host"in e&&"mode"in e&&Jr.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Jr.shadowRoot(t)===e)}function Xr(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Zr(e){try{const n=e.rules||e.cssRules;if(!n)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const o=Array.from(n,(e=>$r(e,r))).join("");return(t=o).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(n){return null}var t}function $r(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=Zr(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(n){t=e.cssText}return e.styleSheet.href?co(t,e.styleSheet.href):t}{let n=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(n)),t?co(n,t):n}}class Qr{constructor(){Dr(this,"idNodeMap",new Map),Dr(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function eo({element:e,maskInputOptions:t,tagName:n,type:r,value:o,maskInputFn:i}){let a=o||"";const s=r&&to(r);return(t[n.toLowerCase()]||s&&t[s])&&(a=i?i(a,e):"*".repeat(a.length)),a}function to(e){return e.toLowerCase()}const no="__rrweb_original__";function ro(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?to(t):null}function oo(e,t){let n;try{n=new URL(e,t??window.location.href)}catch(o){return null}const r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==r?void 0:r[1])??null}const io=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ao=/^(?:[a-z+]+:)?\/\//i,so=/^www\..*/i,lo=/^(data:)([^,]*),(.*)/i;function co(e,t){return(e||"").replace(io,((e,n,r,o,i,a)=>{const s=r||i||a,l=n||o||"";if(!s)return e;if(ao.test(s)||so.test(s))return`url(${l}${s}${l})`;if(lo.test(s))return`url(${l}${s}${l})`;if("/"===s[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+s}${l})`;const c=t.split("/"),u=s.split("/");c.pop();for(const t of u)"."!==t&&(".."===t?c.pop():c.push(t));return`url(${l}${c.join("/")}${l})`}))}function uo(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function po(e,t){return function(e,t,n=!1){const r=Array.from(t.childNodes),o=[];let i=0;if(r.length>1&&e&&"string"==typeof e){let t=uo(e,n);const a=t.length/e.length;for(let s=1;s<r.length;s++)if(r[s].textContent&&"string"==typeof r[s].textContent){const l=uo(r[s].textContent,n),c=100;let u=3;for(;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,u),1));u++);for(;u<l.length;u++){let d=l.substring(0,u),p=t.split(d),h=-1;if(2===p.length)h=p[0].length;else if(p.length>2&&""===p[0]&&""!==r[s-1].textContent)h=t.indexOf(d,1);else if(1===p.length){if(d=d.substring(0,d.length-1),p=t.split(d),p.length<=1)return o.push(e),o;u=c+1}else u===l.length-1&&(h=t.indexOf(d));if(p.length>=2&&u>c){const e=r[s-1].textContent;if(e&&"string"==typeof e){const n=uo(e).length;h=t.indexOf(d,n)}-1===h&&(h=p[0].length)}if(-1!==h){let s=Math.floor(h/a);for(;s>0&&s<e.length;){if(i+=1,i>50*r.length)return o.push(e),o;const l=uo(e.substring(0,s),n);if(l.length===h){o.push(e.substring(0,s)),e=e.substring(s),t=t.substring(h);break}l.length<h?s+=Math.max(1,Math.floor((h-l.length)/a)):s-=Math.max(1,Math.floor((l.length-h)*a))}break}}}}return o.push(e),o}(e,t).join("/* rr_split */")}let ho=1;const fo=new RegExp("[^a-z0-9-_:]"),go=-2;function mo(){return ho++}let vo,yo;const bo=/^[^ \t\n\r\u000c]+/,wo=/^[, \t\n\r\u000c]+/;const ko=new WeakMap;function xo(e,t){return t&&""!==t.trim()?Co(e,t):t}function So(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Co(e,t){let n=ko.get(e);if(n||(n=e.createElement("a"),ko.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Io(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&["table","td","th"].includes(t)?xo(e,r):"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(wo),!(n>=t.length);){let i=r(bo);if(","===i.slice(-1))i=xo(e,i.substring(0,i.length-1)),o.push(i);else{let r="";i=xo(e,i);let a=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((i+r).trim());break}if(a)")"===e&&(a=!1);else{if(","===e){n+=1,o.push((i+r).trim());break}"("===e&&(a=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?co(r,Co(e)):"object"===t&&"data"===n?xo(e,r):r:r}function Eo(e,t,n){return["video","audio"].includes(e)&&"autoplay"===t}function Oo(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Oo(Jr.parentNode(e),t,n);for(let r=e.classList.length;r--;){const n=e.classList[r];if(t.test(n))return!0}return!!n&&Oo(Jr.parentNode(e),t,n)}function To(e,t,n,r){let o;if(Yr(e)){if(o=e,!Jr.childNodes(o).length)return!1}else{if(null===Jr.parentElement(e))return!1;o=Jr.parentElement(e)}try{if("string"==typeof t){if(r){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(Oo(o,t,r))return!0;if(n)if(r){if(o.closest(n))return!0}else if(o.matches(n))return!0}catch(i){}return!1}function Lo(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:a,inlineStylesheet:s,maskInputOptions:l={},maskTextFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:p,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:g=!1,cssCaptured:m=!1}=t,v=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:jr.Document,childNodes:[],compatMode:e.compatMode}:{type:jr.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:jr.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskInputFn:s,dataURLOptions:l={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:h}=t,f=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(r){}return!1}(e,r,o),g=function(e){if(e instanceof HTMLFormElement)return"form";const t=to(e.tagName);return fo.test(t)?"div":t}(e);let m={};const v=e.attributes.length;for(let w=0;w<v;w++){const t=e.attributes[w];Eo(g,t.name,t.value)||(m[t.name]=Io(n,g,to(t.name),t.value))}if("link"===g&&i){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=Zr(t)),r&&(delete m.rel,delete m.href,m._cssText=r)}if("style"===g&&e.sheet){let t=Zr(e.sheet);t&&(e.childNodes.length>1&&(t=po(t,e)),m._cssText=t)}if(["input","textarea","select"].includes(g)){const t=e.value,n=e.checked;"radio"!==m.type&&"checkbox"!==m.type&&"submit"!==m.type&&"button"!==m.type&&t?m.value=eo({element:e,type:ro(e),tagName:g,value:t,maskInputOptions:a,maskInputFn:s}):n&&(m.checked=n)}"option"===g&&(e.selected&&!a.select?m.selected=!0:delete m.selected);"dialog"===g&&e.open&&(m.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===g&&u)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const o=t.getImageData,i=no in o?o[no]:o;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(m.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(m.rr_dataURL=t)}if("img"===g&&c){vo||(vo=n.createElement("canvas"),yo=vo.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",o=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{vo.width=t.naturalWidth,vo.height=t.naturalHeight,yo.drawImage(t,0,0),m.rr_dataURL=vo.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?m.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if(["audio","video"].includes(g)){const t=m;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}p||(e.scrollLeft&&(m.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(m.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:n}=e.getBoundingClientRect();m={class:m.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==g||d(m.src)||(e.contentDocument||(m.rr_src=m.src),delete m.src);let y;try{customElements.get(g)&&(y=!0)}catch(b){}return{type:jr.Element,tagName:g,attributes:m,childNodes:[],isSVG:So(e)||void 0,needBlock:f,rootId:h,isCustom:y}}(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:s,maskInputOptions:l,maskInputFn:u,dataURLOptions:d,inlineImages:p,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:g,rootId:v});case e.TEXT_NODE:return function(e,t){const{needsMask:n,maskTextFn:r,rootId:o,cssCaptured:i}=t,a=Jr.parentNode(e),s=a&&a.tagName;let l="";const c="STYLE"===s||void 0,u="SCRIPT"===s||void 0;u?l="SCRIPT_PLACEHOLDER":i||(l=Jr.textContent(e),c&&l&&(l=co(l,Co(t.doc))));!c&&!u&&l&&n&&(l=r?r(l,Jr.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:jr.Text,textContent:l||"",rootId:o}}(e,{doc:n,needsMask:a,maskTextFn:c,rootId:v,cssCaptured:m});case e.CDATA_SECTION_NODE:return{type:jr.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:jr.Comment,textContent:Jr.textContent(e)||"",rootId:v};default:return!1}}function Ao(e){return null==e?"":e.toLowerCase()}function Mo(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function Po(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:d,maskInputFn:p,slimDOMOptions:h,dataURLOptions:f={},inlineImages:g=!1,recordCanvas:m=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:x=(()=>!1),newlyAddedElement:S=!1,cssCaptured:C=!1}=t;let{needsMask:I}=t,{preserveWhiteSpace:E=!0}=t;if(!I){I=To(e,a,s,void 0===I)}const O=Lo(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:I,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,dataURLOptions:f,inlineImages:g,recordCanvas:m,keepIframeSrcFn:x,newlyAddedElement:S,cssCaptured:C});if(!O)return console.warn(e,"not serialized"),null;let T;T=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===jr.Comment)return!0;if(e.type===jr.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===oo(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Ao(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ao(e.attributes.name)||"icon"===Ao(e.attributes.rel)||"apple-touch-icon"===Ao(e.attributes.rel)||"shortcut icon"===Ao(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Ao(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ao(e.attributes.property).match(/^(og|twitter|fb):/)||Ao(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ao(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Ao(e.attributes.name)||"googlebot"===Ao(e.attributes.name)||"bingbot"===Ao(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Ao(e.attributes.name)||"generator"===Ao(e.attributes.name)||"framework"===Ao(e.attributes.name)||"publisher"===Ao(e.attributes.name)||"progid"===Ao(e.attributes.name)||Ao(e.attributes.property).match(/^article:/)||Ao(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Ao(e.attributes.name)||"yandex-verification"===Ao(e.attributes.name)||"csrf-token"===Ao(e.attributes.name)||"p:domain_verify"===Ao(e.attributes.name)||"verify-v1"===Ao(e.attributes.name)||"verification"===Ao(e.attributes.name)||"shopify-checkout-api-token"===Ao(e.attributes.name)))return!0}}return!1}(O,h)||!E&&O.type===jr.Text&&!O.textContent.replace(/^\s+|\s+$/gm,"").length?go:mo();const L=Object.assign(O,{id:T});if(r.add(e,L),T===go)return null;v&&v(e);let A=!l;if(L.type===jr.Element){A=A&&!L.needBlock,delete L.needBlock;const t=Jr.shadowRoot(e);t&&Xr(t)&&(L.isShadowHost=!0)}if((L.type===jr.Document||L.type===jr.Element)&&A){h.headWhitespace&&L.type===jr.Element&&"head"===L.tagName&&(E=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:I,maskTextClass:a,maskTextSelector:s,skipChild:l,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:h,dataURLOptions:f,inlineImages:g,recordCanvas:m,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:x,cssCaptured:!1};if(L.type===jr.Element&&"textarea"===L.tagName&&void 0!==L.attributes.value);else{L.type===jr.Element&&void 0!==L.attributes._cssText&&"string"==typeof L.attributes._cssText&&(t.cssCaptured=!0);for(const n of Array.from(Jr.childNodes(e))){const e=Po(n,t);e&&L.childNodes.push(e)}}let S=null;if(Yr(e)&&(S=Jr.shadowRoot(e)))for(const e of Array.from(Jr.childNodes(S))){const n=Po(e,t);n&&(Xr(S)&&(n.isShadow=!0),L.childNodes.push(n))}}const M=Jr.parentNode(e);return M&&Kr(M)&&Xr(M)&&(L.isShadow=!0),L.type===jr.Element&&"iframe"===L.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let o,i=!1;try{o=r.document.readyState}catch(s){return}if("complete"!==o){const r=setTimeout((()=>{i||(t(),i=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(r),i=!0,t()}))}const a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&y){const n=Po(t,{doc:t,mirror:r,blockClass:o,blockSelector:i,needsMask:I,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:h,dataURLOptions:f,inlineImages:g,recordCanvas:m,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:x});n&&y(e,n)}}),b),L.type===jr.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===oo(L.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(a){return}if(r)return;const i=setTimeout((()=>{o||(t(),o=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(i),o=!0,t()}))}(e,(()=>{if(w){const t=Po(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:I,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:h,dataURLOptions:f,inlineImages:g,recordCanvas:m,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:x});t&&w(e,t)}}),k),L}function Ro(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function No(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var _o={exports:{}},Do=String,jo=function(){return{isColorSupported:!1,reset:Do,bold:Do,dim:Do,italic:Do,underline:Do,inverse:Do,hidden:Do,strikethrough:Do,black:Do,red:Do,green:Do,yellow:Do,blue:Do,magenta:Do,cyan:Do,white:Do,gray:Do,bgBlack:Do,bgRed:Do,bgGreen:Do,bgYellow:Do,bgBlue:Do,bgMagenta:Do,bgCyan:Do,bgWhite:Do}};_o.exports=jo(),_o.exports.createColors=jo;var Fo=_o.exports;const Bo=No(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Uo=Fo,Ho=Bo,zo=class e extends Error{constructor(t,n,r,o,i,a){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),o&&(this.source=o),a&&(this.plugin=a),void 0!==n&&void 0!==r&&("number"==typeof n?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Uo.isColorSupported),Ho&&e&&(t=Ho(t));let n,r,o=t.split(/\r?\n/),i=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),s=String(a).length;if(e){let{bold:e,gray:t,red:o}=Uo.createColors(!0);n=t=>e(o(t)),r=e=>t(e)}else n=r=e=>e;return o.slice(i,a).map(((e,t)=>{let o=i+1+t,a=" "+(" "+o).slice(-s)+" | ";if(o===this.line){let t=r(a.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(a)+e+"\n "+t+n("^")}return" "+r(a)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var qo=zo;zo.default=zo;var Wo={};Wo.isClean=Symbol("isClean"),Wo.my=Symbol("my");const Go={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Vo=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let o=(e.raws.between||"")+(t?";":"");this.builder(n+r+o,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,o=0;for(;r&&"root"!==r.type;)o+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)n+=t}return n}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let o=e.nodes[r],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==r||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,n){let r;if(n||(n=t),t&&(r=e.raws[t],void 0!==r))return r;let o=e.parent;if("before"===n){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return Go[n];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let o="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[o]?r=this[o](i,e):i.walk((e=>{if(r=e.raws[t],void 0!==r)return!1}))}var a;return void 0===r&&(r=Go[n]),i.rawCache[n]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Jo=Vo;Vo.default=Vo;let Yo=Jo;function Ko(e,t){new Yo(t).stringify(e)}var Xo=Ko;Ko.default=Ko;let{isClean:Zo,my:$o}=Wo,Qo=qo,ei=Jo,ti=Xo;function ni(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let o=e[r],i=typeof o;"parent"===r&&"object"===i?t&&(n[r]=t):"source"===r?n[r]=o:Array.isArray(o)?n[r]=o.map((e=>ni(e,n))):("object"===i&&null!==o&&(o=ni(o)),n[r]=o)}return n}let ri=class{constructor(e={}){this.raws={},this[Zo]=!1,this[$o]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ni(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new Qo(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Zo]){this[Zo]=!1;let e=this;for(;e=e.parent;)e[Zo]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,o=this.source.start.line;for(let i=0;i<e;i++)"\n"===n[i]?(r=1,o+=1):r+=1;return{column:r,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),o=r.indexOf(e.word);-1!==o&&(t=this.positionInside(o,r),n=this.positionInside(o+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new ei).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},r=null==t;t=t||new Map;let o=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))n[i]=e.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof e&&e.toJSON)n[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=o,t.set(e.input,o),o++),n[i]={end:e.end,inputId:r,start:e.start}}else n[i]=e}return r&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ti){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let r={node:this};for(let o in n)r[o]=n[o];return e.warn(t,r)}get proxyOf(){return this}};var oi=ri;ri.default=ri;let ii=oi,ai=class extends ii{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var si=ai;ai.default=ai;var li={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=n;for(;o--;)r+=e[Math.random()*e.length|0];return r}};let{SourceMapConsumer:ci,SourceMapGenerator:ui}=Bo,{existsSync:di,readFileSync:pi}=Bo,{dirname:hi,join:fi}=Bo;let gi=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=hi(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new ci(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=hi(e),di(e))return this.mapFile=e,pi(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ci)return ui.fromSourceMap(t).toString();if(t instanceof ui)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=fi(hi(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var mi=gi;gi.default=gi;let{SourceMapConsumer:vi,SourceMapGenerator:yi}=Bo,{fileURLToPath:bi,pathToFileURL:wi}=Bo,{isAbsolute:ki,resolve:xi}=Bo,{nanoid:Si}=li,Ci=Bo,Ii=qo,Ei=mi,Oi=Symbol("fromOffsetCache"),Ti=Boolean(vi&&yi),Li=Boolean(xi&&ki),Ai=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Li||/^\w+:\/\//.test(t.from)||ki(t.from)?this.file=t.from:this.file=xi(t.from)),Li&&Ti){let e=new Ei(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+Si(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let o,i,a;if(t&&"object"==typeof t){let e=t,r=n;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,a=e.col}else i=r.line,a=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let s=this.origin(t,n,i,a);return o=s?new Ii(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,r.plugin):new Ii(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:a,line:i},this.css,this.file,r.plugin),o.input={column:n,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(wi&&(o.input.url=wi(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,n;if(this[Oi])n=this[Oi];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let r=0,o=e.length;r<o;r++)n[r]=t,t+=e[r].length+1;this[Oi]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t,o=n.length-2;for(;r<o;)if(t=r+(o-r>>1),e<n[t])o=t-1;else{if(!(e>=n[t+1])){r=t;break}r=t+1}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:xi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let o,i,a=this.map.consumer(),s=a.originalPositionFor({column:t,line:e});if(!s.source)return!1;"number"==typeof n&&(o=a.originalPositionFor({column:r,line:n})),i=ki(s.source)?wi(s.source):new URL(s.source,this.map.consumer().sourceRoot||wi(this.map.mapFile));let l={column:s.column,endColumn:o&&o.column,endLine:o&&o.line,line:s.line,url:i.toString()};if("file:"===i.protocol){if(!bi)throw new Error("file: protocol is not available in this PostCSS build");l.file=bi(i)}let c=a.sourceContentFor(s.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Mi=Ai;Ai.default=Ai,Ci&&Ci.registerInput&&Ci.registerInput(Ai);let{SourceMapConsumer:Pi,SourceMapGenerator:Ri}=Bo,{dirname:Ni,relative:_i,resolve:Di,sep:ji}=Bo,{pathToFileURL:Fi}=Bo,Bi=Mi,Ui=Boolean(Pi&&Ri),Hi=Boolean(Ni&&Di&&_i&&ji);var zi=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||Ni(e.file);!1===this.mapOpts.sourcesContent?(t=new Pi(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Hi&&Ui&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ri.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ri({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Ri({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,r=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((a,s,l)=>{if(this.css+=a,s&&"end"!==l&&(i.generated.line=n,i.generated.column=r-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=a.match(/\n/g),e?(n+=e.length,t=a.lastIndexOf("\n"),r=a.length-t):r+=a.length,s&&"start"!==l){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=n,i.generated.column=r-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=r-1,this.map.addMapping(i)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?Ni(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=Ni(Di(n,this.mapOpts.annotation)));let r=_i(n,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new Bi(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Fi){let t=Fi(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===ji&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};let qi=oi,Wi=class extends qi{constructor(e){super(e),this.type="comment"}};var Gi=Wi;Wi.default=Wi;let Vi,Ji,Yi,Ki,{isClean:Xi,my:Zi}=Wo,$i=si,Qi=Gi,ea=oi;function ta(e){return e.map((e=>(e.nodes&&(e.nodes=ta(e.nodes)),delete e.source,e)))}function na(e){if(e[Xi]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)na(t)}let ra=class e extends ea{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[r]+=1;return delete this.indexes[r],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,r=this.index(e),o=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of o)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)n=this.indexes[i],r<n&&(this.indexes[i]=n+o.length);return this.markDirty(),this}insertBefore(e,t){let n,r=this.index(e),o=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],o).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r,0,a);for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}normalize(t,n){if("string"==typeof t)t=ta(Vi(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new $i(t)]}else if(t.selector)t=[new Ji(t)];else if(t.name)t=[new Yi(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Qi(t)]}return t.map((t=>(t[Zi]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Xi]&&na(t),void 0===t.raws.before&&n&&void 0!==n.raws.before&&(t.raws.before=n.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let r;try{r=e(t,n)}catch(o){throw t.addToError(o)}return!1!==r&&t.walk&&(r=t.walk(e)),r}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("atrule"===n.type&&e.test(n.name))return t(n,r)})):this.walk(((n,r)=>{if("atrule"===n.type&&n.name===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("decl"===n.type&&e.test(n.prop))return t(n,r)})):this.walk(((n,r)=>{if("decl"===n.type&&n.prop===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("rule"===n.type&&e.test(n.selector))return t(n,r)})):this.walk(((n,r)=>{if("rule"===n.type&&n.selector===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ra.registerParse=e=>{Vi=e},ra.registerRule=e=>{Ji=e},ra.registerAtRule=e=>{Yi=e},ra.registerRoot=e=>{Ki=e};var oa=ra;ra.default=ra,ra.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Yi.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ji.prototype):"decl"===e.type?Object.setPrototypeOf(e,$i.prototype):"comment"===e.type?Object.setPrototypeOf(e,Qi.prototype):"root"===e.type&&Object.setPrototypeOf(e,Ki.prototype),e[Zi]=!0,e.nodes&&e.nodes.forEach((e=>{ra.rebuild(e)}))};let ia,aa,sa=oa,la=class extends sa{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ia(new aa,this,e).stringify()}};la.registerLazyResult=e=>{ia=e},la.registerProcessor=e=>{aa=e};var ca=la;la.default=la;let ua=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let n in t)this[n]=t[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var da=ua;ua.default=ua;let pa=da,ha=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new pa(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var fa=ha;ha.default=ha;const ga="'".charCodeAt(0),ma='"'.charCodeAt(0),va="\\".charCodeAt(0),ya="/".charCodeAt(0),ba="\n".charCodeAt(0),wa=" ".charCodeAt(0),ka="\f".charCodeAt(0),xa="\t".charCodeAt(0),Sa="\r".charCodeAt(0),Ca="[".charCodeAt(0),Ia="]".charCodeAt(0),Ea="(".charCodeAt(0),Oa=")".charCodeAt(0),Ta="{".charCodeAt(0),La="}".charCodeAt(0),Aa=";".charCodeAt(0),Ma="*".charCodeAt(0),Pa=":".charCodeAt(0),Ra="@".charCodeAt(0),Na=/[\t\n\f\r "#'()/;[\\\]{}]/g,_a=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Da=/.[\r\n"'(/\\]/,ja=/[\da-f]/i;let Fa=oa,Ba=class extends Fa{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ua=Ba;Ba.default=Ba,Fa.registerAtRule(Ba);let Ha,za,qa=oa,Wa=class extends qa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let r=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of r)o.raws.before=t.raws.before;return r}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Ha(new za,this,e).stringify()}};Wa.registerLazyResult=e=>{Ha=e},Wa.registerProcessor=e=>{za=e};var Ga=Wa;Wa.default=Wa,qa.registerRoot(Wa);let Va={comma:e=>Va.split(e,[","],!0),space:e=>Va.split(e,[" ","\n","\t"]),split(e,t,n){let r=[],o="",i=!1,a=0,s=!1,l="",c=!1;for(let u of e)c?c=!1:"\\"===u?c=!0:s?u===l&&(s=!1):'"'===u||"'"===u?(s=!0,l=u):"("===u?a+=1:")"===u?a>0&&(a-=1):0===a&&t.includes(u)&&(i=!0),i?(""!==o&&r.push(o.trim()),o="",i=!1):o+=u;return(n||""!==o)&&r.push(o.trim()),r}};var Ja=Va;Va.default=Va;let Ya=oa,Ka=Ja,Xa=class extends Ya{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ka.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};var Za=Xa;Xa.default=Xa,Ya.registerRule(Xa);let $a=si,Qa=function(e,t={}){let n,r,o,i,a,s,l,c,u,d,p=e.css.valueOf(),h=t.ignoreErrors,f=p.length,g=0,m=[],v=[];function y(t){throw e.error("Unclosed "+t,g)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&g>=f},nextToken:function(e){if(v.length)return v.pop();if(g>=f)return;let t=!!e&&e.ignoreUnclosed;switch(n=p.charCodeAt(g),n){case ba:case wa:case xa:case Sa:case ka:r=g;do{r+=1,n=p.charCodeAt(r)}while(n===wa||n===ba||n===xa||n===Sa||n===ka);d=["space",p.slice(g,r)],g=r-1;break;case Ca:case Ia:case Ta:case La:case Pa:case Aa:case Oa:{let e=String.fromCharCode(n);d=[e,e,g];break}case Ea:if(c=m.length?m.pop()[1]:"",u=p.charCodeAt(g+1),"url"===c&&u!==ga&&u!==ma&&u!==wa&&u!==ba&&u!==xa&&u!==ka&&u!==Sa){r=g;do{if(s=!1,r=p.indexOf(")",r+1),-1===r){if(h||t){r=g;break}y("bracket")}for(l=r;p.charCodeAt(l-1)===va;)l-=1,s=!s}while(s);d=["brackets",p.slice(g,r+1),g,r],g=r}else r=p.indexOf(")",g+1),i=p.slice(g,r+1),-1===r||Da.test(i)?d=["(","(",g]:(d=["brackets",i,g,r],g=r);break;case ga:case ma:o=n===ga?"'":'"',r=g;do{if(s=!1,r=p.indexOf(o,r+1),-1===r){if(h||t){r=g+1;break}y("string")}for(l=r;p.charCodeAt(l-1)===va;)l-=1,s=!s}while(s);d=["string",p.slice(g,r+1),g,r],g=r;break;case Ra:Na.lastIndex=g+1,Na.test(p),r=0===Na.lastIndex?p.length-1:Na.lastIndex-2,d=["at-word",p.slice(g,r+1),g,r],g=r;break;case va:for(r=g,a=!0;p.charCodeAt(r+1)===va;)r+=1,a=!a;if(n=p.charCodeAt(r+1),a&&n!==ya&&n!==wa&&n!==ba&&n!==xa&&n!==Sa&&n!==ka&&(r+=1,ja.test(p.charAt(r)))){for(;ja.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===wa&&(r+=1)}d=["word",p.slice(g,r+1),g,r],g=r;break;default:n===ya&&p.charCodeAt(g+1)===Ma?(r=p.indexOf("*/",g+2)+1,0===r&&(h||t?r=p.length:y("comment")),d=["comment",p.slice(g,r+1),g,r],g=r):(_a.lastIndex=g+1,_a.test(p),r=0===_a.lastIndex?p.length-1:_a.lastIndex-2,d=["word",p.slice(g,r+1),g,r],m.push(d),g=r)}return g++,d},position:function(){return g}}},es=Gi,ts=Ua,ns=Ga,rs=Za;const os={empty:!0,space:!0};var is=class{constructor(e){this.input=e,this.root=new ns,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,o=new ts;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,s=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(s.length>0){for(r=s.length-1,n=s[r];n&&"space"===n[0];)n=s[--r];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}s.push(e)}else s.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(o.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(o,"params",s),i&&(e=s[s.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,r=0;for(let o=t-1;o>=0&&(n=e[o],"space"===n[0]||(r+=1,2!==r));o--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,r,o=0;for(let[i,a]of e.entries()){if(t=a,n=t[0],"("===n&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new es;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Qa(this.input)}decl(e,t){let n=new $a;this.init(n,e[0][2]);let r,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,a=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let s=e.length-1;s>=0;s--){if(r=e[s],"!important"===r[1].toLowerCase()){n.important=!0;let t=this.stringFrom(e,s);t=this.spacesFromEnd(e)+t," !important"!==t&&(n.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=s;e>0;e--){let n=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==n)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(n.important=!0,n.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new rs;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,o=null,i=[],a=e[1].startsWith("--"),s=[],l=e;for(;l;){if(n=l[0],s.push(l),"("===n||"["===n)o||(o=l),i.push("("===n?")":"]");else if(a&&r&&"{"===n)o||(o=l),i.push("}");else if(0===i.length){if(";"===n){if(r)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(r=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&r){if(!a)for(;s.length&&(l=s[s.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let o,i,a,s,l=n.length,c="",u=!0;for(let d=0;d<l;d+=1)o=n[d],i=o[0],"space"!==i||d!==l-1||r?"comment"===i?(s=n[d-1]?n[d-1][0]:"empty",a=n[d+1]?n[d+1][0]:"empty",os[s]||os[a]||","===c.slice(-1)?u=!1:c+=o[1]):c+=o[1]:u=!1;if(!u){let r=n.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new rs;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let as=oa,ss=is,ls=Mi;function cs(e,t){let n=new ls(e,t),r=new ss(n);try{r.parse()}catch(o){throw o}return r.root}var us=cs;cs.default=cs,as.registerParse(cs);let{isClean:ds,my:ps}=Wo,hs=zi,fs=Xo,gs=oa,ms=ca,vs=fa,ys=us,bs=Ga;const ws={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ks={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},xs={Once:!0,postcssPlugin:!0,prepare:!0},Ss=0;function Cs(e){return"object"==typeof e&&"function"==typeof e.then}function Is(e){let t=!1,n=ws[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,Ss,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,Ss,n+"Exit"]:[n,n+"Exit"]}function Es(e){let t;return t="document"===e.type?["Document",Ss,"DocumentExit"]:"root"===e.type?["Root",Ss,"RootExit"]:Is(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Os(e){return e[ds]=!1,e.nodes&&e.nodes.forEach((e=>Os(e))),e}let Ts={},Ls=class e{constructor(t,n,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof vs)o=Os(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=ys;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{o=e(n,r)}catch(i){this.processed=!0,this.error=i}o&&!o[ps]&&gs.rebuild(o)}else o=Os(n);this.result=new vs(t,o,r),this.helpers={...Ts,postcss:Ts,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!ks[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!xs[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let n=0;n<this.plugins.length;n++){let t=this.plugins[n],r=this.runOnRoot(t);if(Cs(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ds];){e[ds]=!0;let n=[Es(e)];for(;n.length>0;){let e=this.visitTick(n);if(Cs(e))try{await e}catch(t){let e=n[n.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return Cs(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=fs;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new hs(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(Cs(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ds];)e[ds]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,o]of e){let e;this.result.lastPlugin=r;try{e=o(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Cs(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(n.toProxy(),this.helpers)}catch(i){throw this.handleError(i,n)}}if(0!==t.iterator){let r,o=t.iterator;for(;r=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!r[ds])return r[ds]=!0,void e.push(Es(r));t.iterator=0,delete n.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,e===Ss)return void(n.nodes&&n.nodes.length&&(n[ds]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ds]=!0;let t=Is(e);for(let n of t)if(n===Ss)e.nodes&&e.each((e=>{e[ds]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ls.registerPostcss=e=>{Ts=e};var As=Ls;Ls.default=Ls,bs.registerLazyResult(Ls),ms.registerLazyResult(Ls);let Ms=zi,Ps=Xo,Rs=us;const Ns=fa;let _s=class{constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let o=Ps;this.result=new Ns(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let a=new Ms(o,r,this._opts,t);if(a.isMap()){let[e,t]=a.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Rs;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Ds=_s;_s.default=_s;let js=Ds,Fs=As,Bs=ca,Us=Ga,Hs=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Fs(this,e,t):new js(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var zs=Hs;Hs.default=Hs,Us.registerProcessor(Hs),Bs.registerProcessor(Hs);let qs=si,Ws=mi,Gs=Gi,Vs=Ua,Js=Mi,Ys=Ga,Ks=Za;function Xs(e,t){if(Array.isArray(e))return e.map((e=>Xs(e)));let{inputs:n,...r}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:Js.prototype};n.map&&(n.map={...n.map,__proto__:Ws.prototype}),t.push(n)}}if(r.nodes&&(r.nodes=e.nodes.map((e=>Xs(e,t)))),r.source){let{inputId:e,...n}=r.source;r.source=n,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Ys(r);if("decl"===r.type)return new qs(r);if("rule"===r.type)return new Ks(r);if("comment"===r.type)return new Gs(r);if("atrule"===r.type)return new Vs(r);throw new Error("Unknown node type: "+e.type)}var Zs=Xs;Xs.default=Xs;let $s=qo,Qs=si,el=As,tl=oa,nl=zs,rl=Xo,ol=Zs,il=ca,al=da,sl=Gi,ll=Ua,cl=fa,ul=Mi,dl=us,pl=Ja,hl=Za,fl=Ga,gl=oi;function ml(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new nl(e)}ml.plugin=function(e,t){let n,r=!1;function o(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...n);return o.postcssPlugin=e,o.postcssVersion=(new nl).version,o}return Object.defineProperty(o,"postcss",{get:()=>(n||(n=o()),n)}),o.process=function(e,t,n){return ml([o(n)]).process(e,t)},o},ml.stringify=rl,ml.parse=dl,ml.fromJSON=ol,ml.list=pl,ml.comment=e=>new sl(e),ml.atRule=e=>new ll(e),ml.decl=e=>new Qs(e),ml.rule=e=>new hl(e),ml.root=e=>new fl(e),ml.document=e=>new il(e),ml.CssSyntaxError=$s,ml.Declaration=Qs,ml.Container=tl,ml.Processor=nl,ml.Document=il,ml.Comment=sl,ml.Warning=al,ml.AtRule=ll,ml.Result=cl,ml.Input=ul,ml.Rule=hl,ml.Root=fl,ml.Node=gl,el.registerPostcss(ml);var vl=ml;ml.default=ml;const yl=Ro(vl);yl.stringify,yl.fromJSON,yl.plugin,yl.parse,yl.list,yl.document,yl.comment,yl.atRule,yl.rule,yl.decl,yl.root,yl.CssSyntaxError,yl.Declaration,yl.Container,yl.Processor,yl.Document,yl.Comment,yl.Warning,yl.AtRule,yl.Result,yl.Input,yl.Rule,yl.Root,yl.Node;var bl=Object.defineProperty,wl=(e,t,n)=>((e,t,n)=>t in e?bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);function kl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xl(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var Sl={exports:{}},Cl=String,Il=function(){return{isColorSupported:!1,reset:Cl,bold:Cl,dim:Cl,italic:Cl,underline:Cl,inverse:Cl,hidden:Cl,strikethrough:Cl,black:Cl,red:Cl,green:Cl,yellow:Cl,blue:Cl,magenta:Cl,cyan:Cl,white:Cl,gray:Cl,bgBlack:Cl,bgRed:Cl,bgGreen:Cl,bgYellow:Cl,bgBlue:Cl,bgMagenta:Cl,bgCyan:Cl,bgWhite:Cl}};Sl.exports=Il(),Sl.exports.createColors=Il;var El=Sl.exports;const Ol=xl(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Tl=El,Ll=Ol,Al=class e extends Error{constructor(t,n,r,o,i,a){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),o&&(this.source=o),a&&(this.plugin=a),void 0!==n&&void 0!==r&&("number"==typeof n?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Tl.isColorSupported),Ll&&e&&(t=Ll(t));let n,r,o=t.split(/\r?\n/),i=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),s=String(a).length;if(e){let{bold:e,gray:t,red:o}=Tl.createColors(!0);n=t=>e(o(t)),r=e=>t(e)}else n=r=e=>e;return o.slice(i,a).map(((e,t)=>{let o=i+1+t,a=" "+(" "+o).slice(-s)+" | ";if(o===this.line){let t=r(a.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(a)+e+"\n "+t+n("^")}return" "+r(a)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ml=Al;Al.default=Al;var Pl={};Pl.isClean=Symbol("isClean"),Pl.my=Symbol("my");const Rl={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Nl=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let o=(e.raws.between||"")+(t?";":"");this.builder(n+r+o,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,o=0;for(;r&&"root"!==r.type;)o+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)n+=t}return n}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let o=e.nodes[r],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==r||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,n){let r;if(n||(n=t),t&&(r=e.raws[t],void 0!==r))return r;let o=e.parent;if("before"===n){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return Rl[n];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let o="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[o]?r=this[o](i,e):i.walk((e=>{if(r=e.raws[t],void 0!==r)return!1}))}var a;return void 0===r&&(r=Rl[n]),i.rawCache[n]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var _l=Nl;Nl.default=Nl;let Dl=_l;function jl(e,t){new Dl(t).stringify(e)}var Fl=jl;jl.default=jl;let{isClean:Bl,my:Ul}=Pl,Hl=Ml,zl=_l,ql=Fl;function Wl(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let o=e[r],i=typeof o;"parent"===r&&"object"===i?t&&(n[r]=t):"source"===r?n[r]=o:Array.isArray(o)?n[r]=o.map((e=>Wl(e,n))):("object"===i&&null!==o&&(o=Wl(o)),n[r]=o)}return n}let Gl=class{constructor(e={}){this.raws={},this[Bl]=!1,this[Ul]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Wl(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new Hl(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Bl]){this[Bl]=!1;let e=this;for(;e=e.parent;)e[Bl]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,o=this.source.start.line;for(let i=0;i<e;i++)"\n"===n[i]?(r=1,o+=1):r+=1;return{column:r,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),o=r.indexOf(e.word);-1!==o&&(t=this.positionInside(o,r),n=this.positionInside(o+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new zl).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},r=null==t;t=t||new Map;let o=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))n[i]=e.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof e&&e.toJSON)n[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=o,t.set(e.input,o),o++),n[i]={end:e.end,inputId:r,start:e.start}}else n[i]=e}return r&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ql){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let r={node:this};for(let o in n)r[o]=n[o];return e.warn(t,r)}get proxyOf(){return this}};var Vl=Gl;Gl.default=Gl;let Jl=Vl,Yl=class extends Jl{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Kl=Yl;Yl.default=Yl;var Xl={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=n;for(;o--;)r+=e[Math.random()*e.length|0];return r}};let{SourceMapConsumer:Zl,SourceMapGenerator:$l}=Ol,{existsSync:Ql,readFileSync:ec}=Ol,{dirname:tc,join:nc}=Ol;let rc=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=tc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Zl(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=tc(e),Ql(e))return this.mapFile=e,ec(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Zl)return $l.fromSourceMap(t).toString();if(t instanceof $l)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=nc(tc(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var oc=rc;rc.default=rc;let{SourceMapConsumer:ic,SourceMapGenerator:ac}=Ol,{fileURLToPath:sc,pathToFileURL:lc}=Ol,{isAbsolute:cc,resolve:uc}=Ol,{nanoid:dc}=Xl,pc=Ol,hc=Ml,fc=oc,gc=Symbol("fromOffsetCache"),mc=Boolean(ic&&ac),vc=Boolean(uc&&cc),yc=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!vc||/^\w+:\/\//.test(t.from)||cc(t.from)?this.file=t.from:this.file=uc(t.from)),vc&&mc){let e=new fc(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+dc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let o,i,a;if(t&&"object"==typeof t){let e=t,r=n;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,a=e.col}else i=r.line,a=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let s=this.origin(t,n,i,a);return o=s?new hc(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,r.plugin):new hc(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:a,line:i},this.css,this.file,r.plugin),o.input={column:n,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(lc&&(o.input.url=lc(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,n;if(this[gc])n=this[gc];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let r=0,o=e.length;r<o;r++)n[r]=t,t+=e[r].length+1;this[gc]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t,o=n.length-2;for(;r<o;)if(t=r+(o-r>>1),e<n[t])o=t-1;else{if(!(e>=n[t+1])){r=t;break}r=t+1}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:uc(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let o,i,a=this.map.consumer(),s=a.originalPositionFor({column:t,line:e});if(!s.source)return!1;"number"==typeof n&&(o=a.originalPositionFor({column:r,line:n})),i=cc(s.source)?lc(s.source):new URL(s.source,this.map.consumer().sourceRoot||lc(this.map.mapFile));let l={column:s.column,endColumn:o&&o.column,endLine:o&&o.line,line:s.line,url:i.toString()};if("file:"===i.protocol){if(!sc)throw new Error("file: protocol is not available in this PostCSS build");l.file=sc(i)}let c=a.sourceContentFor(s.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var bc=yc;yc.default=yc,pc&&pc.registerInput&&pc.registerInput(yc);let{SourceMapConsumer:wc,SourceMapGenerator:kc}=Ol,{dirname:xc,relative:Sc,resolve:Cc,sep:Ic}=Ol,{pathToFileURL:Ec}=Ol,Oc=bc,Tc=Boolean(wc&&kc),Lc=Boolean(xc&&Cc&&Sc&&Ic);var Ac=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||xc(e.file);!1===this.mapOpts.sourcesContent?(t=new wc(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Lc&&Tc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=kc.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new kc({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new kc({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,r=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((a,s,l)=>{if(this.css+=a,s&&"end"!==l&&(i.generated.line=n,i.generated.column=r-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=a.match(/\n/g),e?(n+=e.length,t=a.lastIndexOf("\n"),r=a.length-t):r+=a.length,s&&"start"!==l){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=n,i.generated.column=r-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=r-1,this.map.addMapping(i)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?xc(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=xc(Cc(n,this.mapOpts.annotation)));let r=Sc(n,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new Oc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ec){let t=Ec(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Ic&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};let Mc=Vl,Pc=class extends Mc{constructor(e){super(e),this.type="comment"}};var Rc=Pc;Pc.default=Pc;let Nc,_c,Dc,jc,{isClean:Fc,my:Bc}=Pl,Uc=Kl,Hc=Rc,zc=Vl;function qc(e){return e.map((e=>(e.nodes&&(e.nodes=qc(e.nodes)),delete e.source,e)))}function Wc(e){if(e[Fc]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Wc(t)}let Gc=class e extends zc{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[r]+=1;return delete this.indexes[r],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,r=this.index(e),o=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of o)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)n=this.indexes[i],r<n&&(this.indexes[i]=n+o.length);return this.markDirty(),this}insertBefore(e,t){let n,r=this.index(e),o=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],o).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r,0,a);for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}normalize(t,n){if("string"==typeof t)t=qc(Nc(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Uc(t)]}else if(t.selector)t=[new _c(t)];else if(t.name)t=[new Dc(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Hc(t)]}return t.map((t=>(t[Bc]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Fc]&&Wc(t),void 0===t.raws.before&&n&&void 0!==n.raws.before&&(t.raws.before=n.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let r;try{r=e(t,n)}catch(o){throw t.addToError(o)}return!1!==r&&t.walk&&(r=t.walk(e)),r}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("atrule"===n.type&&e.test(n.name))return t(n,r)})):this.walk(((n,r)=>{if("atrule"===n.type&&n.name===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("decl"===n.type&&e.test(n.prop))return t(n,r)})):this.walk(((n,r)=>{if("decl"===n.type&&n.prop===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("rule"===n.type&&e.test(n.selector))return t(n,r)})):this.walk(((n,r)=>{if("rule"===n.type&&n.selector===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Gc.registerParse=e=>{Nc=e},Gc.registerRule=e=>{_c=e},Gc.registerAtRule=e=>{Dc=e},Gc.registerRoot=e=>{jc=e};var Vc=Gc;Gc.default=Gc,Gc.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Dc.prototype):"rule"===e.type?Object.setPrototypeOf(e,_c.prototype):"decl"===e.type?Object.setPrototypeOf(e,Uc.prototype):"comment"===e.type?Object.setPrototypeOf(e,Hc.prototype):"root"===e.type&&Object.setPrototypeOf(e,jc.prototype),e[Bc]=!0,e.nodes&&e.nodes.forEach((e=>{Gc.rebuild(e)}))};let Jc,Yc,Kc=Vc,Xc=class extends Kc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Jc(new Yc,this,e).stringify()}};Xc.registerLazyResult=e=>{Jc=e},Xc.registerProcessor=e=>{Yc=e};var Zc=Xc;Xc.default=Xc;let $c=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let n in t)this[n]=t[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Qc=$c;$c.default=$c;let eu=Qc,tu=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new eu(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var nu=tu;tu.default=tu;const ru="'".charCodeAt(0),ou='"'.charCodeAt(0),iu="\\".charCodeAt(0),au="/".charCodeAt(0),su="\n".charCodeAt(0),lu=" ".charCodeAt(0),cu="\f".charCodeAt(0),uu="\t".charCodeAt(0),du="\r".charCodeAt(0),pu="[".charCodeAt(0),hu="]".charCodeAt(0),fu="(".charCodeAt(0),gu=")".charCodeAt(0),mu="{".charCodeAt(0),vu="}".charCodeAt(0),yu=";".charCodeAt(0),bu="*".charCodeAt(0),wu=":".charCodeAt(0),ku="@".charCodeAt(0),xu=/[\t\n\f\r "#'()/;[\\\]{}]/g,Su=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Cu=/.[\r\n"'(/\\]/,Iu=/[\da-f]/i;let Eu=Vc,Ou=class extends Eu{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Tu=Ou;Ou.default=Ou,Eu.registerAtRule(Ou);let Lu,Au,Mu=Vc,Pu=class extends Mu{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let r=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of r)o.raws.before=t.raws.before;return r}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Lu(new Au,this,e).stringify()}};Pu.registerLazyResult=e=>{Lu=e},Pu.registerProcessor=e=>{Au=e};var Ru=Pu;Pu.default=Pu,Mu.registerRoot(Pu);let Nu={comma:e=>Nu.split(e,[","],!0),space:e=>Nu.split(e,[" ","\n","\t"]),split(e,t,n){let r=[],o="",i=!1,a=0,s=!1,l="",c=!1;for(let u of e)c?c=!1:"\\"===u?c=!0:s?u===l&&(s=!1):'"'===u||"'"===u?(s=!0,l=u):"("===u?a+=1:")"===u?a>0&&(a-=1):0===a&&t.includes(u)&&(i=!0),i?(""!==o&&r.push(o.trim()),o="",i=!1):o+=u;return(n||""!==o)&&r.push(o.trim()),r}};var _u=Nu;Nu.default=Nu;let Du=Vc,ju=_u,Fu=class extends Du{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ju.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};var Bu=Fu;Fu.default=Fu,Du.registerRule(Fu);let Uu=Kl,Hu=function(e,t={}){let n,r,o,i,a,s,l,c,u,d,p=e.css.valueOf(),h=t.ignoreErrors,f=p.length,g=0,m=[],v=[];function y(t){throw e.error("Unclosed "+t,g)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&g>=f},nextToken:function(e){if(v.length)return v.pop();if(g>=f)return;let t=!!e&&e.ignoreUnclosed;switch(n=p.charCodeAt(g),n){case su:case lu:case uu:case du:case cu:r=g;do{r+=1,n=p.charCodeAt(r)}while(n===lu||n===su||n===uu||n===du||n===cu);d=["space",p.slice(g,r)],g=r-1;break;case pu:case hu:case mu:case vu:case wu:case yu:case gu:{let e=String.fromCharCode(n);d=[e,e,g];break}case fu:if(c=m.length?m.pop()[1]:"",u=p.charCodeAt(g+1),"url"===c&&u!==ru&&u!==ou&&u!==lu&&u!==su&&u!==uu&&u!==cu&&u!==du){r=g;do{if(s=!1,r=p.indexOf(")",r+1),-1===r){if(h||t){r=g;break}y("bracket")}for(l=r;p.charCodeAt(l-1)===iu;)l-=1,s=!s}while(s);d=["brackets",p.slice(g,r+1),g,r],g=r}else r=p.indexOf(")",g+1),i=p.slice(g,r+1),-1===r||Cu.test(i)?d=["(","(",g]:(d=["brackets",i,g,r],g=r);break;case ru:case ou:o=n===ru?"'":'"',r=g;do{if(s=!1,r=p.indexOf(o,r+1),-1===r){if(h||t){r=g+1;break}y("string")}for(l=r;p.charCodeAt(l-1)===iu;)l-=1,s=!s}while(s);d=["string",p.slice(g,r+1),g,r],g=r;break;case ku:xu.lastIndex=g+1,xu.test(p),r=0===xu.lastIndex?p.length-1:xu.lastIndex-2,d=["at-word",p.slice(g,r+1),g,r],g=r;break;case iu:for(r=g,a=!0;p.charCodeAt(r+1)===iu;)r+=1,a=!a;if(n=p.charCodeAt(r+1),a&&n!==au&&n!==lu&&n!==su&&n!==uu&&n!==du&&n!==cu&&(r+=1,Iu.test(p.charAt(r)))){for(;Iu.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===lu&&(r+=1)}d=["word",p.slice(g,r+1),g,r],g=r;break;default:n===au&&p.charCodeAt(g+1)===bu?(r=p.indexOf("*/",g+2)+1,0===r&&(h||t?r=p.length:y("comment")),d=["comment",p.slice(g,r+1),g,r],g=r):(Su.lastIndex=g+1,Su.test(p),r=0===Su.lastIndex?p.length-1:Su.lastIndex-2,d=["word",p.slice(g,r+1),g,r],m.push(d),g=r)}return g++,d},position:function(){return g}}},zu=Rc,qu=Tu,Wu=Ru,Gu=Bu;const Vu={empty:!0,space:!0};var Ju=class{constructor(e){this.input=e,this.root=new Wu,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,o=new qu;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,s=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(s.length>0){for(r=s.length-1,n=s[r];n&&"space"===n[0];)n=s[--r];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}s.push(e)}else s.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(o.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(o,"params",s),i&&(e=s[s.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,r=0;for(let o=t-1;o>=0&&(n=e[o],"space"===n[0]||(r+=1,2!==r));o--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,r,o=0;for(let[i,a]of e.entries()){if(t=a,n=t[0],"("===n&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new zu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Hu(this.input)}decl(e,t){let n=new Uu;this.init(n,e[0][2]);let r,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,a=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let s=e.length-1;s>=0;s--){if(r=e[s],"!important"===r[1].toLowerCase()){n.important=!0;let t=this.stringFrom(e,s);t=this.spacesFromEnd(e)+t," !important"!==t&&(n.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=s;e>0;e--){let n=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==n)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(n.important=!0,n.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Gu;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,o=null,i=[],a=e[1].startsWith("--"),s=[],l=e;for(;l;){if(n=l[0],s.push(l),"("===n||"["===n)o||(o=l),i.push("("===n?")":"]");else if(a&&r&&"{"===n)o||(o=l),i.push("}");else if(0===i.length){if(";"===n){if(r)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(r=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&r){if(!a)for(;s.length&&(l=s[s.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let o,i,a,s,l=n.length,c="",u=!0;for(let d=0;d<l;d+=1)o=n[d],i=o[0],"space"!==i||d!==l-1||r?"comment"===i?(s=n[d-1]?n[d-1][0]:"empty",a=n[d+1]?n[d+1][0]:"empty",Vu[s]||Vu[a]||","===c.slice(-1)?u=!1:c+=o[1]):c+=o[1]:u=!1;if(!u){let r=n.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Gu;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let Yu=Vc,Ku=Ju,Xu=bc;function Zu(e,t){let n=new Xu(e,t),r=new Ku(n);try{r.parse()}catch(o){throw o}return r.root}var $u=Zu;Zu.default=Zu,Yu.registerParse(Zu);let{isClean:Qu,my:ed}=Pl,td=Ac,nd=Fl,rd=Vc,od=Zc,id=nu,ad=$u,sd=Ru;const ld={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},cd={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},ud={Once:!0,postcssPlugin:!0,prepare:!0},dd=0;function pd(e){return"object"==typeof e&&"function"==typeof e.then}function hd(e){let t=!1,n=ld[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,dd,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,dd,n+"Exit"]:[n,n+"Exit"]}function fd(e){let t;return t="document"===e.type?["Document",dd,"DocumentExit"]:"root"===e.type?["Root",dd,"RootExit"]:hd(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function gd(e){return e[Qu]=!1,e.nodes&&e.nodes.forEach((e=>gd(e))),e}let md={},vd=class e{constructor(t,n,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof id)o=gd(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=ad;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{o=e(n,r)}catch(i){this.processed=!0,this.error=i}o&&!o[ed]&&rd.rebuild(o)}else o=gd(n);this.result=new id(t,o,r),this.helpers={...md,postcss:md,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!cd[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ud[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let n=0;n<this.plugins.length;n++){let t=this.plugins[n],r=this.runOnRoot(t);if(pd(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Qu];){e[Qu]=!0;let n=[fd(e)];for(;n.length>0;){let e=this.visitTick(n);if(pd(e))try{await e}catch(t){let e=n[n.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return pd(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=nd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new td(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(pd(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Qu];)e[Qu]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,o]of e){let e;this.result.lastPlugin=r;try{e=o(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(pd(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(n.toProxy(),this.helpers)}catch(i){throw this.handleError(i,n)}}if(0!==t.iterator){let r,o=t.iterator;for(;r=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!r[Qu])return r[Qu]=!0,void e.push(fd(r));t.iterator=0,delete n.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,e===dd)return void(n.nodes&&n.nodes.length&&(n[Qu]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Qu]=!0;let t=hd(e);for(let n of t)if(n===dd)e.nodes&&e.each((e=>{e[Qu]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};vd.registerPostcss=e=>{md=e};var yd=vd;vd.default=vd,sd.registerLazyResult(vd),od.registerLazyResult(vd);let bd=Ac,wd=Fl,kd=$u;const xd=nu;let Sd=class{constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let o=wd;this.result=new xd(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let a=new bd(o,r,this._opts,t);if(a.isMap()){let[e,t]=a.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=kd;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Cd=Sd;Sd.default=Sd;let Id=Cd,Ed=yd,Od=Zc,Td=Ru,Ld=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Ed(this,e,t):new Id(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ad=Ld;Ld.default=Ld,Td.registerProcessor(Ld),Od.registerProcessor(Ld);let Md=Kl,Pd=oc,Rd=Rc,Nd=Tu,_d=bc,Dd=Ru,jd=Bu;function Fd(e,t){if(Array.isArray(e))return e.map((e=>Fd(e)));let{inputs:n,...r}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:_d.prototype};n.map&&(n.map={...n.map,__proto__:Pd.prototype}),t.push(n)}}if(r.nodes&&(r.nodes=e.nodes.map((e=>Fd(e,t)))),r.source){let{inputId:e,...n}=r.source;r.source=n,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Dd(r);if("decl"===r.type)return new Md(r);if("rule"===r.type)return new jd(r);if("comment"===r.type)return new Rd(r);if("atrule"===r.type)return new Nd(r);throw new Error("Unknown node type: "+e.type)}var Bd=Fd;Fd.default=Fd;let Ud=Ml,Hd=Kl,zd=yd,qd=Vc,Wd=Ad,Gd=Fl,Vd=Bd,Jd=Zc,Yd=Qc,Kd=Rc,Xd=Tu,Zd=nu,$d=bc,Qd=$u,ep=_u,tp=Bu,np=Ru,rp=Vl;function op(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Wd(e)}op.plugin=function(e,t){let n,r=!1;function o(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...n);return o.postcssPlugin=e,o.postcssVersion=(new Wd).version,o}return Object.defineProperty(o,"postcss",{get:()=>(n||(n=o()),n)}),o.process=function(e,t,n){return op([o(n)]).process(e,t)},o},op.stringify=Gd,op.parse=Qd,op.fromJSON=Vd,op.list=ep,op.comment=e=>new Kd(e),op.atRule=e=>new Xd(e),op.decl=e=>new Hd(e),op.rule=e=>new tp(e),op.root=e=>new np(e),op.document=e=>new Jd(e),op.CssSyntaxError=Ud,op.Declaration=Hd,op.Container=qd,op.Processor=Wd,op.Document=Jd,op.Comment=Kd,op.Warning=Yd,op.AtRule=Xd,op.Result=Zd,op.Input=$d,op.Rule=tp,op.Root=np,op.Node=rp,zd.registerPostcss(op);var ip=op;op.default=op;const ap=kl(ip);ap.stringify,ap.fromJSON,ap.plugin,ap.parse,ap.list,ap.document,ap.comment,ap.atRule,ap.rule,ap.decl,ap.root,ap.CssSyntaxError,ap.Declaration,ap.Container,ap.Processor,ap.Document,ap.Comment,ap.Warning,ap.AtRule,ap.Result,ap.Input,ap.Rule,ap.Root,ap.Node;class sp{constructor(...e){wl(this,"parentElement",null),wl(this,"parentNode",null),wl(this,"ownerDocument"),wl(this,"firstChild",null),wl(this,"lastChild",null),wl(this,"previousSibling",null),wl(this,"nextSibling",null),wl(this,"ELEMENT_NODE",1),wl(this,"TEXT_NODE",3),wl(this,"nodeType"),wl(this,"nodeName"),wl(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof sp))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const lp={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},cp={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},up={},dp=()=>!!globalThis.Zone;function pp(e){if(up[e])return up[e];const t=globalThis[e],n=t.prototype,r=e in lp?lp[e]:void 0,o=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),i=e in cp?cp[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a&&!dp())return up[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const o=r.contentWindow;if(!o)return t.prototype;const i=o[e].prototype;return document.body.removeChild(r),i?up[e]=i:n}catch{return n}}const hp={};function fp(e,t,n){var r;const o=`${e}.${String(n)}`;if(hp[o])return hp[o].call(t);const i=pp(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(hp[o]=a,a.call(t)):t[n]}const gp={};function mp(e,t,n){const r=`${e}.${String(n)}`;if(gp[r])return gp[r].bind(t);const o=pp(e)[n];return"function"!=typeof o?t[n]:(gp[r]=o,o.bind(t))}function vp(){return pp("MutationObserver").constructor}function yp(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}const bp={ownerDocument:function(e){return fp("Node",e,"ownerDocument")},childNodes:function(e){return fp("Node",e,"childNodes")},parentNode:function(e){return fp("Node",e,"parentNode")},parentElement:function(e){return fp("Node",e,"parentElement")},textContent:function(e){return fp("Node",e,"textContent")},contains:function(e,t){return mp("Node",e,"contains")(t)},getRootNode:function(e){return mp("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?fp("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?fp("Element",e,"shadowRoot"):null},querySelector:function(e,t){return fp("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return fp("Element",e,"querySelectorAll")(t)},mutationObserver:vp,patch:yp};function wp(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const kp="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.";let xp={map:{},getId:()=>(console.error(kp),-1),getNode:()=>(console.error(kp),null),removeNodeFromMap(){console.error(kp)},has:()=>(console.error(kp),!1),reset(){console.error(kp)}};function Sp(e,t,n={}){let r=null,o=0;return function(...i){const a=Date.now();o||!1!==n.leading||(o=a);const s=t-(a-o),l=this;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(l,i)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(l,i)}),s))}}function Cp(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>Cp(e,t,i||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(xp=new Proxy(xp,{get:(e,t,n)=>("map"===t&&console.error(kp),Reflect.get(e,t,n))}));let Ip=Date.now;function Ep(e){var t,n,r,o;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=bp.parentElement(i.body))?void 0:t.scrollLeft)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=bp.parentElement(i.body))?void 0:r.scrollTop)||(null==(o=null==i?void 0:i.body)?void 0:o.scrollTop)||0}}function Op(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Tp(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Lp(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:bp.parentElement(e)}function Ap(e,t,n,r){if(!e)return!1;const o=Lp(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(Oo(o,t,r))return!0}catch(i){}if(n){if(o.matches(n))return!0;if(r&&null!==o.closest(n))return!0}return!1}function Mp(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===go}function Pp(e,t){if(Kr(e))return!1;const n=t.getId(e);if(!t.has(n))return!0;const r=bp.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Pp(r,t))}function Rp(e){return Boolean(e.changedTouches)}function Np(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function _p(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Dp(e){return!!e&&(e instanceof sp&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(bp.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ip=()=>(new Date).getTime());class jp{constructor(){Nr(this,"id",1),Nr(this,"styleIDMap",new WeakMap),Nr(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Fp(e){var t;let n=null;return"getRootNode"in e&&(null==(t=bp.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&bp.host(bp.getRootNode(e))&&(n=bp.host(bp.getRootNode(e))),n}function Bp(e){const t=bp.ownerDocument(e);if(!t)return!1;const n=function(e){let t,n=e;for(;t=Fp(n);)n=t;return n}(e);return bp.contains(t,n)}function Up(e){const t=bp.ownerDocument(e);return!!t&&(bp.contains(t,e)||Bp(e))}var Hp=(e=>(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))(Hp||{}),zp=(e=>(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[e.CustomElement=16]="CustomElement",e))(zp||{}),qp=(e=>(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))(qp||{}),Wp=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Wp||{}),Gp=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Gp||{}),Vp=(e=>(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))(Vp||{}),Jp=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Jp||{});function Yp(e){return"__ln"in e}class Kp{constructor(){Nr(this,"length",0),Nr(this,"head",null),Nr(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Yp(e.previousSibling)){const 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&&Yp(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Xp=(e,t)=>`${e}@${t}`;class Zp{constructor(){Nr(this,"frozen",!1),Nr(this,"locked",!1),Nr(this,"texts",[]),Nr(this,"attributes",[]),Nr(this,"attributeMap",new WeakMap),Nr(this,"removes",[]),Nr(this,"mapRemoves",[]),Nr(this,"movedMap",{}),Nr(this,"addedSet",new Set),Nr(this,"movedSet",new Set),Nr(this,"droppedSet",new Set),Nr(this,"removesSubTreeCache",new Set),Nr(this,"mutationCb"),Nr(this,"blockClass"),Nr(this,"blockSelector"),Nr(this,"maskTextClass"),Nr(this,"maskTextSelector"),Nr(this,"inlineStylesheet"),Nr(this,"maskInputOptions"),Nr(this,"maskTextFn"),Nr(this,"maskInputFn"),Nr(this,"keepIframeSrcFn"),Nr(this,"recordCanvas"),Nr(this,"inlineImages"),Nr(this,"slimDOMOptions"),Nr(this,"dataURLOptions"),Nr(this,"doc"),Nr(this,"mirror"),Nr(this,"iframeManager"),Nr(this,"stylesheetManager"),Nr(this,"shadowDomManager"),Nr(this,"canvasManager"),Nr(this,"processedNodeManager"),Nr(this,"unattachedDoc"),Nr(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),Nr(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new Kp,r=e=>{let t=e,n=go;for(;n===go;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{const i=bp.parentNode(o);if(!i||!Up(o))return;let a=!1;if(o.nodeType===Node.TEXT_NODE){const e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(a=!0)}const s=Kr(i)?this.mirror.getId(Fp(o)):this.mirror.getId(i),l=r(o);if(-1===s||-1===l)return n.addNode(o);const c=Po(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Np(e,this.mirror)&&this.iframeManager.addIframe(e),_p(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Dp(o)&&this.shadowDomManager.addShadowRoot(bp.shadowRoot(o),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:a});c&&(e.push({parentId:s,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const s of this.movedSet)Qp(this.removesSubTreeCache,s,this.mirror)&&!this.movedSet.has(bp.parentNode(s))||o(s);for(const s of this.addedSet)eh(this.droppedSet,s)||Qp(this.removesSubTreeCache,s,this.mirror)?eh(this.movedSet,s)?o(s):this.droppedSet.add(s):o(s);let i=null;for(;n.length;){let e=null;if(i){const t=this.mirror.getId(bp.parentNode(i.value)),n=r(i.value);-1!==t&&-1!==n&&(e=i)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(bp.parentNode(n.value));if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value,r=bp.parentNode(t);if(r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=bp.host(r);if(-1!==this.mirror.getId(t)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}i=e.previous,n.removeNode(e.value),o(e.value)}const a={texts:this.texts.map((e=>{const t=e.node,n=bp.parentNode(t);return n&&"TEXTAREA"===n.tagName&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(a.texts.length||a.attributes.length||a.removes.length||a.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(a))})),Nr(this,"genTextAreaValueMutation",(e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const n=Array.from(bp.childNodes(e),(e=>bp.textContent(e)||"")).join("");t.attributes.value=eo({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ro(e),value:n,maskInputFn:this.maskInputFn})})),Nr(this,"processMutation",(e=>{if(!Mp(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=bp.textContent(e.target);Ap(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:To(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Lp(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,o=e.target.getAttribute(r);if("value"===r){const e=ro(n);o=eo({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:e,value:o,maskInputFn:this.maskInputFn})}if(Ap(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(o)){if(n.contentDocument)return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===r&&"INPUT"===n.tagName&&"password"===(e.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Eo(n.tagName,r))if(i.attributes[r]=Io(this.doc,to(n.tagName),to(r),o),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(n.style)){const t=n.style.getPropertyValue(e),o=n.style.getPropertyPriority(e);t!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?i.styleDiff[e]=""===o?t:[t,o]:i._unchangedStyles[e]=[t,o]}for(const e of Array.from(r.style))""===n.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":if(Ap(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=Kr(e.target)?this.mirror.getId(bp.host(e.target)):this.mirror.getId(e.target);Ap(e.target,this.blockClass,this.blockSelector,!1)||Mp(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?($p(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Pp(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Xp(n,r)]?$p(this.movedSet,t):(this.removes.push({parentId:r,id:n,isShadow:!(!Kr(e.target)||!Xr(e.target))||void 0}),function(e,t){const n=[e];for(;n.length;){const e=n.pop();t.has(e)||(t.add(e),bp.childNodes(e).forEach((e=>n.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),Nr(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Mp(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[Xp(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ap(e,this.blockClass,this.blockSelector,!1)||(bp.childNodes(e).forEach((e=>this.genAdds(e))),Dp(e)&&bp.childNodes(bp.shadowRoot(e)).forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function $p(e,t){e.delete(t),bp.childNodes(t).forEach((t=>$p(e,t)))}function Qp(e,t,n){return 0!==e.size&&function(e,t,n){const r=bp.parentNode(t);return!!r&&e.has(r)}(e,t)}function eh(e,t){return 0!==e.size&&th(e,t)}function th(e,t){const n=bp.parentNode(t);return!!n&&(!!e.has(n)||th(e,n))}let nh;const rh=e=>{if(!nh)return e;return(...t)=>{try{return e(...t)}catch(n){if(nh&&!0===nh(n))return;throw n}}},oh=[];function ih(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function ah(e,t){const n=new Zp;oh.push(n),n.init(e);const r=new(vp())(rh(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function sh({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,s=[];let l=null;return Object.keys(qp).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((i=>{let a=to(i);const c=(t=>i=>{const a=ih(i);if(Ap(a,r,o,!0))return;let s=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":s=Wp.Mouse;break;case"touch":s=Wp.Touch;break;case"pen":s=Wp.Pen}s===Wp.Touch?qp[t]===qp.MouseDown?c="TouchStart":qp[t]===qp.MouseUp&&(c="TouchEnd"):Wp.Pen}else Rp(i)&&(s=Wp.Touch);null!==s?(l=s,(c.startsWith("Touch")&&s===Wp.Touch||c.startsWith("Mouse")&&s===Wp.Mouse)&&(s=null)):qp[t]===qp.Click&&(s=l,l=null);const u=Rp(i)?i.changedTouches[0]:i;if(!u)return;const d=n.getId(a),{clientX:p,clientY:h}=u;rh(e)({type:qp[c],id:d,x:p,y:h,...null!==s&&{pointerType:s}})})(i);if(window.PointerEvent)switch(qp[i]){case qp.MouseDown:case qp.MouseUp:a=a.replace("mouse","pointer");break;case qp.TouchStart:case qp.TouchEnd:return}s.push(wp(a,c,t))})),rh((()=>{s.forEach((e=>e()))}))}function lh({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){return wp("scroll",rh(Sp(rh((i=>{const a=ih(i);if(!a||Ap(a,r,o,!0))return;const s=n.getId(a);if(a===t&&t.defaultView){const n=Ep(t.defaultView);e({id:s,x:n.left,y:n.top})}else e({id:s,x:a.scrollLeft,y:a.scrollTop})})),i.scroll||100)),t)}const ch=["INPUT","TEXTAREA","SELECT"],uh=new WeakMap;function dh(e){return function(e,t){if(gh("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||gh("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||gh("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||gh("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function ph(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function hh({mirror:e,stylesheetManager:t},n){var r,o,i;let a=null;a="#document"===n.nodeName?e.getId(n):e.getId(bp.host(n));const s="#document"===n.nodeName?null==(r=n.defaultView)?void 0:r.Document:null==(i=null==(o=n.ownerDocument)?void 0:o.defaultView)?void 0:i.ShadowRoot,l=(null==s?void 0:s.prototype)?Object.getOwnPropertyDescriptor(null==s?void 0:s.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&s&&l?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var n;const r=null==(n=l.set)?void 0:n.call(this,e);if(null!==a&&-1!==a)try{t.adoptStyleSheets(e,a)}catch(o){}return r}}),rh((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function fh(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;!function(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:s,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p,selectionCb:h,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),o(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),a(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),s(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),h(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(r=ah(e,e.doc));const o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let a,s=[];const l=Sp(rh((t=>{const n=Date.now()-a;e(s.map((e=>(e.timeOffset-=n,e))),t),s=[],a=null})),i),c=rh(Sp(rh((e=>{const t=ih(e),{clientX:n,clientY:o}=Rp(e)?e.changedTouches[0]:e;a||(a=Ip()),s.push({x:n,y:o,id:r.getId(t),timeOffset:Ip()-a}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?zp.Drag:e instanceof MouseEvent?zp.MouseMove:zp.TouchMove)})),o,{trailing:!1})),u=[wp("mousemove",c,n),wp("touchmove",c,n),wp("drag",c,n)];return rh((()=>{u.forEach((e=>e()))}))}(e),i=sh(e),a=lh(e),s=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return wp("resize",rh(Sp(rh((()=>{const t=Op(),o=Tp();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)})),200)),t)}(e,{win:n}),l=function({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:s,maskInputFn:l,sampling:c,userTriggeredOnInput:u}){function d(e){let n=ih(e);const c=e.isTrusted,d=n&&n.tagName;if(n&&"OPTION"===d&&(n=bp.parentElement(n)),!n||!d||ch.indexOf(d)<0||Ap(n,r,o,!0))return;if(n.classList.contains(i)||a&&n.matches(a))return;let h=n.value,f=!1;const g=ro(n)||"";"radio"===g||"checkbox"===g?f=n.checked:(s[d.toLowerCase()]||s[g])&&(h=eo({element:n,maskInputOptions:s,tagName:d,type:g,value:h,maskInputFn:l})),p(n,u?{text:h,isChecked:f,userTriggered:c}:{text:h,isChecked:f});const m=n.name;"radio"===g&&m&&f&&t.querySelectorAll(`input[type="radio"][name="${m}"]`).forEach((e=>{if(e!==n){const t=e.value;p(e,u?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}}))}function p(t,r){const o=uh.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){uh.set(t,r);const o=n.getId(t);rh(e)({...r,id:o})}}const h=("last"===c.input?["change"]:["input","change"]).map((e=>wp(e,rh(d),t))),f=t.defaultView;if(!f)return()=>{h.forEach((e=>e()))};const g=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),m=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&h.push(...m.map((e=>Cp(e[0],e[1],{set(){rh(d)({target:this,isTrusted:!1})}},!1,f)))),rh((()=>{h.forEach((e=>e()))}))}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o,doc:i}){const a=rh((i=>Sp(rh((o=>{const a=ih(o);if(!a||Ap(a,t,n,!0))return;const{currentTime:s,volume:l,muted:c,playbackRate:u,loop:d}=a;e({type:i,id:r.getId(a),currentTime:s,volume:l,muted:c,playbackRate:u,loop:d})})),o.media||500))),s=[wp("play",a(Vp.Play),i),wp("pause",a(Vp.Pause),i),wp("seeked",a(Vp.Seeked),i),wp("volumechange",a(Vp.VolumeChange),i),wp("ratechange",a(Vp.RateChange),i)];return rh((()=>{s.forEach((e=>e()))}))}(e);let u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:rh(((r,o,i)=>{const[a,s]=i,{id:l,styleId:c}=ph(o,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:a,index:s}]}),r.apply(o,i)}))}),r.CSSStyleSheet.prototype.addRule=function(e,t,n=this.cssRules.length){const o=`${e} { ${t} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[o,n])};const i=r.CSSStyleSheet.prototype.deleteRule;let a,s;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:rh(((r,o,i)=>{const[a]=i,{id:s,styleId:l}=ph(o,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,removes:[{index:a}]}),r.apply(o,i)}))}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:rh(((r,o,i)=>{const[a]=i,{id:s,styleId:l}=ph(o,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,replace:a}),r.apply(o,i)}))})),r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:rh(((r,o,i)=>{const[a]=i,{id:s,styleId:l}=ph(o,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,replaceSync:a}),r.apply(o,i)}))}));const l={};mh("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(mh("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),mh("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),mh("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach((([r,o])=>{c[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(c[r].insertRule,{apply:rh(((r,o,i)=>{const[a,s]=i,{id:l,styleId:c}=ph(o.parentStyleSheet,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:a,index:[...dh(o),s||0]}]}),r.apply(o,i)}))}),o.prototype.deleteRule=new Proxy(c[r].deleteRule,{apply:rh(((r,o,i)=>{const[a]=i,{id:s,styleId:l}=ph(o.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,removes:[{index:[...dh(o),a]}]}),r.apply(o,i)}))})})),rh((()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,a&&(r.CSSStyleSheet.prototype.replace=a),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(l).forEach((([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule}))}))}(e,{win:n}),d=hh(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:rh(((o,a,s)=>{var l;const[c,u,d]=s;if(n.has(c))return i.apply(a,[c,u,d]);const{id:p,styleId:h}=ph(null==(l=a.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(p&&-1!==p||h&&-1!==h)&&e({id:p,styleId:h,set:{property:c,value:u,priority:d},index:dh(a.parentRule)}),o.apply(a,s)}))});const a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:rh(((o,i,s)=>{var l;const[c]=s;if(n.has(c))return a.apply(i,[c]);const{id:u,styleId:d}=ph(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(u&&-1!==u||d&&-1!==d)&&e({id:u,styleId:d,remove:{property:c},index:dh(i.parentRule)}),o.apply(i,s)}))}),rh((()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a}))}(e,{win:n}),e.collectFonts&&(h=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,n){const r=new i(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const a=yp(t.fonts,"add",(function(t){return function(n){return setTimeout(rh((()=>{const t=o.get(n);t&&(e(t),o.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=i})),r.push(a),rh((()=>{r.forEach((e=>e()))}))}(e)));const f=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e;let a=!0;const s=rh((()=>{const e=t.getSelection();if(!e||a&&(null==e?void 0:e.isCollapsed))return;a=e.isCollapsed||!1;const s=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:l,endContainer:c,endOffset:u}=i;Ap(a,r,o,!0)||Ap(c,r,o,!0)||s.push({start:n.getId(a),startOffset:l,end:n.getId(c),endOffset:u})}i({ranges:s})}));return s(),wp("selectionchange",s)}(e),g=function({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?yp(n.customElements,"define",(function(e){return function(n,r,o){try{t({define:{name:n}})}catch(i){console.warn(`Custom element callback failed for ${n}`)}return e.apply(this,[n,r,o])}})):()=>{}}(e),m=[];for(const v of e.plugins)m.push(v.observer(v.callback,n,v.options));return rh((()=>{oh.forEach((e=>e.reset())),null==r||r.disconnect(),o(),i(),a(),s(),l(),c(),u(),d(),p(),h(),f(),g(),m.forEach((e=>e()))}))}function gh(e){return void 0!==window[e]}function mh(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class vh{constructor(e){Nr(this,"iframeIdToRemoteIdMap",new WeakMap),Nr(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),i.set(a,t)),a}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class yh{constructor(e){Nr(this,"iframes",new WeakMap),Nr(this,"crossOriginIframeMap",new WeakMap),Nr(this,"crossOriginIframeMirror",new vh(mo)),Nr(this,"crossOriginIframeStyleMirror"),Nr(this,"crossOriginIframeRootIdMap",new WeakMap),Nr(this,"mirror"),Nr(this,"mutationCb"),Nr(this,"wrappedEmit"),Nr(this,"loadListener"),Nr(this,"stylesheetManager"),Nr(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new vh(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case Hp.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Hp.IncrementalSnapshot,data:{source:zp.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Hp.Meta:case Hp.Load:case Hp.DomContentLoaded:return!1;case Hp.Plugin:return t;case Hp.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Hp.IncrementalSnapshot:switch(t.data.source){case zp.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case zp.Drag:case zp.TouchMove:case zp.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case zp.ViewportResize:return!1;case zp.MediaInteraction:case zp.MouseInteraction:case zp.Scroll:case zp.CanvasMutation:case zp.Input:return this.replaceIds(t.data,e,["id"]),t;case zp.StyleSheetRule:case zp.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case zp.Font:return t;case zp.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case zp.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===Jp.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class bh{constructor(e){Nr(this,"shadowDoms",new WeakSet),Nr(this,"mutationCb"),Nr(this,"scrollCb"),Nr(this,"bypassOptions"),Nr(this,"mirror"),Nr(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Xr(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=ah({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(lh({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(bp.host(e))),this.restoreHandlers.push(hh({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(yp(e.prototype,"attachShadow",(function(e){return function(r){const o=e.call(this,r),i=bp.shadowRoot(this);return i&&Up(this)&&n.addShadowRoot(i,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var wh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kh="undefined"==typeof Uint8Array?[]:new Uint8Array(256),xh=0;xh<64;xh++)kh[wh.charCodeAt(xh)]=xh;const Sh=new Map;const Ch=(e,t,n)=>{if(!e||!Oh(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=Sh.get(e);return n||(n=new Map,Sh.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o};function Ih(e,t,n){if(e instanceof Array)return e.map((e=>Ih(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){return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=wh[n[t]>>2],o+=wh[(3&n[t])<<4|n[t+1]>>4],o+=wh[(15&n[t+1])<<2|n[t+2]>>6],o+=wh[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ih(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ih(e.data,t,n),e.width,e.height]}}if(Oh(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Ch(e,t,n)}}return e}const Eh=(e,t,n)=>e.map((e=>Ih(e,t,n))),Oh=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(n.find((n=>e instanceof t[n])))};function Th(e,t,n,r){const o=[];try{const i=yp(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o,...i){if(!Ap(this,t,n,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(o);if("__context"in this||(this.__context=e),r&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[o,...i])}}));o.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach((e=>e()))}}function Lh(e,t,n,r,o,i){const a=[],s=Object.getOwnPropertyNames(e);for(const l of s)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const s=yp(e,l,(function(e){return function(...a){const s=e.apply(this,a);if(Ch(s,i,this),"tagName"in this.canvas&&!Ap(this.canvas,r,o,!0)){const e=Eh(a,i,this),r={type:t,property:l,args:e};n(this.canvas,r)}return s}}));a.push(s)}catch{const r=Cp(e,l,{set(e){n(this.canvas,{type:t,property:l,args:[e],setter:!0})}});a.push(r)}return a}const Ah="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Mh="undefined"!=typeof window&&window.Blob&&new Blob([(Ph=Ah,Uint8Array.from(atob(Ph),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var Ph;function Rh(e){let t;try{if(t=Mh&&(window.URL||window.webkitURL).createObjectURL(Mh),!t)throw"";const n=new Worker(t,{name:null==e?void 0:e.name});return n.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),n}catch(n){return new Worker("data:text/javascript;base64,"+Ah,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Nh{constructor(e){Nr(this,"pendingCanvasMutations",new Map),Nr(this,"rafStamps",{latestId:0,invokeId:null}),Nr(this,"mirror"),Nr(this,"mutationCb"),Nr(this,"resetObservers"),Nr(this,"frozen",!1),Nr(this,"locked",!1),Nr(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));const{sampling:t="all",win:n,blockClass:r,blockSelector:o,recordCanvas:i,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(n,r,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,r,o){const i=Th(t,n,r,!0),a=new Map,s=new Rh;s.onmessage=e=>{const{id:t}=e.data;if(a.set(t,!1),!("base64"in e.data))return;const{base64:n,type:r,width:o,height:i}=e.data;this.mutationCb({id:t,type:Gp["2D"],commands:[{property:"clearRect",args:[0,0,o,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})};const l=1e3/e;let c,u=0;const d=e=>{u&&e-u<l||(u=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach((t=>{Ap(t,n,r,!0)||e.push(t)})),e})().forEach((async e=>{var t;const n=this.mirror.getId(e);if(a.get(n))return;if(0===e.width||0===e.height)return;if(a.set(n,!0),["webgl","webgl2"].includes(e.__context)){const n=e.getContext(e.__context);!1===(null==(t=null==n?void 0:n.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}const r=await createImageBitmap(e);s.postMessage({id:n,bitmap:r,width:e.width,height:e.height,dataURLOptions:o.dataURLOptions},[r])}))),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Th(e,t,n,!1),o=function(e,t,n,r){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])continue;const i=yp(t.CanvasRenderingContext2D.prototype,a,(function(o){return function(...i){return Ap(this.canvas,n,r,!0)||setTimeout((()=>{const n=Eh(i,t,this);e(this.canvas,{type:Gp["2D"],property:a,args:n})}),0),o.apply(this,i)}}));o.push(i)}catch{const n=Cp(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:Gp["2D"],property:a,args:[t],setter:!0})}});o.push(n)}return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,r){const o=[];return o.push(...Lh(t.WebGLRenderingContext.prototype,Gp.WebGL,e,n,r,t)),void 0!==t.WebGL2RenderingContext&&o.push(...Lh(t.WebGL2RenderingContext.prototype,Gp.WebGL2,e,n,r,t)),()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map((e=>{const{type:t,...n}=e;return n})),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}class _h{constructor(e){Nr(this,"trackedLinkElements",new WeakSet),Nr(this,"mutationCb"),Nr(this,"adoptedStyleSheetCb"),Nr(this,"styleMirror",new jp),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const o of e){let e;this.styleMirror.has(o)?e=this.styleMirror.getId(o):(e=this.styleMirror.add(o),r.push({styleId:e,rules:Array.from(o.rules||CSSRule,((e,t)=>({rule:$r(e,o.href),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Dh{constructor(){Nr(this,"nodeMap",new WeakMap),Nr(this,"active",!1)}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let jh,Fh,Bh,Uh=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Pr=e.contentWindow)?void 0:Pr.Array.from)||Array.from,document.body.removeChild(e)}}catch(xv){console.debug("Unable to override Array.from",xv)}const Hh=new Qr;function zh(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:s=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:h,maskInputFn:f,maskTextFn:g,hooks:m,packFn:v,sampling:y={},dataURLOptions:b={},mousemoveWait:w,recordDOM:k=!0,recordCanvas:x=!1,recordCrossOriginIframes:S=!1,recordAfter:C=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:I=!1,collectFonts:E=!1,inlineImages:O=!1,plugins:T,keepIframeSrcFn:L=(()=>!1),ignoreCSSAttributes:A=new Set([]),errorHandler:M}=e;nh=M;const P=!S||window.parent===window;let R=!1;if(!P)try{window.parent.document&&(R=!1)}catch(V){R=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!R)return()=>{};void 0!==w&&void 0===y.mousemove&&(y.mousemove=w),Hh.reset();const N=!0===d?{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!==p?p:{password:!0},_=Mo(h);let D;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let j=0;const F=e=>{for(const t of T||[])t.eventProcessor&&(e=t.eventProcessor(e));return v&&!R&&(e=v(e)),e};jh=(e,o)=>{var i;const a=e;if(a.timestamp=Ip(),!(null==(i=oh[0])?void 0:i.isFrozen())||a.type===Hp.FullSnapshot||a.type===Hp.IncrementalSnapshot&&a.data.source===zp.Mutation||oh.forEach((e=>e.unfreeze())),P)null==t||t(F(a),o);else if(R){const e={type:"rrweb",event:F(a),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(a.type===Hp.FullSnapshot)D=a,j=0;else if(a.type===Hp.IncrementalSnapshot){if(a.data.source===zp.Mutation&&a.data.isAttachIframe)return;j++;const e=r&&j>=r,t=n&&a.timestamp-D.timestamp>n;(e||t)&&Fh(!0)}};const B=e=>{jh({type:Hp.IncrementalSnapshot,data:{source:zp.Mutation,...e}})},U=e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.Scroll,...e}}),H=e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.CanvasMutation,...e}}),z=new _h({mutationCb:B,adoptedStyleSheetCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.AdoptedStyleSheet,...e}})}),q=new yh({mirror:Hh,mutationCb:B,stylesheetManager:z,recordCrossOriginIframes:S,wrappedEmit:jh});for(const Y of T||[])Y.getMirror&&Y.getMirror({nodeMirror:Hh,crossOriginIframeMirror:q.crossOriginIframeMirror,crossOriginIframeStyleMirror:q.crossOriginIframeStyleMirror});const W=new Dh;Bh=new Nh({recordCanvas:x,mutationCb:H,win:window,blockClass:o,blockSelector:i,mirror:Hh,sampling:y.canvas,dataURLOptions:b});const G=new bh({mutationCb:B,scrollCb:U,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:N,dataURLOptions:b,maskTextFn:g,maskInputFn:f,recordCanvas:x,inlineImages:O,sampling:y,slimDOMOptions:_,iframeManager:q,stylesheetManager:z,canvasManager:Bh,keepIframeSrcFn:L,processedNodeManager:W},mirror:Hh});Fh=(e=!1)=>{if(!k)return;jh({type:Hp.Meta,data:{href:window.location.href,width:Tp(),height:Op()}},e),z.reset(),G.init(),oh.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new Qr,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:i="rr-mask",maskTextSelector:a=null,inlineStylesheet:s=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:p,slimDOM:h=!1,dataURLOptions:f,preserveWhiteSpace:g,onSerialize:m,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k=(()=>!1)}=t||{};return Po(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===u?{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===u?{password:!0}:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:Mo(h),dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:g,onSerialize:m,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k,newlyAddedElement:!1})}(document,{mirror:Hh,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:N,maskTextFn:g,maskInputFn:f,slimDOM:_,dataURLOptions:b,recordCanvas:x,inlineImages:O,onSerialize:e=>{Np(e,Hh)&&q.addIframe(e),_p(e,Hh)&&z.trackLinkElement(e),Dp(e)&&G.addShadowRoot(bp.shadowRoot(e),document)},onIframeLoad:(e,t)=>{q.attachIframe(e,t),G.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{z.attachLinkElement(e,t)},keepIframeSrcFn:L});if(!t)return console.warn("Failed to snapshot the document");jh({type:Hp.FullSnapshot,data:{node:t,initialOffset:Ep(window)}},e),oh.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&z.adoptStyleSheets(document.adoptedStyleSheets,Hh.getId(document))};try{const e=[],t=e=>{var t;return rh(fh)({mutationCb:B,mousemoveCb:(e,t)=>jh({type:Hp.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.MouseInteraction,...e}}),scrollCb:U,viewportResizeCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.ViewportResize,...e}}),inputCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.Input,...e}}),mediaInteractionCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.MediaInteraction,...e}}),styleSheetRuleCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.StyleSheetRule,...e}}),styleDeclarationCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.StyleDeclaration,...e}}),canvasMutationCb:H,fontCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.Font,...e}}),selectionCb:e=>{jh({type:Hp.IncrementalSnapshot,data:{source:zp.Selection,...e}})},customElementCb:e=>{jh({type:Hp.IncrementalSnapshot,data:{source:zp.CustomElement,...e}})},blockClass:o,ignoreClass:a,ignoreSelector:s,maskTextClass:l,maskTextSelector:c,maskInputOptions:N,inlineStylesheet:u,sampling:y,recordDOM:k,recordCanvas:x,inlineImages:O,userTriggeredOnInput:I,collectFonts:E,doc:e,maskInputFn:f,maskTextFn:g,keepIframeSrcFn:L,blockSelector:i,slimDOMOptions:_,dataURLOptions:b,mirror:Hh,iframeManager:q,stylesheetManager:z,shadowDomManager:G,processedNodeManager:W,canvasManager:Bh,ignoreCSSAttributes:A,plugins:(null==(t=null==T?void 0:T.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>jh({type:Hp.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},m)};q.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(r){console.warn(r)}}));const n=()=>{Fh(),e.push(t(document)),Uh=!0};return["interactive","complete"].includes(document.readyState)?n():(e.push(wp("DOMContentLoaded",(()=>{jh({type:Hp.DomContentLoaded,data:{}}),"DOMContentLoaded"===C&&n()}))),e.push(wp("load",(()=>{jh({type:Hp.Load,data:{}}),"load"===C&&n()}),window))),()=>{e.forEach((e=>{try{e()}catch(t){String(t).toLowerCase().includes("cross-origin")||console.warn(t)}})),W.destroy(),Uh=!1,nh=void 0}}catch(J){console.warn(J)}}var qh,Wh;function Gh(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 Vh(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 Vh(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 Vh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jh(e){return Jh="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},Jh(e)}function Yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yh(Object(n),!0).forEach((function(t){Zh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$h(r.key),r)}}function Zh(e,t,n){return(t=$h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $h(e){var t=function(e,t){if("object"!=Jh(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Jh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jh(t)?t:String(t)}zh.addCustomEvent=(e,t)=>{if(!Uh)throw new Error("please add custom event after start recording");jh({type:Hp.Custom,data:{tag:e,payload:t}})},zh.freezePage=()=>{oh.forEach((e=>e.freeze()))},zh.takeFullSnapshot=e=>{if(!Uh)throw new Error("please take full snapshot after start recording");Fh(e)},zh.mirror=Hh,(Wh=qh||(qh={}))[Wh.NotStarted=0]="NotStarted",Wh[Wh.Running=1]="Running",Wh[Wh.Stopped=2]="Stopped";var Qh=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Zh(this,"startDate",void 0),Zh(this,"events",[]),Zh(this,"bufferSize",0),Zh(this,"stopFunction",void 0),Zh(this,"customOptions",{})}var t,n,r;return t=e,r=[{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=zh(Kh(Kh(Kh({},{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,r=/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim,o=Gh(t.matchAll(r));try{for(o.s();!(n=o.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(xv){o.e(xv)}finally{o.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:x(),type:"rrweb"}}}])&&Xh(t.prototype,n),r&&Xh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ef(e){return ef="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},ef(e)}function tf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rf(r.key),r)}}function nf(e,t,n){return(t=rf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rf(e){var t=function(e,t){if("object"!=ef(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ef(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ef(t)?t:String(t)}Zh(Qh,"instance",void 0);var of=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),nf(this,"rerender",void 0),nf(this,"svgElement",null),nf(this,"path",null),nf(this,"strPath",void 0),nf(this,"strokeWidth",12),nf(this,"strokeWidthRect",6),nf(this,"bufferSize",4),nf(this,"buffer",[]),nf(this,"startPoint",null),nf(this,"tool","rect"),nf(this,"color","#EB144C"),nf(this,"mouseDown",null),nf(this,"mouseMove",null),nf(this,"mouseUp",null),nf(this,"resizeListener",null),nf(this,"pathBuffer",[]);var r=this;this.rerender=t,this.svgElement=document.querySelector(".bb-capture-svg"),this.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px"),this.resizeListener=function(e){r.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"),r.fadeOutToolbar(),"pen"!==r.tool&&"blur"!==r.tool||r.mouseDownPen(e),"rect"===r.tool&&r.mouseDownRect(e)},this.mouseMove=function(e){e.preventDefault(),"pen"!==r.tool&&"blur"!==r.tool||r.mouseMovePen(e),"rect"===r.tool&&r.mouseMoveRect(e)},this.mouseUp=function(e){e.preventDefault(),r.fadeInToolbar(),"pen"!==r.tool&&"blur"!==r.tool||r.mouseUpPen(e),"rect"===r.tool&&r.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,r;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),r=Math.abs(t.y-this.startPoint.y),o=t.x,i=t.y;t.x>this.startPoint.x&&(o=this.startPoint.x),t.y>this.startPoint.y&&(i=this.startPoint.y),this.path.setAttributeNS(null,"x",o),this.path.setAttributeNS(null,"y",i),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",r)}}},{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 r=this.getMousePosition(e);this.appendToBuffer(r),this.strPath="M"+r.x+" "+r.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,r,o=0,i=0,a=0;for(r=e;r<t;r++)a++,o+=(n=this.buffer[r]).x,i+=n.y;return{x:o/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&&tf(t.prototype,n),r&&tf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function af(e){return af="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},af(e)}function sf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cf(r.key),r)}}function lf(e,t,n){return(t=cf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cf(e){var t=function(e,t){if("object"!=af(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=af(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==af(t)?t:String(t)}var uf=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),lf(this,"keys",{37:1,38:1,39:1,40:1}),lf(this,"supportsPassive",!1),lf(this,"wheelOpt",!!this.supportsPassive&&{passive:!1}),lf(this,"wheelEvent","onwheel"in document.createElement("div")?"wheel":"mousewheel"),lf(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,r;return t=e,r=[{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}}])&&sf(t.prototype,n),r&&sf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function df(e){return df="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},df(e)}function pf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ff(r.key),r)}}function hf(e,t,n){return(t=ff(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ff(e){var t=function(e,t){if("object"!=df(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=df(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==df(t)?t:String(t)}lf(uf,"instance",void 0);var gf=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),hf(this,"type","screenshot"),hf(this,"dragCursor",null),hf(this,"screenRecorder",null),hf(this,"callback",null),hf(this,"screenDrawer",null),hf(this,"escListener",null),hf(this,"pageLeaveListener",null),hf(this,"overrideLanguage",bv.getInstance().overrideLanguage),hf(this,"showNextStep",(function(){this.showWidgetUI(),this.callback&&(er.getInstance().sendMessage({name:"set-form-data",data:{formKey:"capture",data:{value:this.type,dirty:!0}}}),this.callback(!0))})),this.type=t}var t,n,r;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&&uf.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 r=document.querySelector(".bb-feedback-button");r&&(r.style.display="flex");var o=document.querySelector(".bb-feedback-dialog-container");o&&(o.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);var e=document.querySelector(".bb-capture-toolbar-item[data-type='drag']");e&&(e.removeEventListener("mousedown",this.dragStart),e.removeEventListener("touchstart",this.dragStart),document.removeEventListener("mousemove",this.drag),document.removeEventListener("touchmove",this.drag),document.removeEventListener("mouseup",this.dragEnd),document.removeEventListener("touchend",this.dragEnd)),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 <div class="bb-capture-toolbar-item bb-capture-item-rec bb-capture-toolbar-item-tool drag-handle-item" data-type="drag">\n ').concat(p("drag"),"\n </div>\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(wf.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(wf.translateText("undo"),"</span>\n </div>\n ").concat("capture"!==this.type?'<div class="bb-capture-button-next">'.concat(wf.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(wf.translateText("retry"),'</div>\n <div class="bb-capture-preview-sendbutton">').concat(wf.translateText("next"),"</div>\n </div>\n </div>\n </div>\n "),document.body.appendChild(e),e.setAttribute("dir",wf.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,r=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,r="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&r&&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?(bv.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),uf.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new of(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),r=document.querySelectorAll(".bb-capture-toolbar-item-color"),o=document.querySelector(".bb-capture-toolbar-item-colorpicker"),i=function(){var i=r[a],s=i.getAttribute("data-color");i.style.backgroundColor=s,i.onclick=function(){i&&(t.screenDrawer.setColor(s),o&&(o.style.display="none"),n.style.backgroundColor=i.style.backgroundColor,e.setPenColor(s))}},a=0;a<r.length;a++)i()}},{key:"dismiss",value:function(){this.showWidgetUI(),this.callback&&this.callback(!1)}},{key:"setupToolbar",value:function(){var e,t,n,r,o=this,i=document.querySelector(".bb-capture-toolbar"),a=!1,s=0,l=0;this.dragStart=function(e){var t=function(){var e=window.getComputedStyle(i).transform;if("none"===e)return{x:0,y:0};var t=new DOMMatrix(e);return{x:t.m41,y:t.m42}}(),o=t.x,c=t.y;s=o,l=c,"mousedown"===e.type?(n=e.clientX-s,r=e.clientY-l):(n=e.touches[0].clientX-s,r=e.touches[0].clientY-l),a=!0},this.dragEnd=function(){a=!1},this.drag=function(o){a&&(o.preventDefault(),"mousemove"===o.type?(e=o.clientX-n,t=o.clientY-r):(e=o.touches[0].clientX-n,t=o.touches[0].clientY-r),s=e,l=t,i.style.transform="translate(".concat(e,"px, ").concat(t,"px)"))};var c=document.querySelector(".bb-capture-toolbar-item[data-type='drag']");c.addEventListener("mousedown",this.dragStart),c.addEventListener("touchstart",this.dragStart),document.addEventListener("mousemove",this.drag),document.addEventListener("touchmove",this.drag),document.addEventListener("mouseup",this.dragEnd),document.addEventListener("touchend",this.dragEnd),document.querySelector(".bb-capture-dismiss").onclick=function(){o.dismiss()};var u=document.querySelector(".bb-capture-button-next");u&&(u.onclick=this.showNextStep.bind(this));for(var d=document.querySelector(".bb-capture-toolbar-item-colorpicker"),p=document.querySelector(".bb-capture-svg"),h=function(e,t){for(var n=document.querySelectorAll(".bb-capture-toolbar-item-tool"),r=0;r<n.length;r++)n[r].classList.remove("bb-capture-toolbar-item--active");if(t.classList.add("bb-capture-toolbar-item--active"),o.screenDrawer.setTool(e),o.dragCursor.innerHTML="","pointer"===e)p.style.pointerEvents="none";else{p.style.pointerEvents="auto";try{var i=t.querySelector("svg").cloneNode(!0);i&&o.dragCursor&&o.dragCursor.appendChild(i)}catch(a){}}},f=document.querySelectorAll(".bb-capture-toolbar-item"),g=function(){var e=f[m];e.onclick=function(){var t=e.getAttribute("data-type");d&&"colorpicker"!==t&&(d.style.display="none"),"mic"===t&&o.screenRecorder.toggleAudio(),"recording"===t&&(o.screenRecorder.isRecording?o.screenRecorder.stopScreenRecording():(o.screenRecorder.startScreenRecording(),h("pointer",document.querySelector(".bb-capture-toolbar-item[data-type='pointer']")))),("capture"!==o.type||o.screenRecorder.isRecording)&&("pen"!==t&&"blur"!==t&&"rect"!==t&&"pointer"!==t||h(t,e),"colorpicker"===t&&("flex"===d.style.display?d.style.display="none":d.style.display="flex"),"undo"===t&&o.screenDrawer.removeLastAddedPathFromSvg())}},m=0;m<f.length;m++)g()}},{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 r=t[n];"undo"===r.getAttribute("data-type")&&(null!=this.screenDrawer.pathBuffer&&this.screenDrawer.pathBuffer.length>0?r.classList.remove(e):r.classList.add(e))}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&bv.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"),r=document.querySelector(".bb-tooltip-screen-recording"),o=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"),o.innerHTML=wf.translateText("unmute")):(u.classList.remove("bb-capture-toolbar-item--inactivecross"),o.innerHTML=wf.translateText("mute"))):(u.classList.add(e),u.classList.add("bb-capture-toolbar-item--inactivecross"),o.innerHTML=wf.translateText("browserNotSupported"));break;case"recording":this.screenRecorder.available?(u.classList.remove(e),this.screenRecorder.isRecording?(u.setAttribute("data-active","true"),r.innerHTML=wf.translateText("stopRecording"),t.style.display="block"):(u.setAttribute("data-active","false"),r.innerHTML=wf.translateText("startRecording"),t.style.display="none")):(u.classList.add(e),r.innerHTML=wf.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 Tn(this.captureRenderer.bind(this),wf.translateText("accessToScreenSharingDenied"))}}],r=[{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&&pf(t.prototype,n),r&&pf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function mf(e){return mf="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},mf(e)}function vf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bf(r.key),r)}}function yf(e,t,n){return(t=bf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bf(e){var t=function(e,t){if("object"!=mf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=mf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==mf(t)?t:String(t)}var wf=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),yf(this,"overrideLanguage",""),yf(this,"isRTLLayout",!1)}var t,n,r;return t=e,r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"translateText",value:function(e){if(!e)return"";var t=tn.getInstance().getFlowConfig().staticTranslations;return t&&t[e]?t[e]:e}},{key:"translateTextWithVars",value:function(e,t){if(!e)return"";var n=this.translateText(e);return n?n.replace(/{(\w+)}/g,(function(e,n){return t[n]})):""}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e}},{key:"updateRTLSupport",value:function(){var e=tn.getInstance().getFlowConfig();this.isRTLLayout=!1,e&&e.localizationOptions&&e.localizationOptions.rtl&&(this.isRTLLayout=!0),a.getInstance().updateFeedbackButtonState(),er.getInstance().updateFrameStyle()}},{key:"getActiveLanguage",value:function(){var e="en";if("undefined"!=typeof navigator&&(e=navigator.language.toLowerCase()),"undefined"!=typeof document&&document.documentElement){var t=document.documentElement.lang;t&&""!==t.trim()&&(e=t.toLowerCase().trim())}return this.overrideLanguage&&""!==this.overrideLanguage&&(e=this.overrideLanguage.toLowerCase()),e}}])&&vf(t.prototype,n),r&&vf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function kf(e){return kf="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},kf(e)}function xf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Cf(r.key),r)}}function Sf(e,t,n){return(t=Cf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cf(e){var t=function(e,t){if("object"!=kf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=kf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kf(t)?t:String(t)}yf(wf,"instance",void 0);var If=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Sf(this,"shortCutListener",void 0)}var t,n,r;return t=e,r=[{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,r=(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"!==r&&"U"!==r&&85!==r||bv.startFeedbackFlowWithOptions("bugreporting",{autostartDrawing:!0})})))}},{key:"stop",value:function(){this.shortCutListener&&(document.removeEventListener("keyup",this.shortCutListener),this.shortCutListener=void 0)}}])&&xf(t.prototype,n),r&&xf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ef(e){return Ef="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},Ef(e)}function Of(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Lf(r.key),r)}}function Tf(e,t,n){return(t=Lf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lf(e){var t=function(e,t){if("object"!=Ef(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ef(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ef(t)?t:String(t)}Sf(If,"instance",void 0);var Af=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Tf(this,"formPreFill",{})}var t,n,r;return t=e,r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=null)&&Of(t.prototype,n),r&&Of(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Mf(e){return Mf="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},Mf(e)}function Pf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nf(r.key),r)}}function Rf(e,t,n){return(t=Nf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nf(e){var t=function(e,t){if("object"!=Mf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Mf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mf(t)?t:String(t)}Tf(Af,"instance",void 0);var _f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Rf(this,"notificationContainer",null),Rf(this,"notifications",[]),Rf(this,"unreadCount",0),Rf(this,"unreadNotificationsKey","unread-notifications"),Rf(this,"isTabActive",!0),Rf(this,"showNotificationBadge",!0),Rf(this,"currentNewsIndex",0)}var t,n,r;return t=e,n=[{key:"updateTabBarNotificationCount",value:function(){Un.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(){try{var e=E(this.unreadNotificationsKey);if(e&&e.length>0){var t=e.filter((function(e){return new Date(e.createdAt)>new Date(Date.now()-36e5)}));t.length>2?this.notifications=t.splice(0,t.length-2):this.notifications=t,this.renderNotifications()}}catch(n){}}},{key:"setNotificationCount",value:function(e){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&&cg.ping()),this.notifications.length>2&&this.notifications.shift(),O(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(),e.currentNewsIndex=0},t.className="gleap-notification-close",t.innerHTML=p("dismiss"),this.notificationContainer.appendChild(t);var n=this.notifications.filter((function(e){return e.data.news})).sort((function(e,t){return new Date(e.createdAt)-new Date(t.createdAt)})),r=this.notifications.filter((function(e){return!e.data.news}));if(n.length>0){var o=this.currentNewsIndex<n.length?this.currentNewsIndex:0,i=n[o],a=document.createElement("div");a.className="gleap-notification-item-news";var s=document.createElement("div");if(s.className="gleap-notification-item-news-container",i.data.coverImageUrl&&""!==i.data.coverImageUrl&&!i.data.coverImageUrl.includes("NewsImagePlaceholder")){var l=document.createElement("img");l.className="gleap-notification-item-news-image",l.src=i.data.coverImageUrl,l.onclick=function(t){t.stopPropagation(),e.openNews(i)},s.appendChild(l)}var c=document.createElement("div");c.className="gleap-notification-item-news-content";var u=document.createElement("div");u.className="gleap-notification-item-news-content-title";var d=i.data.text||"";d=d.replaceAll("{{name}}",Wt.getInstance().getName()),u.innerText=d,u.onclick=function(t){t.stopPropagation(),e.openNews(i)},c.appendChild(u);var h=this.renderDescription(i);if(h){var f=document.createElement("div");f.className="gleap-notification-item-news-preview",f.innerHTML=h,c.appendChild(f)}if(n.length>1){var g=document.createElement("div");g.className="gleap-news-pagination";var m=document.createElement("span");m.className="gleap-news-page-indicator",m.innerText="".concat(o+1," / ").concat(n.length),g.appendChild(m);var v=document.createElement("button");v.className="gleap-news-next-button",o<n.length-1?(v.innerText=wf.translateText("next"),v.onclick=function(t){t.stopPropagation(),e.currentNewsIndex++,e.renderNotifications()}):(v.innerText=wf.translateText("done"),v.onclick=function(t){t.stopPropagation(),e.clearAllNotifications(),e.currentNewsIndex=0}),g.appendChild(v),c.appendChild(g)}s.appendChild(c),a.appendChild(s),this.notificationContainer.appendChild(a)}for(var y=function(){var t=r[b],n=t.data.text||"";n=n.replaceAll("{{name}}",Wt.getInstance().getName());var o=document.createElement("div");if(o.onclick=function(){t.data.conversation?bv.openConversation(t.data.conversation.shareToken,!0):t.data.checklist?bv.openChecklist(t.data.checklist.id,!0):bv.open()},t.data.checklist){var i=Math.round(t.data.currentStep/t.data.totalSteps*100);i<100&&(i+=4),o.className="gleap-notification-item-checklist",o.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">\n '.concat(t.data.text,'\n </div>\n <div class="gleap-notification-item-checklist-content-progress">\n <div class="gleap-notification-item-checklist-content-progress-inner" style="width: ').concat(i,'%;"></div>\n </div>\n <div class="gleap-notification-item-checklist-content-next">\n <svg width="24" height="24" viewBox="0 0 24 24"\n fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4 12H20M20 12L14 6M20 12L14 18"\n stroke="currentColor" stroke-width="2"\n stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n ').concat(t.data.nextStepTitle,"\n </div>\n </div>\n </div>")}else o.className="gleap-notification-item",o.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">\n '.concat(t.data.sender.name,"\n </div>"):"",'\n <div class="gleap-notification-item-content">').concat(n,"</div>\n </div>");e.notificationContainer.appendChild(o)},b=0;b<r.length;b++)y();n.length>0||r.length>0||this.clearAllNotifications(!0)}}},{key:"openNews",value:function(e){e.data.news?bv.openNewsArticle(e.data.news.id,!0):bv.open()}},{key:"renderDescription",value:function(e){var t=e.data,n=t.previewText,r=t.sender;return n&&n.length>0?n:r?'\n <div class="gleap-notification-item-news-sender">\n '.concat(r.profileImageUrl?'<img src="'.concat(r.profileImageUrl,'" alt="').concat(r.name,'" />'):"","\n ").concat(r.name,"\n </div>\n "):""}},{key:"clearAllNotifications",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],this.currentNewsIndex=0,O(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=tn.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",wf.getInstance().isRTLLayout?"rtl":"ltr")}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Pf(t.prototype,n),r&&Pf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Df(e){return Df="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},Df(e)}function jf(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 Ff(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 Ff(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 Ff(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bf(Object(n),!0).forEach((function(t){zf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Hf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qf(r.key),r)}}function zf(e,t,n){return(t=qf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qf(e){var t=function(e,t){if("object"!=Df(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Df(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Df(t)?t:String(t)}Rf(_f,"instance",void 0);var Wf=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),zf(this,"chatbarUrl","https://outboundmedia.gleap.io/chatbar"),zf(this,"chatbarContainer",null),zf(this,"chatbarFrame",null),zf(this,"config",null),zf(this,"agentId","kai"),zf(this,"agentContext",null),zf(this,"isHidden",!0),zf(this,"manuallyHidden",!1),zf(this,"iframeReady",!1),zf(this,"pendingMessages",[]),this._listenForMessages(),this._listenForOutsideClicks()}var t,n,r;return t=e,n=[{key:"_listenForOutsideClicks",value:function(){var e=this;document.addEventListener("click",(function(t){e.chatbarContainer&&(e.chatbarContainer.contains(t.target)||e._suppressOutsideClick||e._postMessage({name:"chatbar-outside-click"}))}))}},{key:"_listenForMessages",value:function(){var e=this;window.addEventListener("message",(function(t){if(!e.chatbarUrl||e.chatbarUrl.includes(t.origin))try{var n=JSON.parse(t.data);if("CHATBAR"!==(null==n?void 0:n.type))return;"chatbar-loaded"===n.name&&(e.iframeReady=!0,e._sendChatbarData(),e._flushPendingMessages()),"chatbar-resize"===n.name&&n.data&&e._resizeFrame(n.data),"chatbar-message-sent"===n.name&&Un.notifyEvent("agent-message-sent",n.data),"chatbar-conversation-created"===n.name&&Un.notifyEvent("agent-conversation-created",n.data),"chatbar-reply-received"===n.name&&Un.notifyEvent("agent-reply-received",n.data),"chatbar-tool-executed"===n.name&&n.data&&Jn.getInstance().triggerToolAction(n.data),"chatbar-error"===n.name&&Un.notifyEvent("agent-error",n.data),"chatbar-panel-blur"===n.name&&n.data&&e._updateBlurBackdrop(n.data)}catch(r){}}))}},{key:"_postMessage",value:function(e){try{var t;if(!this.iframeReady||null===(t=this.chatbarFrame)||void 0===t||!t.contentWindow)return void this.pendingMessages.push(e);this.chatbarFrame.contentWindow.postMessage(JSON.stringify(Uf(Uf({},e),{},{type:"chatbar"})),"*")}catch(n){}}},{key:"_flushPendingMessages",value:function(){var e=this.pendingMessages;this.pendingMessages=[];var t,n=jf(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this._postMessage(r)}}catch(xv){n.e(xv)}finally{n.f()}}},{key:"_sendChatbarData",value:function(){var e,t,n,r,o,i={},a="https://api.gleap.io",s="",l="",c="";try{i=tn.getInstance().getFlowConfig()||{}}catch(f){}try{var u,d,p=Wt.getInstance();a=p.apiUrl||a,s=p.sdkKey||"",l=(null===(u=p.session)||void 0===u?void 0:u.gleapId)||"",c=(null===(d=p.session)||void 0===d?void 0:d.gleapHash)||""}catch(f){}var h=(null===(e=i)||void 0===e||null===(e=e.aiBar)||void 0===e?void 0:e.defaultAgentName)||"Kai";this._postMessage({name:"chatbar-data",data:{agentId:this.agentId,defaultAgentName:h,placeholder:(null===(t=this.config)||void 0===t?void 0:t.placeholder)||"Ask me anything...",quickActions:(null===(n=this.config)||void 0===n?void 0:n.quickActions)||[],style:(null===(r=this.config)||void 0===r?void 0:r.style)||"glow",primaryColor:(null===(o=i)||void 0===o?void 0:o.color)||"#485BFF",agentTools:Jn.getInstance().getAgentTools(),apiUrl:a,sdkKey:s,gleapId:l,gleapHash:c}})}},{key:"_resizeFrame",value:function(e){var t=e.width,n=e.height;this.chatbarContainer&&(this.chatbarContainer.style.width=Math.ceil(t)+"px",this.chatbarContainer.style.height=Math.ceil(n)+"px",this.isHidden||(this.chatbarContainer.style.display="block"))}},{key:"_updateBlurBackdrop",value:function(e){var t=e.visible,n=e.height,r=e.borderRadius;this.blurBackdrop&&(t?(this.blurBackdrop.style.height=n+"px",this.blurBackdrop.style.borderRadius=r+"px",this.blurBackdrop.style.display="block"):this.blurBackdrop.style.display="none")}},{key:"setConfig",value:function(e){this.config=e,"kai"!==this.agentId&&this.agentId||(e.agentId&&"default"!==e.agentId?this.agentId=e.agentId:this.agentId="kai"),this._preloadIframe(),e.enabled&&this.show(),this._sendChatbarData()}},{key:"setPlaceholder",value:function(e){this.config||(this.config={}),this.config.placeholder=e,this._sendChatbarData()}},{key:"setQuickActions",value:function(e){this.config||(this.config={}),this.config.quickActions=e,this._sendChatbarData()}},{key:"sendAgentToolsUpdate",value:function(){this._postMessage({name:"chatbar-set-agent-tools",data:{tools:Jn.getInstance().getAgentTools()}})}},{key:"updateUIVisibility",value:function(){var e;er.getInstance().isOpened()?this.hide():null!==(e=this.config)&&void 0!==e&&e.enabled&&this.show()}},{key:"show",value:function(){this.manuallyHidden||(this.isHidden=!1,this._preloadIframe(),this.chatbarContainer&&(this.chatbarContainer.style.display="block"))}},{key:"hide",value:function(){this.isHidden=!0,this.chatbarContainer&&(this.chatbarContainer.style.display="none")}},{key:"_resolveAgentId",value:function(e){return e&&"default"!==e?e:"kai"}},{key:"_sendAgentCommand",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this._resolveAgentId(e);this.agentId=o,n.context&&(this.agentContext=n.context),this.manuallyHidden=!1;var i={agentId:this.agentId,context:this.agentContext,primaryColor:n.primaryColor||void 0,initialMessage:n.initialMessage||void 0},a=r?"chatbar-show-agent":"chatbar-set-agent";this._suppressOutsideClick=!0,setTimeout((function(){t._suppressOutsideClick=!1}),0),this.show(),this._postMessage({name:a,data:i})}},{key:"setAgent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._sendAgentCommand(e,t,!1)}},{key:"showWithAgent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._sendAgentCommand(e,t,!0)}},{key:"_preloadIframe",value:function(){var e=this;this.chatbarContainer||T((function(){return e._injectUI()}))}},{key:"_injectUI",value:function(){if(document.body&&!this.chatbarContainer){try{tn.getInstance().getFlowConfig()}catch(r){}var e=document.createElement("div");e.className="gleap-chatbar",e.style.cssText="\n position: fixed;\n bottom: 10px;\n z-index: 2147483000;\n border: 0;\n width: 280px;\n overflow: hidden;\n height: 80px;\n display: none;\n transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n left: 50%;\n transform: translateX(-50%);\n ";var t=document.createElement("iframe");t.src=this.chatbarUrl,t.className="gleap-chatbar-frame",t.title="Gleap AI Chatbar",t.setAttribute("role","dialog"),t.setAttribute("frameborder","0"),t.setAttribute("allow","autoplay; encrypted-media; microphone *;"),t.style.cssText="\n position: relative;\n width: 100%;\n height: 100%;\n border: 0;\n background: transparent;\n z-index: 1;\n ";var n=document.createElement("div");n.style.cssText="\n position: absolute;\n bottom: 70px;\n left: 20px;\n right: 20px;\n height: 0;\n display: none;\n backdrop-filter: blur(40px) saturate(180%);\n -webkit-backdrop-filter: blur(40px) saturate(180%);\n border-radius: 20px;\n pointer-events: none;\n z-index: 0;\n ",e.appendChild(n),e.appendChild(t),document.body.appendChild(e),this.chatbarContainer=e,this.chatbarFrame=t,this.blurBackdrop=n}}},{key:"destroy",value:function(){this.chatbarContainer&&document.body.contains(this.chatbarContainer)&&document.body.removeChild(this.chatbarContainer),this.chatbarContainer=null,this.chatbarFrame=null,this.config=null,this.agentId=null,this.agentContext=null,this.isHidden=!0,this.iframeReady=!1,this.pendingMessages=[],e.instance=null}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Hf(t.prototype,n),r&&Hf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Gf(e){return Gf="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},Gf(e)}function Vf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vf(Object(n),!0).forEach((function(t){Kf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xf(r.key),r)}}function Kf(e,t,n){return(t=Xf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xf(e){var t=function(e,t){if("object"!=Gf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Gf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Gf(t)?t:String(t)}zf(Wf,"instance",void 0);var Zf=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Kf(this,"bannerUrl","https://outboundmedia.gleap.io"),Kf(this,"bannerContainer",null),Kf(this,"bannerData",null),Kf(this,"disabled",!1),this.startCommunication()}var t,n,r;return t=e,r=[{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){var n;if(null!==(n=e.bannerUrl)&&void 0!==n&&n.includes(t.origin))try{var r,o,i,a,s,l,c,u,d,p,h,f=JSON.parse(t.data);if("BANNER"!==(null==f?void 0:f.type))return;if("banner-loaded"===f.name&&e.bannerData&&e.sendMessage({name:"banner-data",data:e.bannerData}),"banner-height"===f.name&&document.documentElement.style.setProperty("--gleap-margin-top",f.data.height+"px"),"banner-data-set"===f.name&&(document.body.classList.add("gleap-b-shown"),"floating"===(null===(r=e.bannerData)||void 0===r?void 0:r.format)&&document.body.classList.add("gleap-b-f")),"banner-close"===f.name&&e.removeBannerUI(),"start-conversation"===f.name&&bv.startBot(null===(o=f.data)||void 0===o?void 0:o.botId),"start-custom-action"===f.name&&bv.triggerCustomAction(null===(i=f.data)||void 0===i?void 0:i.action),"start-product-tour"===f.name&&bv.startProductTour(null===(a=f.data)||void 0===a?void 0:a.tourId,!0),"open-url"===f.name){var g=f.data,m=!!f.newTab;er.getInstance().urlHandler(g,m)}"show-form"===f.name&&bv.startFeedbackFlow(null===(s=f.data)||void 0===s?void 0:s.formId),"show-survey"===f.name&&bv.showSurvey(null===(l=f.data)||void 0===l?void 0:l.formId,null===(c=f.data)||void 0===c?void 0:c.surveyFormat),"show-news-article"===f.name&&bv.openNewsArticle(null===(u=f.data)||void 0===u?void 0:u.articleId),"show-help-article"===f.name&&bv.openHelpCenterArticle(null===(d=f.data)||void 0===d?void 0:d.articleId),"show-checklist"===f.name&&bv.startChecklist(null===(p=f.data)||void 0===p?void 0:p.checklistId,!0,null===(h=f.data)||void 0===h?void 0:h.sharedKey)}catch(v){}}))}},{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:"disable",value:function(){this.disabled=!0,this.removeBannerUI()}},{key:"injectBannerUI",value:function(e){if(!document.body)return!1;if(this.disabled)return!1;this.bannerContainer&&this.removeBannerUI(),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(Jf(Jf({},e),{},{type:"banner"})),"*")}catch(n){}}},{key:"showBanner",value:function(e){this.injectBannerUI(e)}}])&&Yf(t.prototype,n),r&&Yf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();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 Qf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qf(Object(n),!0).forEach((function(t){ng(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rg(r.key),r)}}function ng(e,t,n){return(t=rg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rg(e){var t=function(e,t){if("object"!=$f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=$f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$f(t)?t:String(t)}Kf(Zf,"instance",void 0);var og=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ng(this,"modalUrl","https://outboundmedia.gleap.io/modal"),ng(this,"modalContainer",null),ng(this,"modalData",null),ng(this,"modalBackdropClickListener",null),ng(this,"disabled",!1),this._listenForMessages()}var t,n,r;return t=e,r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setModalUrl",value:function(e){this.modalUrl=e}},{key:"disable",value:function(){this.disabled=!0,this.hideModal()}},{key:"_listenForMessages",value:function(){var e=this;window.addEventListener("message",(function(t){var n;if(null!==(n=e.modalUrl)&&void 0!==n&&n.includes(t.origin))try{var r,o,i,a,s,l,c,u,d,p,h=JSON.parse(t.data);if("MODAL"!==(null==h?void 0:h.type))return;if("modal-loaded"===h.name&&e.modalData){var f=tn.getInstance().getFlowConfig(),g=f.color?f.color:"#485BFF",m=f.backgroundColor?f.backgroundColor:"#FFFFFF";e._postMessage({name:"modal-data",data:eg(eg({},e.modalData),{},{primaryColor:g,backgroundColor:m})})}if("modal-height"===h.name){var v,y=null==h||null===(v=h.data)||void 0===v?void 0:v.height;if(y){var b=e.modalContainer.querySelector(".gleap-modal-frame");b&&(b.style.height="".concat(y,"px"))}}if(h.name,"modal-close"===h.name&&e.hideModal(),"start-conversation"===h.name&&bv.startBot(null===(r=h.data)||void 0===r?void 0:r.botId),"start-custom-action"===h.name&&bv.triggerCustomAction(null===(o=h.data)||void 0===o?void 0:o.action),"start-product-tour"===h.name&&bv.startProductTour(null===(i=h.data)||void 0===i?void 0:i.tourId,!0),"open-url"===h.name){var w=h.data,k=!!h.newTab;er.getInstance().urlHandler(w,k)}"show-form"===h.name&&bv.startFeedbackFlow(null===(a=h.data)||void 0===a?void 0:a.formId),"show-survey"===h.name&&bv.showSurvey(null===(s=h.data)||void 0===s?void 0:s.formId,null===(l=h.data)||void 0===l?void 0:l.surveyFormat),"show-news-article"===h.name&&bv.openNewsArticle(null===(c=h.data)||void 0===c?void 0:c.articleId),"show-help-article"===h.name&&bv.openHelpCenterArticle(null===(u=h.data)||void 0===u?void 0:u.articleId),"show-checklist"===h.name&&bv.startChecklist(null===(d=h.data)||void 0===d?void 0:d.checklistId,!0,null===(p=h.data)||void 0===p?void 0:p.sharedKey)}catch(x){}}))}},{key:"_injectModalUI",value:function(e){var t=this;if(!document.body)return!1;if(this.disabled)return!1;this.modalContainer&&this.hideModal(),this.modalData=e;var n=document.createElement("div");n.className="gleap-modal-wrapper",n.innerHTML='\n <div class="gleap-modal-backdrop"></div>\n <div class="gleap-modal">\n <iframe\n src="'.concat(this.modalUrl,'"\n class="gleap-modal-frame"\n scrolling="no"\n title="Gleap Modal"\n role="dialog"\n frameborder="0"\n allow="autoplay; encrypted-media; fullscreen; microphone *;"\n ></iframe>\n </div>\n '),document.body.appendChild(n),this.modalContainer=n,this.modalBackdropClickListener=this.modalContainer.querySelector(".gleap-modal-backdrop").addEventListener("click",(function(){var e,n;(null===(e=null===(n=t.modalData)||void 0===n?void 0:n.showCloseButton)||void 0===e||e)&&t.hideModal()})),document.body.classList.add("gleap-modal-open")}},{key:"_postMessage",value:function(e){try{var t=this.modalContainer.querySelector(".gleap-modal-frame");null!=t&&t.contentWindow&&t.contentWindow.postMessage(JSON.stringify(eg(eg({},e),{},{type:"modal"})),this.modalUrl)}catch(xv){}}},{key:"showModal",value:function(e){e&&e.config&&this._injectModalUI(e.config)}},{key:"hideModal",value:function(){this.modalContainer&&(this.modalBackdropClickListener&&this.modalContainer.querySelector(".gleap-modal-backdrop").removeEventListener("click",this.modalBackdropClickListener),document.body.removeChild(this.modalContainer),this.modalContainer=null,document.body.classList.remove("gleap-modal-open"))}}])&&tg(t.prototype,n),r&&tg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ig(e){return ig="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},ig(e)}function ag(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lg(r.key),r)}}function sg(e,t,n){return(t=lg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lg(e){var t=function(e,t){if("object"!=ig(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ig(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ig(t)?t:String(t)}ng(og,"instance",void 0);var cg=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,r;return t=e,r=[{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)&&ag(t.prototype,n),r&&ag(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ug(e){return ug="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},ug(e)}function dg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hg(r.key),r)}}function pg(e,t,n){return(t=hg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hg(e){var t=function(e,t){if("object"!=ug(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ug(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ug(t)?t:String(t)}sg(cg,"audio",void 0),sg(cg,"settings",{play:!0});var fg=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),pg(this,"tags",[])}var t,n,r;return t=e,r=[{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}}])&&dg(t.prototype,n),r&&dg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function gg(e){var t=e.getAttribute("id");return null!==t&&""!==t?t.match(/(?:^\d|:)/)?'[id="'.concat(t,'"]'):"#"+t:null}function mg(e){var t=function(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(" ")}}(e).filter(Boolean);return t.map((function(e){return".".concat(e)}))}function vg(e,t,n,r,o,i,a){if(i!==a)for(var s=r;s<=o&&o-s+1>=a-i;++s)n[i]=t[s],vg(e,t,n,s+1,o,i+1,a);else e.push(n.slice(0,i).join(""))}function yg(e){return function(e){if(Array.isArray(e))return bg(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 bg(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 bg(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 bg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wg(e){return wg="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},wg(e)}function kg(e){return"object"===("undefined"==typeof HTMLElement?"undefined":wg(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===wg(e)&&1===e.nodeType&&"string"==typeof e.nodeName}function xg(e){var t,n,r=0,o=e.parentNode;if(Boolean(o)){var i=o.childNodes,a=i.length;for(t=0;t<a;t++)if(kg(n=i[t])&&(r++,n===e))return":nth-child(".concat(r,")")}return null}function Sg(e){return e.tagName.toLowerCase().replace(/:/g,"\\:")}function Cg(e,t){if(!Boolean(t))return!1;var n=e.ownerDocument.querySelectorAll(t);return 1===n.length&&n[0]===e}function Ig(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 Eg(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 Eg(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 Eg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Og(e,t,n){var r={Tag:Sg,NthChild:xg,Attributes:function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["id","class","length"];return yg(e.attributes).reduce((function(e,n){return t.indexOf(n.nodeName)>-1||e.push("[".concat(n.nodeName,'="').concat(n.value,'"]')),e}),[])}(e,n)},Class:mg,ID:gg};return t.reduce((function(t,n){return t[n]=r[n](e),t}),{})}function Tg(e,t){try{var n=e.parentNode.querySelectorAll(t);return 1===n.length&&n[0]===e}catch(r){return!1}}function Lg(e,t){return t.find(Tg.bind(null,e))}function Ag(e,t,n){var r=function(e,t){for(var n=[],r=e.length,o=[],i=1;i<=t;++i)vg(n,e,o,0,r-1,0,i);return n}(t,3),o=Lg(e,r);return Boolean(o)||Boolean(n)&&(o=Lg(e,r=r.map((function(e){return n+e}))),Boolean(o))?o:null}function Mg(e,t,n,r){var o,i=Og(e,t,n);r&&r instanceof RegExp&&(i.ID=r.test(i.ID)?null:i.ID,i.Class=i.Class.filter((function(e){return!r.test(e)})));var a,s=Ig(t);try{for(s.s();!(a=s.n()).done;){var l=a.value,c=i.ID,u=i.Tag,d=i.Class,p=i.Attributes,h=i.NthChild;switch(l){case"ID":if(Boolean(c)&&Tg(e,c))return c;break;case"Tag":if(Boolean(u)&&Tg(e,u))return u;break;case"Class":if(Boolean(d)&&d.length&&(o=Ag(e,d,u)))return o;break;case"Attributes":if(Boolean(p)&&p.length&&(o=Ag(e,p,u)))return o;break;case"NthChild":if(Boolean(h))return h}}}catch(xv){s.e(xv)}finally{s.f()}return"*"}function Pg(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.selectorTypes,o=void 0===r?["ID","Class","Tag","NthChild"]:r,i=n.attributesToIgnore,a=void 0===i?["id","class","length"]:i,s=n.excludeRegex,l=void 0===s?null:s,c=[],u=function(e){for(var t=[],n=e;kg(n);)t.push(n),n=n.parentNode;return t}(e),d=Ig(u);try{for(d.s();!(t=d.n()).done;){var p=Mg(t.value,o,a,l);Boolean(p)&&c.push(p)}}catch(xv){d.e(xv)}finally{d.f()}for(var h=[],f=0,g=c;f<g.length;f++){var m=g[f];h.unshift(m);var v=h.join(" > ");if(Cg(e,v))return v}return null}function Rg(e){return Rg="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},Rg(e)}function Ng(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jg(r.key),r)}}function Dg(e,t,n){return t&&_g(e.prototype,t),n&&_g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jg(e){var t=function(e,t){if("object"!=Rg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Rg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Rg(t)?t:String(t)}pg(fg,"instance",void 0);var Fg=function(){function e(t){Ng(this,e),this.overlay=document.createElement("div"),this.overlay.className=t.className||"_ext-element-overlay",this.overlay.style.background=t.style&&t.style.background||"rgba(250, 240, 202, 0.2)",this.overlay.style.borderColor=t.style&&t.style.borderColor||"#F95738",this.overlay.style.borderStyle=t.style&&t.style.borderStyle||"solid",this.overlay.style.borderRadius=t.style&&t.style.borderRadius||"1px",this.overlay.style.borderWidth=t.style&&t.style.borderWidth||"1px",this.overlay.style.boxSizing=t.style&&t.style.boxSizing||"border-box",this.overlay.style.cursor=t.style&&t.style.cursor||"crosshair",this.overlay.style.position=t.style&&t.style.position||"absolute",this.overlay.style.zIndex=t.style&&t.style.zIndex||"2147483647",this.overlay.style.margin=t.style&&t.style.margin||"0px",this.overlay.style.padding=t.style&&t.style.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"})}return Dg(e,[{key:"addToDOM",value:function(e,t){this.usingShadowDOM=t,t?(e.insertBefore(this.shadowContainer,e.firstChild),this.shadowRoot.appendChild(this.overlay)):e.appendChild(this.overlay)}},{key:"removeFromDOM",value:function(){this.setBounds({x:0,y:0,width:0,height:0}),this.overlay.remove?this.overlay.remove():this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay),this.usingShadowDOM&&(this.shadowContainer.remove?this.shadowContainer.remove():this.shadowContainer.parentNode&&this.shadowContainer.parentNode.removeChild(this.shadowContainer))}},{key:"captureCursor",value:function(){this.overlay.style.pointerEvents="auto"}},{key:"ignoreCursor",value:function(){this.overlay.style.pointerEvents="none"}},{key:"setBounds",value:function(e){var t=e.x,n=e.y,r=e.width,o=e.height;this.overlay.style.left=t+"px",this.overlay.style.top=n+"px",this.overlay.style.width=r+"px",this.overlay.style.height=o+"px"}}]),e}(),Bg=function(){function e(t){Ng(this,e),this.active=!1,this.overlay=new Fg(t||{}),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleClick=this.handleClick.bind(this),this.tick=this.tick.bind(this)}return Dg(e,[{key:"start",value:function(e){if(this.active)return!1;this.active=!0,this.options=e,document.addEventListener("mousemove",this.handleMouseMove,!0),document.addEventListener("click",this.handleClick,!0);var t=e.parentElement||document.body,n=void 0===e.useShadowDOM||e.useShadowDOM;return this.overlay.addToDOM(t,n),this.tick(),!0}},{key:"stop",value:function(){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)}},{key:"handleMouseMove",value:function(e){this.mouseX=e.clientX,this.mouseY=e.clientY}},{key:"handleClick",value:function(e){var t=document.elementFromPoint(e.clientX,e.clientY);this.options&&this.options.elementFilter&&t&&!this.options.elementFilter(t)||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.target&&this.options&&this.options.onClick&&this.options.onClick(this.target))}},{key:"tick",value:function(){this.updateTarget(),this.tickReq=window.requestAnimationFrame(this.tick)}},{key:"updateTarget",value:function(){if(void 0!==this.mouseX&&void 0!==this.mouseY){this.overlay.ignoreCursor();var e=document.elementFromPoint(this.mouseX,this.mouseY);if(this.overlay.captureCursor(),e&&e!==this.target){if(this.options&&this.options.elementFilter&&!this.options.elementFilter(e))return this.target=void 0,void this.overlay.setBounds({x:0,y:0,width:0,height:0});this.target=e;var t,n,r=(n=(t=e).getBoundingClientRect(),{x:window.pageXOffset+n.left,y:window.pageYOffset+n.top,width:t.offsetWidth,height:t.offsetHeight});this.overlay.setBounds(r),this.options&&this.options.onHover&&this.options.onHover(e)}}}}]),e}();const Ug=Bg;function Hg(e){return Hg="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},Hg(e)}function zg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gg(r.key),r)}}function qg(e,t,n){return t&&zg(e.prototype,t),n&&zg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wg(e,t,n){return(t=Gg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gg(e){var t=function(e,t){if("object"!=Hg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Hg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hg(t)?t:String(t)}const Vg=qg((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Wg(this,"picker",null),Wg(this,"onElementPicked",null),Wg(this,"stopPicker",(function(){if(t.picker)return t.picker.stop(),void(t.picker=null)})),Wg(this,"startPicker",(function(){t.stopPicker();var e=t;t.picker=new Ug({style:{borderColor:"#2142E7",background:"transparent",borderWidth:"4px",borderRadius:"5px"}}),t.picker.start({useShadowDOM:!1,onClick:function(t){try{var n,r=t.getAttribute("data-gleap-tour");n=r?'[data-gleap-tour="'.concat(r,'"]'):Pg(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")}})})),Wg(this,"setMode",(function(e){t.mode=e,"navigate"===e&&t.stopPicker(),"picker"===e&&t.startPicker()}))}));function Jg(e){return Jg="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},Jg(e)}function Yg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yg(Object(n),!0).forEach((function(t){Zg(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$g(r.key),r)}}function Zg(e,t,n){return(t=$g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $g(e){var t=function(e,t){if("object"!=Jg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Jg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jg(t)?t:String(t)}var Qg=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),Zg(this,"libraryInstance",null),Zg(this,"lastUrl",void 0),Zg(this,"injectedFrame",!1),Zg(this,"gleapFrameContainer",null),Zg(this,"gleapCollapseUI",null),Zg(this,"injectedCollapseUI",!1),Zg(this,"gleapFrame",null),Zg(this,"configData",null),Zg(this,"adminHelper",null),Zg(this,"status","navigate"),Zg(this,"initialized",!1),Zg(this,"toggleCollapseUI",(function(){var e="gleap-admin-collapse-ui-active",n="gleap-admin-frame-container-active",r=function(e,t){return e&&e.classList.contains(t)};(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])||r(t.gleapCollapseUI,e)&&r(t.gleapFrameContainer,n))&&(t.gleapCollapseUI&&t.gleapCollapseUI.classList.toggle(e),t.gleapFrameContainer&&t.gleapFrameContainer.classList.toggle(n))})),Zg(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(e){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t.toggleCollapseUI()}))}})),Zg(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,r;return t=e,r=[{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;this.initialized=!0,Om.getInstance().disable(),Zf.getInstance().disable(),og.getInstance().disable(),bv.close(),bv.showFeedbackButton(!1),e.adminHelper=new Vg;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("https://app.gleap.io"===n.origin)try{var r=JSON.parse(n.data);if("admin"===r.type&&("load"===r.name&&(t.configData=r.data,t.initAdminHelper()),"smartlink-search-result"===r.name&&e.sendMessageToTourBuilder({name:"smartlink-search-result",data:r.data}),"translate-complete"===r.name&&e.sendMessageToTourBuilder({name:"translate-complete",data:r.data})),"tourbuilder"===r.type){var o;if("loaddata"===r.name&&e.sendMessageToTourBuilder({name:"data",data:Kg(Kg({},t.configData),{},{currentPage:window.location.href})}),"highlight-element"===r.name&&(document.querySelectorAll(".gleap-admin-highlight").forEach((function(e){e.classList.remove("gleap-admin-highlight")})),null!=r&&null!==(o=r.data)&&void 0!==o&&o.selector)){var i,a=document.querySelector(null==r||null===(i=r.data)||void 0===i?void 0:i.selector);a&&a.classList.add("gleap-admin-highlight")}if("smartlink-search"===r.name&&e.sendMessage({name:"smartlink-search",data:r.data}),"product-tour-started"===r.name&&e.sendMessage({name:"product-tour-started",data:r.data}),"translate"===r.name&&e.sendMessage({name:"translate",data:r.data}),"save"===r.name&&e.sendMessage({name:"save",data:r.data}),"update-steps"===r.name&&e.sendMessage({name:"update-steps",data:r.data}),"click"===r.name)try{document.querySelector(r.data.selector).click()}catch(s){console.log(s)}"status-changed"===r.name&&(t.status=r.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(Kg(Kg({},e),{},{type:"admin"})),"*")}catch(t){}}},{key:"sendMessageToTourBuilder",value:function(e){try{this.gleapFrame&&this.gleapFrame.contentWindow&&this.gleapFrame.contentWindow.postMessage(JSON.stringify(Kg(Kg({},e),{},{type:"tourbuilder"})),"*")}catch(t){}}}])&&Xg(t.prototype,n),r&&Xg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function em(e){return em="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},em(e)}function tm(e){return function(e){if(Array.isArray(e))return nm(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 nm(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 nm(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 nm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function om(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rm(Object(n),!0).forEach((function(t){im(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function im(e,t,n){return t=function(e){var t=function(e,t){if("object"!=em(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=em(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==em(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Zg(Qg,"instance",void 0);var am=function(){var e={};function t(){e=om({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 r(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function o(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),r=Array.from(e.querySelectorAll(t));return[].concat(tm(n?[e]:[]),r)})).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 h(e){var t;null==(t=d[e])||t.call(d)}function f(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,r=window.innerHeight,o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.classList.add("gleap-tour-overlay","gleap-tour-overlay-animated"),o.setAttribute("viewBox","0 0 ".concat(t," ").concat(r)),o.setAttribute("xmlSpace","preserve"),o.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),o.setAttribute("version","1.1"),o.setAttribute("preserveAspectRatio","xMinYMin slice"),o.style.fillRule="evenodd",o.style.clipRule="evenodd",o.style.strokeLinejoin="round",o.style.strokeMiterlimit="2",o.style.zIndex="10000",o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="100%",o.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",o.appendChild(i),o}(e);document.body.appendChild(t),S(t,(function(e){"path"===e.target.tagName&&h("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,r=window.innerHeight,o=n("stagePadding")||0,i=n("stageRadius")||0,a=e.width+2*o,s=e.height+2*o,l=Math.min(i,a/2,s/2),c=Math.floor(Math.max(l,0)),u=e.x-o+c,d=e.y-o,p=a-2*c,h=s-2*c;return"M".concat(t,",0L0,0L0,").concat(r,"L").concat(t,",").concat(r,"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(h," 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(h," a").concat(c,",").concat(c," 0 0 1 ").concat(c,",-").concat(c," z")}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,o=e.element,a=o;if("string"==typeof a)try{a=document.querySelector(o)}catch(u){var s=o.replace(/(#[^#\s]+)/g,(function(e){return e.replace(/:/g,"\\:")}));a=document.querySelector(s)}if(o&&!a&&t>=0)setTimeout((function(){C(),y(e,t-100)}),100);else{if(!a&&("INPUT"===e.mode||"CLICK"===e.mode))return n("onElementNotFound")(e);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 o,a,s=400,u=Date.now(),d=c("__activeStep"),p=c("__activeElement")||e,h=!p||p===e,g="gleap-tour-dummy-element"===e.id,v="gleap-tour-dummy-element"===p.id,y=n("animate"),b=t.onHighlightStarted||n("onHighlightStarted"),w=(null==t?void 0:t.onHighlighted)||n("onHighlighted"),k=(null==d?void 0:d.onDeselected)||n("onDeselected"),x=n(),S=c();!h&&k&&k(v?void 0:p,d,{config:x,state:S});b&&b(g?void 0:e,t,{config:x,state:S});var E=!h&&y,O=!1;C(),l("previousStep",d),l("previousElement",p),l("activeStep",t),l("activeElement",e);var T=function o(){if(c("__transitionCallback")===o){var i=Date.now()-u,a=s-i<=s/2;t.popover&&a&&!O&&E&&(I(e,t),O=!0),n("animate")&&i<s?function(e,t,n,o){var i=c("__activeStagePosition"),a=i||n.getBoundingClientRect(),s=o.getBoundingClientRect();m(i={x:r(e,a.x,s.x-a.x,t),y:r(e,a.y,s.y-a.y,t),width:r(e,a.width,s.width-a.width,t),height:r(e,a.height,s.height-a.height,t)}),l("__activeStagePosition",i)}(i,s,p,e):(f(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(o)}};l("__transitionCallback",T),window.requestAnimationFrame(T),i(e),!E&&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!==(o=null!==(a=t.disableActiveInteraction)&&void 0!==a?a:n("disableActiveInteraction"))&&void 0!==o&&o&&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 b(){var e=c("__activeElement"),t=c("__activeStep");if(e&&t){if(!document.body.contains(e)&&t.element&&"string"==typeof t.element)try{var n=document.querySelector(t.element);if(!n){var r=t.element.replace(/(#[^#\s]+)/g,(function(e){return e.replace(/:/g,"\\:")}));n=document.querySelector(r)}n&&(e=n,l("__activeElement",n),l("activeElement",n),n.classList.add("gleap-tour-active-element"))}catch(o){}f(e),function(){var e=c("__activeStagePosition"),t=c("__overlaySvg");if(e)if(t){var n=window.innerWidth,r=window.innerHeight;t.setAttribute("viewBox","0 0 ".concat(n," ").concat(r))}else console.warn("No stage svg found.")}(),L(e,t)}}function w(){var e=c("__resizeTimeout");e&&window.cancelAnimationFrame(e),l("__resizeTimeout",window.requestAnimationFrame(b))}function k(e){var t;if(c("isInitialized")&&("Tab"===e.key||9===e.keyCode)){var n=c("__activeElement"),r=null==(t=c("popover"))?void 0:t.wrapper,i=o([].concat(tm(r?[r]:[]),tm(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 x(e){var t;(null==(t=n("allowKeyboardControl"))||t)&&("Escape"===e.key?h("escapePress"):"ArrowRight"===e.key?h("arrowRightPress"):"ArrowLeft"===e.key&&h("arrowLeftPress"))}function S(e,t,n){var r=function(t,r){var o=t.target;e.contains(o)&&(n&&!n(o)||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()),null==r||r(t))},o=!0;document.addEventListener("pointerdown",r,o),document.addEventListener("mousedown",r,o),document.addEventListener("pointerup",r,o),document.addEventListener("mouseup",r,o),document.addEventListener("click",(function(e){r(e,t)}),o)}function C(){var e=c("popover");e&&(e.wrapper.style.display="none")}function I(e,t){var r,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 r=document.createElement("div");r.id="gleap-tour-popover-description",r.classList.add("gleap-tour-popover-description"),r.style.display="none",r.innerText="Popover description is here";var o=document.createElement("button");o.type="button",o.classList.add("gleap-tour-popover-close-btn"),o.setAttribute("aria-label","Close"),o.innerHTML="×";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="← Previous";var c=document.createElement("button");return c.type="button",c.classList.add("gleap-tour-popover-next-btn"),c.innerHTML="Next →",s.appendChild(l),s.appendChild(c),i.appendChild(a),i.appendChild(s),e.appendChild(o),e.appendChild(t),e.appendChild(n),e.appendChild(r),e.appendChild(i),{wrapper:e,arrow:t,title:n,description:r,footer:i,previousButton:l,nextButton:c,closeButton:o,footerButtons:s,progress:a}}(),document.body.appendChild(s.wrapper);var u=t.popover||{},d=u.title,p=u.description,f=u.showButtons,g=u.disableButtons,m=u.showProgress,v=u.nextBtnText,y=void 0===v?n("nextBtnText")||"Next":v,b=u.prevBtnText,w=void 0===b?n("prevBtnText")||"Previous":b,k=u.progressText,x=void 0===k?n("progressText")||"{current} of {total}":k;s.nextButton.innerHTML=y,s.previousButton.innerHTML=w,s.progress.innerHTML=x,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=f||n("showButtons"),I=m||n("showProgress")||!1,E=(null==C?void 0:C.includes("next"))||(null==C?void 0:C.includes("previous"))||I;s.closeButton.style.display=C.includes("close")?"block":"none",E?(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 O=g||n("disableButtons")||[];(null==O?void 0:O.includes("next"))&&(s.nextButton.disabled=!0,s.nextButton.classList.add("gleap-tour-popover-btn-disabled")),(null==O?void 0:O.includes("previous"))&&(s.previousButton.disabled=!0,s.previousButton.classList.add("gleap-tour-popover-btn-disabled")),(null==O?void 0:O.includes("close"))&&(s.closeButton.disabled=!0,s.closeButton.classList.add("gleap-tour-popover-btn-disabled"));var T=s.wrapper;T.style.display="block",T.style.left="",T.style.top="",T.style.bottom="",T.style.right="",T.id="gleap-tour-popover-content",T.setAttribute("role","dialog"),T.setAttribute("aria-labelledby","gleap-tour-popover-title"),T.setAttribute("aria-describedby","gleap-tour-popover-description"),s.arrow.className="gleap-tour-popover-arrow";var A=(null==(r=t.popover)?void 0:r.popoverClass)||n("popoverClass")||"";T.className="gleap-tour-popover ".concat(A).trim(),S(s.wrapper,(function(r){var o,i,a,s=r.target,l=(null==(o=t.popover)?void 0:o.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()}):h("nextClick"):s.classList.contains("gleap-tour-popover-prev-btn")?u?u(e,t,{config:n(),state:c()}):h("prevClick"):s.classList.contains("gleap-tour-popover-close-btn")?d?d(e,t,{config:n(),state:c()}):h("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 M=(null==(a=t.popover)?void 0:a.onPopoverRender)||n("onPopoverRender");M&&M(s,{config:n(),state:c()}),L(e,t),i(T);var P=e.classList.contains("gleap-tour-dummy-element"),R=o([T].concat(tm(P?[]:[e])));R.length>0&&R[0].focus()}function E(){var e=c("popover");if(null==e?void 0:e.wrapper){var t=e.wrapper.getBoundingClientRect(),r=n("stagePadding")||0,o=n("popoverOffset")||0;return{width:t.width+r+o,height:t.height+r+o,realWidth:t.width,realHeight:t.height}}}function O(e,t){var n=t.elementDimensions,r=t.popoverDimensions,o=t.popoverPadding,i=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.top-o,window.innerHeight-r.realHeight-i.width),i.width):"end"===e?Math.max(Math.min(n.top-(null==r?void 0:r.realHeight)+n.height+o,window.innerHeight-(null==r?void 0:r.realHeight)-i.width),i.width):"center"===e?Math.max(Math.min(n.top+n.height/2-(null==r?void 0:r.realHeight)/2,window.innerHeight-(null==r?void 0:r.realHeight)-i.width),i.width):0}function T(e,t){var n=t.elementDimensions,r=t.popoverDimensions,o=t.popoverPadding,i=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.left-o,window.innerWidth-r.realWidth-i.width),i.width):"end"===e?Math.max(Math.min(n.left-(null==r?void 0:r.realWidth)+n.width+o,window.innerWidth-(null==r?void 0:r.realWidth)-i.width),i.width):"center"===e?Math.max(Math.min(n.left+n.width/2-(null==r?void 0:r.realWidth)/2,window.innerWidth-(null==r?void 0:r.realWidth)-i.width),i.width):0}function L(e,t){var r=c("popover");if(r){var o=(null==t?void 0:t.popover)||{},i=o.align,a=void 0===i?"start":i,s=o.side,l=void 0===s?"left":s,u=a,d="gleap-tour-dummy-element"===e.id?"over":l,p=n("stagePadding")||0,h=E(),f=r.arrow.getBoundingClientRect(),g=e.getBoundingClientRect(),m=g.top-h.height,v=m>=0,y=window.innerHeight-(g.bottom+h.height),b=y>=0,w=g.left-h.width,k=w>=0,x=window.innerWidth-(g.right+h.width),S=x>=0,C=!(v||b||k||S),I=d;if("top"===d&&v?S=k=b=!1:"bottom"===d&&b?S=k=v=!1:"left"===d&&k?S=v=b=!1:"right"===d&&S&&(k=v=b=!1),"over"===d){var L=window.innerWidth/2-h.realWidth/2,A=window.innerHeight/2-h.realHeight/2;r.wrapper.style.left="".concat(L,"px"),r.wrapper.style.right="auto",r.wrapper.style.top="".concat(A,"px"),r.wrapper.style.bottom="auto"}else if(C){var M=window.innerWidth/2-(null==h?void 0:h.realWidth)/2;r.wrapper.style.left="".concat(M,"px"),r.wrapper.style.right="auto",r.wrapper.style.bottom="".concat(10,"px"),r.wrapper.style.top="auto"}else if(k){var P=Math.min(w,window.innerWidth-(null==h?void 0:h.realWidth)-f.width),R=O(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});r.wrapper.style.left="".concat(P,"px"),r.wrapper.style.top="".concat(R,"px"),r.wrapper.style.bottom="auto",r.wrapper.style.right="auto",I="left"}else if(S){var N=Math.min(x,window.innerWidth-(null==h?void 0:h.realWidth)-f.width),_=O(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});r.wrapper.style.right="".concat(N,"px"),r.wrapper.style.top="".concat(_,"px"),r.wrapper.style.bottom="auto",r.wrapper.style.left="auto",I="right"}else if(v){var D=Math.min(m,window.innerHeight-h.realHeight-f.width),j=T(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});r.wrapper.style.top="".concat(D,"px"),r.wrapper.style.left="".concat(j,"px"),r.wrapper.style.bottom="auto",r.wrapper.style.right="auto",I="top"}else if(b){var F=Math.min(y,window.innerHeight-(null==h?void 0:h.realHeight)-f.width),B=T(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});r.wrapper.style.left="".concat(B,"px"),r.wrapper.style.bottom="".concat(F,"px"),r.wrapper.style.top="auto",r.wrapper.style.right="auto",I="bottom"}C?r.arrow.classList.add("gleap-tour-popover-arrow-none"):function(e,t,n){var r=c("popover");if(!r)return;var o=n.getBoundingClientRect(),i=E(),a=r.arrow,s=i.width,l=window.innerWidth,u=o.width,d=o.left,p=i.height,h=window.innerHeight,f=o.top,g=o.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?(f+g<=0?(m="bottom",v="end"):f+g-p<=0&&(m="left",v="start"),f>=h?(m="top",v="end"):f+p>=h&&(m="left",v="end")):"right"===t&&(f+g<=0?(m="bottom",v="start"):f+g-p<=0&&(m="right",v="start"),f>=h?(m="top",v="start"):f+p>=h&&(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")&&f()}function r(){var e=c("activeIndex"),t=n("steps")||[];if(void 0!==e){var r=e+1;t[r]?h(r):f()}}function o(){var e=c("activeIndex"),t=n("steps")||[];if(void 0!==e){var r=e-1;t[r]?h(r):f()}}function i(){var e;if(!c("__transitionCallback")){var t=c("activeIndex"),r=c("__activeStep"),i=c("__activeElement");if("CLICK"!==r.mode)if(void 0!==t&&void 0!==r)if(void 0!==c("activeIndex")){var a=(null==(e=r.popover)?void 0:e.onPrevClick)||n("onPrevClick");if(a)return a(i,r,{config:n(),state:c()});o()}}}function a(){var e;if(!c("__transitionCallback")){var t=c("activeIndex"),o=c("__activeStep"),i=c("__activeElement");if("CLICK"!==o.mode&&void 0!==t&&void 0!==o){var a=(null==(e=o.popover)?void 0:e.onNextClick)||n("onNextClick");if(a)return a(i,o,{config:n(),state:c()});r()}}}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",x,!1),window.addEventListener("keydown",k,!1),window.addEventListener("resize",w),window.addEventListener("scroll",w),l("__positionInterval",setInterval((function(){c("isInitialized")&&w()}),1e3)),p("overlayClick",e),p("escapePress",e),p("arrowLeftPress",i),p("arrowRightPress",a))}function h(){var e,t,r,o,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 f();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",b=n("allowClose"),w=void 0!==(null==(t=p.popover)?void 0:t.showProgress)?null==(r=p.popover)?void 0:r.showProgress:n("showProgress"),k=((null==(o=p.popover)?void 0:o.progressText)||n("progressText")||"{{current}} of {{total}}").replace("{{current}}","".concat(u+1)).replace("{{total}}","".concat(d.length)),x=(null==(i=p.popover)?void 0:i.showButtons)||n("showButtons"),S=["next","previous"].concat(tm(b?["close"]:[])).filter((function(e){return!(null==x?void 0:x.length)||x.includes(e)})),C=(null==(a=p.popover)?void 0:a.onNextClick)||n("onNextClick"),I=(null==(s=p.popover)?void 0:s.onPrevClick)||n("onPrevClick"),E=(null==(c=p.popover)?void 0:c.onCloseClick)||n("onCloseClick");y(om(om({},p),{},{popover:om({showButtons:S,nextBtnText:g?void 0:v,disableButtons:tm(m?[]:["previous"]),showProgress:w,progressText:k,onNextClick:C||function(){g?h(u+1):f()},onPrevClick:I||function(){h(u-1)},onCloseClick:E||function(){f()}},(null==p?void 0:p.popover)||{})}))}else f()}function f(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=c("__activeElement"),r=c("__activeStep"),o=c("__activeOnDestroyed"),i=n("onDestroyStarted");if(e&&i){i(!t||"gleap-tour-dummy-element"===(null==t?void 0:t.id)?void 0:t,r,{config:n(),state:c()})}else{var a,s=(null==r?void 0:r.onDeselected)||n("onDeselected"),l=n("onDestroyed");if(document.body.classList.remove("gleap-tour-active","gleap-tour-fade","gleap-tour-simple"),function(){window.removeEventListener("keyup",x),window.removeEventListener("resize",w),window.removeEventListener("scroll",w);var e=c("__positionInterval");e&&clearInterval(e)}(),function(){var e,t=c("popover");t&&(null==(e=t.wrapper.parentElement)||e.removeChild(t.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")}))}(),(a=c("__overlaySvg"))&&a.remove(),d={},u(),t&&r){var p="gleap-tour-dummy-element"===t.id;s&&s(p?void 0:t,r,{config:n(),state:c()}),l&&l(p?void 0:t,r,{config:n(),state:c()})}o&&o.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(),h(e)},setConfig:t,setSteps:function(e){u(),t(om(om({},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:r,movePrevious:o,moveTo:function(e){(n("steps")||[])[e]?h(e):f()},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(),y(om(om({},e),{},{popover:e.popover?om({showButtons:[],showProgress:!1,progressText:""},e.popover):void 0}))},destroy:function(){f(!1)}}}}();const sm=am;function lm(e){return lm="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},lm(e)}function cm(){cm=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==lm(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(lm(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function um(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pm(r.key),r)}}function dm(e,t,n){return(t=pm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pm(e){var t=function(e,t){if("object"!=lm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lm(t)?t:String(t)}function hm(e,t,n,r,o,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(r,o)}var fm="gleap-tour-data",gm="copilot-pointer-container",mm="copilot-tour-styles",vm="copilot-joined-container";function ym(){var e;return e=cm().mark((function e(){var t;return cm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!=typeof window){e.next=2;break}return e.abrupt("return");case 2:return t=new Audio("data:audio/wav;base64,UklGRigAAABXQVZFZm10IBAAAAABAAEARKwAABCxAgAEABAAZGF0YQAAAAA="),e.prev=3,e.next=6,t.play();case 6:return e.abrupt("return",!0);case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e,null,[[3,9]])})),ym=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){hm(i,r,o,a,s,"next",e)}function s(e){hm(i,r,o,a,s,"throw",e)}a(void 0)}))},ym.apply(this,arguments)}var bm=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),dm(this,"productTourData",void 0),dm(this,"productTourId",void 0),dm(this,"currentActiveIndex",void 0),dm(this,"lastArrowPositionX",void 0),dm(this,"lastArrowPositionY",void 0),dm(this,"onCompleteCallback",void 0),dm(this,"audioMuted",!1),dm(this,"currentAudio",void 0),dm(this,"_pointerContainer",null),dm(this,"_scrollListeners",[]),dm(this,"_currentAnchor",null),dm(this,"_currentStep",null),dm(this,"_scrollDebounceTimer",null);var t=this;"undefined"!=typeof window&&(this._scrollListeners=[],this._currentAnchor=null,this._currentStep=null,this._scrollDebounceTimer=null,window.addEventListener("resize",(function(){if(t.productTourId&&t.currentActiveIndex>=0&&t.productTourData&&t.productTourData.steps){var e=t.productTourData.steps[t.currentActiveIndex];e&&e.selector&&""!==e.selector&&t.updatePointerPosition(document.querySelector(e.selector),e)}})))}var t,n,r;return t=e,n=[{key:"disable",value:function(){this.disabled=!0,this.cleanup()}},{key:"startWithConfig",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;"undefined"!=typeof window&&(this.productTourId||this.disabled||(this.productTourId=e,this.productTourData=t,this.currentActiveIndex=0,this.onCompleteCallback=n,this.start()))}},{key:"storeUncompletedTour",value:function(){if("undefined"!=typeof window)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(fm,JSON.stringify(e))}catch(t){}else localStorage.removeItem(fm)}},{key:"attachScrollListeners",value:function(e,t){var n=this;if("undefined"!=typeof window&&e){var r=function(e){if("undefined"!=typeof window){for(var t=[],n=e.parentElement;n;){var r=window.getComputedStyle(n);("auto"===r.overflowY||"scroll"===r.overflowY)&&n.scrollHeight>n.clientHeight&&t.push(n),n=n.parentElement}return t}}(e);r.push(window),r.forEach((function(r){var o=function(){clearTimeout(n._scrollDebounceTimer),n._scrollDebounceTimer=setTimeout((function(){n.updatePointerPosition(e,t)}),150)};r.addEventListener("scroll",o,{passive:!0}),n._scrollListeners.push({el:r,handler:o})}))}}},{key:"removeScrollListeners",value:function(){"undefined"!=typeof window&&(this._scrollListeners&&this._scrollListeners.length>0&&(this._scrollListeners.forEach((function(e){var t=e.el,n=e.handler;t.removeEventListener("scroll",n)})),this._scrollListeners=[]),this._scrollDebounceTimer&&(clearTimeout(this._scrollDebounceTimer),this._scrollDebounceTimer=null))}},{key:"updatePointerPosition",value:function(e,t){var n,r=this;if("undefined"!=typeof window)try{var o=this._pointerContainer||document.getElementById(gm);if(!o)return;if(!e)return o.style.position="fixed",o.style.left="50%",o.style.top="50%",o.style.transform="translate(-50%, -50%)",function(e){if("undefined"!=typeof window){var t=e-window.innerHeight/2;window.scrollTo({top:t,behavior:"smooth"})}}(window.innerHeight/2),this.removeScrollListeners(),this._currentAnchor=null,void(this._currentStep=null);n=e,"undefined"!=typeof window&&n&&n.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});var i=0;!function n(){if(function(e){if("undefined"!=typeof window){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}}(e)||i>=20){var a=e.getBoundingClientRect(),s=a.left+a.width/2,l=a.top+a.height/2+10;o.style.position="fixed",o.style.left="".concat(s,"px"),o.style.top="".concat(l,"px"),o.style.transform="translate(-50%, -50%)";var c=350;c>window.innerWidth-40&&(c=window.innerWidth-40),s+c>window.innerWidth-20?o.classList.add("copilot-pointer-container-right"):o.classList.remove("copilot-pointer-container-right"),r._currentAnchor===e&&r._currentStep===t||(r.removeScrollListeners(),r._currentAnchor=e,r._currentStep=t,r.attachScrollListeners(e,t))}else i++,setTimeout(n,100)}()}catch(a){}}},{key:"cleanup",value:function(){var e=this;"undefined"!=typeof window&&(document.body.classList.add("gl-copilot-fade-out"),this.currentAudio&&this.currentAudio.pause(),setTimeout((function(){if(e._pointerContainer)e._pointerContainer.remove(),e._pointerContainer=null;else{var t=document.getElementById(gm);t&&t.remove()}var n=document.getElementById(vm);n&&n.remove();var r=document.getElementById(mm);r&&r.remove(),document.body.classList.remove("gl-copilot-fade-out")}),800),this.productTourId=void 0,this.productTourData=void 0,this.removeScrollListeners())}},{key:"toggleAudio",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.audioMuted=e,this.currentAudio&&(this.currentAudio.muted=this.audioMuted),document.querySelector(".".concat(vm,"-mute")).innerHTML=p(this.audioMuted?"unmute":"mute")}},{key:"setupCopilotTour",value:function(){var e,t,n,r,o,i,a=this;if("undefined"!=typeof window){var s,l,c=null!==(e=null===(t=tn.getInstance().flowConfig)||void 0===t?void 0:t.color)&&void 0!==e?e:"#485BFF",u=d(c),h=document.getElementById(mm);h||((h=document.createElement("style")).id=mm,h.type="text/css",h.textContent="\n #".concat(gm," {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n align-items: flex-start;\n pointer-events: none;\n z-index: 2147483610;\n transition: all 0.5s ease;\n }\n .").concat(gm,"-clickmode {\n cursor: pointer;\n pointer-events: all !important;\n }\n .").concat(gm,"-clickmode #copilot-info-bubble-content {\n display: flex !important;\n }\n .").concat(gm,"-clickmode svg {\n display: none !important;\n }\n #").concat(gm," svg {\n width: 20px;\n height: auto;\n fill: none;\n }\n #copilot-info-bubble {\n position: relative;\n }\n #copilot-info-bubble-content-container {\n position: absolute;\n top: 0px;\n left: 0px;\n min-width: min(300px, 80vw);\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n .").concat(gm,"-right #copilot-info-bubble-content-container {\n left: auto !important;\n right: 0px !important;\n align-items: flex-end;\n }\n .").concat(gm,"-right .copilot-info-bubble-content {\n margin-right: 5px;\n }\n .").concat(gm,"-right svg {\n transform: scaleX(-1);\n }\n #copilot-info-bubble-content svg {\n width: 16px;\n height: 16px;\n display: inline-block !important;\n margin-left: 5px;\n }\n #copilot-info-bubble-content {\n margin-top: 18px;\n margin-left: 5px;\n padding: 10px 15px;\n border-radius: 20px;\n background-color: black;\n color: white;\n font-family: Arial, sans-serif;\n font-size: 14px;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n max-width: 100%;\n white-space: normal;\n overflow-wrap: break-word;\n word-break: normal;\n hyphens: none;\n }\n .").concat(gm,"-right #copilot-info-bubble-content {\n margin-top: 30px;\n margin-left: 0px;\n margin-right: 5px;\n }\n .click-wave {\n position: absolute;\n width: 34px;\n height: 34px;\n border-radius: 50%;\n background-color: rgba(0, 0, 0, 0.5);\n pointer-events: none;\n z-index: 2147483611;\n animation: click-wave-animation 0.8s ease forwards;\n }\n @keyframes click-wave-animation {\n 0% {\n transform: scale(0.2);\n opacity: 1;\n }\n 100% {\n transform: scale(2);\n opacity: 0;\n }\n }\n @keyframes slideInFromTop {\n 0% {\n transform: translateY(-100%);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n }\n .").concat(vm," {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: 2147483610;\n background: #fff;\n padding: 6px;\n border-radius: 10px;\n box-shadow: 0 0 20px 0 #C294F2;\n display: flex;\n align-items: center;\n gap: 8px;\n border: 1px solid rgba(192, 146, 242, 0.5);\n animation: slideInFromTop 0.5s ease-out forwards;\n }\n .").concat(vm," span {\n font-size: 13px;\n color: #000;\n font-family: sans-serif;\n }\n .").concat(vm,"-avatar {\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n border-radius: 6px;\n }\n .").concat(vm,"-mute {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .").concat(vm,"-mute svg {\n width: 20px;\n height: auto;\n cursor: pointer;\n animation: pulsate 2s infinite;\n }\n .").concat(vm,"-mute svg:hover {\n opacity: 0.8;\n }\n .").concat(vm,"-dismiss {\n display: flex;\n align-items: center;\n justify-content: center;\n padding-right: 3px;\n }\n .").concat(vm,"-dismiss svg {\n width: 15px;\n height: auto;\n cursor: pointer;\n }\n .").concat(vm,"-dismiss svg:hover {\n opacity: 0.8;\n }\n @keyframes pulsate {\n 0% {\n transform: scale(1);\n opacity: 1;\n }\n 50% {\n transform: scale(1.1);\n opacity: 0.8;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n }\n @keyframes glCoFadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n @keyframes glCoFadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n\n .gleap-audio-unmute-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 2147483620;\n }\n\n .gleap-audio-unmute-modal {\n background-color: #fff;\n padding: 20px;\n border-radius: 8px;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);\n text-align: center;\n max-width: 90%;\n width: 400px;\n }\n\n .gleap-audio-unmute-modal p {\n margin-bottom: 20px;\n font-size: 16px;\n line-height: 22px;\n font-weight: normal;\n }\n\n .gleap-audio-unmute-button {\n background: ").concat(c,";\n color: ").concat(u,";\n outline: none;\n border: none;\n padding: 10px 14px;\n border-radius: 12px;\n font-size: 14px;\n font-weight: bold;\n cursor: pointer;\n }\n\n .gleap-audio-unmute-button:hover {\n opacity: 0.8;\n }\n\n .gleap-tour-continue-button {\n color: ").concat(c,";\n text-decoration: none;\n cursor: pointer;\n font-size: 14px;\n font-weight: bold;\n border: none;\n background: none;\n padding: 0;\n margin: 0;\n margin-left: 20px;\n }\n\n .gleap-tour-continue-button:hover {\n opacity: 0.8;\n }\n\n body.gl-copilot-fade-out::before,\n body.gl-copilot-fade-out::after,\n body.gl-copilot-fade-out #").concat(vm," {\n animation: glCoFadeOut 0.8s ease-out forwards;\n }\n ").concat(null===(s=null===(l=this.productTourData)||void 0===l?void 0:l.playVoice)||void 0===s||s?"":"\n .".concat(vm,"-mute {\n display: none;\n }\n "),"\n ").concat(this.productTourData.gradient?'body::before {\n content: "";\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n pointer-events: all;\n z-index: 2147483609;\n box-sizing: border-box;\n border: 18px solid transparent;\n filter: blur(25px);\n border-image-slice: 1;\n border-image-source: linear-gradient(45deg, #ED5587, #FBE6A9, #a6e3f8, #C294F2);\n animation: glCoFadeIn 1.5s ease-out forwards;\n }\n \n body::after {\n content: "";\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n pointer-events: all;\n z-index: 2147483609;\n opacity: 0.5;\n box-sizing: border-box;\n border: 3px solid transparent;\n border-image-slice: 1;\n border-image-source: linear-gradient(45deg, #ED5587, #FBE6A9, #a6e3f8, #C294F2);\n animation: glCoFadeIn 1.5s ease-out forwards;\n }':'body::after {\n content: "";\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n pointer-events: all;\n z-index: 2147483609;\n opacity: 0;\n }',"\n "),document.head.appendChild(h));var f=document.createElement("div");f.id=gm,f.style.opacity=0,this._pointerContainer=f;var g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("viewBox","0 0 380 476"),g.innerHTML='<path d="M352.595 268.315L352.581 268.302L352.566 268.29L78.6092 24.7278C71.6245 18.433 62.5487 15 53.2 15C32.1157 15 15 32.1157 15 53.2V424C15 444.34 31.4714 461 52 461C62.6797 461 72.8089 456.467 79.8863 448.38C79.8871 448.379 79.8879 448.378 79.8886 448.378L180.804 333.1H327.9C348.384 333.1 365 316.484 365 296C365 285.404 360.46 275.344 352.595 268.315Z" fill="black" stroke="white" stroke-width="30"/>';var m=document.createElement("div");m.id="copilot-info-bubble",m.innerHTML="<div id='copilot-info-bubble-content-container'><div id='copilot-info-bubble-content'></div></div>";var v=document.createElement("div");v.id=vm,v.classList.add(vm),v.innerHTML='\n <img class="'.concat(vm,'-avatar" src="').concat(null===(n=this.productTourData)||void 0===n?void 0:n.kaiAvatar,'" />\n <span>').concat(null===(r=this.productTourData)||void 0===r?void 0:r.kaiSlug,'</span>\n <div class="').concat(vm,'-mute">\n ').concat(p(this.audioMuted?"unmute":"mute"),"\n </div>\n ").concat(null!==(o=this.productTourData)&&void 0!==o&&o.allowClose?'<div class="'.concat(vm,'-dismiss">\n ').concat(p("dismiss"),"\n </div>"):"","\n "),document.body.appendChild(v),document.querySelector(".".concat(vm,"-mute")).addEventListener("click",(function(){a.toggleAudio(!a.audioMuted)})),null!==(i=this.productTourData)&&void 0!==i&&i.allowClose&&document.querySelector(".".concat(vm,"-dismiss")).addEventListener("click",(function(){a.completeTour(!1)})),f.appendChild(g),f.appendChild(m),document.body.appendChild(f)}}},{key:"start",value:function(){var e=this;if("undefined"!=typeof window&&!this.disabled){var t=this.productTourData;t&&function(){return ym.apply(this,arguments)}().then((function(n){e.audioMuted=!n,e.setupCopilotTour(),e.audioMuted&&null!=t&&t.showUnmuteModal?e.showAudioUnmuteModal():setTimeout((function(){e.renderNextStep()}),1500)}))}}},{key:"showAudioUnmuteModal",value:function(){var e,t,n,r=this,o=document.createElement("div");o.classList.add("gleap-audio-unmute-modal-overlay");var i=document.createElement("div");i.classList.add("gleap-audio-unmute-modal");var a=document.createElement("p");a.textContent=null===(e=this.productTourData)||void 0===e?void 0:e.unmuteModalTitle,i.appendChild(a);var s=document.createElement("button");s.classList.add("gleap-audio-unmute-button"),s.textContent=null===(t=this.productTourData)||void 0===t?void 0:t.unmuteModalButton,s.addEventListener("click",(function(){r.toggleAudio(!1),o.parentNode&&o.parentNode.removeChild(o),setTimeout((function(){r.renderNextStep()}),1e3)})),i.appendChild(s);var l=document.createElement("button");l.classList.add("gleap-tour-continue-button"),l.textContent=null===(n=this.productTourData)||void 0===n?void 0:n.unmuteModalContinue,l.addEventListener("click",(function(){o.parentNode&&o.parentNode.removeChild(o),setTimeout((function(){r.renderNextStep()}),1e3)})),i.appendChild(l),o.appendChild(i),document.body.appendChild(o)}},{key:"completeTour",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];"undefined"!=typeof window&&(this.cleanup(),this.onCompleteCallback&&this.onCompleteCallback(e))}},{key:"renderNextStep",value:function(){var e=this;if("undefined"!=typeof window&&!this.disabled){var t=this,n=this.productTourData.steps;if(this.currentActiveIndex>=n.length)setTimeout((function(){e.completeTour()}),500);else{var r=n[this.currentActiveIndex],o=function(n){if(e._pointerContainer.style.display="flex",r.selector&&r.selector.length>0&&!n)e.completeTour(!1);else{var o=function(){if("INPUT"===r.mode&&n){var e,o=function(){document.querySelector("#".concat(gm)).classList.remove("copilot-pointer-container-clickmode"),n.classList.remove("gleap-input-highlight"),document.getElementById(gm).style.display="none",t.currentActiveIndex++,t.storeUncompletedTour(),t.renderNextStep()};if("default"===(null!==(e=r.inputType)&&void 0!==e?e:"default")){var i=function e(t){var r;if(0!==(null==t||null===(r=t.target)||void 0===r||null===(r=r.value)||void 0===r?void 0:r.length)){var i=document.getElementById("copilot-info-bubble-content");i&&(i.innerHTML="".concat(wf.translateText("next"),' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\n <path fill="currentColor" d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"/>\n</svg>'),i.addEventListener("click",o,{once:!0}),n.classList.add("gleap-input-highlight"),document.querySelector("#".concat(gm)).classList.add("copilot-pointer-container-clickmode"),n.removeEventListener("input",e))}};n.addEventListener("input",i,{once:!1}),n.hasAttribute("contenteditable")&&n.addEventListener("keyup",i,{once:!1}),n.addEventListener("blur",(function(){n.focus()}),{once:!0}),n.focus()}else{var a,s=null!==(a=r.inputValue)&&void 0!==a?a:"",l=0;!function e(){l<s.length?(n.value+=s[l],l++,setTimeout(e,100)):setTimeout((function(){o()}),1200)}()}}else{if(t.currentActiveIndex++,t.storeUncompletedTour(),"CLICK"===r.mode&&n){var c=n.getBoundingClientRect(),u=window.scrollX||0,d=window.scrollY||0;!function(e,t){if("undefined"!=typeof window){var n=document.createElement("div");n.className="click-wave",n.style.left="".concat(e-17,"px"),n.style.top="".concat(t-17,"px"),document.body.appendChild(n),setTimeout((function(){n.remove()}),800)}}(c.left+c.width/2+u,c.top+c.height/2+d),n.click()}t.renderNextStep()}};e.updatePointerPosition(n,r);var i=null!=r&&r.message?function(e){if("undefined"!=typeof window){var t=document.createElement("div");return t.innerHTML=e,t.textContent||""}}(r.message):"🤔";document.getElementById("copilot-info-bubble-content").textContent=i,e._pointerContainer.style.opacity=1;var a=function(e){if("undefined"!=typeof window){var t=e.split(/\s+/).filter((function(e){return e.length>0})).length;return Math.ceil(t/3.6)+1}}(i),s=function(){e.currentAudio=void 0,setTimeout((function(){o()}),1e3*a)};r.voice&&r.voice.length>0?(e.currentAudio=new Audio(r.voice),e.audioMuted&&(e.currentAudio.muted=!0),e.currentAudio.addEventListener("ended",(function(){setTimeout((function(){o()}),1e3)})),e.currentAudio.play().then((function(){})).catch((function(e){s()}))):s()}},i=r.selector?function(e){if("undefined"!=typeof window){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3)/100,n=0;return new Promise((function(r,o){var i=setInterval((function(){var a=document.querySelector(e);a?(clearInterval(i),r(a)):n>=t&&(clearInterval(i),o(new Error("Element not found for selector: ".concat(e)))),n++}),100)}))}}(r.selector):Promise.resolve(null);i.then(o).catch((function(){return o(null)}))}}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&um(t.prototype,n),r&&um(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wm(e){return wm="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},wm(e)}function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?km(Object(n),!0).forEach((function(t){Cm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):km(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Im(r.key),r)}}function Cm(e,t,n){return(t=Im(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Im(e){var t=function(e,t){if("object"!=wm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=wm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wm(t)?t:String(t)}dm(bm,"instance",void 0);var Em="gleap-tour-data",Om=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Cm(this,"productTourData",void 0),Cm(this,"productTourId",void 0),Cm(this,"unmuted",!1),Cm(this,"currentActiveIndex",void 0),Cm(this,"gleapTourObj",void 0),Cm(this,"disabled",!1);var t=this;if("undefined"!=typeof window){"undefined"!=typeof window&&window.addEventListener("beforeunload",(function(e){var n;null!=t&&t.disabled||null==t||!t.productTourId||null==t||!t.productTourData||"cobrowse"===(null==t||null===(n=t.productTourData)||void 0===n?void 0:n.tourType)||t.storeUncompletedTour()}))}}var t,n,r;return t=e,n=[{key:"disable",value:function(){this.gleapTourObj&&this.gleapTourObj.destroy(),bm.getInstance().disable(),this.gleapTourObj=void 0,this.disabled=!0}},{key:"startWithConfig",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!this.productTourId&&!this.disabled)if(this.productTourId=e,this.productTourData=t,this.currentActiveIndex=0,o)this.start();else{var i=this;Wt.getInstance().validateProductTour(e).then((function(){return r>0?setTimeout((function(){i.start()}),r):n.start()})).catch((function(e){console.log("Product tour is not live. Cleaning up..."),console.error(e),i.onComplete(!1)}))}}},{key:"onComplete",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={tourId:this.productTourId};e?(Un.notifyEvent("productTourCompleted",t),bv.trackEvent("tour-".concat(this.productTourId,"-completed"),t)):(Un.notifyEvent("productTourQuit",t),bv.trackEvent("tour-".concat(this.productTourId,"-quit"),t)),this.gleapTourObj&&this.gleapTourObj.destroy(),this.gleapTourObj=void 0,this.productTourData=void 0,this.productTourId=void 0,this.currentActiveIndex=void 0,this.clearUncompletedTour()}},{key:"loadUncompletedTour",value:function(){try{var e=JSON.parse(localStorage.getItem(Em));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(Em,JSON.stringify(e))}catch(t){}else this.clearUncompletedTour()}},{key:"clearUncompletedTour",value:function(){try{localStorage.removeItem(Em)}catch(e){}}},{key:"start",value:function(){var e=this,t=this.productTourData;if(t){if("cobrowse"===t.tourType)return bm.getInstance().startWithConfig(this.productTourId,t,(function(t){e.onComplete(t)}));this.unmuted=!1;for(var n=t.steps,r=this,o=[],i=0;i<n.length;i++){var a=n[i],s="CLICK"===a.mode,l="INPUT"===a.mode,c="INTERACTION"===a.mode,u="",d=!1;if("video-pointer"===a.type)u='<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 h="";t.sender&&t.sender.firstName&&(d=!0,h='<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>")),u="".concat(h,'<div class="gleap-tour-message">').concat(a.message,"</div>")}var f={disableActiveInteraction:!s&&!l&&!c,mode:a.mode,popover:xm({description:u,popoverClass:"gleap-tour-popover-".concat(a.type," ").concat(!d&&"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),o.push(f)}var g=["next","close"];t.backButton&&g.push("previous"),this.gleapTourObj=sm(Cm(Cm(Cm(Cm(Cm(Cm(Cm(Cm(Cm(Cm({showProgress:!0,allowKeyboardControl:!1,steps:o},"showProgress",n.length>1),"allowClose",t.allowClose),"nextBtnText",t.nextText),"doneBtnText",t.doneText),"prevBtnText",t.prevText),"showButtons",g),"onHighlightStarted",(function(t,n,r){var o;e.currentActiveIndex=null==r||null===(o=r.state)||void 0===o?void 0:o.activeIndex,e.storeUncompletedTour()})),"onElementNotFound",(function(t){document.removeEventListener("click",m),e.onComplete(!1)})),"onDestroyStarted",(function(){e.gleapTourObj.hasNextStep()?e.onComplete(!1):e.onComplete(!0),document.removeEventListener("click",m)})),"onPopoverRender",(function(t){if(t)for(var n=document.querySelectorAll(".gleap-tour-popover-description img, .gleap-tour-popover-description video"),o=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(){o()})),a.addEventListener("error",(function(){o()}))):"VIDEO"===a.tagName&&(a.addEventListener("canplaythrough",(function(){o()})),a.addEventListener("error",(function(){o()})))}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");r.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?(r.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",m,!0)}function m(e){try{var t=document.querySelector(".gleap-tour-popover");if(t&&!t.contains(e.target)){var o,i=r.gleapTourObj.getActiveIndex(),a=n[i],s=r.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;r.currentActiveIndex=(r.currentActiveIndex||0)+1,r.storeUncompletedTour(),s&&"INPUT"===s.tagName||"INPUT"===a.mode||"INTERACTION"===a.mode||null!=e&&null!==(o=e.target)&&void 0!==o&&o.id.includes("tooltip-svg")||r.gleapTourObj.moveNext()}}catch(l){}}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Sm(t.prototype,n),r&&Sm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Tm(e){return Tm="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},Tm(e)}function Lm(e){return function(e){if(Array.isArray(e))return Am(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 Am(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 Am(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 Am(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bm(r.key),r)}}function Pm(e,t,n){return t=jm(t),function(e,t){if(t&&("object"===Tm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Rm(e)}(e,_m()?Reflect.construct(t,n||[],jm(e).constructor):t.apply(e,n))}function Rm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nm(e){var t="function"==typeof Map?new Map:void 0;return Nm=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(_m())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&Dm(o,n.prototype),o}(e,arguments,jm(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Dm(n,e)},Nm(e)}function _m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_m=function(){return!!e})()}function Dm(e,t){return Dm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dm(e,t)}function jm(e){return jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jm(e)}function Fm(e,t,n){return(t=Bm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bm(e){var t=function(e,t){if("object"!=Tm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Tm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Tm(t)?t:String(t)}Cm(Om,"instance",void 0);function Um(e){return Um="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},Um(e)}function Hm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Km(r.key),r)}}function zm(e,t,n){return t=Jm(t),function(e,t){if(t&&("object"===Um(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qm(e)}(e,Gm()?Reflect.construct(t,n||[],Jm(e).constructor):t.apply(e,n))}function qm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wm(e){var t="function"==typeof Map?new Map:void 0;return Wm=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Gm())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&Vm(o,n.prototype),o}(e,arguments,Jm(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Vm(n,e)},Wm(e)}function Gm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Gm=function(){return!!e})()}function Vm(e,t){return Vm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vm(e,t)}function Jm(e){return Jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jm(e)}function Ym(e,t,n){return(t=Km(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Km(e){var t=function(e,t){if("object"!=Um(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Um(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Um(t)?t:String(t)}function Xm(e){return Xm="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},Xm(e)}function Zm(){Zm=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==Xm(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(Xm(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function $m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$m(Object(n),!0).forEach((function(t){ev(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ev(e,t,n){return(t=iv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tv(e){return function(e){if(Array.isArray(e))return nv(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 nv(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 nv(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 nv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rv(e,t,n,r,o,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(r,o)}function ov(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iv(r.key),r)}}function iv(e){var t=function(e,t){if("object"!=Xm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xm(t)?t:String(t)}var av=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._agentId=t.agentId||"kai",this._context=t.context||null,this._onChange=t.onChange||null,this._onError=t.onError||null,this._onReplyReceived=t.onReplyReceived||null,this._onConversationCreated=t.onConversationCreated||null,this._onToken=t.onToken||null,this._messages=[],this._conversationId=t.conversationId||null,this._isExecuting=!1,this._error=null,this._destroyed=!1,this._abortController=null;try{this._networkManager=re.getInstance()}catch(n){this._networkManager=null}}var t,n,r,o,i;return t=e,n=[{key:"sendMessage",value:(o=Zm().mark((function e(t){var n,r,o,i,a,s,l,c=this;return Zm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=(t||"").trim())&&!this._isExecuting&&!this._destroyed){e.next=3;break}return e.abrupt("return");case 3:return this._messages=[].concat(tv(this._messages),[{id:"user-".concat(Date.now()),role:"user",content:n,createdAt:(new Date).toISOString()}]),r="stream-".concat(Date.now()),this._messages=[].concat(tv(this._messages),[{id:r,role:"assistant",content:"",createdAt:(new Date).toISOString(),isStreaming:!0}]),this._isExecuting=!0,this._error=null,this._notify(),o="kai"===this._agentId,i=o?this._messages.filter((function(e){return!e.isStreaming&&e.content})).map((function(e){return{role:e.role,content:e.content}})):[{role:"user",content:n}],a={messages:i},this._conversationId&&(a.conversationId=this._conversationId),this._context&&(a.additionalContext=this._context),this._abortController=new AbortController,s=!this._conversationId,l=this._messages.length-1,e.next=19,this._networkManager.streamAgent(this._agentId,a,{onMeta:function(e){c._destroyed||(e.conversationId&&(c._conversationId=e.conversationId,c._networkManager._invalidateMessagesCache(e.conversationId),s&&c._onConversationCreated&&c._onConversationCreated(e.conversationId)),e.runId&&c._messages[l]&&(c._messages[l]=Qm(Qm({},c._messages[l]),{},{id:e.runId})))},onToken:function(e){if(!c._destroyed){var t=c._messages[l];t&&(t.content+=e.content||""),c._notify(),c._onToken&&c._onToken(e)}},onDone:function(e){if(!c._destroyed){var t=c._messages[l];t&&(t.isStreaming=!1,e.response&&!t.content&&(t.content=e.response)),c._isExecuting=!1,c._abortController=null,c._notify(),c._onReplyReceived&&c._onReplyReceived(e)}},onError:function(e){if(!c._destroyed){var t=c._messages[l];t&&!t.content?c._messages.splice(l,1):t&&(t.isStreaming=!1),c._isExecuting=!1,c._error=e,c._abortController=null,c._notify(),c._onError&&c._onError(e)}},onToolStart:function(){},onToolEnd:function(){}},this._abortController.signal);case 19:case"end":return e.stop()}}),e,this)})),i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){rv(i,n,r,a,s,"next",e)}function s(e){rv(i,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return i.apply(this,arguments)})},{key:"cancelStream",value:function(){this._abortController&&(this._abortController.abort(),this._abortController=null),this._messages=this._messages.map((function(e){return e.isStreaming?Qm(Qm({},e),{},{isStreaming:!1}):e})),this._messages=this._messages.filter((function(e){return e.content||"user"===e.role})),this._isExecuting=!1,this._notify()}},{key:"clearMessages",value:function(){this._messages=[],this._conversationId=null,this._isExecuting=!1,this._error=null,this.cancelStream(),re.getInstance().clearCache(),this._notify()}},{key:"setContext",value:function(e){this._context=e}},{key:"getState",value:function(){return{messages:this._messages,isExecuting:this._isExecuting,error:this._error,conversationId:this._conversationId}}},{key:"destroy",value:function(){this.cancelStream(),this._destroyed=!0,this._onChange=null,this._onError=null,this._onReplyReceived=null,this._onConversationCreated=null,this._onToken=null}},{key:"_notify",value:function(){this._onChange&&!this._destroyed&&this._onChange(this.getState())}}],n&&ov(t.prototype,n),r&&ov(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();const sv=av;function lv(e){return lv="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},lv(e)}function cv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hv(r.key),r)}}function uv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uv(Object(n),!0).forEach((function(t){pv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pv(e,t,n){return(t=hv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hv(e){var t=function(e,t){if("object"!=lv(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lv(t)?t:String(t)}"undefined"!=typeof window&&"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,dv(dv({},t),{},{preserveDrawingBuffer:!0}))}),"undefined"!=typeof customElements&&"undefined"!=typeof HTMLElement&&"undefined"!=typeof window&&(function(){if("undefined"!=typeof customElements&&"undefined"!=typeof HTMLElement&&"undefined"!=typeof window){var e=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Fm(Rm(e=Pm(this,t)),"activeStep",-1),Fm(Rm(e),"checklistData",null),Fm(Rm(e),"_isInitialLoad",!1),Fm(Rm(e),"_initialActiveSet",!1),Fm(Rm(e),"_hasLoaded",!1),Fm(Rm(e),"_isSessionReady",!1),Fm(Rm(e),"_boundHandleChecklistUpdate",e.handleChecklistUpdate.bind(Rm(e))),Fm(Rm(e),"_boundHandleSessionUpdate",e.handleSessionUpdate.bind(Rm(e))),e.attachShadow({mode:"open"});try{e._networkManager=void 0!==Wt&&void 0!==D?D.getInstance():null}catch(n){e._networkManager=null}return e._boundFloatingLauncherClick=e.handleFloatingLauncherClick.bind(Rm(e)),e._boundFloatingCloseClick=e.handleFloatingCloseClick.bind(Rm(e)),e._floatingHideTimeout=null,e}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dm(e,t)}(t,Nm(HTMLElement)),n=t,r=[{key:"connectedCallback",value:function(){window.addEventListener("checkListUpdate",this._boundHandleChecklistUpdate),window.addEventListener("session-updated",this._boundHandleSessionUpdate),window.addEventListener("resize",this._boundResizeHandler=this.handleResize.bind(this)),this._checkSessionAndLoad()}},{key:"disconnectedCallback",value:function(){window.removeEventListener("checkListUpdate",this._boundHandleChecklistUpdate),window.removeEventListener("session-updated",this._boundHandleSessionUpdate),window.removeEventListener("resize",this._boundResizeHandler),this.removeFloatingClickListeners(),this._floatingHideTimeout&&(clearTimeout(this._floatingHideTimeout),this._floatingHideTimeout=null),this.checklistData=null,this.activeStep=-1,this._hasLoaded=!1,this._isSessionReady=!1,this._initialActiveSet=!1,this.renderResponse()}},{key:"handleResize",value:function(){this.updateActiveTaskMaxHeight()}},{key:"attributeChangedCallback",value:function(e,t,n){t!==n&&("checklistId"===e&&this._isSessionReady?this.loadChecklist():"checklistId"!==e&&this._hasLoaded&&this.checklistData&&this.renderChecklist(this.checklistData))}},{key:"_checkSessionAndLoad",value:function(){var e=this._getGleapSessionInstance(),t=this.getAttribute("checklistId");e.ready&&t?(this._isSessionReady=!0,this._networkManager=D.getInstance(),this.loadChecklist()):(this._isSessionReady=!1,this._hasLoaded=!1,this.checklistData=null,this.activeStep=-1,this._initialActiveSet=!1,this.renderResponse())}},{key:"handleSessionUpdate",value:function(){this._checkSessionAndLoad()}},{key:"_getGleapSessionInstance",value:function(){try{return void 0!==Wt?Wt.getInstance():null}catch(e){return null}}},{key:"infoEnabled",get:function(){var e=this.getAttribute("info");return null===e||"false"!==e.toLowerCase()}},{key:"progressbarEnabled",get:function(){var e=this.getAttribute("progressbar");return null===e||"false"!==e.toLowerCase()}},{key:"floatingEnabled",get:function(){return"true"===this.getAttribute("floating")}},{key:"_translate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return wf.translateText(e)||t}},{key:"_translateWithVars",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return wf.translateTextWithVars(e,t)||n}},{key:"getCheckIcon",value:function(){return'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.7071 5.29289C21.0976 5.68342 21.0976 6.31658 20.7071 6.70711L9.70711 17.7071C9.31658 18.0976 8.68342 18.0976 8.29289 17.7071L3.29289 12.7071C2.90237 12.3166 2.90237 11.6834 3.29289 11.2929C3.68342 10.9024 4.31658 10.9024 4.70711 11.2929L9 15.5858L19.2929 5.29289C19.6834 4.90237 20.3166 4.90237 20.7071 5.29289Z" fill="currentColor"/>\n </svg>'}},{key:"loadChecklist",value:function(){if(this._isSessionReady&&this._networkManager){var e=this.getAttribute("checklistId");e?(this.activeStep=-1,this._initialActiveSet=!1,this.validateChecklist(e)):(this.renderResponse(),this.checklistData=null,this._hasLoaded=!1)}}},{key:"getQueryParams",value:function(){var e=this._getGleapSessionInstance();if(null==e||!e.session)return"";var t=e.session,n="en";try{void 0!==wf&&(n=wf.getInstance().getActiveLanguage()||"en")}catch(r){}return"gleapId=".concat(t.gleapId||"","&gleapHash=").concat(t.gleapHash||"","&lang=").concat(n)}},{key:"makeRequest",value:function(e,t,n,r){var o=this._getGleapSessionInstance();if(null!=o&&o.session){var i=new XMLHttpRequest;i.open(e,t);try{o.injectSession(i)}catch(a){}n&&i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.onreadystatechange=function(){4===i.readyState&&r(i)},i.onerror=function(){r(i)},i.send(n?JSON.stringify(n):null)}else r({readyState:4,status:0,responseText:"Session unavailable",_isMock:!0})}},{key:"validateChecklist",value:function(e){var t=this;if(this._isSessionReady&&this._networkManager){this.checklistData=null,this._hasLoaded=!1,this.renderResponse();var n=this.getAttribute("sharedKey");this._networkManager.validateChecklist(e,n).then((function(e){t.isConnected&&t._isSessionReady&&e&&t.fetchChecklist(e)})).catch((function(e){t.renderResponse(),t.checklistData=null,t._hasLoaded=!1}))}}},{key:"fetchChecklist",value:function(e){var t=this;this._isSessionReady&&this._networkManager&&(this._isInitialLoad=!this._hasLoaded,this._networkManager.fetchChecklist(e).then((function(e){var n;if(!t.isConnected||!t._isSessionReady||!e)return t._hasLoaded=!1,t.checklistData=null,void t._checkSessionAndLoad();if(t.checklistData=e,t._hasLoaded=!0,"done"!==e.status){if(t._isInitialLoad&&!t._initialActiveSet){var r,o=(null===(r=e.outbound)||void 0===r||null===(r=r.config)||void 0===r?void 0:r.steps)||[],i=e.completedSteps||[],a=o.findIndex((function(e){return!i.includes(e.id)}));t.activeStep=a>=0?a:-1,-1!==t.activeStep&&(t._initialActiveSet=!0)}t.renderChecklist(t.checklistData),Un.notifyEvent("checklist-loaded",{checklistId:t.checklistData.id,outboundId:null===(n=t.checklistData.outbound)||void 0===n?void 0:n.id,completedSteps:t.checklistData.completedSteps,status:t.checklistData.status,data:t.checklistData})}else t.renderResponse()})).catch((function(e){t.renderResponse(),t.checklistData=null,t._hasLoaded=!1})))}},{key:"updateChecklist",value:function(e,t){var n,r,o=this._getGleapSessionInstance();if(null!=o&&o.session){var i=o.apiUrl;if(i){var a=o.session,s=null!==(n=null==a?void 0:a.gleapId)&&void 0!==n?n:"",l=null!==(r=null==a?void 0:a.gleapHash)&&void 0!==r?r:"",c="en";try{void 0!==wf&&(c=wf.getInstance().getActiveLanguage()||"en")}catch(d){}var u="".concat(i,"/outbound/checklists/").concat(e);t.checkedStep&&(u+="/increment/".concat(t.checkedStep)),u+="?gleapId=".concat(s,"&gleapHash=").concat(l,"&lang=").concat(c),this.makeRequest("PUT",u,t,(function(e){e._isMock||200!==e.status&&e.status}))}}}},{key:"handleChecklistUpdate",value:function(e){if(this._hasLoaded&&this.checklistData){var t=e.detail;if(t&&t.id===this.checklistData.id){var n,r=Lm(this.checklistData.completedSteps||[]),o=!1,i=!1,a=this.activeStep;if(t.completedSteps&&JSON.stringify(t.completedSteps)!==JSON.stringify(r)&&(this.checklistData.completedSteps=Lm(t.completedSteps),o=!0,-1!==a)){var s,l=null===(s=this.checklistData.outbound)||void 0===s||null===(s=s.config)||void 0===s||null===(s=s.steps)||void 0===s||null===(s=s[a])||void 0===s?void 0:s.id;l&&this.checklistData.completedSteps.includes(l)&&!r.includes(l)&&(i=!0)}if(t.status&&t.status!==this.checklistData.status&&(this.checklistData.status=t.status,o=!0),i){for(var c,u=(null===(c=this.checklistData.outbound)||void 0===c||null===(c=c.config)||void 0===c?void 0:c.steps)||[],d=-1,p=a+1;p<u.length;p++)if(!this.checklistData.completedSteps.includes(u[p].id)){d=p;break}this.activeStep!==d&&this.setActiveStep(d),o=!0}o&&(this.renderChecklist(this.checklistData),Un.notifyEvent("checklist-update",{checklistId:this.checklistData.id,outboundId:null===(n=this.checklistData.outbound)||void 0===n?void 0:n.id,completedSteps:this.checklistData.completedSteps,status:this.checklistData.status,data:this.checklistData}))}}}},{key:"handleFloatingLauncherClick",value:function(e){if(e.stopPropagation(),"done"!==this.checklistData.status){var t=this.shadowRoot.querySelector(".checklist-tasks");t&&(t.style.display="block"===t.style.display?"none":"block")}}},{key:"handleFloatingCloseClick",value:function(e){e.stopPropagation();var t=this.shadowRoot.querySelector(".checklist-tasks");t&&(t.style.display="none")}},{key:"addFloatingClickListeners",value:function(){var e=this.shadowRoot.querySelector(".checklist-floating-launcher");e&&e.addEventListener("click",this._boundFloatingLauncherClick);var t=this.shadowRoot.querySelector(".checklist-floating-header");t&&t.addEventListener("click",this._boundFloatingCloseClick)}},{key:"removeFloatingClickListeners",value:function(){var e=this.shadowRoot.querySelector(".checklist-floating-launcher");e&&e.removeEventListener("click",this._boundFloatingLauncherClick);var t=this.shadowRoot.querySelector(".checklist-floating-header");t&&t.removeEventListener("click",this._boundFloatingCloseClick)}},{key:"renderResponse",value:function(){this.shadowRoot.innerHTML=""}},{key:"renderFloatingLauncher",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"checklist-floating",o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=(null===(t=e.config)||void 0===t?void 0:t.steps)||[],a=(null===(n=this.checklistData)||void 0===n?void 0:n.completedSteps)||[],s=0;if(this.progressbarEnabled&&i.length>0){var l=i.length,c=a.length;s=l>0?c/l*100:0}var u,d,p=i.find((function(e){return!a.includes(e.id)})),h=i.length>0?p?p.title||this._translateWithVars("stepDefaultTitle",{index:i.indexOf(p)+1},"Step ".concat(i.indexOf(p)+1)):"":e.subject||"",f=i.length>0?p&&p.description||"":e.message||"";o&&(h=(null===(u=e.config)||void 0===u?void 0:u.successTitle)||"",f=(null===(d=e.config)||void 0===d?void 0:d.successMessage)||"",s=100);var g=2*Math.PI*7,m=g-s/100*g,v="checklist-floating-header"===r,y=v?'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>':'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>';return'\n <div part="'.concat(r,'" class="').concat(v?"checklist-floating-header":"checklist-floating-launcher"," ").concat(o?"checklist-floating-launcher--done":"",'">\n <div class="floating-header">\n <div class="floating-circular-progress">\n <svg viewBox="0 0 20 20">\n <circle class="track" cx="10" cy="10" r="7"></circle>\n <circle class="progress" cx="10" cy="10" r="7" stroke-dasharray="').concat(g.toFixed(2),'" stroke-dashoffset="').concat(m.toFixed(2),'"></circle>\n </svg>\n </div>\n <div class="floating-title">').concat(h,"</div>\n ").concat(o?"":'<span class="floating-icon">'.concat(y,"</span>"),'\n </div>\n <div class="floating-subtitle">').concat(f,"</div>\n </div>\n ")}},{key:"renderInfoSection",value:function(e){var t;if(!this.infoEnabled||!e)return"";var n=e.subject||this._translate("checklistDefaultTitle","Checklist"),r=e.message||"",o="";return null!==(t=e.sender)&&void 0!==t&&t.profileImageUrl&&(o='\n <div part="sender" class="checklists-sender">\n <img part="sender-image" src="'.concat(e.sender.profileImageUrl,'" alt="').concat(e.sender.firstName||"Sender",'\'s profile picture" style="object-fit: cover;" />\n <span part="sender-name">').concat(e.sender.firstName||"","</span>\n </div>")),'\n <div part="info" class="checklists-info">\n '.concat(n?'<div part="info-title" class="checklists-title">'.concat(n,"</div>"):"","\n ").concat(r?'<div part="info-description" class="checklists-description">'.concat(r,"</div>"):"","\n ").concat(o,"\n </div>")}},{key:"renderProgressSection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!this.progressbarEnabled||!e.length)return"";var n=e.length,r=t.length,o=n>0?r/n*100:0,i=0;e.forEach((function(e){!t.includes(e.id)&&e.duration>0&&(i+=e.duration)}));var a=this._translateWithVars("taskProgress",{a:r,b:n},"".concat(r," of ").concat(n," done")),s=i>0?this._translateWithVars("aboutMinutes",{a:i},"About ".concat(i," min left")):"";return'\n <div part="progress-labels" class="checklist-progress-labels">\n <div part="progress-label-primary" class="checklist-progress-label">'.concat(a,"</div>\n ").concat(s?'<div part="progress-label-secondary" class="checklist-progress-label">'.concat(s,"</div>"):"",'\n </div>\n <div part="progress-bar" class="checklist-progress-bar">\n <div part="progress-bar-progress" class="checklist-progress-bar-progress" style="width: ').concat(o,'%;"></div>\n </div>')}},{key:"renderTasks",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t&&0!==t.length?t.map((function(t,r){var o=n.includes(t.id),i=e.activeStep===r,a=o?'<span part="task-badge" class="checklist-task-header--badge checklist-task-header--badge-done">'.concat(e.getCheckIcon(),"</span>"):'<span part="task-badge" class="checklist-task-header--badge">'.concat(r+1,"</span>"),s=t.title||e._translateWithVars("stepDefaultTitle",{index:r+1},"Step ".concat(r+1)),l=t.description||"",c=t.actionTitle||e._translate("actionDefaultTitle","Action"),u=t.action&&"none"!==t.action?'<div part="task-action" class="checklist-task-body-action" data-action-index="'.concat(r,'">\n <button type="button" class="action-button form-send-button">').concat(c,"</button>\n </div>"):"",d=e._translate("markAsDone","Mark as done"),p=t.allowMarkDone&&!o?'<div part="task-mark-done" class="checklist-task-body-markdone" data-markdone-index="'.concat(r,'">\n ').concat(e.getCheckIcon(),'\n <div class="checklist-task-body-markdone-label">').concat(d,"</div>\n </div>"):"",h=["checklist-task",o?"checklist-task--done":"",i?"checklist-task--active":""].filter(Boolean).join(" ");return'\n <div part="task" class="'.concat(h,'" data-task-index="').concat(r,'">\n <div part="task-header" class="checklist-task-header" role="button" aria-expanded="').concat(i,'" aria-controls="task-body-').concat(r,'">\n ').concat(a,'\n <div part="task-header-title" class="checklist-task-header--title">').concat(s,'</div>\n <span part="task-header-chevron" class="checklist-task-header--chevron">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>\n </span>\n </div>\n <div part="task-body" class="checklist-task-body" id="task-body-').concat(r,'">\n <div part="task-body-inner" class="checklist-task-body-inner">\n ').concat(l?'<div part="task-body-content" class="checklist-task-body-content">'.concat(l,"</div>"):"","\n ").concat(u,"\n ").concat(p,"\n </div>\n </div>\n </div>")})).join(""):"<p>".concat(this._translate("noStepsDefined","No steps defined."),"</p>")}},{key:"renderChecklist",value:function(e){var t;if(this._hasLoaded&&e&&e.outbound){var n=e.outbound,r=(null===(t=n.config)||void 0===t?void 0:t.steps)||[],o=e.completedSteps||[],i="";if("done"===e.status||r.length>0&&o.length>=r.length){var a,s,l=(null===(a=n.config)||void 0===a?void 0:a.successTitle)||"",c=(null===(s=n.config)||void 0===s?void 0:s.successMessage)||"";i=this.floatingEnabled?this.renderFloatingLauncher(n,"checklist-floating-launcher",!0):'\n <div part="content" class="checklists-content checklists-content--done">\n <div part="success-icon" class="checklists-success-icon">\n <span part="success-icon-circle" class="checklists-success-icon--circle">'.concat(this.getCheckIcon(),'</span>\n </div>\n <div part="success-title" class="checklists-title">').concat(l,'</div>\n <div part="success-description" class="checklists-description">').concat(c,"</div>\n </div>"),-1!==this.activeStep&&(this.activeStep=-1)}else i='\n <div part="content" class="checklists-content">\n '.concat(this.floatingEnabled?"":this.renderInfoSection(n),"\n ").concat(this.floatingEnabled?"":this.renderProgressSection(r,o),"\n ").concat(this.floatingEnabled?this.renderFloatingLauncher(n):"",'\n <div part="tasks" class="checklist-tasks">\n ').concat(this.floatingEnabled?this.renderFloatingLauncher(n,"checklist-floating-header"):"","\n ").concat(this.renderTasks(r,o),"\n </div>\n </div>");var u=tn.getInstance().getFlowConfig(),d=u.color?u.color:"#485BFF",p="\n <style>\n :host {\n display: block;\n --color-bg: #ffffff;\n --color-font-title: #1f2937;\n --color-font-text: #4b5563;\n --color-font-light: #6b7280;\n --color-primary: ".concat(d,";\n --color-primary-light: ").concat(d,'22;\n --color-primary-contrast: #ffffff;\n --color-border: #e5e7eb;\n --color-gray-light: #f3f4f6;\n --color-gray-lighter: #f9fafb;\n --color-gray-dark: #6b7280;\n --color-success: #10b981;\n --color-success-light: #ffffff;\n --radius-sm: 4px;\n --radius-lg: 12px;\n --radius-full: 9999px;\n --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);\n --shadow-lg: rgba(0, 0, 0, 0.2) 0px 7px 29px 0px;\n --animation-duration: 0.2s;\n --animation-timing: ease-in-out;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n box-sizing: border-box;\n }\n :host([dark]) {\n --color-bg: #1f2937;\n --color-font-title: #f9fafb;\n --color-font-text: #d1d5db;\n --color-font-light: #9ca3af;\n --color-primary: ').concat(d,";\n --color-primary-light: ").concat(d,'22;\n --color-primary-contrast: #ffffff;\n --color-border: #374151;\n --color-gray-light: #374151;\n --color-gray-lighter: #111827;\n --color-gray-dark: #9ca3af;\n --color-success: #34d399;\n --color-success-light: #1f2937;\n }\n *, *:before, *:after { box-sizing: inherit; }\n .checklists-content { color: var(--color-font-text); }\n .checklists-content--done { text-align: center; }\n .checklists-info { margin-bottom: 24px; text-align: center; }\n .checklists-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; color: var(--color-font-title); }\n .checklists-description { font-size: 0.9rem; margin-bottom: 16px; color: var(--color-font-text); line-height: 1.5; }\n .checklists-sender { display: flex; align-items: center; justify-content: center; gap: 8px; }\n .checklists-sender img { width: 28px; height: 28px; border-radius: var(--radius-full); object-fit: cover; }\n .checklists-sender span { font-size: 0.875rem; color: var(--color-font-light); font-weight: 500; }\n .checklists-success-icon { margin-bottom: 16px; line-height: 0; }\n .checklists-success-icon--circle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-full); background-color: var(--color-success); color: var(--color-success-light); font-size: 22px; }\n .checklist-progress-labels { display: flex; justify-content: space-between; margin-bottom: 8px; }\n .checklist-progress-label { font-size: 0.75rem; color: var(--color-font-light); font-weight: 500; }\n .checklist-progress-bar { width: 100%; height: 6px; background-color: var(--color-gray-light); border-radius: var(--radius-full); overflow: hidden; margin-bottom: 20px; }\n .checklist-progress-bar-progress { height: 100%; background-color: var(--color-primary); transition: width var(--animation-duration) var(--animation-timing); border-radius: var(--radius-full); }\n .checklist-tasks { display: flex; flex-direction: column; gap: 12px; }\n .checklist-task { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background-color: var(--color-bg); box-shadow: var(--shadow-sm); overflow: hidden; transition: background-color var(--animation-duration) var(--animation-timing), border-color var(--animation-duration) var(--animation-timing); }\n .checklist-task-header { display: flex; align-items: center; padding: 15px 20px; cursor: pointer; gap: 12px; position: relative; }\n .checklist-task-header:hover { background: var(--color-gray-lighter); }\n .checklist-task-header:hover .checklist-task-header--chevron {\n color: var(--color-font-title);\n }\n .checklist-task-header--badge { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-full); background-color: var(--color-primary-light); color: var(--color-primary); font-size: 0.875rem; font-weight: 600; flex-shrink: 0; transition: background-color var(--animation-duration) var(--animation-timing), color var(--animation-duration) var(--animation-timing); line-height: 1; }\n .checklist-task-header--badge svg { width: 16px; height: 16px; }\n .checklist-task-header--title { flex-grow: 1; font-size: 0.9rem; font-weight: 500; color: var(--color-font-title); transition: font-weight var(--animation-duration) var(--animation-timing), color var(--animation-duration) var(--animation-timing), text-decoration var(--animation-duration) var(--animation-timing); }\n .checklist-task-header--chevron { color: var(--color-font-light); transition: transform var(--animation-duration) var(--animation-timing); flex-shrink: 0; margin-left: auto; }\n .checklist-task-header--chevron svg { display: block; width: 18px; height: 18px; }\n .checklist-task-body {\n overflow: hidden;\n transition: max-height var(--animation-duration) var(--animation-timing), opacity var(--animation-duration) var(--animation-timing);\n max-height: 0;\n opacity: 0;\n }\n .checklist-task--active .checklist-task-body {\n max-height: var(--task-body-active-height, 200px);\n opacity: 1;\n }\n .checklist-task-body-inner { padding: 4px 16px 20px 60px; font-size: 0.875rem; color: var(--color-font-text); line-height: 1.5; }\n .checklist-task-body-content { margin-bottom: 16px; }\n .checklist-task-body-content p:first-child { margin-top: 0; }\n .checklist-task-body-content p:last-child { margin-bottom: 0; }\n .checklist-task-body-content iframe { width: 100%; height: 315px; object-fit: contain; border: none; }\n .checklist-task-body-action { margin-top: 16px; }\n .action-button { display: inline-flex; align-items: center; justify-content: center; background-color: var(--color-primary); color: var(--color-primary-contrast); padding: 10px 18px; font-size: 0.875rem; font-weight: 500; border-radius: var(--radius-lg); border: none; text-align: center; cursor: pointer; transition: background-color var(--animation-duration) var(--animation-timing), box-shadow var(--animation-duration) var(--animation-timing); box-shadow: var(--shadow-sm); }\n .action-button:hover { background-color: color-mix(in srgb, var(--color-primary) 90%, black); box-shadow: var(--shadow-md); }\n .action-button:focus { outline: 2px solid color-mix(in srgb, var(--color-primary) 50%, transparent); outline-offset: 2px; }\n .checklist-task-body-markdone { margin-top: 20px; border-top: 1px solid var(--color-border); padding: 16px 0 0px 0; display: flex; align-items: center; cursor: pointer; color: var(--color-primary); transition: color var(--animation-duration) var(--animation-timing); }\n .checklist-task-body-markdone:hover { color: color-mix(in srgb, var(--color-primary) 80%, black); }\n .checklist-task-body-markdone svg { width: 18px; height: 18px; margin-right: 6px; flex-shrink: 0; font-size: 18px; }\n .checklist-task-body-markdone-label { font-size: 0.875rem; font-weight: 500; line-height: 1; }\n .checklist-task--active .checklist-task-header--title { font-weight: 600; }\n .checklist-task--active .checklist-task-header--chevron { transform: rotate(180deg); }\n .checklist-task--active .checklist-task-header:hover { background: linear-gradient(180deg, var(--color-gray-lighter), transparent); }\n .checklist-task--done { background-color: var(--color-gray-lighter); border-color: var(--color-gray-light); box-shadow: none; }\n .checklist-task--done .checklist-task-header--badge { background-color: var(--color-success); color: var(--color-success-light); }\n .checklist-task--done .checklist-task-header--title { color: var(--color-font-light); }\n .checklist-task--done .checklist-task-body-inner { color: var(--color-font-light); }\n .checklist-task--done .checklist-task-header--title {\n text-decoration: line-through;\n }\n \n /* -------------------------\n Floating style addition\n Only applies if floating="true"\n ------------------------- */\n :host([floating="true"]) .checklists-content {\n position: relative;\n }\n :host([floating="true"]) .checklist-tasks {\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: 1000;\n max-height: 90vh;\n display: none;\n padding: 0px;\n min-width: min(380px, 90vw);\n background-color: var(--color-bg);\n border-radius: var(--radius-lg);\n box-shadow: var(--shadow-lg);\n overflow: hidden;\n }\n :host([floating="true"]) .checklist-task {\n border-radius: 0px;\n border: none;\n box-shadow: none;\n border-bottom: 1px solid var(--color-border);\n }\n :host([floating="true"]) .checklist-task:last-child {\n border-bottom: none;\n }\n :host([floating="true"]) .checklist-task--done {\n background-color: transparent;\n }\n :host([floating="true"]) .checklist-task-header:hover {\n background: linear-gradient(180deg, var(--color-gray-lighter), transparent);\n }\n \n /* -------------------------\n Floating Launcher Styles\n ------------------------- */\n .checklist-floating-launcher {\n padding: 12px;\n background-color: var(--color-bg);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-lg);\n box-shadow: var(--shadow-md);\n transition: transform 0.3s ease;\n cursor: pointer;\n }\n .checklist-floating-launcher--done {\n cursor: default !important;\n }\n .checklist-floating-header {\n padding: 20px;\n padding-bottom: 16px;\n border-bottom: 1px solid var(--color-border);\n cursor: pointer;\n }\n .checklist-floating-header:hover .floating-icon,\n .checklist-floating-launcher:hover .floating-icon {\n color: var(--color-font-title);\n }\n .floating-header {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n }\n .floating-title {\n font-size: 0.875rem;\n font-weight: 600;\n color: var(--color-font-title);\n max-width: calc(100% - 32px);\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n .floating-subtitle {\n font-size: 0.875rem;\n color: var(--color-font-text);\n margin-top: 8px;\n max-width: 100%;\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n .floating-circular-progress {\n width: 26px;\n height: 26px;\n margin-right: 6px;\n }\n .floating-circular-progress svg {\n width: 100%;\n height: 100%;\n transform: rotate(-90deg);\n }\n .floating-circular-progress .track {\n fill: none;\n stroke: var(--color-gray-light);\n stroke-width: 3;\n }\n .floating-circular-progress .progress {\n fill: none;\n stroke: var(--color-primary);\n stroke-width: 3;\n stroke-linecap: round;\n transition: stroke-dashoffset var(--animation-duration) var(--animation-timing);\n }\n .checklist-floating-launcher--done .floating-circular-progress .progress {\n stroke: var(--color-success);\n }\n .floating-icon {\n margin-left: auto;\n color: var(--color-font-light);\n }\n </style>\n ');this.shadowRoot.innerHTML=p+i,this.addTaskEventListeners(),this.floatingEnabled&&this.addFloatingClickListeners(),-1!==this.activeStep&&this.toggleTask(this.activeStep,!0)}else this._checkSessionAndLoad()}},{key:"updateActiveTaskMaxHeight",value:function(){if(-1!==this.activeStep){var e=this.shadowRoot.querySelector('.checklist-task[data-task-index="'.concat(this.activeStep,'"] .checklist-task-body-inner')),t=this.shadowRoot.querySelector('.checklist-task[data-task-index="'.concat(this.activeStep,'"] .checklist-task-body'));if(e&&t){var n=e.offsetHeight;t.style.setProperty("--task-body-active-height","".concat(n,"px"))}}}},{key:"addTaskEventListeners",value:function(){var e=this;this.shadowRoot.querySelectorAll(".checklist-task").forEach((function(t){var n=t.querySelector(".checklist-task-header"),r=parseInt(t.getAttribute("data-task-index"),10);n&&n.addEventListener("click",(function(){var t=e.activeStep===r?-1:r;e.setActiveStep(t)}));var o=t.querySelector(".checklist-task-body-markdone");o&&o.addEventListener("click",(function(t){var n;if(t.stopPropagation(),null!==(n=e.checklistData)&&void 0!==n&&null!==(n=n.outbound)&&void 0!==n&&null!==(n=n.config)&&void 0!==n&&n.steps){var o=e.checklistData.outbound.config.steps[r];if(o){var i=e.activeStep;if(e.checklistData.completedSteps||(e.checklistData.completedSteps=[]),!e.checklistData.completedSteps.includes(o.id)){e.checklistData.completedSteps.push(o.id);var a=e.checklistData.outbound.config.steps,s=-1;if(i===r){for(var l=r+1;l<a.length;l++)if(!e.checklistData.completedSteps.includes(a[l].id)){s=l;break}e.setActiveStep(s)}setTimeout((function(){var t=!1;if(e.floatingEnabled){var n=e.shadowRoot.querySelector(".checklist-tasks");t=n&&"block"===n.style.display}if(e.renderChecklist(e.checklistData),e.floatingEnabled&&t){var r=e.shadowRoot.querySelector(".checklist-tasks");r&&(r.style.display="block")}}),300);var c={checkedStep:o.id};a.length>0&&e.checklistData.completedSteps.length>=a.length&&(e.checklistData.status="done",c.status="done"),e.updateChecklist(e.checklistData.id,c)}}}}));var i=t.querySelector(".checklist-task-body-action .action-button");i&&i.addEventListener("click",(function(t){var n;if(t.stopPropagation(),null!==(n=e.checklistData)&&void 0!==n&&null!==(n=n.outbound)&&void 0!==n&&null!==(n=n.config)&&void 0!==n&&n.steps&&void 0!==bv){var o=e.checklistData.outbound.config.steps[r];if(o&&o.action&&"none"!==o.action)try{"BOT"===o.action?bv.startBot(o.botId):"CUSTOM_ACTION"===o.action?bv.triggerCustomAction(o.actionBody):"REDIRECT_URL"===o.action?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),bv.openURL(o.actionBody,!!o.actionOpenInNewTab)):"FEEDBACK_FLOW"===o.action?bv.startFeedbackFlow(o.formId):"NEWS_ARTICLE"===o.action?bv.openNewsArticle(o.articleId):"HELP_ARTICLE"===o.action?bv.openHelpCenterArticle(o.articleId):"CHECKLIST"===o.action?bv.startChecklist(o.outboundId,!0,null==o?void 0:o.sharedKey):"PRODUCT_TOUR"===o.action&&bv.startProductTour(o.productTourId,!0)}catch(i){}}}))}))}},{key:"setActiveStep",value:function(e){var t=this,n=this.activeStep;this.activeStep=e;var r=[];-1!==n&&n!==this.activeStep&&r.push({index:n,open:!1}),-1!==this.activeStep&&this.activeStep!==n&&r.push({index:this.activeStep,open:!0}),r.forEach((function(e){var n=e.index,r=e.open;t.toggleTask(n,r)}))}},{key:"toggleTask",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.shadowRoot.querySelector('.checklist-task[data-task-index="'.concat(e,'"]'));if(r){var o=r.querySelector(".checklist-task-header");if(o){var i=r.classList.contains("checklist-task--active"),a=null!==n?n:!i;if(a){i||(r.classList.add("checklist-task--active"),o.setAttribute("aria-expanded","true"));var s=r.querySelector(".checklist-task-body-inner");if(s){var l=s.offsetHeight,c=r.querySelector(".checklist-task-body");c&&c.style.setProperty("--task-body-active-height","".concat(l,"px"))}r.querySelectorAll("iframe").forEach((function(n){n._heightListenerAdded||(n._heightListenerAdded=!0,n.addEventListener("load",(function(){t.activeStep===e&&t.updateActiveTaskMaxHeight()})))}))}else!a&&i&&(r.classList.remove("checklist-task--active"),o.setAttribute("aria-expanded","false"))}}}}],o=[{key:"observedAttributes",get:function(){return["checklistId","info","progressbar","dark","floating","sharedKey"]}}],r&&Mm(n.prototype,r),o&&Mm(n,o),Object.defineProperty(n,"prototype",{writable:!1}),t}();"undefined"==typeof customElements||customElements.get("gleap-checklist")||customElements.define("gleap-checklist",e)}}(),function(){if("undefined"!=typeof customElements&&"undefined"!=typeof HTMLElement&&"undefined"!=typeof window&&!customElements.get("gleap-agent-conversation")){var e=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ym(qm(e=zm(this,t,[].concat(r))),"_iframe",null),Ym(qm(e),"_agentConvUrl","https://outboundmedia.gleap.io/agent-conversation"),Ym(qm(e),"_messageListener",null),Ym(qm(e),"_config",{}),e}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vm(e,t)}(t,Wm(HTMLElement)),n=t,o=[{key:"observedAttributes",get:function(){return["agentId","conversationId","dark","placeholder","agentColor","emptyText","context"]}}],(r=[{key:"connectedCallback",value:function(){this._injectIframe(),this._listenForMessages()}},{key:"disconnectedCallback",value:function(){this._messageListener&&window.removeEventListener("message",this._messageListener),this._messageListener=null}},{key:"attributeChangedCallback",value:function(e,t,n){t!==n&&this._iframe&&this._sendConfig()}},{key:"_injectIframe",value:function(){if(!this._iframe){this.style.display="block",this.style.width="100%",this.style.height="100%";var e=document.createElement("iframe");e.src=this._agentConvUrl,e.style.cssText="width: 100%; height: 100%; border: 0; background: transparent;",e.setAttribute("frameborder","0"),e.setAttribute("allow","autoplay; encrypted-media; microphone *;"),e.title="Gleap Agent Conversation",this.appendChild(e),this._iframe=e}}},{key:"_listenForMessages",value:function(){var e=this;this._messageListener||(this._messageListener=function(t){var n,r;try{var o=new URL(e._agentConvUrl);if(t.origin!==o.origin)return}catch(i){return}try{r=JSON.parse(t.data)}catch(i){return}"AGENT_CONVERSATION"===(null===(n=r)||void 0===n?void 0:n.type)&&("agent-conv-loaded"===r.name&&e._sendConfig(),"agent-conv-conversation-created"===r.name&&e.dispatchEvent(new CustomEvent("gleap-agent-conversation-created",{bubbles:!0,composed:!0,detail:r.data})),"agent-conv-message-sent"===r.name&&e.dispatchEvent(new CustomEvent("gleap-agent-message-sent",{bubbles:!0,composed:!0,detail:r.data})),"agent-conv-reply-received"===r.name&&e.dispatchEvent(new CustomEvent("gleap-agent-reply-received",{bubbles:!0,composed:!0,detail:r.data})),"agent-conv-error"===r.name&&e.dispatchEvent(new CustomEvent("gleap-agent-error",{bubbles:!0,composed:!0,detail:r.data})))},window.addEventListener("message",this._messageListener))}},{key:"_sendConfig",value:function(){var e,t=this;if(null!==(e=this._iframe)&&void 0!==e&&e.contentWindow){var n="https://api.gleap.io",r="",o="",i="";try{var a,s,l=Wt.getInstance();n=l.apiUrl||n,r=l.sdkKey||"",o=(null===(a=l.session)||void 0===a?void 0:a.gleapId)||"",i=(null===(s=l.session)||void 0===s?void 0:s.gleapHash)||""}catch(u){}var c={agentId:this.getAttribute("agentId")||"",conversationId:this.getAttribute("conversationId")||null,dark:"true"===this.getAttribute("dark")||""===this.getAttribute("dark"),placeholder:this.getAttribute("placeholder")||"Type a message...",agentColor:this.getAttribute("agentColor")||null,emptyText:this.getAttribute("emptyText")||"How can I help you today?",context:function(){try{var e=t.getAttribute("context");return e?JSON.parse(e):null}catch(n){return null}}(),apiUrl:n,sdkKey:r,gleapId:o,gleapHash:i};this._config=c,this._iframe.contentWindow.postMessage(JSON.stringify({type:"agent-conversation",name:"agent-conv-data",data:c}),"*")}}},{key:"sendMessage",value:function(e){var t;null!==(t=this._iframe)&&void 0!==t&&t.contentWindow&&null!=e&&e.trim()&&this._iframe.contentWindow.postMessage(JSON.stringify({type:"agent-conversation",name:"agent-conv-send-message",data:{content:e}}),"*")}},{key:"clearConversation",value:function(){var e;null!==(e=this._iframe)&&void 0!==e&&e.contentWindow&&this._iframe.contentWindow.postMessage(JSON.stringify({type:"agent-conversation",name:"agent-conv-clear",data:{}}),"*")}}])&&Hm(n.prototype,r),o&&Hm(n,o),Object.defineProperty(n,"prototype",{writable:!1}),t}();customElements.define("gleap-agent-conversation",e)}}());var fv=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),pv(this,"initialized",!1),pv(this,"offlineMode",!1),pv(this,"disablePageTracking",!1),pv(this,"disableInAppNotifications",!1),pv(this,"disableQueryParams",!1),pv(this,"globalData",{screenRecordingData:null,webReplay:null,snapshotPosition:{x:0,y:0}}),"undefined"!=typeof window&&(ir.getInstance(),pr.getInstance().start(),br.getInstance().start(),Qg.getInstance().start())}var t,n,r;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(){er.getInstance().destroy(),tn.getInstance().start().then((function(){a.getInstance().refresh(),_f.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 r=t[n];if(r&&r.actionType){var o,i;if(((null===(o=r.pageRules)||void 0===o?void 0:o.length)>0||r.pageFilter)&&window&&window.location&&!At(window.location.href,r))continue;"notification"===r.actionType?"widget"===(null==r||null===(i=r.data)||void 0===i||null===(i=i.checklist)||void 0===i?void 0:i.popupType)?e.openChecklist(r.data.checklist.id,!0):this.disableInAppNotifications||e.showNotification(r):"banner"===r.actionType?e.showBanner(r):"modal"===r.actionType?e.showModal(r):"tour"===r.actionType?e.startProductTourWithConfig(r.outbound,r.data,!1):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=Qh.getInstance().getReplayData();this.setGlobalDataItem("webReplay",e)}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"setEnvironment",value:function(e){ir.getInstance().environment=e}},{key:"setTags",value:function(e){fg.getInstance().setTags(e)}},{key:"setUrlHandler",value:function(e){er.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(){pr.getInstance().stop()}},{key:"setAiTools",value:function(e){Jn.getInstance().setAgentTools(e),Wf.getInstance().sendAgentToolsUpdate(),er.getInstance().sendConfigUpdate()}},{key:"attachNetworkLogs",value:function(e){y.getInstance().externalRequests=S(e)}},{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";pr.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(o){}var r=Wt.getInstance();r.sdkKey=t,r.setOnSessionReady((function(){setTimeout((function(){tn.getInstance().start().then((function(){Kt.getInstance().start(),T((function(){a.getInstance().injectFeedbackButton(),_f.getInstance().injectNotificationUI(),e.checkForUncompletedTour(),e.checkForUrlParams(),Un.notifyEvent("initialized")}))})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),r.startSession()}}},{key:"openURL",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];er.getInstance().urlHandler(e,t)}},{key:"disableQueryParams",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.getInstance().disableQueryParams=e}},{key:"checkForUrlParams",value:function(){if(this.getInstance().disableQueryParams)console.log("Query params are disabled.");else 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 r=t.get("gleap_conversation");r&&r.length>0&&("true"===r?e.startConversation(!0):e.startBot(r,!0));var o=t.get("gleap_feedback");o&&o.length>0&&e.startFeedbackFlow(o);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=2),setTimeout((function(){e.startProductTour(s)}),1e3*l)}}catch(c){}}},{key:"destroy",value:function(){Qh.getInstance().stop(),Kt.getInstance().stop(),er.getInstance().destroy(),a.getInstance().destroy(),_f.getInstance().clearAllNotifications(!0),Wf.getInstance().destroy(),Wt.getInstance().clearSession(0,!1),Zf.getInstance().removeBannerUI(),this.instance=null}},{key:"closeBanner",value:function(){Zf.getInstance().removeBannerUI()}},{key:"closeModal",value:function(){og.getInstance().hideModal()}},{key:"showAiChatbar",value:function(){Wf.getInstance().manuallyHidden=!1,Wf.getInstance().show()}},{key:"hideAiChatbar",value:function(){Wf.getInstance().manuallyHidden=!0,Wf.getInstance().hide()}},{key:"setAiChatbarQuickActions",value:function(e){Wf.getInstance().setQuickActions(e)}},{key:"setAiChatbarPlaceholder",value:function(e){Wf.getInstance().setPlaceholder(e)}},{key:"setUseCookies",value:function(e){Wt.getInstance().useCookies=e}},{key:"disableLocalStorage",value:function(){Wt.getInstance().localStorageDisabled=!0}},{key:"identify",value:function(e,t,n){return Wt.getInstance().identifySession(e,S(t),n)}},{key:"updateContact",value:function(e){return Wt.getInstance().updateSession(S(e))}},{key:"clearIdentity",value:function(){Wt.getInstance().clearSession()}},{key:"getIdentity",value:function(){return Wt.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=Wt.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return er.getInstance().isOpened()}},{key:"hide",value:function(){er.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){y.getInstance().setMaxRequests(e)}},{key:"startNetworkLogger",value:function(){y.getInstance().start()}},{key:"setNetworkLogsBlacklist",value:function(e){y.getInstance().setBlacklist(e)}},{key:"setNetworkLogPropsToIgnore",value:function(e){y.getInstance().setFilters(e)}},{key:"setReplayOptions",value:function(e){Qh.getInstance().setOptions(e)}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];er.getInstance().hideWidget(e)}},{key:"open",value:function(){er.getInstance().setAppMode("widget"),er.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){Kt.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){Kt.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=S(e);Af.getInstance().formPreFill=t,er.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){Un.on(e,t)}},{key:"enableShortcuts",value:function(e){e?If.getInstance().start():If.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){a.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){ir.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){ir.setAppBuildNumber(e)}},{key:"setWSApiUrl",value:function(e){Wt.getInstance().wsApiUrl=e}},{key:"setApiUrl",value:function(e){Wt.getInstance().apiUrl=e}},{key:"setBannerUrl",value:function(e){Zf.getInstance().setBannerUrl(e)}},{key:"setModalUrl",value:function(e){og.getInstance().setModalUrl(e)}},{key:"setFrameUrl",value:function(e){er.getInstance().frameUrl=e}},{key:"setTicketAttribute",value:function(e,t){Cr.getInstance().setTicketAttribute(e,t)}},{key:"unsetTicketAttribute",value:function(e){Cr.getInstance().unsetTicketAttribute(e)}},{key:"clearTicketAttributes",value:function(){Cr.getInstance().clearTicketAttributes()}},{key:"attachCustomData",value:function(e){Cr.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){Cr.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){Cr.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){Cr.getInstance().clearCustomData()}},{key:"playSound",value:function(e){cg.playSound(e)}},{key:"showTabNotificationBadge",value:function(e){var t=_f.getInstance();t.showNotificationBadge=e,t.updateTabBarNotificationCount()}},{key:"setLanguage",value:function(t){wf.getInstance().setOverrideLanguage(t),e.getInstance().initialized&&setTimeout((function(){e.getInstance().softReInitialize(),e.updateContact({lang:t})}),1e3)}},{key:"registerAgentToolAction",value:function(e){Jn.getInstance().registerAgentToolAction(e)}},{key:"registerCustomAction",value:function(e){Mr.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Mr.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",o=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;T((function(){!function(e,t,n,r,o,i,s,l){var c=d(e),p=d(n),h=d(o),f=d(t),g="#ffffff"===h,m=u(t,"#ffffff"===f?-35:-15),v=u(o,g?100:-120),y=u(o,g?30:-12),b=u(o,g?80:-30),w=(r=parseInt(r,10),Math.round(1.05*r)),k=Math.round(.8*r),x=Math.round(.6*r),S=Math.round(.4*r),C=Math.round(.25*r),I=57+s;l===a.FEEDBACK_BUTTON_CLASSIC_BOTTOM?I=s+15:(l&&l.includes("CLASSIC")||l===a.FEEDBACK_BUTTON_NONE)&&(I=s);var E='\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-ai-ui-widget {\n display: none;\n }\n .gleap-input-highlight {\n box-shadow: 0 0 0 3px '.concat(e," !important;\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(k,"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 word-break: break-word;\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 z-index: ").concat(2147483699,";\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(h,"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(o,";\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(o,"1A 70%,\n ").concat(o," 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;\n height: 100dvh !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;\n max-height: 100dvh !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(k,"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(o,";\n }\n\n .gleap-notification-item-checklist-container {\n display: flex;\n animation: fadeIn;\n animation-duration: .45s;\n background-color: ").concat(o,";\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(x,"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(h,";\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(y,";\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(h,";\n }\n\n .gleap-notification-item-news {\n width: 100%;\n }\n\n .gleap-news-pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n width: 100%;\n }\n\n .gleap-news-page-indicator {\n font-size: 12px;\n color: ").concat(v,";\n }\n\n .gleap-news-next-button {\n background-color: ").concat(e,";\n color: ").concat(c,";\n border-radius: ").concat(C,"px;\n box-sizing: border-box;\n padding: 5px 10px;\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-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: 14px;\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(h,";\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 cursor: pointer;\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(o,";\n border-radius: ").concat(v,";\n box-sizing: border-box;\n flex-direction: column;\n overflow: hidden;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(x,"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 cursor: pointer;\n }\n \n .gleap-notification-item-news-content-title:hover {\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(x,"px;\n border-bottom-left-radius: 0px;\n padding: 20px;\n background-color: ").concat(o,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n line-height: 21px;\n color: ").concat(h,';\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(o,";\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(h,";\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(84+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(k,"px);\n top: ").concat(k,"px;\n background-color: ").concat(o,";\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 !important;\n pointer-events: auto !important;\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 @keyframes bbRedDotPulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.8;\n }\n 100% {\n opacity: 1;\n }\n }\n\n .bb-feedback-button--red-dot {\n position: absolute;\n top: 0px;\n right: 0px;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background-color: #ff3b30;\n box-shadow: 0 2px 4px rgba(0,0,0,0.2);\n z-index: ").concat(2147483631,";\n animation: bbRedDotPulse 2s ease-in-out infinite;\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: 12px;\n padding: 0px 4px;\n height: 20px;\n min-width: 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 .drag-handle-item {\n cursor: grab !important;\n width: 34px;\n min-width: 34px;\n }\n\n .drag-handle-item svg {\n width: 18px !important;\n height: 18px !important;\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(h,";\n border-radius: ").concat(w,"px;\n background-color: ").concat(y,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(b,";\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(y,";\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(b,";\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(o,";\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(h,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(S,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(o,";\n border-radius: ").concat(S,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(o,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(y,";\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 max-height: 100vh;\n min-height: 100dvh !important;\n max-height: 100dvh !important;\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: 10px;\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(h,";\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 margin-bottom: 10px !important;\n margin-top: 10px !important;\n }\n\n .gleap-tour-message ul {\n line-height: 1.3;\n padding-left: 20px;\n margin-top: 10px !important;\n margin-bottom: 10px !important;\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(b,"; \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 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% !important;\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(h," !important;\n background-color: ").concat(y," !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 .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\n /* Modal styles */\n .gleap-modal-wrapper {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: ').concat(2147483640,";\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .gleap-modal-backdrop {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: ").concat(2147483641,";\n }\n\n .gleap-modal {\n position: relative;\n width: 90%;\n max-width: 600px;\n max-height: 90vh;\n z-index: ").concat(2147483700,";\n background-color: ").concat(o,";\n border-radius: ").concat(k,"px;\n overflow: hidden;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n }\n\n .gleap-modal-frame {\n width: 100%;\n border: none;\n display: block;\n outline: none;\n }\n\n body.gleap-modal-open {\n overflow: hidden;\n }\n\n /* Agent Popup styles */\n .gleap-agent-popup-wrapper {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: ").concat(2147483640,";\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .gleap-agent-popup-backdrop {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: ").concat(2147483641,";\n }\n\n .gleap-agent-popup {\n position: relative;\n width: 95%;\n max-width: 700px;\n height: 85vh;\n max-height: 800px;\n z-index: ").concat(2147483700,";\n background-color: ").concat(o,";\n border-radius: ").concat(k,"px;\n overflow: hidden;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n }\n\n .gleap-agent-popup-frame {\n width: 100%;\n height: 100%;\n border: none;\n display: block;\n outline: none;\n }\n\n body.gleap-agent-popup-open {\n overflow: hidden;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 20px, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-admin-frame-container,\n .gleap-frame-container,\n .bb-feedback-button,\n .gleap-notification-container,\n .gleap-tooltip,\n .gleap-ai-ui-widget {\n pointer-events: auto !important;\n }\n "),O=document.querySelector(".gleap-styles");O&&O.remove();var T=document.createElement("style");T.innerHTML=E,T.className="gleap-styles",document.body.appendChild(T)}(e,t,n,o,r,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",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,r)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",r=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 o=r?S(r):{},i=Wt.getInstance();if(i.ready){var a=e||{};i.session.email&&(a.reportedBy=i.session.email),new _n("CRASH",n,a,!0,o).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]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=n.autostartDrawing,i=n.hideBackButton,a=n.format;if(Wt.getInstance().ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var s="start-feedbackflow";r&&(s="start-survey"),er.getInstance().setAppMode(r?a:"widget"),er.getInstance().sendMessage({name:s,data:{flow:t,hideBackButton:i,format:a}},!0),o?er.getInstance().showDrawingScreen("screenshot"):er.getInstance().showWidget()}}},{key:"openConversations",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-conversations",data:{hideBackButton:!e}},!0),er.getInstance().showWidget()}},{key:"openConversation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e,hideBackButton:!t}},!0),er.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];er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"start-bot",data:{botId:e||"",hideBackButton:!t}},!0),er.getInstance().showWidget()}},{key:"askAI",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"ask-ai",data:{question:e,hideBackButton:!t}},!0),er.getInstance().showWidget()}},{key:"sendAgentMessage",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||!t)return Promise.reject(new Error("agentId and message are required."));var r={messages:[{role:"user",content:t.trim()}]};return n.conversationId&&(r.conversationId=n.conversationId),n.additionalContext&&(r.additionalContext=n.additionalContext),new Promise((function(t,o){var i="",a=n.conversationId||null,s=null;re.getInstance().streamAgent(e,r,{onMeta:function(e){e.conversationId&&(a=e.conversationId),e.runId&&(s=e.runId)},onToken:function(e){i+=e.content||"",n.onToken&&n.onToken(e)},onDone:function(e){t({runId:s||(null==e?void 0:e.runId),status:(null==e?void 0:e.status)||"completed",response:i||(null==e?void 0:e.response)||"",conversationId:a})},onError:function(e){o(e)},onToolStart:function(){},onToolEnd:function(){}})}))}},{key:"clearAgentConversation",value:function(){re.getInstance().clearCache()}},{key:"createAgentChat",value:function(e){return new sv(e)}},{key:"openHelpCenterCollection",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-help-collection",data:{collectionId:e,hideBackButton:!t}},!0),er.getInstance().showWidget())}},{key:"openHelpCenterArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-help-article",data:{articleId:e,hideBackButton:!t}},!0),er.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),er.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),er.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-news-article",data:{id:e}},!0),er.getInstance().showWidget())}},{key:"openChecklists",value:function(){er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-checklists",data:{}},!0),er.getInstance().showWidget()}},{key:"startChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return!!e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"start-checklist",data:dv({outboundId:e,hideBackButton:!t},n?{sharedKey:n}:{})},!0),er.getInstance().showWidget(),!0)}},{key:"openChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-checklist",data:{id:e,hideBackButton:!t}},!0),er.getInstance().showWidget())}},{key:"getChecklistData",value:function(e,t){if(!e)return Promise.reject(new Error("outboundId is required"));var n=D.getInstance();return n.validateChecklist(e,t).then((function(e){return n.fetchChecklist(e)}))}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),er.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-feature-requests",data:{}},!0),er.getInstance().showWidget()}},{key:"startProductTour",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this;Wt.getInstance().startProductTourConfig(e).then((function(r){var o;!t||null==r||!r.startURL||null!==(o=window)&&void 0!==o&&null!==(o=o.location)&&void 0!==o&&null!==(o=o.href)&&void 0!==o&&o.includes(null==r?void 0:r.baseURL)?n.startProductTourWithConfig(e,r,!0):window.location.href="".concat(r.startURL,"?gleap_tour=").concat(e,"&gleap_tour_delay=1")})).catch((function(e){}))}},{key:"checkForUncompletedTour",value:function(){var e=Om.getInstance().loadUncompletedTour();e&&Om.getInstance().startWithConfig(e.tourId,e.tourData,500)}},{key:"startProductTourWithConfig",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Om.getInstance().startWithConfig(e,t,0,n)}},{key:"showBanner",value:function(e){try{Zf.getInstance().showBanner(e)}catch(t){}}},{key:"showModal",value:function(e){try{og.getInstance().showModal(e)}catch(t){}}},{key:"startAgent",value:function(e,t){try{Wf.getInstance().showWithAgent(e,t)}catch(n){}}},{key:"setAIAgent",value:function(e,t){try{Wf.getInstance().setAgent(e,t)}catch(n){}}},{key:"showNotification",value:function(e){_f.getInstance().showNotification(e)}}],n&&cv(t.prototype,n),r&&cv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();if(pv(fv,"invoked",!0),pv(fv,"silentCrashReportSent",!1),pv(fv,"instance",void 0),"undefined"!=typeof window){var gv=window.GleapActions;if(gv&&gv.length>0)for(var mv=0;mv<gv.length;mv++){var vv=gv[mv];vv&&vv.e&&fv[vv.e]&&fv[vv.e].apply(fv,vv.a)}}var yv=function(e){try{var t=e.split("/"),n=t[2];if("article"===n){var r=t[3];fv.openHelpCenterArticle(r,!0)}if("collection"===n){var o=t[3];fv.openHelpCenterCollection(o,!0)}if("flow"===n){var i=t[3];fv.startFeedbackFlow(i,!0)}if("survey"===n){var a=t[3];fv.showSurvey(a)}if("bot"===n){var s=t[3];fv.startBot(s,!0)}if("news"===n){var l=t[3];fv.openNewsArticle(l,!0)}if("checklist"===n){var c=t[3];fv.startChecklist(c,!0,t[4])}if("tour"===n){var u=t[3];fv.startProductTour(u)}}catch(d){console.error("Failed to handle Gleap link: ",e)}};const bv=fv,wv=bv;var kv=t.A;export{kv as default};
|
|
1
|
+
var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};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 r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function o(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(e){var t=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.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)}e.d(t,{A:()=>wv});var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o(this,"feedbackButton",null),o(this,"injectedFeedbackButton",!1),o(this,"buttonHidden",null),o(this,"lastButtonIcon",null),o(this,"showingRedDot",!1)}var t,n,i;return t=e,i=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"destroy",value:function(){this.feedbackButton&&(this.feedbackButton.remove(),this.feedbackButton=null),this.buttonHidden=null,this.lastButtonIcon=null,this.injectedFeedbackButton=!1,this.instance=null}},{key:"toggleFeedbackButton",value:function(t){this.buttonHidden=!t,e.getInstance().updateFeedbackButtonState(),_f.getInstance().updateContainerStyle()}},{key:"updateRedDot",value:function(e){var t=er.getInstance();if(this.feedbackButton&&!this.buttonHidden&&!t.isOpened()){var n="bb-feedback-button--red-dot",r=this.feedbackButton.querySelector(".".concat(n));if(e){if(!r){var o=document.createElement("div");o.className=n,this.feedbackButton.appendChild(o)}}else r&&r.remove()}}},{key:"feedbackButtonPressed",value:function(){var e=er.getInstance();e.isOpened()?(e.hideWidget(),this.updateRedDot(this.showingRedDot)):(e.setAppMode("widget"),e.showWidget(),this.updateRedDot(!1))}},{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&&!er.getInstance().isOpened()?(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=tn.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(Wf.getInstance().updateUIVisibility(),null!==this.feedbackButton){var t=tn.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",wf.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 r=!1;null===e.getInstance().buttonHidden?t.feedbackButtonPosition===e.FEEDBACK_BUTTON_NONE&&(r=!0):e.getInstance().buttonHidden&&(r=!0),r&&this.feedbackButton.classList.add("bb-feedback-button--disabled"),t.feedbackButtonPosition===e.FEEDBACK_BUTTON_BOTTOM_LEFT&&this.feedbackButton.classList.add("bb-feedback-button--bottomleft"),er.getInstance().isOpened()&&this.feedbackButton.classList.add("bb-feedback-button--open");var o=er.getInstance().appMode;"survey"!==o&&"survey_full"!==o&&"survey_web"!==o||this.feedbackButton.classList.add("bb-feedback-button--survey"),!0!==t.hideForGuests||Wt.getInstance().isUser()||this.feedbackButton.classList.add("bb-feedback-button--hidden")}}}])&&r(t.prototype,n),i&&r(t,i),Object.defineProperty(t,"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 r,o,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=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}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,r=new Array(t);n<t;n++)r[n]=e[n];return r}o(a,"FEEDBACK_BUTTON_BOTTOM_RIGHT","BOTTOM_RIGHT"),o(a,"FEEDBACK_BUTTON_BOTTOM_LEFT","BOTTOM_LEFT"),o(a,"FEEDBACK_BUTTON_CLASSIC","BUTTON_CLASSIC"),o(a,"FEEDBACK_BUTTON_CLASSIC_LEFT","BUTTON_CLASSIC_LEFT"),o(a,"FEEDBACK_BUTTON_CLASSIC_BOTTOM","BUTTON_CLASSIC_BOTTOM"),o(a,"FEEDBACK_BUTTON_NONE","BUTTON_NONE"),o(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),r=n[0],o=n[1],i=n[2],a=[parseInt(r,16)+t,parseInt(o,16)+t,parseInt(i,16)+t];r=a[0],o=a[1],i=a[2],r=Math.max(Math.min(255,r),0).toString(16),o=Math.max(Math.min(255,o),0).toString(16),i=Math.max(Math.min(255,i),0).toString(16);var s=(r.length<2?"0":"")+r,c=(o.length<2?"0":"")+o,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>':"drag"===e?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512">\x3c!--!Font Awesome Pro 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc.--\x3e<path d="M64 128a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm0 160a32 32 0 1 0 0-64 32 32 0 1 0 0 64zM96 416a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96-288a32 32 0 1 0 0-64 32 32 0 1 0 0 64zm32 128a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM192 448a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"/></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 h(e){return h="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},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}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"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h(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,r;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 r=0;r<this.filters.length;r++)delete n.request.headers[this.filters[r]];if(n&&n.request&&n.request.payload){var o=n.request.payload;try{o=JSON.parse(n.request.payload)}catch(c){}if(o){for(r=0;r<this.filters.length;r++)delete o[this.filters[r]];n.request.payload=JSON.stringify(o)}}if(n&&n.response&&n.response.responseText)try{var i=JSON.parse(n.response.responseText);for(r=0;r<this.filters.length;r++)delete i[this.filters[r]];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":h(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,r){if(!e.stopped&&r&&e.requests){if(n.length>0&&void 0!==n[0]&&void 0!==n[0].url)e.requests[r]={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 o=n[1]&&n[1].method?n[1].method:"GET";e.requests[r]={request:{payload:t.preparePayload(n[1].body),headers:n[1].headers},type:o,url:n[0],date:new Date}}else e.requests[r]={url:n[0],date:new Date};e.cleanRequests()}},onFetchLoad:function(n,r){if(!e.stopped&&r&&e.requests&&e.requests[r]){try{e.requests[r].success=!0,e.requests[r].response={status:n.status,statusText:"",responseText:"<request_still_open>"},e.calcRequestTime(r)}catch(i){}try{var o="";n.headers&&void 0!==n.headers.get&&(o=n.headers.get("content-type")),e.isContentTypeSupported(o)?n.text().then((function(o){e.requests[r]&&(e.requests[r].success=!0,e.requests[r].response={status:n.status,statusText:n.statusText,responseText:t.cleanupContentSize(o)}),e.calcRequestTime(r),e.cleanRequests()})).catch((function(t){e.cleanRequests()})):(e.requests[r]&&(e.requests[r].success=!0,e.requests[r].response={status:n.status,statusText:n.statusText,responseText:"<content_type_not_supported>"}),e.calcRequestTime(r),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 r=t.currentTarget,o=r.responseType,i="<"+o+">";""!==o&&"text"!==o||(i=e.cleanupContentSize(r.responseText)),e.requests[r.bbRequestId].success=!0,e.requests[r.bbRequestId].response={status:r.status,statusText:r.statusText,responseText:i},e.calcRequestTime(r.bbRequestId)}e.cleanRequests()}}})}}},{key:"interceptNetworkRequests",value:function(e){var t,n=this,r=XMLHttpRequest.prototype.open,o=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)),r.apply(this,arguments)},XMLHttpRequest.prototype.send=function(){return e.onSend&&e.onSend(this,arguments),o.apply(this,arguments)},window.fetch&&(t=window.fetch,window.fetch=function(){var r=++n.requestId;return e.onFetch(arguments,r),t.apply(this,arguments).then((function(t){if(t&&"function"==typeof t.clone){var n=t.clone();e.onFetchLoad(n,r)}return t})).catch((function(t){throw e.onFetchFailed(t,r),t}))}),e}},{key:"blobToTextPromise",value:function(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(e){e&&e.target&&e.target.result?t(e.target.result):n()},r.onerror=function(e){n(e)},r.readAsText(e)}))}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();g(v,"instance",void 0);const y=v;var b=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(r,o){var i=0===e.indexOf("data:image/jpeg"),a=new Image;a.src=e,a.onerror=function(){o()},a.onload=function(){var e=document.createElement("canvas"),o=t,s=n;t>a.width/1.5&&(o=a.width/1.5),n>a.height/1.5&&(s=a.height/1.5);var l=a.width,c=a.height;l>c?l>o&&(c*=o/l,l=o):c>s&&(l*=s/c,c=s),e.width=l,e.height=c,e.getContext("2d").drawImage(a,0,0,l,c),r(i?e.toDataURL("image/jpeg",.7):e.toDataURL())}}))},w=/(android|iphone|ipod|ipad|blackberry|iemobile|opera mini|webos)/i,k=function(){return x()?"mobile":"desktop"},x=function(){if("undefined"==typeof window)return!1;try{var e="undefined"!=typeof navigator?navigator:void 0;if(null!=e&&e.userAgentData&&"boolean"==typeof e.userAgentData.mobile&&null!==e.userAgentData.mobile)return e.userAgentData.mobile;if(e&&w.test(e.userAgent||e.vendor||""))return!0;if((null==e?void 0:e.maxTouchPoints)>1&&window.matchMedia){var t=window.matchMedia("(hover: none) and (pointer: coarse)");if(null!=t&&t.matches)return!0}}catch(n){}return!1},S=function(e){if(!e)return{};if("string"==typeof e||e instanceof String)try{return JSON.parse(e)}catch(t){return{}}return e},C=function(e,t){return e.length>t?e.slice(0,t)+"...":e},I=function(e){try{var t=e.split("."),n=!1,r=t[t.length-2];return"co"!==r&&"com"!==r&&"gv"!==r&&"ac"!==r&&"edu"!==r&&"gov"!==r&&"mil"!==r&&"net"!==r&&"org"!==r||(n=!0),(t=t.slice(n?-3:-2)).join(".")}catch(o){}return e},E=function(e){try{var t=localStorage.getItem("gleap-widget-".concat(e));if(t)return JSON.parse(t)}catch(n){}return null},O=function(e,t){var n="gleap-widget-".concat(e);if(t)try{localStorage.setItem(n,JSON.stringify(t))}catch(r){}else localStorage.removeItem(n)},T=function(e){"complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",(function(){e()}))};function L(e){return L="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},L(e)}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,R(r.key),r)}}function M(e,t,n){return(t=R(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e){var t=function(e,t){if("object"!=L(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=L(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==L(t)?t:String(t)}var P="success",N="error",_=function(){function e(){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),M(this,"validationRequests",new Map),M(this,"validationCache",new Map),M(this,"fetchRequests",new Map),M(this,"fetchCache",new Map),e.instance)return e.instance;e.instance=this}var t,n,r;return t=e,n=[{key:"clearCache",value:function(){this.validationCache.clear(),this.fetchCache.clear(),this.validationRequests.clear(),this.fetchRequests.clear()}},{key:"_getQueryParams",value:function(){var e=Wt.getInstance(),t=null==e?void 0:e.session,n=wf.getInstance().getActiveLanguage()||"en";return"gleapId=".concat((null==t?void 0:t.gleapId)||"","&gleapHash=").concat((null==t?void 0:t.gleapHash)||"","&lang=").concat(n)}},{key:"_getApiUrl",value:function(){var e=Wt.getInstance();return(null==e?void 0:e.apiUrl)||null}},{key:"_makeRequest",value:function(e,t,n){return new Promise((function(r,o){var i=new XMLHttpRequest;i.open(e,t);var a=Wt.getInstance();null==a||a.injectSession(i),n&&i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.onreadystatechange=function(){if(4===i.readyState)if(i.status>=200&&i.status<300)try{var e=i.responseText?JSON.parse(i.responseText):null;r(e)}catch(t){o({status:i.status,statusText:"JSON Parse Error",responseText:i.responseText,error:t})}else o({status:i.status,statusText:i.statusText,responseText:i.responseText})},i.onerror=function(){o({status:0,statusText:"Network Error",responseText:null})},i.send(n?JSON.stringify(n):null)}))}},{key:"_createCacheKey",value:function(e,t){return t?"".concat(e,"::").concat(t):e}},{key:"validateChecklist",value:function(e,t){var n=this,r=this._createCacheKey(e,t),o=this.validationCache.get(r);if(o)return o.status===P?Promise.resolve(o.internalId):Promise.reject(o.error);if(this.validationRequests.has(r))return this.validationRequests.get(r);var i=this._getApiUrl();if(!i){var a=new Error("ChecklistNetworkManager: Gleap API URL not configured.");return this.validationCache.set(r,{status:N,error:a}),Promise.reject(a)}var s="".concat(i,"/outbound/checklists?").concat(this._getQueryParams()),l=this._makeRequest("POST",s,{outboundId:e,sharedKey:t}).then((function(e){if(e&&e.id)return n.validationCache.set(r,{status:P,internalId:e.id}),e.id;var t=new Error("Validation response missing checklist ID.");throw n.validationCache.set(r,{status:N,error:e||t}),t})).catch((function(e){throw n.validationCache.set(r,{status:N,error:e}),e})).finally((function(){n.validationRequests.delete(r)}));return this.validationRequests.set(r,l),l}},{key:"fetchChecklist",value:function(e){var t=this,n=this.fetchCache.get(e);if(n)return n.status===P?Promise.resolve(JSON.parse(JSON.stringify(n.data))):Promise.reject(n.error);if(this.fetchRequests.has(e))return this.fetchRequests.get(e).then((function(e){return JSON.parse(JSON.stringify(e))}));var r=this._getApiUrl();if(!r){var o=new Error("ChecklistNetworkManager: Gleap API URL not configured.");return this.fetchCache.set(e,{status:N,error:o}),Promise.reject(o)}var i="".concat(r,"/outbound/checklists/").concat(e,"?convertTipTap=true&").concat(this._getQueryParams()),a=this._makeRequest("GET",i,null).then((function(n){if(n)return t.fetchCache.set(e,{status:P,data:n}),JSON.parse(JSON.stringify(n));var r=new Error("Empty response received for checklist fetch.");throw t.fetchCache.set(e,{status:N,error:n||r}),r})).catch((function(n){throw t.fetchCache.set(e,{status:N,error:n}),n})).finally((function(){t.fetchRequests.delete(e)}));return this.fetchRequests.set(e,a),a.then((function(e){return JSON.parse(JSON.stringify(e))}))}}],r=[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}],n&&A(t.prototype,n),r&&A(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();M(_,"instance",null);const D=_;function j(e){return j="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},j(e)}function F(){F=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==j(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(j(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function B(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 U(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 U(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 U(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t,n,r,o,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(r,o)}var z=function(e,t,n){var r,o,i,a,s,l,c;switch(e){case"meta":null===(r=n.onMeta)||void 0===r||r.call(n,t);break;case"token":null===(o=n.onToken)||void 0===o||o.call(n,t);break;case"tool_start":null===(i=n.onToolStart)||void 0===i||i.call(n,t);break;case"tool_end":null===(a=n.onToolEnd)||void 0===a||a.call(n,t);break;case"done":null===(s=n.onDone)||void 0===s||s.call(n,t);break;case"error":null===(l=n.onError)||void 0===l||l.call(n,t);break;case"handoff":null===(c=n.onHandoff)||void 0===c||c.call(n,t)}},q=function(){var e,t=(e=F().mark((function e(t,n){var r,o,i,a,s,l,c,u,d,p,h,f,g,m,v,y,b,w;return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.body){e.next=3;break}return null===(r=n.onError)||void 0===r||r.call(n,{message:"No response body."}),e.abrupt("return");case 3:o=t.body.getReader(),i=new TextDecoder,a="",s="",l="",e.prev=8;case 9:return e.next=12,o.read();case 12:if(u=e.sent,d=u.done,p=u.value,!d){e.next=17;break}return e.abrupt("break",24);case 17:a+=i.decode(p,{stream:!0}),h=a.split("\n"),a=null!==(c=h.pop())&&void 0!==c?c:"",f=B(h);try{for(f.s();!(g=f.n()).done;)if(m=g.value,(v=m.replace(/\r$/,"")).startsWith("event: "))s=v.slice(7).trim();else if(v.startsWith("data: "))l+=(l?"\n":"")+v.slice(6);else if(""===v){if(s&&l)try{y=JSON.parse(l),z(s,y,n)}catch(k){}s="",l=""}}catch(x){f.e(x)}finally{f.f()}e.next=9;break;case 24:if(s&&l)try{b=JSON.parse(l),z(s,b,n)}catch(S){}e.next=30;break;case 27:e.prev=27,e.t0=e.catch(8),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)&&(null===(w=n.onError)||void 0===w||w.call(n,{message:"Stream interrupted."}));case 30:case"end":return e.stop()}}),e,null,[[8,27]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){H(i,r,o,a,s,"next",e)}function s(e){H(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(e,n){return t.apply(this,arguments)}}();function W(e){return W="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},W(e)}function G(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 V(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 V(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function J(){J=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==W(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(W(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function X(e,t,n,r,o,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(r,o)}function Z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function $(e,t,n){return(t=Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(e){var t=function(e,t){if("object"!=W(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=W(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==W(t)?t:String(t)}var ee="success",te="error",ne=function(){function e(){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$(this,"executeInFlight",new Map),$(this,"messagesCache",new Map),$(this,"messagesRequests",new Map),e.instance)return e.instance;e.instance=this}var t,n,r,o,i;return t=e,n=[{key:"clearCache",value:function(){this.messagesCache.clear(),this.messagesRequests.clear(),this.executeInFlight.clear()}},{key:"_getApiUrl",value:function(){var e=Wt.getInstance();return(null==e?void 0:e.apiUrl)||null}},{key:"_getHeaders",value:function(){var e,t,n=Wt.getInstance(),r={"Content-Type":"application/json"};return null!=n&&n.sdkKey&&(r["Api-Token"]=n.sdkKey),null!=n&&null!==(e=n.session)&&void 0!==e&&e.gleapId&&(r["Gleap-Id"]=n.session.gleapId),null!=n&&null!==(t=n.session)&&void 0!==t&&t.gleapHash&&(r["Gleap-Hash"]=n.session.gleapHash),r}},{key:"_makeRequest",value:function(e,t,n){return new Promise((function(r,o){var i=new XMLHttpRequest;i.open(e,t);var a=Wt.getInstance();null==a||a.injectSession(i),n&&i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.onreadystatechange=function(){if(4===i.readyState)if(i.status>=200&&i.status<300)try{r(i.responseText?JSON.parse(i.responseText):null)}catch(e){o({status:i.status,statusText:"JSON Parse Error",error:e})}else o({status:i.status,statusText:i.statusText,responseText:i.responseText})},i.onerror=function(){return o({status:0,statusText:"Network Error"})},i.send(n?JSON.stringify(n):null)}))}},{key:"streamAgent",value:(o=J().mark((function e(t,n,r,o){var i,a,s,l,c,u,d;return J().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.executeInFlight.get(t)){e.next=2;break}return e.abrupt("return");case 2:if(this.executeInFlight.set(t,!0),i=this._getApiUrl()){e.next=8;break}return this.executeInFlight.delete(t),null===(a=r.onError)||void 0===a||a.call(r,{message:"Gleap API URL not configured."}),e.abrupt("return");case 8:return s="".concat(i,"/v3/shared/agents/").concat(t,"/stream"),l=K(K({},this._getHeaders()),{},{Accept:"text/event-stream"}),e.prev=10,e.next=13,fetch(s,{method:"POST",headers:l,body:JSON.stringify(n),signal:o});case 13:c=e.sent,e.next=23;break;case 16:if(e.prev=16,e.t0=e.catch(10),this.executeInFlight.delete(t),"AbortError"!==(null===e.t0||void 0===e.t0?void 0:e.t0.name)){e.next=21;break}return e.abrupt("return");case 21:return null===(u=r.onError)||void 0===u||u.call(r,{message:"Failed to connect to agent."}),e.abrupt("return");case 23:if(c.ok){e.next=27;break}return this.executeInFlight.delete(t),null===(d=r.onError)||void 0===d||d.call(r,{message:"Server error: ".concat(c.status)}),e.abrupt("return");case 27:return e.next=29,q(c,r);case 29:n.conversationId&&this._invalidateMessagesCache(n.conversationId),this.executeInFlight.delete(t);case 31:case"end":return e.stop()}}),e,this,[[10,16]])})),i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){X(i,n,r,a,s,"next",e)}function s(e){X(i,n,r,a,s,"throw",e)}a(void 0)}))},function(e,t,n,r){return i.apply(this,arguments)})},{key:"executeAgent",value:function(e,t){var n=this;if(this.executeInFlight.get(e))return Promise.reject(new Error("Agent execution already in progress."));var r=this._getApiUrl();if(!r)return Promise.reject(new Error("AgentNetworkManager: Gleap API URL not configured."));this.executeInFlight.set(e,!0);var o="".concat(r,"/v3/shared/agents/").concat(e,"/execute");return this._makeRequest("POST",o,t).then((function(e){return t.conversationId&&n._invalidateMessagesCache(t.conversationId),null!=e&&e.conversationId&&n._invalidateMessagesCache(e.conversationId),e})).finally((function(){n.executeInFlight.delete(e)}))}},{key:"getConversationMessages",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("kai"===e)return Promise.resolve({messages:[]});var i="".concat(t,":").concat(r,":").concat(o),a=this.messagesCache.get(i);if(a)return a.status===ee?Promise.resolve(JSON.parse(JSON.stringify(a.data))):Promise.reject(a.error);if(this.messagesRequests.has(i))return this.messagesRequests.get(i).then((function(e){return JSON.parse(JSON.stringify(e))}));var s=this._getApiUrl();if(!s)return Promise.reject(new Error("AgentNetworkManager: Gleap API URL not configured."));var l="".concat(s,"/v3/shared/agents/").concat(e,"/conversations/").concat(t,"/messages?limit=").concat(r,"&skip=").concat(o),c=this._makeRequest("GET",l,null).then((function(e){return n.messagesCache.set(i,{status:ee,data:e}),JSON.parse(JSON.stringify(e))})).catch((function(e){throw n.messagesCache.set(i,{status:te,error:e}),e})).finally((function(){n.messagesRequests.delete(i)}));return this.messagesRequests.set(i,c),c.then((function(e){return JSON.parse(JSON.stringify(e))}))}},{key:"getConversations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if("kai"===e)return Promise.resolve({conversations:[]});var r=this._getApiUrl();return r?this._makeRequest("GET","".concat(r,"/v3/shared/agents/").concat(e,"/conversations?limit=").concat(t,"&skip=").concat(n),null):Promise.reject(new Error("AgentNetworkManager: Gleap API URL not configured."))}},{key:"_invalidateMessagesCache",value:function(e){var t,n=G(this.messagesCache.keys());try{for(n.s();!(t=n.n()).done;){var r=t.value;r.startsWith(e+":")&&this.messagesCache.delete(r)}}catch(s){n.e(s)}finally{n.f()}var o,i=G(this.messagesRequests.keys());try{for(i.s();!(o=i.n()).done;){var a=o.value;a.startsWith(e+":")&&this.messagesRequests.delete(a)}}catch(s){i.e(s)}finally{i.f()}}}],r=[{key:"getInstance",value:function(){return e.instance||(e.instance=new e),e.instance}}],n&&Z(t.prototype,n),r&&Z(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();$(ne,"instance",null);const re=ne,oe=Math.min,ie=Math.max,ae=Math.round,se=Math.floor,le=e=>({x:e,y:e}),ce={left:"right",right:"left",bottom:"top",top:"bottom"},ue={start:"end",end:"start"};function de(e,t,n){return ie(e,oe(t,n))}function pe(e,t){return"function"==typeof e?e(t):e}function he(e){return e.split("-")[0]}function fe(e){return e.split("-")[1]}function ge(e){return"x"===e?"y":"x"}function me(e){return"y"===e?"height":"width"}const ve=new Set(["top","bottom"]);function ye(e){return ve.has(he(e))?"y":"x"}function be(e){return ge(ye(e))}function we(e){return e.replace(/start|end/g,(e=>ue[e]))}const ke=["left","right"],xe=["right","left"],Se=["top","bottom"],Ce=["bottom","top"];function Ie(e,t,n,r){const o=fe(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?xe:ke:t?ke:xe;case"left":case"right":return t?Se:Ce;default:return[]}}(he(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(we)))),i}function Ee(e){return e.replace(/left|right|bottom|top/g,(e=>ce[e]))}function Oe(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 Te(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Le(e,t,n){let{reference:r,floating:o}=e;const i=ye(t),a=be(t),s=me(a),l=he(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(fe(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function Ae(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=pe(t,e),f=Oe(h),g=s[p?"floating"===d?"reference":"floating":d],m=Te(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?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},w=Te(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(m.top-w.top+f.top)/b.y,bottom:(w.bottom-m.bottom+f.bottom)/b.y,left:(m.left-w.left+f.left)/b.x,right:(w.right-m.right+f.right)/b.x}}const Me=new Set(["left","top"]);function Re(){return"undefined"!=typeof window}function Pe(e){return De(e)?(e.nodeName||"").toLowerCase():"#document"}function Ne(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _e(e){var t;return null==(t=(De(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function De(e){return!!Re()&&(e instanceof Node||e instanceof Ne(e).Node)}function je(e){return!!Re()&&(e instanceof Element||e instanceof Ne(e).Element)}function Fe(e){return!!Re()&&(e instanceof HTMLElement||e instanceof Ne(e).HTMLElement)}function Be(e){return!(!Re()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ne(e).ShadowRoot)}const Ue=new Set(["inline","contents"]);function He(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ue.has(o)}const ze=new Set(["table","td","th"]);function qe(e){return ze.has(Pe(e))}const We=[":popover-open",":modal"];function Ge(e){return We.some((t=>{try{return e.matches(t)}catch(n){return!1}}))}const Ve=["transform","translate","scale","rotate","perspective"],Je=["transform","translate","scale","rotate","perspective","filter"],Ye=["paint","layout","strict","content"];function Ke(e){const t=Xe(),n=je(e)?Qe(e):e;return Ve.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Je.some((e=>(n.willChange||"").includes(e)))||Ye.some((e=>(n.contain||"").includes(e)))}function Xe(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Ze=new Set(["html","body","#document"]);function $e(e){return Ze.has(Pe(e))}function Qe(e){return Ne(e).getComputedStyle(e)}function et(e){return je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tt(e){if("html"===Pe(e))return e;const t=e.assignedSlot||e.parentNode||Be(e)&&e.host||_e(e);return Be(t)?t.host:t}function nt(e){const t=tt(e);return $e(t)?e.ownerDocument?e.ownerDocument.body:e.body:Fe(t)&&He(t)?t:nt(t)}function rt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=nt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ne(o);if(i){const e=ot(a);return t.concat(a,a.visualViewport||[],He(o)?o:[],e&&n?rt(e):[])}return t.concat(o,rt(o,[],n))}function ot(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function it(e){const t=Qe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Fe(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=ae(n)!==i||ae(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function at(e){return je(e)?e:e.contextElement}function st(e){const t=at(e);if(!Fe(t))return le(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=it(t);let a=(i?ae(n.width):n.width)/r,s=(i?ae(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const lt=le(0);function ct(e){const t=Ne(e);return Xe()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:lt}function ut(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=at(e);let a=le(1);t&&(r?je(r)&&(a=st(r)):a=st(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ne(e))&&t}(i,n,r)?ct(i):le(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Ne(i),t=r&&je(r)?Ne(r):r;let n=e,o=ot(n);for(;o&&r&&t!==n;){const e=st(o),t=o.getBoundingClientRect(),r=Qe(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Ne(o),o=ot(n)}}return Te({width:u,height:d,x:l,y:c})}function dt(e,t){const n=et(e).scrollLeft;return t?t.left+n:ut(_e(e)).left+n}function pt(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-dt(e,n),y:n.top+t.scrollTop}}const ht=25;const ft=new Set(["absolute","fixed"]);function gt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ne(e),r=_e(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Xe();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=dt(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=ht&&(i-=a)}else c<=ht&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=_e(e),n=et(e),r=e.ownerDocument.body,o=ie(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ie(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+dt(e);const s=-n.scrollTop;return"rtl"===Qe(r).direction&&(a+=ie(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(_e(e));else if(je(t))r=function(e,t){const n=ut(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Fe(e)?st(e):le(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=ct(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Te(r)}function mt(e,t){const n=tt(e);return!(n===t||!je(n)||$e(n))&&("fixed"===Qe(n).position||mt(n,t))}function vt(e,t,n){const r=Fe(t),o=_e(t),i="fixed"===n,a=ut(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=le(0);function c(){l.x=dt(o)}if(r||!r&&!i)if(("body"!==Pe(t)||He(o))&&(s=et(t)),r){const e=ut(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?le(0):pt(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function yt(e){return"static"===Qe(e).position}function bt(e,t){if(!Fe(e)||"fixed"===Qe(e).position)return null;if(t)return t(e);let n=e.offsetParent;return _e(e)===n&&(n=n.ownerDocument.body),n}function wt(e,t){const n=Ne(e);if(Ge(e))return n;if(!Fe(e)){let t=tt(e);for(;t&&!$e(t);){if(je(t)&&!yt(t))return t;t=tt(t)}return n}let r=bt(e,t);for(;r&&qe(r)&&yt(r);)r=bt(r,t);return r&&$e(r)&&yt(r)&&!Ke(r)?n:r||function(e){let t=tt(e);for(;Fe(t)&&!$e(t);){if(Ke(t))return t;if(Ge(t))return null;t=tt(t)}return null}(e)||n}const kt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=_e(r),s=!!t&&Ge(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=le(1);const u=le(0),d=Fe(r);if((d||!d&&!i)&&(("body"!==Pe(r)||He(a))&&(l=et(r)),Fe(r))){const e=ut(r);c=st(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?le(0):pt(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:_e,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Ge(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=rt(e,[],!1).filter((e=>je(e)&&"body"!==Pe(e))),o=null;const i="fixed"===Qe(e).position;let a=i?tt(e):e;for(;je(a)&&!$e(a);){const t=Qe(a),n=Ke(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&ft.has(o.position)||He(a)&&!n&&mt(e,a))?r=r.filter((e=>e!==a)):o=t,a=tt(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=gt(t,n,o);return e.top=ie(r.top,e.top),e.right=oe(r.right,e.right),e.bottom=oe(r.bottom,e.bottom),e.left=ie(r.left,e.left),e}),gt(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:wt,getElementRects:async function(e){const t=this.getOffsetParent||wt,n=this.getDimensions,r=await n(e.floating);return{reference:vt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=it(e);return{width:t,height:n}},getScale:st,isElement:je,isRTL:function(e){return"rtl"===Qe(e).direction}};function xt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function St(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=at(e),u=o||i?[...c?rt(c):[],...rt(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=_e(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(s||t(),!p||!h)return;const f={rootMargin:-se(d)+"px "+-se(o.clientWidth-(u+p))+"px "+-se(o.clientHeight-(d+h))+"px "+-se(u)+"px",threshold:ie(0,oe(1,l))||1};let g=!0;function m(t){const r=t[0].intersectionRatio;if(r!==l){if(!g)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||xt(c,e.getBoundingClientRect())||a(),g=!1}try{r=new IntersectionObserver(m,{...f,root:o.ownerDocument})}catch(v){r=new IntersectionObserver(m,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let g=l?ut(e):null;return l&&function t(){const r=ut(e);g&&!xt(g,r)&&n();g=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Ct=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=he(n),s=fe(n),l="y"===ye(n),c=Me.has(a)?-1:1,u=i&&l?-1:1,d=pe(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},It=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=pe(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),p=ye(he(o)),h=ge(p);let f=u[h],g=u[p];if(a){const e="y"===h?"bottom":"right";f=de(f+d["y"===h?"top":"left"],f,f-d[e])}if(s){const e="y"===p?"bottom":"right";g=de(g+d["y"===p?"top":"left"],g,g-d[e])}const m=l.fn({...t,[h]:f,[p]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:a,[p]:s}}}}}},Et=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...m}=pe(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=he(o),y=ye(s),b=he(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),k=p||(b||!g?[Ee(s)]:function(e){const t=Ee(e);return[we(e),t,we(t)]}(s)),x="none"!==f;!p&&x&&k.push(...Ie(s,g,f,w));const S=[s,...k],C=await l.detectOverflow(t,m),I=[];let E=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&I.push(C[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=fe(e),o=be(e),i=me(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ee(a)),[a,Ee(a)]}(o,a,w);I.push(C[e[0]],C[e[1]])}if(E=[...E,{placement:o,overflows:I}],!I.every((e=>e<=0))){var O,T;const e=((null==(O=i.flip)?void 0:O.index)||0)+1,t=S[e];if(t){if(!("alignment"===d&&y!==ye(t))||E.every((e=>ye(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:E},reset:{placement:t}}}let n=null==(T=E.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:T.placement;if(!n)switch(h){case"bestFit":{var L;const e=null==(L=E.filter((e=>{if(x){const t=ye(e.placement);return t===y||"y"===t}return!0})).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:L[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Ot=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=pe(e,t)||{};if(null==c)return{};const d=Oe(u),p={x:n,y:r},h=be(o),f=me(h),g=await a.getDimensions(c),m="y"===h,v=m?"top":"left",y=m?"bottom":"right",b=m?"clientHeight":"clientWidth",w=i.reference[f]+i.reference[h]-p[h]-i.floating[f],k=p[h]-i.reference[h],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=x?x[b]:0;S&&await(null==a.isElement?void 0:a.isElement(x))||(S=s.floating[b]||i.floating[f]);const C=w/2-k/2,I=S/2-g[f]/2-1,E=oe(d[v],I),O=oe(d[y],I),T=E,L=S-g[f]-O,A=S/2-g[f]/2+C,M=de(T,A,L),R=!l.arrow&&null!=fe(o)&&A!==M&&i.reference[f]/2-(A<T?E:O)-g[f]/2<0,P=R?A<T?A-T:A-L:0;return{[h]:p[h]+P,data:{[h]:M,centerOffset:A-M-P,...R&&{alignmentOffset:P}},reset:R}}}),Tt=(e,t,n)=>{const r=new Map,o={platform:kt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="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:o}),{x:u,y:d}=Le(c,r,l),p=r,h={},f=0;for(let m=0;m<s.length;m++){var g;const{name:n,fn:i}=s[m],{x:v,y,data:b,reset:w}=await i({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:{...a,detectOverflow:null!=(g=a.detectOverflow)?g:Ae},elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=y?y:d,h={...h,[n]:{...h[n],...b}},w&&f<=50&&(f++,"object"==typeof w&&(w.placement&&(p=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:d}=Le(c,p,l))),m=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var Lt=function(e,t,n){if(!e||!t||!n)return!0;var r=function(e){return e.replace(/\/$/,"")},o=function(e,t){if(!e||!t)return!1;try{if(e.includes(t))return!0}catch(r){}var n=function(e){if(!e)return null;try{e.startsWith("/")&&(e=e.substring(1));var t=e.replace(/{\w+}/g,"___PLACEHOLDER___");return t=(t=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).replace(/___PLACEHOLDER___/g,"[^&?]+"),new RegExp(t,"i")}catch(r){return null}}(t);if(!n)return!1;try{return n.test(e)}catch(r){return!1}},i=!1;switch(n){case"is":i=r(e)===r(t);break;case"isnot":i=r(e)!==r(t);break;case"contains":i=o(e,t);break;case"startswith":i=e.startsWith(t);break;case"endswith":i=e.endsWith(t);break;case"notcontains":i=!o(e,t);break;default:i=!1}return i},At=function(e,t){var n=t.pageRules&&t.pageRules.length>0?t.pageRules:t.pageFilter?[{pageFilter:t.pageFilter,pageFilterType:t.pageFilterType}]:[];return 0===n.length||n.every((function(t){return Lt(e,t.pageFilter,t.pageFilterType)}))};function Mt(e){return Mt="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},Mt(e)}function Rt(e){return function(e){if(Array.isArray(e))return Pt(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 Pt(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 Pt(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 Pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dt(r.key),r)}}function _t(e,t,n){return(t=Dt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dt(e){var t=function(e,t){if("object"!=Mt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mt(t)?t:String(t)}var jt=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),_t(this,"tooltips",[]),_t(this,"filteredTooltips",[]),_t(this,"lastUrl",null),_t(this,"elementToFloatingUIMap",new WeakMap),_t(this,"elementToTooltipMap",new WeakMap),_t(this,"nextId",0),_t(this,"linkTooltip",(function(e,n){if(!e.hasAttribute("data-gleap-tooltip")){var r=t.nextId++;if(e.setAttribute("data-gleap-tooltip",r),e){var o=null;if("hotspot"===n.mode){var i=document.createElement("div");i.setAttribute("data-gleap-tooltip-anchor",r),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",r),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),o=a,t.elementToTooltipMap.set(e,n)}else o=e;var s=t.createTooltip(o,n.html,n);t.elementToFloatingUIMap.set(e,s)}}})),_t(this,"updateFilteredTooltips",(function(){t.filteredTooltips=t.getFilteredTooltips(),t.checkForTooltips()})),_t(this,"getFilteredTooltips",(function(){if(!t.tooltips)return[];var e=window.location.href;return t.tooltips.filter((function(t){return t.pageRules&&t.pageRules.length>0?At(e,{pageRules:t.pageRules}):!t.page||0===t.page.length||!!Lt(e,t.page,t.pageType)}))})),_t(this,"checkForTooltips",(function(){for(var e=0;e<t.filteredTooltips.length;e++){var n=t.filteredTooltips[e];try{for(var r=document.querySelectorAll(n.selector),o=0;o<r.length;o++){var i=r[o];i&&t.linkTooltip(i,n)}}catch(a){}}})),_t(this,"load",(function(){var e=t,n=Wt.getInstance(),r=new XMLHttpRequest;r.open("GET",n.apiUrl+"/config/"+n.sdkKey+"/tooltips"),r.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.setRequestHeader("Api-Token",n.sdkKey);try{r.setRequestHeader("Gleap-Id",n.session.gleapId),r.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(o){}r.onerror=function(){console.error("Failed to fetch tooltips")},r.onreadystatechange=function(t){if(4===r.readyState&&200===r.status)try{e.tooltips=JSON.parse(r.responseText),e.updateFilteredTooltips()}catch(o){console.error("Failed to parse tooltips",o)}},r.send()}))}var t,n,r;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,r,o,i=(n=t.updateHotspotPositions.bind(t),r=250,o=null,function(){if(!o){var e=this,t=arguments;o=setTimeout((function(){n.call.apply(n,[e].concat(Rt(t))),o=null}),r)}});window.addEventListener("resize",i),window.requestAnimationFrame((function(){e.observer=new MutationObserver((function(n){t.lastUrl!==window.location.href&&(t.lastUrl=window.location.href,t.filteredTooltips=t.getFilteredTooltips()),n.forEach((function(n){if("attributes"===n.type){var r=n.target;r.nodeType===Node.ELEMENT_NODE&&(r.querySelector("[data-gleap-tooltip-hotspot]")||r.hasAttribute("data-gleap-tooltip-mode")||r.hasAttribute("data-gleap-tooltip"))&&t.updateHotspotPositions()}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)}))}))})),e.observer.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class"]})}))}}},{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 r=document.createElement("div");r.className="gleap-tooltip",r.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(r);var o,i=r.querySelector(".gleap-tooltip-arrow"),a=St(e,r,(function(){Tt(e,r,{placement:"left"===n.posX?"left":"right",middleware:[Ct(10),Et(),It(),Ot({element:i})]}).then((function(e){var t=e.x,n=e.y,o=e.middlewareData,a=e.placement;try{if(Object.assign(r.style,{left:"".concat(t,"px"),top:"".concat(n,"px")}),o.arrow){var s={left:"",top:"",transform:""};null!=o.arrow.x&&(s.left="".concat(o.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!=o.arrow.y&&(s.top="".concat(o.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(o),r.style.visibility="visible",r.style.opacity="1",r.style.pointerEvents="auto"}function l(){o=setTimeout((function(){r.style.opacity="0",setTimeout((function(){r.style.visibility="hidden",r.style.pointerEvents="none"}),200)}),500)}return e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",l),r.addEventListener("mouseenter",s),r.addEventListener("mouseleave",l),e.addEventListener("click",l),r.addEventListener("click",l),{cleanup:a,tooltip:r}}},{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:"destroy",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null),document.querySelectorAll(".gleap-tooltip").forEach((function(e){return e.remove()})),document.querySelectorAll("[data-gleap-tooltip-anchor]").forEach((function(e){return e.remove()})),document.querySelectorAll("[data-gleap-tooltip-hotspot]").forEach((function(e){return e.remove()})),document.querySelectorAll("[data-gleap-tooltip]").forEach((function(e){return e.removeAttribute("data-gleap-tooltip")})),document.querySelectorAll("[data-gleap-tooltip-mode]").forEach((function(e){return e.removeAttribute("data-gleap-tooltip-mode")})),this.elementToFloatingUIMap=new WeakMap,this.elementToTooltipMap=new WeakMap,this.tooltips=[],this.filteredTooltips=[]}},{key:"repositionHotspot",value:function(e,t){if(e&&t){var n=e.getAttribute("data-gleap-tooltip");if(n){var r=document.querySelector('[data-gleap-tooltip-hotspot="'.concat(n,'"]'));if(r){t.posX||(t.posX="right"),t.posY||(t.posY="center"),t.offsetX||(t.offsetX=4),t.offsetY||(t.offsetY=0);var o=e.getBoundingClientRect();try{var i=document.createRange();i.selectNodeContents(e);var a=window.getComputedStyle(e),s=i.getBoundingClientRect().width+parseFloat(a.paddingLeft);s<o.width&&(o.width=s)}catch(h){}var l=document.querySelector('[data-gleap-tooltip-anchor="'.concat(n,'"]')).getBoundingClientRect(),c=l.left-o.left,u=l.top-o.top,d=0,p=0;switch(t.posX){case"left":p=-1*(t.offsetX+17);break;case"right":p=o.width+t.offsetX}switch(t.posY){case"top":d=0+t.offsetY;break;case"bottom":d=o.height-17+t.offsetY;break;case"center":d=o.height/2-8.5+t.offsetY}r&&(r.style.position="absolute",r.style.top=d-u+"px",r.style.left=p-c+"px")}}}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e,this.instance.start()),this.instance}}],n&&Nt(t.prototype,n),r&&Nt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ft(e){return Ft="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},Ft(e)}function Bt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bt(Object(n),!0).forEach((function(t){zt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qt(r.key),r)}}function zt(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"!=Ft(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ft(t)?t:String(t)}_t(jt,"instance",void 0);var Wt=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),zt(this,"apiUrl","https://api.gleap.io"),zt(this,"wsApiUrl","wss://ws.gleap.io"),zt(this,"sdkKey",null),zt(this,"updatingSession",!1),zt(this,"useCookies",!0),zt(this,"localStorageDisabled",!1),zt(this,"session",{gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0}),zt(this,"ready",!1),zt(this,"onSessionReadyListener",[]),zt(this,"setOnSessionReady",(function(e){t.ready?e():t.onSessionReadyListener.push(e)})),zt(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))})),zt(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&&Un.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash));try{O("session-".concat(t.sdkKey),null)}catch(o){}if(t.useCookies)try{!function(e){try{var t=I(window.location.host.split(":")[0]);document.cookie=e+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT; Domain="+t}catch(o){}}("session-".concat(t.sdkKey))}catch(o){}if(t.ready=!1,t.session={gleapId:null,gleapHash:null,name:"",email:"",userId:"",phone:"",value:0},er.getInstance().sendMessage({name:"session-cleared"},!0),_f.getInstance().clearAllNotifications(!1),_f.getInstance().setNotificationCount(0),Zf.getInstance().removeBannerUI(),og.getInstance().hideModal(),n&&!isNaN(e)){var r=10*Math.pow(e,2);setTimeout((function(){t.startSession(e+1)}),1e3*r)}})),zt(this,"validateSession",(function(e){var n;if(e&&e.gleapId){var r=!1;(null===(n=t.session)||void 0===n?void 0:n.gleapId)!==(null==e?void 0:e.gleapId)&&(r=!0),t.session&&t.session.gleapHash&&Un.notifyEvent("unregister-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),t.localStorageDisabled||O("session-".concat(t.sdkKey),e),t.useCookies&&function(e,t,n){try{var r="";if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),r="; expires="+o.toUTCString()}var i=I(window.location.host.split(":")[0]);document.cookie=e+"="+(t||"")+r+"; 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&&Un.notifyEvent("register-pushmessage-group","gleapuser-".concat(t.session.gleapHash)),r&&(setTimeout((function(){D.getInstance().clearCache(),re.getInstance().clearCache(),Kt.getInstance().restart();var e=jt.getInstance();if(e){try{e.destroy()}catch(t){}e.load()}}),0),"function"==typeof window.dispatchEvent&&window.dispatchEvent(new CustomEvent("session-updated"))),t.notifySessionReady()}})),zt(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(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}}catch(i){}return null}("session-".concat(t.sdkKey));if(n){var r=JSON.parse(decodeURIComponent(n));t.validateSession(r)}}}catch(s){}if(!(t.localStorageDisabled||t.session&&t.session.gleapId&&t.session.gleapId.length>0)){var o=E("session-".concat(t.sdkKey));o&&t.validateSession(o)}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)}catch(s){}else 429!==a.status&&i.clearSession(e,!0)},a.send(JSON.stringify({lang:wf.getInstance().getActiveLanguage(),deviceType:k(),platform:"web"}))})),zt(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(r){}return t.checkIfSessionDataNeedsUpdate(n)})),zt(this,"checkIfSessionDataNeedsUpdate",(function(e){if(e)for(var n=Object.keys(e),r=0;r<n.length;r++){var o=n[r];if(JSON.stringify(t.session[o])!==JSON.stringify(e[o])&&(!t.session.customData||JSON.stringify(t.session.customData[o])!==JSON.stringify(e[o])))return!0}return!1})),zt(this,"updateSession",(function(e){if(t.checkIfSessionDataNeedsUpdate(e)){var n=t;return new Promise((function(r,o){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return o("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(){o()},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),r(a)}catch(i){o(i)}else o()},t.send(JSON.stringify({data:Ut(Ut({},e),{},{lang:wf.getInstance().getActiveLanguage(),deviceType:k(),platform:"web"}),type:"js",sdkVersion:"16.0.2",ws:!0}))}))}))}})),zt(this,"identifySession",(function(e,n,r){if(t.checkIfSessionNeedsUpdate(e,n)){var o=t;return new Promise((function(i,a){t.setOnSessionReady((function(){if(!o.session.gleapId||!o.session.gleapHash)return a("Session not ready yet.");var t=new XMLHttpRequest;t.open("POST",o.apiUrl+"/sessions/identify"),t.setRequestHeader("Content-Type","application/json;charset=UTF-8"),t.setRequestHeader("Api-Token",o.sdkKey);try{t.setRequestHeader("Gleap-Id",o.session.gleapId),t.setRequestHeader("Gleap-Hash",o.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);o.validateSession(n),i(n)}catch(l){a(l)}else a()};var s=Ut({},n);n.customData&&(delete s.customData,s=Ut(Ut({},s),n.customData)),t.send(JSON.stringify(Ut(Ut({},s),{},{userId:e,userHash:r,lang:wf.getInstance().getActiveLanguage(),deviceType:k(),platform:"web"})))}))}))}})),zt(this,"startProductTourConfig",(function(e){var n=t;return new Promise((function(r,o){t.setOnSessionReady((function(){if(!n.session.gleapId||!n.session.gleapHash)return o("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(){o()},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&&r(n.config)}catch(i){o(i)}else o()},t.send(JSON.stringify({outboundId:e}))}))}))})),zt(this,"validateProductTour",(function(e){var n=t;return new Promise((function(r,o){t.setOnSessionReady((function(){var t;if(!n.session.gleapId||!n.session.gleapHash)return o("Session not ready yet.");var i=new XMLHttpRequest;i.open("POST",n.apiUrl+"/outbound/producttourvalidation"),i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.setRequestHeader("Api-Token",n.sdkKey);try{i.setRequestHeader("Gleap-Id",n.session.gleapId),i.setRequestHeader("Gleap-Hash",n.session.gleapHash)}catch(a){}i.onerror=function(){o()},i.onreadystatechange=function(e){if(4===i.readyState)if(200===i.status||201===i.status)try{var t=JSON.parse(i.responseText);t&&"live"===t.status&&t.passedPageFilter?r(t.config):o()}catch(a){o(a)}else o()},i.send(JSON.stringify({outboundId:e,currentUrl:null===(t=window)||void 0===t||null===(t=t.location)||void 0===t?void 0:t.href}))}))}))}))}var t,n,r;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=[],er.getInstance().sendSessionUpdate()}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Ht(t.prototype,n),r&&Ht(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Gt(e){return Gt="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},Gt(e)}function Vt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Yt(r.key),r)}}function Jt(e,t,n){return(t=Yt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yt(e){var t=function(e,t){if("object"!=Gt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Gt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Gt(t)?t:String(t)}zt(Wt,"instance",void 0);var Kt=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),Jt(this,"eventArray",[]),Jt(this,"streamedEventArray",[]),Jt(this,"eventMaxLength",500),Jt(this,"errorCount",0),Jt(this,"streamingEvents",!1),Jt(this,"lastUrl",void 0),Jt(this,"mainLoopTimeout",null),Jt(this,"socket",null),Jt(this,"connectedWebSocketGleapId",null),Jt(this,"connectionTimeout",null),Jt(this,"pingWS",null),Jt(this,"handleOpenBound",null),Jt(this,"handleErrorBound",null),Jt(this,"handleMessageBound",null),Jt(this,"handleCloseBound",null),Jt(this,"runEventStreamLoop",(function(){var e=t;t.streamEvents(),t.mainLoopTimeout=setTimeout((function(){e.runEventStreamLoop()}),2500)})),Jt(this,"streamEvents",(function(){if(!(!Wt.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",Wt.getInstance().apiUrl+"/sessions/events"),n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),Wt.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 r=ir.getInstance().getSessionDuration();n.send(JSON.stringify({time:r,events:t.streamedEventArray,opened:er.getInstance().isOpened(),type:"js",sdkVersion:"16.0.2",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,r;return t=e,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=Wt.getInstance().session.gleapId,Wt.getInstance().session&&Wt.getInstance().sdkKey&&(this.socket=new WebSocket("".concat(Wt.getInstance().wsApiUrl,"?gleapId=").concat(Wt.getInstance().session.gleapId,"&gleapHash=").concat(Wt.getInstance().session.gleapHash,"&apiKey=").concat(Wt.getInstance().sdkKey,"&sdkVersion=").concat("16.0.2")),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(Qg.getInstance().initialized)return;if("update"===e.name){var t,n=e.data,r=n.a,o=n.u,i=n.ai,a=er.getInstance().isOpened();if(r){var s=["banner","modal"],l=r.filter((function(e){var t;return!a||s.includes(null==e||null===(t=e.actionType)||void 0===t?void 0:t.toLowerCase())}));bv.getInstance().performActions(l)}i&&Wf.getInstance().setConfig({enabled:null!==(t=i.e)&&void 0!==t&&t,placeholder:i.p,quickActions:i.a,style:i.s,agentId:i.g,agentName:i.n}),null!=o&&_f.getInstance().setNotificationCount(o)}if("checklist"===e.name&&null!=e&&e.data&&window){var c,u,d=e.data,p=null!==(c=d.completedSteps)&&void 0!==c?c:[],h=null!==(u=d.completedStepsBefore)&&void 0!==u?u:[];if(p.length>h.length)for(var f=function(e){var t,n=null==d||null===(t=d.steps)||void 0===t?void 0:t.find((function(t){return t.id===p[e]}));if(!n)return 1;var r=e;h.includes(n)||Un.notifyEvent("checklist-step-completed",{checklistId:d.id,outboundId:d.outboundId,stepId:n.id,stepIndex:r,step:n,completedSteps:d.completedSteps,status:d.status,data:d})},g=0;g<p.length;g++)f(g);"done"===d.status&&Un.notifyEvent("checklist-completed",{checklistId:d.id,outboundId:d.outboundId,completedSteps:d.completedSteps,status:d.status,data:d}),"function"==typeof window.dispatchEvent&&window.dispatchEvent(new CustomEvent("checkListUpdate",{detail:e.data}))}}catch(m){}}},{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!==Wt.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(!bv.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=S(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()}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Vt(t.prototype,n),r&&Vt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Xt(e){return Xt="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},Xt(e)}function Zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qt(r.key),r)}}function $t(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"!=Xt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xt(t)?t:String(t)}Jt(Kt,"instance",void 0);var en=function(e,t){var n=parseInt(e);return isNaN(n)?t:n},tn=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),$t(this,"flowConfig",null),$t(this,"projectActions",null),$t(this,"onConfigLoadedListener",[]),$t(this,"onConfigLoaded",(function(e){null!==t.flowConfig?e():t.onConfigLoadedListener.push(e)})),$t(this,"start",(function(){var e=Wt.getInstance(),n=E("config-".concat(e.sdkKey,"-").concat(wf.getInstance().getActiveLanguage()));return n?(t.applyConfig(n),t.loadConfigFromServer().catch((function(e){})),Promise.resolve()):t.loadConfigFromServer()})),$t(this,"loadConfigFromServer",(function(){var e=t;return new Promise((function(t,n){var r=Wt.getInstance(),o=new XMLHttpRequest,i=wf.getInstance().getActiveLanguage();o.open("GET",r.apiUrl+"/config/"+r.sdkKey+"?lang="+i),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),r.injectSession(o),o.onerror=function(){n()},o.onreadystatechange=function(a){if(4===o.readyState){if(403===o.status&&(!function(e){try{var t="gleap-widget-".concat(e);localStorage.removeItem(t)}catch(n){}}("config-".concat(r.sdkKey,"-").concat(i)),bv.destroy()),200===o.status||201===o.status)try{var s=JSON.parse(o.responseText);try{O("config-".concat(r.sdkKey,"-").concat(i),s)}catch(l){}return e.applyConfig(s),t()}catch(a){}n()}},o.send()}))}))}var t,n,r;return t=e,n=[{key:"getFlowConfig",value:function(){return this.flowConfig}},{key:"applyStylesFromConfig",value:function(){var e=this.flowConfig;bv.setStyles(e.color?e.color:"#485BFF",e.headerColor?e.headerColor:"#485BFF",e.buttonColor?e.buttonColor:"#485BFF",e.backgroundColor?e.backgroundColor:"#FFFFFF",en(e.borderRadius,20),en(e.buttonX,20),en(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(),er.getInstance().sendConfigUpdate(),a.getInstance().updateFeedbackButtonState(),_f.getInstance().updateContainerStyle(),t.enableWebReplays?Qh.getInstance().start():Qh.getInstance().stop(),t.enableNetworkLogs&&y.getInstance().start(),y.getInstance().setLoadAllResources(!!t.sendNetworkResources),t.networkLogPropsToIgnore&&y.getInstance().setFilters(t.networkLogPropsToIgnore),t.networkLogBlacklist&&y.getInstance().setBlacklist(t.networkLogBlacklist),wf.getInstance().updateRTLSupport(),bv.enableShortcuts(!!t.enableShortcuts),e.aiBar&&Wf.getInstance().setConfig(e.aiBar),this.notifyConfigLoaded()}catch(n){}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Zt(t.prototype,n),r&&Zt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();$t(tn,"instance",void 0);function nn(e){return nn="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},nn(e)}function rn(){rn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==nn(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(nn(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function on(e,t,n,r,o,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(r,o)}function an(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){on(i,r,o,a,s,"next",e)}function s(e){on(i,r,o,a,s,"throw",e)}a(void 0)}))}}var sn=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 r=0;r<e.childNodes.length;r++)e.childNodes[r]&&(t+=e.childNodes[r].outerHTML);return t},ln=function(e,t,n){return r=e,o=/url\((.*?)\)/g,i=function(e){return new Promise((function(r,o){if(!e)return r(e);var i=e.substr(4,e.length-5).replaceAll("'","").replaceAll('"',"");if(0===i.indexOf("http")||0===i.indexOf("//")||0===i.indexOf("data"))return r(e);try{var a=i;return t&&(a=new URL(i,t+"/").href),n?r("url("+a+")"):cn(a).then((function(e){return r("url("+e+")")}))}catch(s){return r(e)}}))},new Promise((function(e,t){var n=[];r.replace(o,(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var a=i.apply(void 0,[e].concat(r));n.push(a)})),Promise.all(n).then((function(t){e(r.replace(o,(function(){return t.shift()})))})).catch((function(){t()}))}));var r,o,i},cn=function(e){return new Promise((function(t,n){if(e){var r=new XMLHttpRequest;r.onload=function(){var e=new FileReader;e.onloadend=function(){t(e.result)},e.onerror=function(){n()},e.readAsDataURL(r.response)},r.onerror=function(e){t()},r.open("GET",e),r.responseType="blob",r.send()}else t()}))},un=function(e){return new Promise((function(t,n){if(e&&e.src){if(function(e){var t=["//fonts.googleapis.com","//cdn.jsdelivr.net","//cdnjs.cloudflare.com","//ajax.googleapis.com","//use.typekit.net",".amazonaws.com","//jssdk.gleap.io",".gstatic.com"];if(!e)return!1;for(var n=0;n<t.length;n++)if(-1!==e.indexOf(t[n]))return!0;return!1}(e.src))return t();var r=new XMLHttpRequest;r.onload=function(){var n=new FileReader;n.onloadend=function(){!function(e,t,n,r){b(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(r.response)},r.onerror=function(e){t()};var o=e.src;r.open("GET",o),r.responseType="blob",r.send()}else t()}))},dn=function(e,t,n,r){var o=null;t.ownerNode&&(o=e.querySelector('[bb-styleid="'+r+'"]'));try{if(o){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&&(o.parentNode.insertBefore(i,o),o.remove())}}catch(c){}},pn=function(e){var t=null;try{e.cssRules?t=e.cssRules:e.rules&&(t=e.rules)}catch(o){}var n="";if(t)for(var r in t)t[r].cssText&&(n+=t[r].cssText+"\n");return function(e){for(var t="",n=0,r=0;r<e.length;r++)"{"===e[r]?(n++,t+=e[r]):"}"===e[r]?n>0&&(n--,t+=e[r]):t+=e[r];return t}(n)},hn=function(e,t){for(var n,r=[],o=function(){var e=document.styleSheets[i];if(e.media&&"print"===e.media.mediaText)return 1;var o=pn(e);if(e&&e.ownerNode)if(""!=o){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("/"));r.push(ln(o,s,t).then((function(t){return{styletext:t,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}})))}else r.push(Promise.resolve({styletext:o,stylesheet:e,styleId:e.ownerNode.getAttribute("bb-styleid")}))},i=0;i<document.styleSheets.length;i++)o();return Promise.all(r).then((function(t){if(t)for(var n=0;n<t.length;n++)dn(e,t[n].stylesheet,t[n].styletext,t[n].styleId);return!0}))},fn=function(e,t){return new Promise((function(n,r){return t?hn(e,t).then((function(){n()})).catch((function(){n()})):function(e){for(var t=e.querySelectorAll("img"),n=[],r=0;r<t.length;r++){var o=t[r];n.push(un(o))}return Promise.all(n)}(e).then((function(){return hn(e,t).then((function(){n()}))})).catch((function(){console.warn("Gleap: Failed with resolving local resources. Please contact the Gleap support team."),n()}))}))},gn=function(e,t,n){if(void 0!==e.adoptedStyleSheets)for(var r=0;r<e.adoptedStyleSheets.length;r++){var o=e.adoptedStyleSheets[r],i=pn(o),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)}},mn=function(e){if(e&&"function"==typeof e.getAnimations){var t=e.getAnimations(),n={};return t.forEach((function(t){var r,o=(null===(r=t.effect)||void 0===r?void 0:r.getKeyframes())||[],i=o[o.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},vn=function(){var e=an(rn().mark((function e(t){var n,r,o,i;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=1,r=function(){var e=an(rn().mark((function e(t,o,i){var a,s,l,c,u,d,p,h,f;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=function(){var e=an(rn().mark((function e(t,n,o){return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t){e.next=11;break}return e.prev=1,e.next=4,r(t,n,o);case 4:e.next=8;break;case 6:e.prev=6,e.t0=e.catch(1);case 8:t=!t.nextElementSibling||t.nextElementSibling.nextSibling!==t.nextSibling&&null!==t.nextSibling?t.nextSibling:t.nextElementSibling,e.next=0;break;case 11:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t,n,r){return e.apply(this,arguments)}}(),s=t.cloneNode(),null!=(l=mn(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,b(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||(h=t.value,("value"===t.getAttribute("gleap-ignore")||t.classList.contains("gl-mask"))&&(h=new Array(h.length+1).join("*")),s.setAttribute("bb-data-value",h),"checkbox"!==t.type&&"radio"!==t.type||!t.checked||s.setAttribute("bb-data-checked",!0))),o.appendChild(s),!t.shadowRoot){e.next=29;break}return f=n,n++,e.next=27,a(t.shadowRoot.firstChild,s,f);case 27:gn(t.shadowRoot,s,f),void 0!==s.setAttribute&&s.setAttribute("bb-shadow-parent",f);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,r){return e.apply(this,arguments)}}(),o=document.createDocumentFragment(),e.next=5,r(t,o);case 5:return(i=o.querySelector("head"))||(i=o),gn(window.document,i),e.abrupt("return",o);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),yn=function(e){return new Promise(function(){var t=an(rn().mark((function t(n,r){var o,i,a,s,l,c,u,d,p,h,f,g,m,v,y;return rn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(t.prev=0,o=window.document.querySelectorAll("style, link"),i=0;i<o.length;++i)o[i].setAttribute("bb-styleid",i);return t.next=5,vn(window.document.documentElement);case 5: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(h=window.location.href.substring(0,window.location.href.lastIndexOf("/")),f=h+"/",d&&(d.startsWith("http")?f=d:(f=h+d).endsWith("/")||(f+="/")),(g=window.document.createElement("base")).href=f,(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(y=a.querySelectorAll("[bb-element=true]"),i=0;i<y.length;++i)y[i]&&(y[i].style.height=y[i].getAttribute("bb-height")+"px");fn(a,e).then((function(){var e=sn(a);n({html:e,baseUrl:h,width:window.innerWidth,height:window.innerHeight,isMobile:x()})})),t.next=31;break;case 27:t.prev=27,t.t0=t.catch(0),console.warn("Gleap: Failed to capture screenshot",t.t0),n(null);case 31:case"end":return t.stop()}}),t,null,[[0,27]])})));return function(e,n){return t.apply(this,arguments)}}())};function bn(e){return bn="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},bn(e)}function wn(){wn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==bn(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(bn(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function kn(e,t,n,r,o,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(r,o)}function xn(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){kn(i,r,o,a,s,"next",e)}function s(e){kn(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Sn(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 Cn(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 Cn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 Cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function In(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,On(r.key),r)}}function En(e,t,n){return(t=On(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function On(e){var t=function(e,t){if("object"!=bn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=bn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==bn(t)?t:String(t)}var Tn=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),En(this,"rerender",void 0),En(this,"stream",void 0),En(this,"mediaRecorder",void 0),En(this,"audioMuted",!1),En(this,"audioAvailable",!0),En(this,"available",!0),En(this,"isRecording",!1),En(this,"file",null),En(this,"maxRecordTime",e.MAX_RECORD_TIME),En(this,"recordTime",0),En(this,"recordingTimer",null),En(this,"permissionErrorText",""),En(this,"_displayVideoTrack",null),En(this,"_displayStream",null),En(this,"_micStream",null),this.rerender=t,this.permissionErrorText=n,navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia||(this.available=!1),setTimeout((function(){r.rerender()}),e.RERENDER_DELAY)}var t,n,r,o,i,a;return t=e,n=[{key:"getSupportedMimeType",value:function(){var t,n=Sn(e.MIME_TYPES);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(window.MediaRecorder&&MediaRecorder.isTypeSupported(r))return r}}catch(o){n.e(o)}finally{n.f()}return"video/webm"}},{key:"formatTime",value:function(e){return(e-(e%=60))/60+(9<e?":":":0")+e}},{key:"stopStreamTracks",value:function(e){if(e)try{e.getTracks().forEach((function(e){return e.stop()}))}catch(t){}}},{key:"createMediaStream",value:function(e){var t=e.filter((function(e){return null!==e}));return new MediaStream(t)}},{key:"getFirstVideoTrack",value:function(e){if(!e)return null;var t=e.getVideoTracks();return t.length>0?t[0]:null}},{key:"getFirstAudioTrack",value:function(e){if(!e)return null;var t=e.getAudioTracks();return t.length>0?t[0]:null}},{key:"startScreenRecording",value:(a=xn(wn().mark((function t(){var n,r;return wn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia&&!this.isRecording){t.next=4;break}return this.available=!1,this.rerender(),t.abrupt("return");case 4:return t.prev=4,t.next=7,navigator.mediaDevices.getDisplayMedia({video:{width:{ideal:Math.min(window.screen.width,e.MAX_WIDTH)},height:{ideal:Math.min(window.screen.height,e.MAX_HEIGHT)},frameRate:{ideal:e.IDEAL_FRAME_RATE,max:e.MAX_FRAME_RATE},displaySurface:"monitor"},audio:!1,selfBrowserSurface:"include"});case 7:if(n=t.sent,this._displayStream=n,this._displayVideoTrack=this.getFirstVideoTrack(n),this.audioMuted){t.next=15;break}return t.next=13,this.startAudioRecording();case 13:t.next=19;break;case 15:this.audioAvailable=!1,r=this.createMediaStream([this._displayVideoTrack]),this.stream=r,this.handleRecord({stream:r});case 19:this.rerender(),t.next=26;break;case 22:t.prev=22,t.t0=t.catch(4),window.alert(this.permissionErrorText),this.rerender();case 26:case"end":return t.stop()}}),t,this,[[4,22]])}))),function(){return a.apply(this,arguments)})},{key:"stopScreenRecording",value:function(){if(this.mediaRecorder&&this.stream&&this.isRecording){this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null);try{this.mediaRecorder.stop()}catch(e){}this.stopStreamTracks(this.stream),this._displayStream&&(this.stopStreamTracks(this._displayStream),this._displayStream=null),this._micStream&&(this.stopStreamTracks(this._micStream),this._micStream=null),this._displayVideoTrack=null,this.rerender()}}},{key:"startAudioRecording",value:(i=xn(wn().mark((function e(){var t,n,r,o;return wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._displayVideoTrack){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},video:!1});case 5:t=e.sent,this._micStream=t,n=this.getFirstAudioTrack(t),this.audioMuted=!1,this.audioAvailable=!!n,r=this.createMediaStream([this._displayVideoTrack,n]),this.stream=r,this.handleRecord({stream:r}),this.rerender(),e.next=23;break;case 16:e.prev=16,e.t0=e.catch(2),this.audioAvailable=!1,o=this.createMediaStream([this._displayVideoTrack]),this.stream=o,this.handleRecord({stream:o}),this.rerender();case 23:case"end":return e.stop()}}),e,this,[[2,16]])}))),function(){return i.apply(this,arguments)})},{key:"toggleAudio",value: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}},{key:"clearPreview",value:function(){var t=document.querySelector(e.SELECTORS.PREVIEW_VIDEO);t&&(t.src=null),this.file=null,this.rerender()}},{key:"handleRecord",value:function(t){var n=t.stream,r=this,o=[];this.mediaRecorder=new MediaRecorder(n,{mimeType:this.getSupportedMimeType()}),this.isRecording=!0,this.recordTime=0;var i=document.querySelector(e.SELECTORS.TIMER_LABEL);this.recordingTimer&&(clearInterval(this.recordingTimer),this.recordingTimer=null),this.recordingTimer=setInterval((function(){r.recordTime++;var e=r.maxRecordTime-r.recordTime;i?e>0?i.innerHTML=r.formatTime(e):(i.innerHTML="2:00",r.stopScreenRecording()):e<=0&&r.stopScreenRecording()}),e.TIMER_UPDATE_INTERVAL),this.mediaRecorder.ondataavailable=function(e){e.data&&e.data.size>0&&o.push(e.data)};var a=this.getFirstVideoTrack(n);a&&(a.onended=function(){r.prepareRecording(o)}),this.mediaRecorder.onstop=function(){r.prepareRecording(o)},this.mediaRecorder.start(e.CHUNK_INTERVAL),r.rerender()}},{key:"prepareRecording",value:function(t){var n=this.getSupportedMimeType(),r=new Blob(t,{type:n}),o=n.includes("mp4")?"mp4":"webm";this.file=new File([r],"screen-recording.".concat(o),{type:n});var i=document.querySelector(e.SELECTORS.PREVIEW_VIDEO);i&&(i.src=URL.createObjectURL(r),this.audioAvailable=this.stream?this.stream.getAudioTracks().length>0:this.audioAvailable,this.isRecording=!1,this.rerender())}}],r=[{key:"uploadScreenRecording",value:(o=xn(wn().mark((function e(t){return wn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=t){e.next=2;break}return e.abrupt("return",null);case 2:return e.abrupt("return",new Promise((function(e,n){var r=new XMLHttpRequest;r.open("POST",Wt.getInstance().apiUrl+"/uploads/sdk"),Wt.getInstance().injectSession(r);var o=new FormData;o.append("file",t),r.onerror=function(){n(new Error("Network error during file upload"))},r.onreadystatechange=function(){4==r.readyState&&(200==r.status?e(JSON.parse(r.response).fileUrl):n(new Error("Upload failed with status ".concat(r.status))))},r.send(o)})));case 3:case"end":return e.stop()}}),e)}))),function(e){return o.apply(this,arguments)})}],n&&In(t.prototype,n),r&&In(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ln(e){return Ln="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},Ln(e)}function An(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?An(Object(n),!0).forEach((function(t){Pn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):An(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Rn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nn(r.key),r)}}function Pn(e,t,n){return(t=Nn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nn(e){var t=function(e,t){if("object"!=Ln(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ln(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ln(t)?t:String(t)}En(Tn,"MAX_RECORD_TIME",120),En(Tn,"MAX_WIDTH",3072),En(Tn,"MAX_HEIGHT",1728),En(Tn,"IDEAL_FRAME_RATE",10),En(Tn,"MAX_FRAME_RATE",24),En(Tn,"CHUNK_INTERVAL",200),En(Tn,"TIMER_UPDATE_INTERVAL",1e3),En(Tn,"RERENDER_DELAY",100),En(Tn,"MIME_TYPES",["video/webm;codecs=vp9,opus","video/webm;codecs=vp8,opus","video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm","video/mp4"]),En(Tn,"SELECTORS",{PREVIEW_VIDEO:".bb-capture-preview video",TIMER_LABEL:".bb-capture-toolbar-item-timer"});var _n=function(){function e(t,n,r,o,i,a,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Pn(this,"excludeData",{}),Pn(this,"type","BUG"),Pn(this,"priority","LOW"),Pn(this,"customData",{}),Pn(this,"ticketAttributes",{}),Pn(this,"metaData",{}),Pn(this,"consoleLog",[]),Pn(this,"networkLogs",[]),Pn(this,"customEventLog",[]),Pn(this,"formData",{}),Pn(this,"isSilent",!1),Pn(this,"outboundId",void 0),Pn(this,"screenshotData",void 0),Pn(this,"webReplay",void 0),Pn(this,"screenRecordingUrl",void 0),Pn(this,"spamToken",void 0),this.type=t,this.priority=n,this.formData=r,this.isSilent=o,this.excludeData=i,this.outboundId=a,this.spamToken=s}var t,n,r;return t=e,n=[{key:"takeSnapshot",value:function(){var e=this,t=bv.getInstance();this.customData=Cr.getInstance().getCustomData(),this.metaData=ir.getInstance().getMetaData(),this.consoleLog=pr.getInstance().getLogs(),this.networkLogs=y.getInstance().getRequests(),this.customEventLog=Kt.getInstance().getEventArray(),this.ticketAttributes=Cr.getInstance().getTicketAttributes();var n=[],r=t.getGlobalDataItem("webReplay");null!==r&&(this.webReplay=r);var o,i=t.getGlobalDataItem("screenRecordingData");if(null!=i){var a=Tn.uploadScreenRecording(i).then((function(t){t&&(e.screenRecordingUrl=t)}));n.push(a)}if(!this.excludeData||!this.excludeData.screenshot){var s=(o=t.isLiveMode(),yn(o)).then((function(n){if(n){var r=t.getGlobalDataItem("snapshotPosition");n.x=r.x,n.y=r.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:Mn(Mn({},this.ticketAttributes),this.formData),isSilent:this.isSilent,outbound:this.outboundId,screenshotData:this.screenshotData,webReplay:this.webReplay,screenRecordingUrl:this.screenRecordingUrl,spamToken:this.spamToken},t=fg.getInstance().getTags();if(t&&t.length>0&&(e.tags=t),this.excludeData)for(var n=Object.keys(this.excludeData),r=0;r<n.length;r++){var o=n[r];!0===this.excludeData[o]&&(e[o]&&delete e[o],"screenshot"===o&&delete e.screenshotData,"replays"===o&&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 r=e.getData(),o=new XMLHttpRequest;o.open("POST",Wt.getInstance().apiUrl+"/bugs/v2"),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),Wt.getInstance().injectSession(o),o.onerror=function(e){n()},o.onreadystatechange=function(e){if(4===o.readyState)if(200===o.status||201===o.status)try{var r=JSON.parse(o.responseText);t(r)}catch(i){n()}else n()},o.send(JSON.stringify(r))})).catch((function(e){console.log("Failed to take snapshot",e),n()}))}))}}],n&&Rn(t.prototype,n),r&&Rn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Dn(e){return Dn="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},Dn(e)}function jn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bn(r.key),r)}}function Fn(e,t,n){return(t=Bn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bn(e){var t=function(e,t){if("object"!=Dn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Dn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Dn(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),Fn(this,"eventListeners",{})}var t,n,r;return t=e,r=[{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=bv.getInstance();n.setGlobalDataItem("webReplay",null),n.setGlobalDataItem("screenRecordingData",null),n.takeCurrentReplay()}var r=this.getInstance().eventListeners[e];if(r)for(var o=0;o<r.length;o++){var i=r[o];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)&&jn(t.prototype,n),r&&jn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Hn(e){return Hn="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},Hn(e)}function zn(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 qn(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 qn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Vn(r.key),r)}}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"!=Hn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Hn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hn(t)?t:String(t)}Fn(Un,"instance",void 0);var Jn=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Gn(this,"agentTools",[]),Gn(this,"agentToolCallbacks",[])}var t,n,r;return t=e,r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setAgentTools",value:function(e){this.agentTools=e||[]}},{key:"getAgentTools",value:function(){return this.agentTools}},{key:"registerAgentToolAction",value:function(e){e&&this.agentToolCallbacks.push(e)}},{key:"triggerToolAction",value:function(e){if(e){Un.notifyEvent("agent-tool-executed",e);var t,n=zn(this.agentToolCallbacks);try{for(n.s();!(t=n.n()).done;){var r=t.value;try{r(e)}catch(o){}}}catch(i){n.e(i)}finally{n.f()}}}}])&&Wn(t.prototype,n),r&&Wn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Yn(e){return Yn="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},Yn(e)}function Kn(e){return function(e){if(Array.isArray(e))return Xn(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 Xn(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 Xn(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 Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Qn(r.key),r)}}function $n(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"!=Yn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Yn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Yn(t)?t:String(t)}Gn(Jn,"instance",void 0);var er=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),$n(this,"frameUrl","https://messenger-app.gleap.io"),$n(this,"gleapFrameContainer",null),$n(this,"gleapFrame",null),$n(this,"comReady",!1),$n(this,"injectedFrame",!1),$n(this,"widgetOpened",!1),$n(this,"listeners",[]),$n(this,"appMode","widget"),$n(this,"markerManager",void 0),$n(this,"escListener",void 0),$n(this,"frameHeight",0),$n(this,"sendingFeedback",!1),$n(this,"queue",[]),$n(this,"urlHandler",(function(e,t){if(e&&e.length>0)if(t){var n=window.open(e,"_blank");n&&n.focus()}else window.location.href=e})),$n(this,"autoWhiteListCookieManager",(function(){window&&window.cmp_block_ignoredomains&&window.cmp_block_ignoredomains.concat(["messenger-app.gleap.io"])})),$n(this,"injectFrame",(function(){t.injectedFrame||(t.injectedFrame=!0,t.autoWhiteListCookieManager(),T((function(){tn.getInstance().onConfigLoaded((function(){tn.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 *; display-capture *; camera *;" 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)}))})))})),$n(this,"showImage",(function(e){T((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()}))}))})),$n(this,"updateFrameStyle",(function(){if(t.gleapFrameContainer){for(var e="gleap-frame-container--survey",n="gleap-frame-container--extended",r="gleap-frame-container--survey-full",o="gleap-frame-container--classic",i="gleap-frame-container--classic-left",s="gleap-frame-container--modern-left",l="gleap-frame-container--no-button",c=[o,i,n,s,l,e,r],u=0;u<c.length;u++)t.gleapFrameContainer.classList.remove(c[u]);var d=void 0,p=tn.getInstance().getFlowConfig();p.feedbackButtonPosition!==a.FEEDBACK_BUTTON_CLASSIC&&p.feedbackButtonPosition!==a.FEEDBACK_BUTTON_CLASSIC_BOTTOM||(d=o),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(r),"extended"===t.appMode&&t.gleapFrameContainer.classList.add(n),t.gleapFrameContainer.setAttribute("dir",wf.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(r){}}}var t,n,r;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,n=this;if(this.gleapFrameContainer){var r=tn.getInstance().getFlowConfig(),o="gleap-frame-container--loading";null!==(t=this.gleapFrameContainer)&&void 0!==t&&t.classList&&(this.gleapFrameContainer.classList.remove("gleap-frame-container--hidden"),e?(this.gleapFrameContainer.classList.add(o),r&&r.disableBGFade&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nofade"),r&&r.disableBGGradient&&this.gleapFrameContainer.classList.add("gleap-frame-container--loading-nogradient")):this.gleapFrameContainer.classList.remove(o),setTimeout((function(){var e;null===(e=n.gleapFrameContainer)||void 0===e||e.classList.add("gleap-frame-container--animate")}),500)),this.widgetOpened=!0,this.updateUI()}}},{key:"runWidgetShouldOpenCallback",value:function(){this.gleapFrameContainer&&(this.workThroughQueue(),bv.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),this.showFrameContainer(!1),this.updateWidgetStatus(),Un.notifyEvent("open"),this.registerEscListener())}},{key:"updateUI",value:function(){_f.getInstance().clearAllNotifications(this.isSurvey()),a.getInstance().updateNotificationBadge(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(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];"survey_web"!==this.appMode&&(this.hideMarkerManager(),this.gleapFrameContainer&&(this.gleapFrameContainer.classList.add("gleap-frame-container--hidden"),this.gleapFrameContainer.classList.remove("gleap-frame-container--animate")),e&&this.sendMessage({name:"reset-routes",data:{}}),this.widgetOpened=!1,this.updateWidgetStatus(),a.getInstance().updateFeedbackButtonState(),Un.notifyEvent("close"),_f.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:Wt.getInstance().getSession(),apiUrl:Wt.getInstance().apiUrl,sdkKey:Wt.getInstance().sdkKey}})}},{key:"sendConfigUpdate",value:function(){this.comReady&&(this.sendMessage({name:"config-update",data:{config:tn.getInstance().getFlowConfig(),aiTools:Jn.getInstance().getAgentTools(),agentTools:Jn.getInstance().getAgentTools(),overrideLanguage:wf.getInstance().getOverrideLanguage()}}),this.updateFrameStyle())}},{key:"showDrawingScreen",value:function(e){var t=this;this.hideWidget(),this.markerManager=new gf(e),this.markerManager.show((function(e){e||t.hideMarkerManager(),t.showWidget()}))}},{key:"workThroughQueue",value:function(){var e=Kn(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&&cg.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:Cr.getInstance().getCustomData(),metaData:ir.getInstance().getMetaData(),consoleLog:pr.getInstance().getLogs(),networkLogs:y.getInstance().getRequests(),customEventLog:Kt.getInstance().getEventArray(),formData:Cr.getInstance().getTicketAttributes()},r=fg.getInstance().getTags();r&&r.length>0&&(n.tags=r),e.sendMessage({name:"collect-ticket-data",data:n})}if("height-update"===t.name){e.frameHeight=t.data;var o=document.querySelector(".gleap-frame-container-inner");"survey"!==e.appMode&&"survey_full"!==e.appMode&&"survey_web"!==e.appMode||!o||(o.style.maxHeight="".concat(e.frameHeight,"px"))}if("notify-event"===t.name&&Un.notifyEvent(t.data.type,t.data.data),"cleanup-drawings"===t.name&&e.hideMarkerManager(),"open-url"===t.name){var i=t.data,s=!!t.newTab;e.urlHandler(i,s)}var l;if("start-product-tour"===t.name&&bv.startProductTour(null===(l=t.data)||void 0===l?void 0:l.tourId,!0),"run-custom-action"===t.name&&Mr.triggerCustomAction(t.data,{shareToken:t.shareToken}),"close-widget"===t.name&&e.hideWidget(),"video-call-joined"===t.name&&(a.getInstance().showingRedDot=!0,a.getInstance().updateRedDot(!0)),"video-call-left"===t.name&&(a.getInstance().showingRedDot=!1,a.getInstance().updateRedDot(!1)),"tool-execution"===t.name&&(Un.notifyEvent("tool-execution",t.data),Jn.getInstance().triggerToolAction(t.data)),"checklist-loaded"===t.name){var c,u=t.data;Un.notifyEvent("checklist-loaded",{checklistId:u.id,outboundId:null===(c=u.outbound)||void 0===c?void 0:c.id,completedSteps:u.completedSteps,status:u.status,data:u})}if("checklist-step-completed"===t.name){var d,p=t.data,h=p.checklistData,f=p.step,g=p.index;Un.notifyEvent("checklist-step-completed",{checklistId:h.id,outboundId:null===(d=h.outbound)||void 0===d?void 0:d.id,stepId:f.id,stepIndex:g,step:f,completedSteps:h.completedSteps,status:h.status,data:h})}if("checklist-completed"===t.name){var m,v=t.data;Un.notifyEvent("checklist-completed",{checklistId:v.id,outboundId:null===(m=v.outbound)||void 0===m?void 0:m.id,completedSteps:v.completedSteps,status:v.status,data:v})}if("send-feedback"===t.name){if(e.sendingFeedback)return;e.sendingFeedback=!0;var b=t.data.formData,w=t.data.action,k=t.data.outboundId,x=t.data.spamToken;new _n(w.feedbackType,"MEDIUM",b,!1,w.excludeData,k,x).sendFeedback().then((function(t){if(setTimeout((function(){e.sendingFeedback=!1}),1e3),e.sendMessage({name:"feedback-sent",data:t}),Un.notifyEvent("feedback-sent",b),k&&k.length>0){Un.notifyEvent("outbound-sent",{outboundId:k,outbound:w,formData:b});try{delete b.reportedBy}catch(n){}bv.trackEvent("outbound-".concat(k,"-submitted"),b)}})).catch((function(t){setTimeout((function(){e.sendingFeedback=!1,e.sendMessage({name:"feedback-sending-failed",data:"Something went wrong, please try again."}),Un.notifyEvent("error-while-sending")}),1e3)}))}"start-screen-drawing"===t.name&&e.showDrawingScreen(t.data)})),window.addEventListener("message",(function(t){if(t.origin===e.frameUrl||t.origin===Zf.getInstance().bannerUrl)try{for(var n=JSON.parse(t.data),r=0;r<e.listeners.length;r++)e.listeners[r]&&e.listeners[r](n)}catch(o){}}))}},{key:"addMessageListener",value:function(e){this.listeners.push(e)}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Zn(t.prototype,n),r&&Zn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function tr(e){return tr="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},tr(e)}function nr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,or(r.key),r)}}function rr(e,t,n){return(t=or(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function or(e){var t=function(e,t){if("object"!=tr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=tr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==tr(t)?t:String(t)}$n(er,"instance",void 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),rr(this,"sessionStart",new Date),rr(this,"appBuildNumber",""),rr(this,"appVersionCode",""),rr(this,"environment","prod")}var t,n,r;return t=e,r=[{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,r=navigator.userAgent,o=navigator.appName,i=""+parseFloat(navigator.appVersion),a=parseInt(navigator.appVersion,10);-1!==(t=r.indexOf("Opera"))?(o="Opera",i=r.substring(t+6),-1!==(t=r.indexOf("Version"))&&(i=r.substring(t+8))):-1!==(t=r.indexOf("MSIE"))?(o="Microsoft Internet Explorer",i=r.substring(t+5)):-1!==(t=r.indexOf("Chrome"))?(o="Chrome",i=r.substring(t+7)):-1!==(t=r.indexOf("Safari"))?(o="Safari",i=r.substring(t+7),-1!==(t=r.indexOf("Version"))&&(i=r.substring(t+8))):-1!==(t=r.indexOf("Firefox"))?(o="Firefox",i=r.substring(t+8)):(e=r.lastIndexOf(" ")+1)<(t=r.lastIndexOf("/"))&&(o=r.substring(e,t),i=r.substring(t+1),o.toLowerCase()===o.toUpperCase()&&(o=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:o+"("+i+")",userAgent:r,browser:o,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:x(),sdkVersion:"16.0.2",sdkType:"javascript",environment:this.environment}}}])&&nr(t.prototype,n),r&&nr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ar(e){return ar="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},ar(e)}function sr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}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){ur(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){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dr(r.key),r)}}function ur(e,t,n){return(t=dr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dr(e){var t=function(e,t){if("object"!=ar(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ar(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ar(t)?t:String(t)}rr(ir,"instance",void 0);var pr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ur(this,"logArray",[]),ur(this,"disabled",!1),ur(this,"originalConsoleLog",void 0),ur(this,"logMaxLength",500)}var t,n,r;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:C(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 r=0;r<e.length;r++)n+=e[r]+" "}catch(o){}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,lr(lr({},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)}}))}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&cr(t.prototype,n),r&&cr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function hr(e){return hr="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},hr(e)}function fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,gr(r.key),r)}}function gr(e){var t=function(e,t){if("object"!=hr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=hr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==hr(t)?t:String(t)}ur(pr,"instance",void 0);var mr,vr,yr,br=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,r;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;yv(t)}er.getInstance().isOpened()||pr.getInstance().addLog(function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=C(e.innerText||"",40).replace(/(\r\n|\n|\r)/gm,"").replace(/ +(?= )/g,""),r="",o="";if(void 0!==e.getAttribute){var i=e.getAttribute("id");i&&(r=' id="'.concat(i,'"'));var a=e.getAttribute("class");a&&(o=' class="'.concat(a,'"'))}var s=(e.tagName||"").toLowerCase(),l="<",c=">";return t||(l="[",c="]"),"".concat(l).concat(s).concat(r).concat(o).concat(c).concat(n).concat(l,"/").concat(s).concat(c)}(e.target),"CLICK")}}))}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&fr(t.prototype,n),r&&fr(t,r),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 kr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sr(r.key),r)}}function xr(e,t,n){return(t=Sr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sr(e){var t=function(e,t){if("object"!=wr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=wr(r))return r;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=br,yr=void 0,(vr=gr(vr="instance"))in mr?Object.defineProperty(mr,vr,{value:yr,enumerable:!0,configurable:!0,writable:!0}):mr[vr]=yr;var Cr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),xr(this,"customData",{}),xr(this,"ticketAttributes",{})}var t,n,r;return t=e,n=[{key:"getCustomData",value:function(){return this.customData}},{key:"attachCustomData",value:function(e){this.customData=Object.assign(this.customData,S(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}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&kr(t.prototype,n),r&&kr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ir(e){return Ir="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},Ir(e)}function Er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Or(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Er(Object(n),!0).forEach((function(t){Lr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Er(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ar(r.key),r)}}function Lr(e,t,n){return(t=Ar(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ar(e){var t=function(e,t){if("object"!=Ir(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ir(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ir(t)?t:String(t)}xr(Cr,"instance",void 0);var Mr=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Lr(this,"customActionCallbacks",[])}var t,n,r;return t=e,r=[{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 r=0;r<n.customActionCallbacks.length;r++){var o=n.customActionCallbacks[r];o&&o(Or({name:e},t||{}))}}}],(n=null)&&Tr(t.prototype,n),r&&Tr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();Lr(Mr,"instance",void 0);var Rr,Pr=Object.defineProperty,Nr=(e,t,n)=>((e,t,n)=>t in e?Pr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),_r=Object.defineProperty,Dr=(e,t,n)=>((e,t,n)=>t in e?_r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),jr=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(jr||{});const Fr={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Br={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ur={},Hr=()=>!!globalThis.Zone;function zr(e){if(Ur[e])return Ur[e];const t=globalThis[e],n=t.prototype,r=e in Fr?Fr[e]:void 0,o=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),i=e in Br?Br[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a&&!Hr())return Ur[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const o=r.contentWindow;if(!o)return t.prototype;const i=o[e].prototype;return document.body.removeChild(r),i?Ur[e]=i:n}catch{return n}}const qr={};function Wr(e,t,n){var r;const o=`${e}.${String(n)}`;if(qr[o])return qr[o].call(t);const i=zr(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(qr[o]=a,a.call(t)):t[n]}const Gr={};function Vr(e,t,n){const r=`${e}.${String(n)}`;if(Gr[r])return Gr[r].bind(t);const o=zr(e)[n];return"function"!=typeof o?t[n]:(Gr[r]=o,o.bind(t))}const Jr={ownerDocument:function(e){return Wr("Node",e,"ownerDocument")},childNodes:function(e){return Wr("Node",e,"childNodes")},parentNode:function(e){return Wr("Node",e,"parentNode")},parentElement:function(e){return Wr("Node",e,"parentElement")},textContent:function(e){return Wr("Node",e,"textContent")},contains:function(e,t){return Vr("Node",e,"contains")(t)},getRootNode:function(e){return Vr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Wr("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Wr("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Wr("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Wr("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return zr("MutationObserver").constructor},patch:function(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}};function Yr(e){return e.nodeType===e.ELEMENT_NODE}function Kr(e){const t=e&&"host"in e&&"mode"in e&&Jr.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Jr.shadowRoot(t)===e)}function Xr(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Zr(e){try{const n=e.rules||e.cssRules;if(!n)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const o=Array.from(n,(e=>$r(e,r))).join("");return(t=o).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(n){return null}var t}function $r(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=Zr(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(n){t=e.cssText}return e.styleSheet.href?co(t,e.styleSheet.href):t}{let n=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(n)),t?co(n,t):n}}class Qr{constructor(){Dr(this,"idNodeMap",new Map),Dr(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function eo({element:e,maskInputOptions:t,tagName:n,type:r,value:o,maskInputFn:i}){let a=o||"";const s=r&&to(r);return(t[n.toLowerCase()]||s&&t[s])&&(a=i?i(a,e):"*".repeat(a.length)),a}function to(e){return e.toLowerCase()}const no="__rrweb_original__";function ro(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?to(t):null}function oo(e,t){let n;try{n=new URL(e,t??window.location.href)}catch(o){return null}const r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==r?void 0:r[1])??null}const io=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ao=/^(?:[a-z+]+:)?\/\//i,so=/^www\..*/i,lo=/^(data:)([^,]*),(.*)/i;function co(e,t){return(e||"").replace(io,((e,n,r,o,i,a)=>{const s=r||i||a,l=n||o||"";if(!s)return e;if(ao.test(s)||so.test(s))return`url(${l}${s}${l})`;if(lo.test(s))return`url(${l}${s}${l})`;if("/"===s[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+s}${l})`;const c=t.split("/"),u=s.split("/");c.pop();for(const t of u)"."!==t&&(".."===t?c.pop():c.push(t));return`url(${l}${c.join("/")}${l})`}))}function uo(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function po(e,t){return function(e,t,n=!1){const r=Array.from(t.childNodes),o=[];let i=0;if(r.length>1&&e&&"string"==typeof e){let t=uo(e,n);const a=t.length/e.length;for(let s=1;s<r.length;s++)if(r[s].textContent&&"string"==typeof r[s].textContent){const l=uo(r[s].textContent,n),c=100;let u=3;for(;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,u),1));u++);for(;u<l.length;u++){let d=l.substring(0,u),p=t.split(d),h=-1;if(2===p.length)h=p[0].length;else if(p.length>2&&""===p[0]&&""!==r[s-1].textContent)h=t.indexOf(d,1);else if(1===p.length){if(d=d.substring(0,d.length-1),p=t.split(d),p.length<=1)return o.push(e),o;u=c+1}else u===l.length-1&&(h=t.indexOf(d));if(p.length>=2&&u>c){const e=r[s-1].textContent;if(e&&"string"==typeof e){const n=uo(e).length;h=t.indexOf(d,n)}-1===h&&(h=p[0].length)}if(-1!==h){let s=Math.floor(h/a);for(;s>0&&s<e.length;){if(i+=1,i>50*r.length)return o.push(e),o;const l=uo(e.substring(0,s),n);if(l.length===h){o.push(e.substring(0,s)),e=e.substring(s),t=t.substring(h);break}l.length<h?s+=Math.max(1,Math.floor((h-l.length)/a)):s-=Math.max(1,Math.floor((l.length-h)*a))}break}}}}return o.push(e),o}(e,t).join("/* rr_split */")}let ho=1;const fo=new RegExp("[^a-z0-9-_:]"),go=-2;function mo(){return ho++}let vo,yo;const bo=/^[^ \t\n\r\u000c]+/,wo=/^[, \t\n\r\u000c]+/;const ko=new WeakMap;function xo(e,t){return t&&""!==t.trim()?Co(e,t):t}function So(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Co(e,t){let n=ko.get(e);if(n||(n=e.createElement("a"),ko.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Io(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&["table","td","th"].includes(t)?xo(e,r):"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(wo),!(n>=t.length);){let i=r(bo);if(","===i.slice(-1))i=xo(e,i.substring(0,i.length-1)),o.push(i);else{let r="";i=xo(e,i);let a=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((i+r).trim());break}if(a)")"===e&&(a=!1);else{if(","===e){n+=1,o.push((i+r).trim());break}"("===e&&(a=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?co(r,Co(e)):"object"===t&&"data"===n?xo(e,r):r:r}function Eo(e,t,n){return["video","audio"].includes(e)&&"autoplay"===t}function Oo(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Oo(Jr.parentNode(e),t,n);for(let r=e.classList.length;r--;){const n=e.classList[r];if(t.test(n))return!0}return!!n&&Oo(Jr.parentNode(e),t,n)}function To(e,t,n,r){let o;if(Yr(e)){if(o=e,!Jr.childNodes(o).length)return!1}else{if(null===Jr.parentElement(e))return!1;o=Jr.parentElement(e)}try{if("string"==typeof t){if(r){if(o.closest(`.${t}`))return!0}else if(o.classList.contains(t))return!0}else if(Oo(o,t,r))return!0;if(n)if(r){if(o.closest(n))return!0}else if(o.matches(n))return!0}catch(i){}return!1}function Lo(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:a,inlineStylesheet:s,maskInputOptions:l={},maskTextFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:p,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:g=!1,cssCaptured:m=!1}=t,v=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:jr.Document,childNodes:[],compatMode:e.compatMode}:{type:jr.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:jr.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,inlineStylesheet:i,maskInputOptions:a={},maskInputFn:s,dataURLOptions:l={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:h}=t,f=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(r){}return!1}(e,r,o),g=function(e){if(e instanceof HTMLFormElement)return"form";const t=to(e.tagName);return fo.test(t)?"div":t}(e);let m={};const v=e.attributes.length;for(let w=0;w<v;w++){const t=e.attributes[w];Eo(g,t.name,t.value)||(m[t.name]=Io(n,g,to(t.name),t.value))}if("link"===g&&i){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=Zr(t)),r&&(delete m.rel,delete m.href,m._cssText=r)}if("style"===g&&e.sheet){let t=Zr(e.sheet);t&&(e.childNodes.length>1&&(t=po(t,e)),m._cssText=t)}if(["input","textarea","select"].includes(g)){const t=e.value,n=e.checked;"radio"!==m.type&&"checkbox"!==m.type&&"submit"!==m.type&&"button"!==m.type&&t?m.value=eo({element:e,type:ro(e),tagName:g,value:t,maskInputOptions:a,maskInputFn:s}):n&&(m.checked=n)}"option"===g&&(e.selected&&!a.select?m.selected=!0:delete m.selected);"dialog"===g&&e.open&&(m.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===g&&u)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const o=t.getImageData,i=no in o?o[no]:o;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(m.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(m.rr_dataURL=t)}if("img"===g&&c){vo||(vo=n.createElement("canvas"),yo=vo.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",o=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{vo.width=t.naturalWidth,vo.height=t.naturalHeight,yo.drawImage(t,0,0),m.rr_dataURL=vo.toDataURL(l.type,l.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(o?m.crossOrigin=o:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if(["audio","video"].includes(g)){const t=m;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}p||(e.scrollLeft&&(m.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(m.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:n}=e.getBoundingClientRect();m={class:m.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==g||d(m.src)||(e.contentDocument||(m.rr_src=m.src),delete m.src);let y;try{customElements.get(g)&&(y=!0)}catch(b){}return{type:jr.Element,tagName:g,attributes:m,childNodes:[],isSVG:So(e)||void 0,needBlock:f,rootId:h,isCustom:y}}(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:s,maskInputOptions:l,maskInputFn:u,dataURLOptions:d,inlineImages:p,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:g,rootId:v});case e.TEXT_NODE:return function(e,t){const{needsMask:n,maskTextFn:r,rootId:o,cssCaptured:i}=t,a=Jr.parentNode(e),s=a&&a.tagName;let l="";const c="STYLE"===s||void 0,u="SCRIPT"===s||void 0;u?l="SCRIPT_PLACEHOLDER":i||(l=Jr.textContent(e),c&&l&&(l=co(l,Co(t.doc))));!c&&!u&&l&&n&&(l=r?r(l,Jr.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:jr.Text,textContent:l||"",rootId:o}}(e,{doc:n,needsMask:a,maskTextFn:c,rootId:v,cssCaptured:m});case e.CDATA_SECTION_NODE:return{type:jr.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:jr.Comment,textContent:Jr.textContent(e)||"",rootId:v};default:return!1}}function Ao(e){return null==e?"":e.toLowerCase()}function Mo(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function Ro(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:d,maskInputFn:p,slimDOMOptions:h,dataURLOptions:f={},inlineImages:g=!1,recordCanvas:m=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:x=(()=>!1),newlyAddedElement:S=!1,cssCaptured:C=!1}=t;let{needsMask:I}=t,{preserveWhiteSpace:E=!0}=t;if(!I){I=To(e,a,s,void 0===I)}const O=Lo(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:I,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,dataURLOptions:f,inlineImages:g,recordCanvas:m,keepIframeSrcFn:x,newlyAddedElement:S,cssCaptured:C});if(!O)return console.warn(e,"not serialized"),null;let T;T=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===jr.Comment)return!0;if(e.type===jr.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===oo(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Ao(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ao(e.attributes.name)||"icon"===Ao(e.attributes.rel)||"apple-touch-icon"===Ao(e.attributes.rel)||"shortcut icon"===Ao(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Ao(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ao(e.attributes.property).match(/^(og|twitter|fb):/)||Ao(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ao(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Ao(e.attributes.name)||"googlebot"===Ao(e.attributes.name)||"bingbot"===Ao(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Ao(e.attributes.name)||"generator"===Ao(e.attributes.name)||"framework"===Ao(e.attributes.name)||"publisher"===Ao(e.attributes.name)||"progid"===Ao(e.attributes.name)||Ao(e.attributes.property).match(/^article:/)||Ao(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Ao(e.attributes.name)||"yandex-verification"===Ao(e.attributes.name)||"csrf-token"===Ao(e.attributes.name)||"p:domain_verify"===Ao(e.attributes.name)||"verify-v1"===Ao(e.attributes.name)||"verification"===Ao(e.attributes.name)||"shopify-checkout-api-token"===Ao(e.attributes.name)))return!0}}return!1}(O,h)||!E&&O.type===jr.Text&&!O.textContent.replace(/^\s+|\s+$/gm,"").length?go:mo();const L=Object.assign(O,{id:T});if(r.add(e,L),T===go)return null;v&&v(e);let A=!l;if(L.type===jr.Element){A=A&&!L.needBlock,delete L.needBlock;const t=Jr.shadowRoot(e);t&&Xr(t)&&(L.isShadowHost=!0)}if((L.type===jr.Document||L.type===jr.Element)&&A){h.headWhitespace&&L.type===jr.Element&&"head"===L.tagName&&(E=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:I,maskTextClass:a,maskTextSelector:s,skipChild:l,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:h,dataURLOptions:f,inlineImages:g,recordCanvas:m,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:x,cssCaptured:!1};if(L.type===jr.Element&&"textarea"===L.tagName&&void 0!==L.attributes.value);else{L.type===jr.Element&&void 0!==L.attributes._cssText&&"string"==typeof L.attributes._cssText&&(t.cssCaptured=!0);for(const n of Array.from(Jr.childNodes(e))){const e=Ro(n,t);e&&L.childNodes.push(e)}}let S=null;if(Yr(e)&&(S=Jr.shadowRoot(e)))for(const e of Array.from(Jr.childNodes(S))){const n=Ro(e,t);n&&(Xr(S)&&(n.isShadow=!0),L.childNodes.push(n))}}const M=Jr.parentNode(e);return M&&Kr(M)&&Xr(M)&&(L.isShadow=!0),L.type===jr.Element&&"iframe"===L.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let o,i=!1;try{o=r.document.readyState}catch(s){return}if("complete"!==o){const r=setTimeout((()=>{i||(t(),i=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(r),i=!0,t()}))}const a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&y){const n=Ro(t,{doc:t,mirror:r,blockClass:o,blockSelector:i,needsMask:I,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:h,dataURLOptions:f,inlineImages:g,recordCanvas:m,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:x});n&&y(e,n)}}),b),L.type===jr.Element&&"link"===L.tagName&&"string"==typeof L.attributes.rel&&("stylesheet"===L.attributes.rel||"preload"===L.attributes.rel&&"string"==typeof L.attributes.href&&"css"===oo(L.attributes.href))&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(a){return}if(r)return;const i=setTimeout((()=>{o||(t(),o=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(i),o=!0,t()}))}(e,(()=>{if(w){const t=Ro(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,needsMask:I,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:h,dataURLOptions:f,inlineImages:g,recordCanvas:m,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:x});t&&w(e,t)}}),k),L}function Po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function No(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var _o={exports:{}},Do=String,jo=function(){return{isColorSupported:!1,reset:Do,bold:Do,dim:Do,italic:Do,underline:Do,inverse:Do,hidden:Do,strikethrough:Do,black:Do,red:Do,green:Do,yellow:Do,blue:Do,magenta:Do,cyan:Do,white:Do,gray:Do,bgBlack:Do,bgRed:Do,bgGreen:Do,bgYellow:Do,bgBlue:Do,bgMagenta:Do,bgCyan:Do,bgWhite:Do}};_o.exports=jo(),_o.exports.createColors=jo;var Fo=_o.exports;const Bo=No(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Uo=Fo,Ho=Bo,zo=class e extends Error{constructor(t,n,r,o,i,a){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),o&&(this.source=o),a&&(this.plugin=a),void 0!==n&&void 0!==r&&("number"==typeof n?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Uo.isColorSupported),Ho&&e&&(t=Ho(t));let n,r,o=t.split(/\r?\n/),i=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),s=String(a).length;if(e){let{bold:e,gray:t,red:o}=Uo.createColors(!0);n=t=>e(o(t)),r=e=>t(e)}else n=r=e=>e;return o.slice(i,a).map(((e,t)=>{let o=i+1+t,a=" "+(" "+o).slice(-s)+" | ";if(o===this.line){let t=r(a.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(a)+e+"\n "+t+n("^")}return" "+r(a)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var qo=zo;zo.default=zo;var Wo={};Wo.isClean=Symbol("isClean"),Wo.my=Symbol("my");const Go={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Vo=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let o=(e.raws.between||"")+(t?";":"");this.builder(n+r+o,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,o=0;for(;r&&"root"!==r.type;)o+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)n+=t}return n}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let o=e.nodes[r],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==r||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,n){let r;if(n||(n=t),t&&(r=e.raws[t],void 0!==r))return r;let o=e.parent;if("before"===n){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return Go[n];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let o="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[o]?r=this[o](i,e):i.walk((e=>{if(r=e.raws[t],void 0!==r)return!1}))}var a;return void 0===r&&(r=Go[n]),i.rawCache[n]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Jo=Vo;Vo.default=Vo;let Yo=Jo;function Ko(e,t){new Yo(t).stringify(e)}var Xo=Ko;Ko.default=Ko;let{isClean:Zo,my:$o}=Wo,Qo=qo,ei=Jo,ti=Xo;function ni(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let o=e[r],i=typeof o;"parent"===r&&"object"===i?t&&(n[r]=t):"source"===r?n[r]=o:Array.isArray(o)?n[r]=o.map((e=>ni(e,n))):("object"===i&&null!==o&&(o=ni(o)),n[r]=o)}return n}let ri=class{constructor(e={}){this.raws={},this[Zo]=!1,this[$o]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ni(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new Qo(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Zo]){this[Zo]=!1;let e=this;for(;e=e.parent;)e[Zo]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,o=this.source.start.line;for(let i=0;i<e;i++)"\n"===n[i]?(r=1,o+=1):r+=1;return{column:r,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),o=r.indexOf(e.word);-1!==o&&(t=this.positionInside(o,r),n=this.positionInside(o+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new ei).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},r=null==t;t=t||new Map;let o=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))n[i]=e.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof e&&e.toJSON)n[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=o,t.set(e.input,o),o++),n[i]={end:e.end,inputId:r,start:e.start}}else n[i]=e}return r&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ti){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let r={node:this};for(let o in n)r[o]=n[o];return e.warn(t,r)}get proxyOf(){return this}};var oi=ri;ri.default=ri;let ii=oi,ai=class extends ii{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var si=ai;ai.default=ai;var li={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=n;for(;o--;)r+=e[Math.random()*e.length|0];return r}};let{SourceMapConsumer:ci,SourceMapGenerator:ui}=Bo,{existsSync:di,readFileSync:pi}=Bo,{dirname:hi,join:fi}=Bo;let gi=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=hi(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new ci(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=hi(e),di(e))return this.mapFile=e,pi(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ci)return ui.fromSourceMap(t).toString();if(t instanceof ui)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=fi(hi(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var mi=gi;gi.default=gi;let{SourceMapConsumer:vi,SourceMapGenerator:yi}=Bo,{fileURLToPath:bi,pathToFileURL:wi}=Bo,{isAbsolute:ki,resolve:xi}=Bo,{nanoid:Si}=li,Ci=Bo,Ii=qo,Ei=mi,Oi=Symbol("fromOffsetCache"),Ti=Boolean(vi&&yi),Li=Boolean(xi&&ki),Ai=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Li||/^\w+:\/\//.test(t.from)||ki(t.from)?this.file=t.from:this.file=xi(t.from)),Li&&Ti){let e=new Ei(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+Si(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let o,i,a;if(t&&"object"==typeof t){let e=t,r=n;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,a=e.col}else i=r.line,a=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let s=this.origin(t,n,i,a);return o=s?new Ii(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,r.plugin):new Ii(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:a,line:i},this.css,this.file,r.plugin),o.input={column:n,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(wi&&(o.input.url=wi(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,n;if(this[Oi])n=this[Oi];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let r=0,o=e.length;r<o;r++)n[r]=t,t+=e[r].length+1;this[Oi]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t,o=n.length-2;for(;r<o;)if(t=r+(o-r>>1),e<n[t])o=t-1;else{if(!(e>=n[t+1])){r=t;break}r=t+1}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:xi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let o,i,a=this.map.consumer(),s=a.originalPositionFor({column:t,line:e});if(!s.source)return!1;"number"==typeof n&&(o=a.originalPositionFor({column:r,line:n})),i=ki(s.source)?wi(s.source):new URL(s.source,this.map.consumer().sourceRoot||wi(this.map.mapFile));let l={column:s.column,endColumn:o&&o.column,endLine:o&&o.line,line:s.line,url:i.toString()};if("file:"===i.protocol){if(!bi)throw new Error("file: protocol is not available in this PostCSS build");l.file=bi(i)}let c=a.sourceContentFor(s.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Mi=Ai;Ai.default=Ai,Ci&&Ci.registerInput&&Ci.registerInput(Ai);let{SourceMapConsumer:Ri,SourceMapGenerator:Pi}=Bo,{dirname:Ni,relative:_i,resolve:Di,sep:ji}=Bo,{pathToFileURL:Fi}=Bo,Bi=Mi,Ui=Boolean(Ri&&Pi),Hi=Boolean(Ni&&Di&&_i&&ji);var zi=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||Ni(e.file);!1===this.mapOpts.sourcesContent?(t=new Ri(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Hi&&Ui&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Pi.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Pi({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Pi({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,r=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((a,s,l)=>{if(this.css+=a,s&&"end"!==l&&(i.generated.line=n,i.generated.column=r-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=a.match(/\n/g),e?(n+=e.length,t=a.lastIndexOf("\n"),r=a.length-t):r+=a.length,s&&"start"!==l){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=n,i.generated.column=r-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=r-1,this.map.addMapping(i)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?Ni(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=Ni(Di(n,this.mapOpts.annotation)));let r=_i(n,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new Bi(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Fi){let t=Fi(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===ji&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};let qi=oi,Wi=class extends qi{constructor(e){super(e),this.type="comment"}};var Gi=Wi;Wi.default=Wi;let Vi,Ji,Yi,Ki,{isClean:Xi,my:Zi}=Wo,$i=si,Qi=Gi,ea=oi;function ta(e){return e.map((e=>(e.nodes&&(e.nodes=ta(e.nodes)),delete e.source,e)))}function na(e){if(e[Xi]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)na(t)}let ra=class e extends ea{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[r]+=1;return delete this.indexes[r],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,r=this.index(e),o=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of o)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)n=this.indexes[i],r<n&&(this.indexes[i]=n+o.length);return this.markDirty(),this}insertBefore(e,t){let n,r=this.index(e),o=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],o).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r,0,a);for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}normalize(t,n){if("string"==typeof t)t=ta(Vi(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new $i(t)]}else if(t.selector)t=[new Ji(t)];else if(t.name)t=[new Yi(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Qi(t)]}return t.map((t=>(t[Zi]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Xi]&&na(t),void 0===t.raws.before&&n&&void 0!==n.raws.before&&(t.raws.before=n.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let r;try{r=e(t,n)}catch(o){throw t.addToError(o)}return!1!==r&&t.walk&&(r=t.walk(e)),r}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("atrule"===n.type&&e.test(n.name))return t(n,r)})):this.walk(((n,r)=>{if("atrule"===n.type&&n.name===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("decl"===n.type&&e.test(n.prop))return t(n,r)})):this.walk(((n,r)=>{if("decl"===n.type&&n.prop===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("rule"===n.type&&e.test(n.selector))return t(n,r)})):this.walk(((n,r)=>{if("rule"===n.type&&n.selector===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ra.registerParse=e=>{Vi=e},ra.registerRule=e=>{Ji=e},ra.registerAtRule=e=>{Yi=e},ra.registerRoot=e=>{Ki=e};var oa=ra;ra.default=ra,ra.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Yi.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ji.prototype):"decl"===e.type?Object.setPrototypeOf(e,$i.prototype):"comment"===e.type?Object.setPrototypeOf(e,Qi.prototype):"root"===e.type&&Object.setPrototypeOf(e,Ki.prototype),e[Zi]=!0,e.nodes&&e.nodes.forEach((e=>{ra.rebuild(e)}))};let ia,aa,sa=oa,la=class extends sa{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ia(new aa,this,e).stringify()}};la.registerLazyResult=e=>{ia=e},la.registerProcessor=e=>{aa=e};var ca=la;la.default=la;let ua=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let n in t)this[n]=t[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var da=ua;ua.default=ua;let pa=da,ha=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new pa(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var fa=ha;ha.default=ha;const ga="'".charCodeAt(0),ma='"'.charCodeAt(0),va="\\".charCodeAt(0),ya="/".charCodeAt(0),ba="\n".charCodeAt(0),wa=" ".charCodeAt(0),ka="\f".charCodeAt(0),xa="\t".charCodeAt(0),Sa="\r".charCodeAt(0),Ca="[".charCodeAt(0),Ia="]".charCodeAt(0),Ea="(".charCodeAt(0),Oa=")".charCodeAt(0),Ta="{".charCodeAt(0),La="}".charCodeAt(0),Aa=";".charCodeAt(0),Ma="*".charCodeAt(0),Ra=":".charCodeAt(0),Pa="@".charCodeAt(0),Na=/[\t\n\f\r "#'()/;[\\\]{}]/g,_a=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Da=/.[\r\n"'(/\\]/,ja=/[\da-f]/i;let Fa=oa,Ba=class extends Fa{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ua=Ba;Ba.default=Ba,Fa.registerAtRule(Ba);let Ha,za,qa=oa,Wa=class extends qa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let r=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of r)o.raws.before=t.raws.before;return r}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Ha(new za,this,e).stringify()}};Wa.registerLazyResult=e=>{Ha=e},Wa.registerProcessor=e=>{za=e};var Ga=Wa;Wa.default=Wa,qa.registerRoot(Wa);let Va={comma:e=>Va.split(e,[","],!0),space:e=>Va.split(e,[" ","\n","\t"]),split(e,t,n){let r=[],o="",i=!1,a=0,s=!1,l="",c=!1;for(let u of e)c?c=!1:"\\"===u?c=!0:s?u===l&&(s=!1):'"'===u||"'"===u?(s=!0,l=u):"("===u?a+=1:")"===u?a>0&&(a-=1):0===a&&t.includes(u)&&(i=!0),i?(""!==o&&r.push(o.trim()),o="",i=!1):o+=u;return(n||""!==o)&&r.push(o.trim()),r}};var Ja=Va;Va.default=Va;let Ya=oa,Ka=Ja,Xa=class extends Ya{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ka.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};var Za=Xa;Xa.default=Xa,Ya.registerRule(Xa);let $a=si,Qa=function(e,t={}){let n,r,o,i,a,s,l,c,u,d,p=e.css.valueOf(),h=t.ignoreErrors,f=p.length,g=0,m=[],v=[];function y(t){throw e.error("Unclosed "+t,g)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&g>=f},nextToken:function(e){if(v.length)return v.pop();if(g>=f)return;let t=!!e&&e.ignoreUnclosed;switch(n=p.charCodeAt(g),n){case ba:case wa:case xa:case Sa:case ka:r=g;do{r+=1,n=p.charCodeAt(r)}while(n===wa||n===ba||n===xa||n===Sa||n===ka);d=["space",p.slice(g,r)],g=r-1;break;case Ca:case Ia:case Ta:case La:case Ra:case Aa:case Oa:{let e=String.fromCharCode(n);d=[e,e,g];break}case Ea:if(c=m.length?m.pop()[1]:"",u=p.charCodeAt(g+1),"url"===c&&u!==ga&&u!==ma&&u!==wa&&u!==ba&&u!==xa&&u!==ka&&u!==Sa){r=g;do{if(s=!1,r=p.indexOf(")",r+1),-1===r){if(h||t){r=g;break}y("bracket")}for(l=r;p.charCodeAt(l-1)===va;)l-=1,s=!s}while(s);d=["brackets",p.slice(g,r+1),g,r],g=r}else r=p.indexOf(")",g+1),i=p.slice(g,r+1),-1===r||Da.test(i)?d=["(","(",g]:(d=["brackets",i,g,r],g=r);break;case ga:case ma:o=n===ga?"'":'"',r=g;do{if(s=!1,r=p.indexOf(o,r+1),-1===r){if(h||t){r=g+1;break}y("string")}for(l=r;p.charCodeAt(l-1)===va;)l-=1,s=!s}while(s);d=["string",p.slice(g,r+1),g,r],g=r;break;case Pa:Na.lastIndex=g+1,Na.test(p),r=0===Na.lastIndex?p.length-1:Na.lastIndex-2,d=["at-word",p.slice(g,r+1),g,r],g=r;break;case va:for(r=g,a=!0;p.charCodeAt(r+1)===va;)r+=1,a=!a;if(n=p.charCodeAt(r+1),a&&n!==ya&&n!==wa&&n!==ba&&n!==xa&&n!==Sa&&n!==ka&&(r+=1,ja.test(p.charAt(r)))){for(;ja.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===wa&&(r+=1)}d=["word",p.slice(g,r+1),g,r],g=r;break;default:n===ya&&p.charCodeAt(g+1)===Ma?(r=p.indexOf("*/",g+2)+1,0===r&&(h||t?r=p.length:y("comment")),d=["comment",p.slice(g,r+1),g,r],g=r):(_a.lastIndex=g+1,_a.test(p),r=0===_a.lastIndex?p.length-1:_a.lastIndex-2,d=["word",p.slice(g,r+1),g,r],m.push(d),g=r)}return g++,d},position:function(){return g}}},es=Gi,ts=Ua,ns=Ga,rs=Za;const os={empty:!0,space:!0};var is=class{constructor(e){this.input=e,this.root=new ns,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,o=new ts;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,s=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(s.length>0){for(r=s.length-1,n=s[r];n&&"space"===n[0];)n=s[--r];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}s.push(e)}else s.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(o.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(o,"params",s),i&&(e=s[s.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,r=0;for(let o=t-1;o>=0&&(n=e[o],"space"===n[0]||(r+=1,2!==r));o--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,r,o=0;for(let[i,a]of e.entries()){if(t=a,n=t[0],"("===n&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new es;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Qa(this.input)}decl(e,t){let n=new $a;this.init(n,e[0][2]);let r,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,a=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let s=e.length-1;s>=0;s--){if(r=e[s],"!important"===r[1].toLowerCase()){n.important=!0;let t=this.stringFrom(e,s);t=this.spacesFromEnd(e)+t," !important"!==t&&(n.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=s;e>0;e--){let n=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==n)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(n.important=!0,n.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new rs;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,o=null,i=[],a=e[1].startsWith("--"),s=[],l=e;for(;l;){if(n=l[0],s.push(l),"("===n||"["===n)o||(o=l),i.push("("===n?")":"]");else if(a&&r&&"{"===n)o||(o=l),i.push("}");else if(0===i.length){if(";"===n){if(r)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(r=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&r){if(!a)for(;s.length&&(l=s[s.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let o,i,a,s,l=n.length,c="",u=!0;for(let d=0;d<l;d+=1)o=n[d],i=o[0],"space"!==i||d!==l-1||r?"comment"===i?(s=n[d-1]?n[d-1][0]:"empty",a=n[d+1]?n[d+1][0]:"empty",os[s]||os[a]||","===c.slice(-1)?u=!1:c+=o[1]):c+=o[1]:u=!1;if(!u){let r=n.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new rs;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let as=oa,ss=is,ls=Mi;function cs(e,t){let n=new ls(e,t),r=new ss(n);try{r.parse()}catch(o){throw o}return r.root}var us=cs;cs.default=cs,as.registerParse(cs);let{isClean:ds,my:ps}=Wo,hs=zi,fs=Xo,gs=oa,ms=ca,vs=fa,ys=us,bs=Ga;const ws={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ks={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},xs={Once:!0,postcssPlugin:!0,prepare:!0},Ss=0;function Cs(e){return"object"==typeof e&&"function"==typeof e.then}function Is(e){let t=!1,n=ws[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,Ss,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,Ss,n+"Exit"]:[n,n+"Exit"]}function Es(e){let t;return t="document"===e.type?["Document",Ss,"DocumentExit"]:"root"===e.type?["Root",Ss,"RootExit"]:Is(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Os(e){return e[ds]=!1,e.nodes&&e.nodes.forEach((e=>Os(e))),e}let Ts={},Ls=class e{constructor(t,n,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof vs)o=Os(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=ys;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{o=e(n,r)}catch(i){this.processed=!0,this.error=i}o&&!o[ps]&&gs.rebuild(o)}else o=Os(n);this.result=new vs(t,o,r),this.helpers={...Ts,postcss:Ts,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!ks[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!xs[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let n=0;n<this.plugins.length;n++){let t=this.plugins[n],r=this.runOnRoot(t);if(Cs(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ds];){e[ds]=!0;let n=[Es(e)];for(;n.length>0;){let e=this.visitTick(n);if(Cs(e))try{await e}catch(t){let e=n[n.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return Cs(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=fs;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new hs(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(Cs(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ds];)e[ds]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,o]of e){let e;this.result.lastPlugin=r;try{e=o(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Cs(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(n.toProxy(),this.helpers)}catch(i){throw this.handleError(i,n)}}if(0!==t.iterator){let r,o=t.iterator;for(;r=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!r[ds])return r[ds]=!0,void e.push(Es(r));t.iterator=0,delete n.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,e===Ss)return void(n.nodes&&n.nodes.length&&(n[ds]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ds]=!0;let t=Is(e);for(let n of t)if(n===Ss)e.nodes&&e.each((e=>{e[ds]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ls.registerPostcss=e=>{Ts=e};var As=Ls;Ls.default=Ls,bs.registerLazyResult(Ls),ms.registerLazyResult(Ls);let Ms=zi,Rs=Xo,Ps=us;const Ns=fa;let _s=class{constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let o=Rs;this.result=new Ns(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let a=new Ms(o,r,this._opts,t);if(a.isMap()){let[e,t]=a.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Ps;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Ds=_s;_s.default=_s;let js=Ds,Fs=As,Bs=ca,Us=Ga,Hs=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Fs(this,e,t):new js(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var zs=Hs;Hs.default=Hs,Us.registerProcessor(Hs),Bs.registerProcessor(Hs);let qs=si,Ws=mi,Gs=Gi,Vs=Ua,Js=Mi,Ys=Ga,Ks=Za;function Xs(e,t){if(Array.isArray(e))return e.map((e=>Xs(e)));let{inputs:n,...r}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:Js.prototype};n.map&&(n.map={...n.map,__proto__:Ws.prototype}),t.push(n)}}if(r.nodes&&(r.nodes=e.nodes.map((e=>Xs(e,t)))),r.source){let{inputId:e,...n}=r.source;r.source=n,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Ys(r);if("decl"===r.type)return new qs(r);if("rule"===r.type)return new Ks(r);if("comment"===r.type)return new Gs(r);if("atrule"===r.type)return new Vs(r);throw new Error("Unknown node type: "+e.type)}var Zs=Xs;Xs.default=Xs;let $s=qo,Qs=si,el=As,tl=oa,nl=zs,rl=Xo,ol=Zs,il=ca,al=da,sl=Gi,ll=Ua,cl=fa,ul=Mi,dl=us,pl=Ja,hl=Za,fl=Ga,gl=oi;function ml(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new nl(e)}ml.plugin=function(e,t){let n,r=!1;function o(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...n);return o.postcssPlugin=e,o.postcssVersion=(new nl).version,o}return Object.defineProperty(o,"postcss",{get:()=>(n||(n=o()),n)}),o.process=function(e,t,n){return ml([o(n)]).process(e,t)},o},ml.stringify=rl,ml.parse=dl,ml.fromJSON=ol,ml.list=pl,ml.comment=e=>new sl(e),ml.atRule=e=>new ll(e),ml.decl=e=>new Qs(e),ml.rule=e=>new hl(e),ml.root=e=>new fl(e),ml.document=e=>new il(e),ml.CssSyntaxError=$s,ml.Declaration=Qs,ml.Container=tl,ml.Processor=nl,ml.Document=il,ml.Comment=sl,ml.Warning=al,ml.AtRule=ll,ml.Result=cl,ml.Input=ul,ml.Rule=hl,ml.Root=fl,ml.Node=gl,el.registerPostcss(ml);var vl=ml;ml.default=ml;const yl=Po(vl);yl.stringify,yl.fromJSON,yl.plugin,yl.parse,yl.list,yl.document,yl.comment,yl.atRule,yl.rule,yl.decl,yl.root,yl.CssSyntaxError,yl.Declaration,yl.Container,yl.Processor,yl.Document,yl.Comment,yl.Warning,yl.AtRule,yl.Result,yl.Input,yl.Rule,yl.Root,yl.Node;var bl=Object.defineProperty,wl=(e,t,n)=>((e,t,n)=>t in e?bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n);function kl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xl(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var Sl={exports:{}},Cl=String,Il=function(){return{isColorSupported:!1,reset:Cl,bold:Cl,dim:Cl,italic:Cl,underline:Cl,inverse:Cl,hidden:Cl,strikethrough:Cl,black:Cl,red:Cl,green:Cl,yellow:Cl,blue:Cl,magenta:Cl,cyan:Cl,white:Cl,gray:Cl,bgBlack:Cl,bgRed:Cl,bgGreen:Cl,bgYellow:Cl,bgBlue:Cl,bgMagenta:Cl,bgCyan:Cl,bgWhite:Cl}};Sl.exports=Il(),Sl.exports.createColors=Il;var El=Sl.exports;const Ol=xl(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Tl=El,Ll=Ol,Al=class e extends Error{constructor(t,n,r,o,i,a){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),o&&(this.source=o),a&&(this.plugin=a),void 0!==n&&void 0!==r&&("number"==typeof n?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Tl.isColorSupported),Ll&&e&&(t=Ll(t));let n,r,o=t.split(/\r?\n/),i=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),s=String(a).length;if(e){let{bold:e,gray:t,red:o}=Tl.createColors(!0);n=t=>e(o(t)),r=e=>t(e)}else n=r=e=>e;return o.slice(i,a).map(((e,t)=>{let o=i+1+t,a=" "+(" "+o).slice(-s)+" | ";if(o===this.line){let t=r(a.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+r(a)+e+"\n "+t+n("^")}return" "+r(a)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ml=Al;Al.default=Al;var Rl={};Rl.isClean=Symbol("isClean"),Rl.my=Symbol("my");const Pl={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Nl=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let o=(e.raws.between||"")+(t?";":"");this.builder(n+r+o,e)}}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,o=0;for(;r&&"root"!==r.type;)o+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)n+=t}return n}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let o=e.nodes[r],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==r||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,n){let r;if(n||(n=t),t&&(r=e.raws[t],void 0!==r))return r;let o=e.parent;if("before"===n){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return Pl[n];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let o="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[o]?r=this[o](i,e):i.walk((e=>{if(r=e.raws[t],void 0!==r)return!1}))}var a;return void 0===r&&(r=Pl[n]),i.rawCache[n]=r,r}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var _l=Nl;Nl.default=Nl;let Dl=_l;function jl(e,t){new Dl(t).stringify(e)}var Fl=jl;jl.default=jl;let{isClean:Bl,my:Ul}=Rl,Hl=Ml,zl=_l,ql=Fl;function Wl(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let o=e[r],i=typeof o;"parent"===r&&"object"===i?t&&(n[r]=t):"source"===r?n[r]=o:Array.isArray(o)?n[r]=o.map((e=>Wl(e,n))):("object"===i&&null!==o&&(o=Wl(o)),n[r]=o)}return n}let Gl=class{constructor(e={}){this.raws={},this[Bl]=!1,this[Ul]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Wl(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new Hl(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Bl]){this[Bl]=!1;let e=this;for(;e=e.parent;)e[Bl]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n}positionInside(e,t){let n=t||this.toString(),r=this.source.start.column,o=this.source.start.line;for(let i=0;i<e;i++)"\n"===n[i]?(r=1,o+=1):r+=1;return{column:r,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),o=r.indexOf(e.word);-1!==o&&(t=this.positionInside(o,r),n=this.positionInside(o+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return(new zl).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},r=null==t;t=t||new Map;let o=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))n[i]=e.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof e&&e.toJSON)n[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=o,t.set(e.input,o),o++),n[i]={end:e.end,inputId:r,start:e.start}}else n[i]=e}return r&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ql){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,n){let r={node:this};for(let o in n)r[o]=n[o];return e.warn(t,r)}get proxyOf(){return this}};var Vl=Gl;Gl.default=Gl;let Jl=Vl,Yl=class extends Jl{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Kl=Yl;Yl.default=Yl;var Xl={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=n;for(;o--;)r+=e[Math.random()*e.length|0];return r}};let{SourceMapConsumer:Zl,SourceMapGenerator:$l}=Ol,{existsSync:Ql,readFileSync:ec}=Ol,{dirname:tc,join:nc}=Ol;let rc=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=tc(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Zl(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=tc(e),Ql(e))return this.mapFile=e,ec(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Zl)return $l.fromSourceMap(t).toString();if(t instanceof $l)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=nc(tc(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var oc=rc;rc.default=rc;let{SourceMapConsumer:ic,SourceMapGenerator:ac}=Ol,{fileURLToPath:sc,pathToFileURL:lc}=Ol,{isAbsolute:cc,resolve:uc}=Ol,{nanoid:dc}=Xl,pc=Ol,hc=Ml,fc=oc,gc=Symbol("fromOffsetCache"),mc=Boolean(ic&&ac),vc=Boolean(uc&&cc),yc=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!vc||/^\w+:\/\//.test(t.from)||cc(t.from)?this.file=t.from:this.file=uc(t.from)),vc&&mc){let e=new fc(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+dc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let o,i,a;if(t&&"object"==typeof t){let e=t,r=n;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,n=r.col}else t=e.line,n=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,a=e.col}else i=r.line,a=r.column}else if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let s=this.origin(t,n,i,a);return o=s?new hc(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,r.plugin):new hc(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:a,line:i},this.css,this.file,r.plugin),o.input={column:n,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(lc&&(o.input.url=lc(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,n;if(this[gc])n=this[gc];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let r=0,o=e.length;r<o;r++)n[r]=t,t+=e[r].length+1;this[gc]=n}t=n[n.length-1];let r=0;if(e>=t)r=n.length-1;else{let t,o=n.length-2;for(;r<o;)if(t=r+(o-r>>1),e<n[t])o=t-1;else{if(!(e>=n[t+1])){r=t;break}r=t+1}}return{col:e-n[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:uc(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let o,i,a=this.map.consumer(),s=a.originalPositionFor({column:t,line:e});if(!s.source)return!1;"number"==typeof n&&(o=a.originalPositionFor({column:r,line:n})),i=cc(s.source)?lc(s.source):new URL(s.source,this.map.consumer().sourceRoot||lc(this.map.mapFile));let l={column:s.column,endColumn:o&&o.column,endLine:o&&o.line,line:s.line,url:i.toString()};if("file:"===i.protocol){if(!sc)throw new Error("file: protocol is not available in this PostCSS build");l.file=sc(i)}let c=a.sourceContentFor(s.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var bc=yc;yc.default=yc,pc&&pc.registerInput&&pc.registerInput(yc);let{SourceMapConsumer:wc,SourceMapGenerator:kc}=Ol,{dirname:xc,relative:Sc,resolve:Cc,sep:Ic}=Ol,{pathToFileURL:Ec}=Ol,Oc=bc,Tc=Boolean(wc&&kc),Lc=Boolean(xc&&Cc&&Sc&&Ic);var Ac=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||xc(e.file);!1===this.mapOpts.sourcesContent?(t=new wc(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Lc&&Tc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=kc.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new kc({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new kc({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,r=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((a,s,l)=>{if(this.css+=a,s&&"end"!==l&&(i.generated.line=n,i.generated.column=r-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=a.match(/\n/g),e?(n+=e.length,t=a.lastIndexOf("\n"),r=a.length-t):r+=a.length,s&&"start"!==l){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=n,i.generated.column=r-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=r-1,this.map.addMapping(i)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?xc(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=xc(Cc(n,this.mapOpts.annotation)));let r=Sc(n,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new Oc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ec){let t=Ec(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Ic&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};let Mc=Vl,Rc=class extends Mc{constructor(e){super(e),this.type="comment"}};var Pc=Rc;Rc.default=Rc;let Nc,_c,Dc,jc,{isClean:Fc,my:Bc}=Rl,Uc=Kl,Hc=Pc,zc=Vl;function qc(e){return e.map((e=>(e.nodes&&(e.nodes=qc(e.nodes)),delete e.source,e)))}function Wc(e){if(e[Fc]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Wc(t)}let Gc=class e extends zc{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[r]+=1;return delete this.indexes[r],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,r=this.index(e),o=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of o)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)n=this.indexes[i],r<n&&(this.indexes[i]=n+o.length);return this.markDirty(),this}insertBefore(e,t){let n,r=this.index(e),o=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],o).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r,0,a);for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}normalize(t,n){if("string"==typeof t)t=qc(Nc(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Uc(t)]}else if(t.selector)t=[new _c(t)];else if(t.name)t=[new Dc(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Hc(t)]}return t.map((t=>(t[Bc]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Fc]&&Wc(t),void 0===t.raws.before&&n&&void 0!==n.raws.before&&(t.raws.before=n.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,n)=>{let r;try{r=e(t,n)}catch(o){throw t.addToError(o)}return!1!==r&&t.walk&&(r=t.walk(e)),r}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("atrule"===n.type&&e.test(n.name))return t(n,r)})):this.walk(((n,r)=>{if("atrule"===n.type&&n.name===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("decl"===n.type&&e.test(n.prop))return t(n,r)})):this.walk(((n,r)=>{if("decl"===n.type&&n.prop===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,r)=>{if("rule"===n.type&&e.test(n.selector))return t(n,r)})):this.walk(((n,r)=>{if("rule"===n.type&&n.selector===e)return t(n,r)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Gc.registerParse=e=>{Nc=e},Gc.registerRule=e=>{_c=e},Gc.registerAtRule=e=>{Dc=e},Gc.registerRoot=e=>{jc=e};var Vc=Gc;Gc.default=Gc,Gc.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Dc.prototype):"rule"===e.type?Object.setPrototypeOf(e,_c.prototype):"decl"===e.type?Object.setPrototypeOf(e,Uc.prototype):"comment"===e.type?Object.setPrototypeOf(e,Hc.prototype):"root"===e.type&&Object.setPrototypeOf(e,jc.prototype),e[Bc]=!0,e.nodes&&e.nodes.forEach((e=>{Gc.rebuild(e)}))};let Jc,Yc,Kc=Vc,Xc=class extends Kc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Jc(new Yc,this,e).stringify()}};Xc.registerLazyResult=e=>{Jc=e},Xc.registerProcessor=e=>{Yc=e};var Zc=Xc;Xc.default=Xc;let $c=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let n in t)this[n]=t[n]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Qc=$c;$c.default=$c;let eu=Qc,tu=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new eu(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var nu=tu;tu.default=tu;const ru="'".charCodeAt(0),ou='"'.charCodeAt(0),iu="\\".charCodeAt(0),au="/".charCodeAt(0),su="\n".charCodeAt(0),lu=" ".charCodeAt(0),cu="\f".charCodeAt(0),uu="\t".charCodeAt(0),du="\r".charCodeAt(0),pu="[".charCodeAt(0),hu="]".charCodeAt(0),fu="(".charCodeAt(0),gu=")".charCodeAt(0),mu="{".charCodeAt(0),vu="}".charCodeAt(0),yu=";".charCodeAt(0),bu="*".charCodeAt(0),wu=":".charCodeAt(0),ku="@".charCodeAt(0),xu=/[\t\n\f\r "#'()/;[\\\]{}]/g,Su=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Cu=/.[\r\n"'(/\\]/,Iu=/[\da-f]/i;let Eu=Vc,Ou=class extends Eu{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Tu=Ou;Ou.default=Ou,Eu.registerAtRule(Ou);let Lu,Au,Mu=Vc,Ru=class extends Mu{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let r=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of r)o.raws.before=t.raws.before;return r}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new Lu(new Au,this,e).stringify()}};Ru.registerLazyResult=e=>{Lu=e},Ru.registerProcessor=e=>{Au=e};var Pu=Ru;Ru.default=Ru,Mu.registerRoot(Ru);let Nu={comma:e=>Nu.split(e,[","],!0),space:e=>Nu.split(e,[" ","\n","\t"]),split(e,t,n){let r=[],o="",i=!1,a=0,s=!1,l="",c=!1;for(let u of e)c?c=!1:"\\"===u?c=!0:s?u===l&&(s=!1):'"'===u||"'"===u?(s=!0,l=u):"("===u?a+=1:")"===u?a>0&&(a-=1):0===a&&t.includes(u)&&(i=!0),i?(""!==o&&r.push(o.trim()),o="",i=!1):o+=u;return(n||""!==o)&&r.push(o.trim()),r}};var _u=Nu;Nu.default=Nu;let Du=Vc,ju=_u,Fu=class extends Du{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ju.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}};var Bu=Fu;Fu.default=Fu,Du.registerRule(Fu);let Uu=Kl,Hu=function(e,t={}){let n,r,o,i,a,s,l,c,u,d,p=e.css.valueOf(),h=t.ignoreErrors,f=p.length,g=0,m=[],v=[];function y(t){throw e.error("Unclosed "+t,g)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&g>=f},nextToken:function(e){if(v.length)return v.pop();if(g>=f)return;let t=!!e&&e.ignoreUnclosed;switch(n=p.charCodeAt(g),n){case su:case lu:case uu:case du:case cu:r=g;do{r+=1,n=p.charCodeAt(r)}while(n===lu||n===su||n===uu||n===du||n===cu);d=["space",p.slice(g,r)],g=r-1;break;case pu:case hu:case mu:case vu:case wu:case yu:case gu:{let e=String.fromCharCode(n);d=[e,e,g];break}case fu:if(c=m.length?m.pop()[1]:"",u=p.charCodeAt(g+1),"url"===c&&u!==ru&&u!==ou&&u!==lu&&u!==su&&u!==uu&&u!==cu&&u!==du){r=g;do{if(s=!1,r=p.indexOf(")",r+1),-1===r){if(h||t){r=g;break}y("bracket")}for(l=r;p.charCodeAt(l-1)===iu;)l-=1,s=!s}while(s);d=["brackets",p.slice(g,r+1),g,r],g=r}else r=p.indexOf(")",g+1),i=p.slice(g,r+1),-1===r||Cu.test(i)?d=["(","(",g]:(d=["brackets",i,g,r],g=r);break;case ru:case ou:o=n===ru?"'":'"',r=g;do{if(s=!1,r=p.indexOf(o,r+1),-1===r){if(h||t){r=g+1;break}y("string")}for(l=r;p.charCodeAt(l-1)===iu;)l-=1,s=!s}while(s);d=["string",p.slice(g,r+1),g,r],g=r;break;case ku:xu.lastIndex=g+1,xu.test(p),r=0===xu.lastIndex?p.length-1:xu.lastIndex-2,d=["at-word",p.slice(g,r+1),g,r],g=r;break;case iu:for(r=g,a=!0;p.charCodeAt(r+1)===iu;)r+=1,a=!a;if(n=p.charCodeAt(r+1),a&&n!==au&&n!==lu&&n!==su&&n!==uu&&n!==du&&n!==cu&&(r+=1,Iu.test(p.charAt(r)))){for(;Iu.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===lu&&(r+=1)}d=["word",p.slice(g,r+1),g,r],g=r;break;default:n===au&&p.charCodeAt(g+1)===bu?(r=p.indexOf("*/",g+2)+1,0===r&&(h||t?r=p.length:y("comment")),d=["comment",p.slice(g,r+1),g,r],g=r):(Su.lastIndex=g+1,Su.test(p),r=0===Su.lastIndex?p.length-1:Su.lastIndex-2,d=["word",p.slice(g,r+1),g,r],m.push(d),g=r)}return g++,d},position:function(){return g}}},zu=Pc,qu=Tu,Wu=Pu,Gu=Bu;const Vu={empty:!0,space:!0};var Ju=class{constructor(e){this.input=e,this.root=new Wu,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,o=new qu;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,s=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(s.length>0){for(r=s.length-1,n=s[r];n&&"space"===n[0];)n=s[--r];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}s.push(e)}else s.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(o.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(o,"params",s),i&&(e=s[s.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,r=0;for(let o=t-1;o>=0&&(n=e[o],"space"===n[0]||(r+=1,2!==r));o--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,r,o=0;for(let[i,a]of e.entries()){if(t=a,n=t[0],"("===n&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new zu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Hu(this.input)}decl(e,t){let n=new Uu;this.init(n,e[0][2]);let r,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,a=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let s=e.length-1;s>=0;s--){if(r=e[s],"!important"===r[1].toLowerCase()){n.important=!0;let t=this.stringFrom(e,s);t=this.spacesFromEnd(e)+t," !important"!==t&&(n.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=s;e>0;e--){let n=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==n)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(n.important=!0,n.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(n.raws.between+=a.map((e=>e[1])).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Gu;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n=null,r=!1,o=null,i=[],a=e[1].startsWith("--"),s=[],l=e;for(;l;){if(n=l[0],s.push(l),"("===n||"["===n)o||(o=l),i.push("("===n?")":"]");else if(a&&r&&"{"===n)o||(o=l),i.push("}");else if(0===i.length){if(";"===n){if(r)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(r=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&r){if(!a)for(;s.length&&(l=s[s.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let o,i,a,s,l=n.length,c="",u=!0;for(let d=0;d<l;d+=1)o=n[d],i=o[0],"space"!==i||d!==l-1||r?"comment"===i?(s=n[d-1]?n[d-1][0]:"empty",a=n[d+1]?n[d+1][0]:"empty",Vu[s]||Vu[a]||","===c.slice(-1)?u=!1:c+=o[1]):c+=o[1]:u=!1;if(!u){let r=n.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Gu;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};let Yu=Vc,Ku=Ju,Xu=bc;function Zu(e,t){let n=new Xu(e,t),r=new Ku(n);try{r.parse()}catch(o){throw o}return r.root}var $u=Zu;Zu.default=Zu,Yu.registerParse(Zu);let{isClean:Qu,my:ed}=Rl,td=Ac,nd=Fl,rd=Vc,od=Zc,id=nu,ad=$u,sd=Pu;const ld={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},cd={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},ud={Once:!0,postcssPlugin:!0,prepare:!0},dd=0;function pd(e){return"object"==typeof e&&"function"==typeof e.then}function hd(e){let t=!1,n=ld[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,dd,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,dd,n+"Exit"]:[n,n+"Exit"]}function fd(e){let t;return t="document"===e.type?["Document",dd,"DocumentExit"]:"root"===e.type?["Root",dd,"RootExit"]:hd(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function gd(e){return e[Qu]=!1,e.nodes&&e.nodes.forEach((e=>gd(e))),e}let md={},vd=class e{constructor(t,n,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof id)o=gd(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=ad;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{o=e(n,r)}catch(i){this.processed=!0,this.error=i}o&&!o[ed]&&rd.rebuild(o)}else o=gd(n);this.result=new id(t,o,r),this.helpers={...md,postcss:md,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!cd[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ud[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let n=0;n<this.plugins.length;n++){let t=this.plugins[n],r=this.runOnRoot(t);if(pd(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Qu];){e[Qu]=!0;let n=[fd(e)];for(;n.length>0;){let e=this.visitTick(n);if(pd(e))try{await e}catch(t){let e=n[n.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[n,r]of this.listeners.OnceExit){this.result.lastPlugin=n;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(t){throw this.handleError(t)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return pd(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=nd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new td(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(pd(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Qu];)e[Qu]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,o]of e){let e;this.result.lastPlugin=r;try{e=o(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(pd(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(n.toProxy(),this.helpers)}catch(i){throw this.handleError(i,n)}}if(0!==t.iterator){let r,o=t.iterator;for(;r=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!r[Qu])return r[Qu]=!0,void e.push(fd(r));t.iterator=0,delete n.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,e===dd)return void(n.nodes&&n.nodes.length&&(n[Qu]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Qu]=!0;let t=hd(e);for(let n of t)if(n===dd)e.nodes&&e.each((e=>{e[Qu]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};vd.registerPostcss=e=>{md=e};var yd=vd;vd.default=vd,sd.registerLazyResult(vd),od.registerLazyResult(vd);let bd=Ac,wd=Fl,kd=$u;const xd=nu;let Sd=class{constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let o=wd;this.result=new xd(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let a=new bd(o,r,this._opts,t);if(a.isMap()){let[e,t]=a.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=kd;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Cd=Sd;Sd.default=Sd;let Id=Cd,Ed=yd,Od=Zc,Td=Pu,Ld=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Ed(this,e,t):new Id(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ad=Ld;Ld.default=Ld,Td.registerProcessor(Ld),Od.registerProcessor(Ld);let Md=Kl,Rd=oc,Pd=Pc,Nd=Tu,_d=bc,Dd=Pu,jd=Bu;function Fd(e,t){if(Array.isArray(e))return e.map((e=>Fd(e)));let{inputs:n,...r}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:_d.prototype};n.map&&(n.map={...n.map,__proto__:Rd.prototype}),t.push(n)}}if(r.nodes&&(r.nodes=e.nodes.map((e=>Fd(e,t)))),r.source){let{inputId:e,...n}=r.source;r.source=n,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Dd(r);if("decl"===r.type)return new Md(r);if("rule"===r.type)return new jd(r);if("comment"===r.type)return new Pd(r);if("atrule"===r.type)return new Nd(r);throw new Error("Unknown node type: "+e.type)}var Bd=Fd;Fd.default=Fd;let Ud=Ml,Hd=Kl,zd=yd,qd=Vc,Wd=Ad,Gd=Fl,Vd=Bd,Jd=Zc,Yd=Qc,Kd=Pc,Xd=Tu,Zd=nu,$d=bc,Qd=$u,ep=_u,tp=Bu,np=Pu,rp=Vl;function op(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Wd(e)}op.plugin=function(e,t){let n,r=!1;function o(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...n);return o.postcssPlugin=e,o.postcssVersion=(new Wd).version,o}return Object.defineProperty(o,"postcss",{get:()=>(n||(n=o()),n)}),o.process=function(e,t,n){return op([o(n)]).process(e,t)},o},op.stringify=Gd,op.parse=Qd,op.fromJSON=Vd,op.list=ep,op.comment=e=>new Kd(e),op.atRule=e=>new Xd(e),op.decl=e=>new Hd(e),op.rule=e=>new tp(e),op.root=e=>new np(e),op.document=e=>new Jd(e),op.CssSyntaxError=Ud,op.Declaration=Hd,op.Container=qd,op.Processor=Wd,op.Document=Jd,op.Comment=Kd,op.Warning=Yd,op.AtRule=Xd,op.Result=Zd,op.Input=$d,op.Rule=tp,op.Root=np,op.Node=rp,zd.registerPostcss(op);var ip=op;op.default=op;const ap=kl(ip);ap.stringify,ap.fromJSON,ap.plugin,ap.parse,ap.list,ap.document,ap.comment,ap.atRule,ap.rule,ap.decl,ap.root,ap.CssSyntaxError,ap.Declaration,ap.Container,ap.Processor,ap.Document,ap.Comment,ap.Warning,ap.AtRule,ap.Result,ap.Input,ap.Rule,ap.Root,ap.Node;class sp{constructor(...e){wl(this,"parentElement",null),wl(this,"parentNode",null),wl(this,"ownerDocument"),wl(this,"firstChild",null),wl(this,"lastChild",null),wl(this,"previousSibling",null),wl(this,"nextSibling",null),wl(this,"ELEMENT_NODE",1),wl(this,"TEXT_NODE",3),wl(this,"nodeType"),wl(this,"nodeName"),wl(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof sp))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const lp={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},cp={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},up={},dp=()=>!!globalThis.Zone;function pp(e){if(up[e])return up[e];const t=globalThis[e],n=t.prototype,r=e in lp?lp[e]:void 0,o=Boolean(r&&r.every((e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))}))),i=e in cp?cp[e]:void 0,a=Boolean(i&&i.every((e=>{var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))})));if(o&&a&&!dp())return up[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const o=r.contentWindow;if(!o)return t.prototype;const i=o[e].prototype;return document.body.removeChild(r),i?up[e]=i:n}catch{return n}}const hp={};function fp(e,t,n){var r;const o=`${e}.${String(n)}`;if(hp[o])return hp[o].call(t);const i=pp(e),a=null==(r=Object.getOwnPropertyDescriptor(i,n))?void 0:r.get;return a?(hp[o]=a,a.call(t)):t[n]}const gp={};function mp(e,t,n){const r=`${e}.${String(n)}`;if(gp[r])return gp[r].bind(t);const o=pp(e)[n];return"function"!=typeof o?t[n]:(gp[r]=o,o.bind(t))}function vp(){return pp("MutationObserver").constructor}function yp(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}const bp={ownerDocument:function(e){return fp("Node",e,"ownerDocument")},childNodes:function(e){return fp("Node",e,"childNodes")},parentNode:function(e){return fp("Node",e,"parentNode")},parentElement:function(e){return fp("Node",e,"parentElement")},textContent:function(e){return fp("Node",e,"textContent")},contains:function(e,t){return mp("Node",e,"contains")(t)},getRootNode:function(e){return mp("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?fp("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?fp("Element",e,"shadowRoot"):null},querySelector:function(e,t){return fp("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return fp("Element",e,"querySelectorAll")(t)},mutationObserver:vp,patch:yp};function wp(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const kp="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.";let xp={map:{},getId:()=>(console.error(kp),-1),getNode:()=>(console.error(kp),null),removeNodeFromMap(){console.error(kp)},has:()=>(console.error(kp),!1),reset(){console.error(kp)}};function Sp(e,t,n={}){let r=null,o=0;return function(...i){const a=Date.now();o||!1!==n.leading||(o=a);const s=t-(a-o),l=this;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(l,i)):r||!1===n.trailing||(r=setTimeout((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(l,i)}),s))}}function Cp(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>Cp(e,t,i||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(xp=new Proxy(xp,{get:(e,t,n)=>("map"===t&&console.error(kp),Reflect.get(e,t,n))}));let Ip=Date.now;function Ep(e){var t,n,r,o;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=bp.parentElement(i.body))?void 0:t.scrollLeft)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=bp.parentElement(i.body))?void 0:r.scrollTop)||(null==(o=null==i?void 0:i.body)?void 0:o.scrollTop)||0}}function Op(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Tp(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Lp(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:bp.parentElement(e)}function Ap(e,t,n,r){if(!e)return!1;const o=Lp(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(Oo(o,t,r))return!0}catch(i){}if(n){if(o.matches(n))return!0;if(r&&null!==o.closest(n))return!0}return!1}function Mp(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||t.getId(e)===go}function Rp(e,t){if(Kr(e))return!1;const n=t.getId(e);if(!t.has(n))return!0;const r=bp.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Rp(r,t))}function Pp(e){return Boolean(e.changedTouches)}function Np(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function _p(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Dp(e){return!!e&&(e instanceof sp&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(bp.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ip=()=>(new Date).getTime());class jp{constructor(){Nr(this,"id",1),Nr(this,"styleIDMap",new WeakMap),Nr(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Fp(e){var t;let n=null;return"getRootNode"in e&&(null==(t=bp.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&bp.host(bp.getRootNode(e))&&(n=bp.host(bp.getRootNode(e))),n}function Bp(e){const t=bp.ownerDocument(e);if(!t)return!1;const n=function(e){let t,n=e;for(;t=Fp(n);)n=t;return n}(e);return bp.contains(t,n)}function Up(e){const t=bp.ownerDocument(e);return!!t&&(bp.contains(t,e)||Bp(e))}var Hp=(e=>(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))(Hp||{}),zp=(e=>(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[e.CustomElement=16]="CustomElement",e))(zp||{}),qp=(e=>(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))(qp||{}),Wp=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Wp||{}),Gp=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Gp||{}),Vp=(e=>(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))(Vp||{}),Jp=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Jp||{});function Yp(e){return"__ln"in e}class Kp{constructor(){Nr(this,"length",0),Nr(this,"head",null),Nr(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Yp(e.previousSibling)){const 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&&Yp(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Xp=(e,t)=>`${e}@${t}`;class Zp{constructor(){Nr(this,"frozen",!1),Nr(this,"locked",!1),Nr(this,"texts",[]),Nr(this,"attributes",[]),Nr(this,"attributeMap",new WeakMap),Nr(this,"removes",[]),Nr(this,"mapRemoves",[]),Nr(this,"movedMap",{}),Nr(this,"addedSet",new Set),Nr(this,"movedSet",new Set),Nr(this,"droppedSet",new Set),Nr(this,"removesSubTreeCache",new Set),Nr(this,"mutationCb"),Nr(this,"blockClass"),Nr(this,"blockSelector"),Nr(this,"maskTextClass"),Nr(this,"maskTextSelector"),Nr(this,"inlineStylesheet"),Nr(this,"maskInputOptions"),Nr(this,"maskTextFn"),Nr(this,"maskInputFn"),Nr(this,"keepIframeSrcFn"),Nr(this,"recordCanvas"),Nr(this,"inlineImages"),Nr(this,"slimDOMOptions"),Nr(this,"dataURLOptions"),Nr(this,"doc"),Nr(this,"mirror"),Nr(this,"iframeManager"),Nr(this,"stylesheetManager"),Nr(this,"shadowDomManager"),Nr(this,"canvasManager"),Nr(this,"processedNodeManager"),Nr(this,"unattachedDoc"),Nr(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),Nr(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new Kp,r=e=>{let t=e,n=go;for(;n===go;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{const i=bp.parentNode(o);if(!i||!Up(o))return;let a=!1;if(o.nodeType===Node.TEXT_NODE){const e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(a=!0)}const s=Kr(i)?this.mirror.getId(Fp(o)):this.mirror.getId(i),l=r(o);if(-1===s||-1===l)return n.addNode(o);const c=Ro(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Np(e,this.mirror)&&this.iframeManager.addIframe(e),_p(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Dp(o)&&this.shadowDomManager.addShadowRoot(bp.shadowRoot(o),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:a});c&&(e.push({parentId:s,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const s of this.movedSet)Qp(this.removesSubTreeCache,s,this.mirror)&&!this.movedSet.has(bp.parentNode(s))||o(s);for(const s of this.addedSet)eh(this.droppedSet,s)||Qp(this.removesSubTreeCache,s,this.mirror)?eh(this.movedSet,s)?o(s):this.droppedSet.add(s):o(s);let i=null;for(;n.length;){let e=null;if(i){const t=this.mirror.getId(bp.parentNode(i.value)),n=r(i.value);-1!==t&&-1!==n&&(e=i)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(bp.parentNode(n.value));if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value,r=bp.parentNode(t);if(r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=bp.host(r);if(-1!==this.mirror.getId(t)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}i=e.previous,n.removeNode(e.value),o(e.value)}const a={texts:this.texts.map((e=>{const t=e.node,n=bp.parentNode(t);return n&&"TEXTAREA"===n.tagName&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(a.texts.length||a.attributes.length||a.removes.length||a.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(a))})),Nr(this,"genTextAreaValueMutation",(e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const n=Array.from(bp.childNodes(e),(e=>bp.textContent(e)||"")).join("");t.attributes.value=eo({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ro(e),value:n,maskInputFn:this.maskInputFn})})),Nr(this,"processMutation",(e=>{if(!Mp(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=bp.textContent(e.target);Ap(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:To(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Lp(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const n=e.target;let r=e.attributeName,o=e.target.getAttribute(r);if("value"===r){const e=ro(n);o=eo({element:n,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:e,value:o,maskInputFn:this.maskInputFn})}if(Ap(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===n.tagName&&"src"===r&&!this.keepIframeSrcFn(o)){if(n.contentDocument)return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===r&&"INPUT"===n.tagName&&"password"===(e.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Eo(n.tagName,r))if(i.attributes[r]=Io(this.doc,to(n.tagName),to(r),o),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(n.style)){const t=n.style.getPropertyValue(e),o=n.style.getPropertyPriority(e);t!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?i.styleDiff[e]=""===o?t:[t,o]:i._unchangedStyles[e]=[t,o]}for(const e of Array.from(r.style))""===n.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":if(Ap(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=Kr(e.target)?this.mirror.getId(bp.host(e.target)):this.mirror.getId(e.target);Ap(e.target,this.blockClass,this.blockSelector,!1)||Mp(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?($p(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Rp(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Xp(n,r)]?$p(this.movedSet,t):(this.removes.push({parentId:r,id:n,isShadow:!(!Kr(e.target)||!Xr(e.target))||void 0}),function(e,t){const n=[e];for(;n.length;){const e=n.pop();t.has(e)||(t.add(e),bp.childNodes(e).forEach((e=>n.push(e))))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))}))}})),Nr(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Mp(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[Xp(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ap(e,this.blockClass,this.blockSelector,!1)||(bp.childNodes(e).forEach((e=>this.genAdds(e))),Dp(e)&&bp.childNodes(bp.shadowRoot(e)).forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function $p(e,t){e.delete(t),bp.childNodes(t).forEach((t=>$p(e,t)))}function Qp(e,t,n){return 0!==e.size&&function(e,t,n){const r=bp.parentNode(t);return!!r&&e.has(r)}(e,t)}function eh(e,t){return 0!==e.size&&th(e,t)}function th(e,t){const n=bp.parentNode(t);return!!n&&(!!e.has(n)||th(e,n))}let nh;const rh=e=>{if(!nh)return e;return(...t)=>{try{return e(...t)}catch(n){if(nh&&!0===nh(n))return;throw n}}},oh=[];function ih(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function ah(e,t){const n=new Zp;oh.push(n),n.init(e);const r=new(vp())(rh(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function sh({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,s=[];let l=null;return Object.keys(qp).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e])).forEach((i=>{let a=to(i);const c=(t=>i=>{const a=ih(i);if(Ap(a,r,o,!0))return;let s=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":s=Wp.Mouse;break;case"touch":s=Wp.Touch;break;case"pen":s=Wp.Pen}s===Wp.Touch?qp[t]===qp.MouseDown?c="TouchStart":qp[t]===qp.MouseUp&&(c="TouchEnd"):Wp.Pen}else Pp(i)&&(s=Wp.Touch);null!==s?(l=s,(c.startsWith("Touch")&&s===Wp.Touch||c.startsWith("Mouse")&&s===Wp.Mouse)&&(s=null)):qp[t]===qp.Click&&(s=l,l=null);const u=Pp(i)?i.changedTouches[0]:i;if(!u)return;const d=n.getId(a),{clientX:p,clientY:h}=u;rh(e)({type:qp[c],id:d,x:p,y:h,...null!==s&&{pointerType:s}})})(i);if(window.PointerEvent)switch(qp[i]){case qp.MouseDown:case qp.MouseUp:a=a.replace("mouse","pointer");break;case qp.TouchStart:case qp.TouchEnd:return}s.push(wp(a,c,t))})),rh((()=>{s.forEach((e=>e()))}))}function lh({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){return wp("scroll",rh(Sp(rh((i=>{const a=ih(i);if(!a||Ap(a,r,o,!0))return;const s=n.getId(a);if(a===t&&t.defaultView){const n=Ep(t.defaultView);e({id:s,x:n.left,y:n.top})}else e({id:s,x:a.scrollLeft,y:a.scrollTop})})),i.scroll||100)),t)}const ch=["INPUT","TEXTAREA","SELECT"],uh=new WeakMap;function dh(e){return function(e,t){if(gh("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||gh("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||gh("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||gh("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function ph(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function hh({mirror:e,stylesheetManager:t},n){var r,o,i;let a=null;a="#document"===n.nodeName?e.getId(n):e.getId(bp.host(n));const s="#document"===n.nodeName?null==(r=n.defaultView)?void 0:r.Document:null==(i=null==(o=n.ownerDocument)?void 0:o.defaultView)?void 0:i.ShadowRoot,l=(null==s?void 0:s.prototype)?Object.getOwnPropertyDescriptor(null==s?void 0:s.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&s&&l?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var n;const r=null==(n=l.set)?void 0:n.call(this,e);if(null!==a&&-1!==a)try{t.adoptStyleSheets(e,a)}catch(o){}return r}}),rh((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))):()=>{}}function fh(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;!function(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:s,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p,selectionCb:h,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),o(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),a(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),s(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),h(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(r=ah(e,e.doc));const o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let a,s=[];const l=Sp(rh((t=>{const n=Date.now()-a;e(s.map((e=>(e.timeOffset-=n,e))),t),s=[],a=null})),i),c=rh(Sp(rh((e=>{const t=ih(e),{clientX:n,clientY:o}=Pp(e)?e.changedTouches[0]:e;a||(a=Ip()),s.push({x:n,y:o,id:r.getId(t),timeOffset:Ip()-a}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?zp.Drag:e instanceof MouseEvent?zp.MouseMove:zp.TouchMove)})),o,{trailing:!1})),u=[wp("mousemove",c,n),wp("touchmove",c,n),wp("drag",c,n)];return rh((()=>{u.forEach((e=>e()))}))}(e),i=sh(e),a=lh(e),s=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return wp("resize",rh(Sp(rh((()=>{const t=Op(),o=Tp();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)})),200)),t)}(e,{win:n}),l=function({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:i,ignoreSelector:a,maskInputOptions:s,maskInputFn:l,sampling:c,userTriggeredOnInput:u}){function d(e){let n=ih(e);const c=e.isTrusted,d=n&&n.tagName;if(n&&"OPTION"===d&&(n=bp.parentElement(n)),!n||!d||ch.indexOf(d)<0||Ap(n,r,o,!0))return;if(n.classList.contains(i)||a&&n.matches(a))return;let h=n.value,f=!1;const g=ro(n)||"";"radio"===g||"checkbox"===g?f=n.checked:(s[d.toLowerCase()]||s[g])&&(h=eo({element:n,maskInputOptions:s,tagName:d,type:g,value:h,maskInputFn:l})),p(n,u?{text:h,isChecked:f,userTriggered:c}:{text:h,isChecked:f});const m=n.name;"radio"===g&&m&&f&&t.querySelectorAll(`input[type="radio"][name="${m}"]`).forEach((e=>{if(e!==n){const t=e.value;p(e,u?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}}))}function p(t,r){const o=uh.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){uh.set(t,r);const o=n.getId(t);rh(e)({...r,id:o})}}const h=("last"===c.input?["change"]:["input","change"]).map((e=>wp(e,rh(d),t))),f=t.defaultView;if(!f)return()=>{h.forEach((e=>e()))};const g=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),m=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&h.push(...m.map((e=>Cp(e[0],e[1],{set(){rh(d)({target:this,isTrusted:!1})}},!1,f)))),rh((()=>{h.forEach((e=>e()))}))}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o,doc:i}){const a=rh((i=>Sp(rh((o=>{const a=ih(o);if(!a||Ap(a,t,n,!0))return;const{currentTime:s,volume:l,muted:c,playbackRate:u,loop:d}=a;e({type:i,id:r.getId(a),currentTime:s,volume:l,muted:c,playbackRate:u,loop:d})})),o.media||500))),s=[wp("play",a(Vp.Play),i),wp("pause",a(Vp.Pause),i),wp("seeked",a(Vp.Seeked),i),wp("volumechange",a(Vp.VolumeChange),i),wp("ratechange",a(Vp.RateChange),i)];return rh((()=>{s.forEach((e=>e()))}))}(e);let u=()=>{},d=()=>{},p=()=>{},h=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:rh(((r,o,i)=>{const[a,s]=i,{id:l,styleId:c}=ph(o,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:a,index:s}]}),r.apply(o,i)}))}),r.CSSStyleSheet.prototype.addRule=function(e,t,n=this.cssRules.length){const o=`${e} { ${t} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[o,n])};const i=r.CSSStyleSheet.prototype.deleteRule;let a,s;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:rh(((r,o,i)=>{const[a]=i,{id:s,styleId:l}=ph(o,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,removes:[{index:a}]}),r.apply(o,i)}))}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:rh(((r,o,i)=>{const[a]=i,{id:s,styleId:l}=ph(o,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,replace:a}),r.apply(o,i)}))})),r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:rh(((r,o,i)=>{const[a]=i,{id:s,styleId:l}=ph(o,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,replaceSync:a}),r.apply(o,i)}))}));const l={};mh("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(mh("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),mh("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),mh("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach((([r,o])=>{c[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(c[r].insertRule,{apply:rh(((r,o,i)=>{const[a,s]=i,{id:l,styleId:c}=ph(o.parentStyleSheet,t,n.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:a,index:[...dh(o),s||0]}]}),r.apply(o,i)}))}),o.prototype.deleteRule=new Proxy(c[r].deleteRule,{apply:rh(((r,o,i)=>{const[a]=i,{id:s,styleId:l}=ph(o.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||l&&-1!==l)&&e({id:s,styleId:l,removes:[{index:[...dh(o),a]}]}),r.apply(o,i)}))})})),rh((()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,a&&(r.CSSStyleSheet.prototype.replace=a),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(l).forEach((([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule}))}))}(e,{win:n}),d=hh(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:rh(((o,a,s)=>{var l;const[c,u,d]=s;if(n.has(c))return i.apply(a,[c,u,d]);const{id:p,styleId:h}=ph(null==(l=a.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(p&&-1!==p||h&&-1!==h)&&e({id:p,styleId:h,set:{property:c,value:u,priority:d},index:dh(a.parentRule)}),o.apply(a,s)}))});const a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:rh(((o,i,s)=>{var l;const[c]=s;if(n.has(c))return a.apply(i,[c]);const{id:u,styleId:d}=ph(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(u&&-1!==u||d&&-1!==d)&&e({id:u,styleId:d,remove:{property:c},index:dh(i.parentRule)}),o.apply(i,s)}))}),rh((()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a}))}(e,{win:n}),e.collectFonts&&(h=function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,n){const r=new i(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const a=yp(t.fonts,"add",(function(t){return function(n){return setTimeout(rh((()=>{const t=o.get(n);t&&(e(t),o.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=i})),r.push(a),rh((()=>{r.forEach((e=>e()))}))}(e)));const f=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e;let a=!0;const s=rh((()=>{const e=t.getSelection();if(!e||a&&(null==e?void 0:e.isCollapsed))return;a=e.isCollapsed||!1;const s=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:a,startOffset:l,endContainer:c,endOffset:u}=i;Ap(a,r,o,!0)||Ap(c,r,o,!0)||s.push({start:n.getId(a),startOffset:l,end:n.getId(c),endOffset:u})}i({ranges:s})}));return s(),wp("selectionchange",s)}(e),g=function({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?yp(n.customElements,"define",(function(e){return function(n,r,o){try{t({define:{name:n}})}catch(i){console.warn(`Custom element callback failed for ${n}`)}return e.apply(this,[n,r,o])}})):()=>{}}(e),m=[];for(const v of e.plugins)m.push(v.observer(v.callback,n,v.options));return rh((()=>{oh.forEach((e=>e.reset())),null==r||r.disconnect(),o(),i(),a(),s(),l(),c(),u(),d(),p(),h(),f(),g(),m.forEach((e=>e()))}))}function gh(e){return void 0!==window[e]}function mh(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class vh{constructor(e){Nr(this,"iframeIdToRemoteIdMap",new WeakMap),Nr(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),i.set(a,t)),a}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class yh{constructor(e){Nr(this,"iframes",new WeakMap),Nr(this,"crossOriginIframeMap",new WeakMap),Nr(this,"crossOriginIframeMirror",new vh(mo)),Nr(this,"crossOriginIframeStyleMirror"),Nr(this,"crossOriginIframeRootIdMap",new WeakMap),Nr(this,"mirror"),Nr(this,"mutationCb"),Nr(this,"wrappedEmit"),Nr(this,"loadListener"),Nr(this,"stylesheetManager"),Nr(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new vh(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case Hp.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Hp.IncrementalSnapshot,data:{source:zp.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Hp.Meta:case Hp.Load:case Hp.DomContentLoaded:return!1;case Hp.Plugin:return t;case Hp.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Hp.IncrementalSnapshot:switch(t.data.source){case zp.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case zp.Drag:case zp.TouchMove:case zp.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case zp.ViewportResize:return!1;case zp.MediaInteraction:case zp.MouseInteraction:case zp.Scroll:case zp.CanvasMutation:case zp.Input:return this.replaceIds(t.data,e,["id"]),t;case zp.StyleSheetRule:case zp.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case zp.Font:return t;case zp.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case zp.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===Jp.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class bh{constructor(e){Nr(this,"shadowDoms",new WeakSet),Nr(this,"mutationCb"),Nr(this,"scrollCb"),Nr(this,"bypassOptions"),Nr(this,"mirror"),Nr(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Xr(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=ah({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(lh({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(bp.host(e))),this.restoreHandlers.push(hh({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(yp(e.prototype,"attachShadow",(function(e){return function(r){const o=e.call(this,r),i=bp.shadowRoot(this);return i&&Up(this)&&n.addShadowRoot(i,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var wh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kh="undefined"==typeof Uint8Array?[]:new Uint8Array(256),xh=0;xh<64;xh++)kh[wh.charCodeAt(xh)]=xh;const Sh=new Map;const Ch=(e,t,n)=>{if(!e||!Oh(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=Sh.get(e);return n||(n=new Map,Sh.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o};function Ih(e,t,n){if(e instanceof Array)return e.map((e=>Ih(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){return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=wh[n[t]>>2],o+=wh[(3&n[t])<<4|n[t+1]>>4],o+=wh[(15&n[t+1])<<2|n[t+2]>>6],o+=wh[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ih(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ih(e.data,t,n),e.width,e.height]}}if(Oh(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Ch(e,t,n)}}return e}const Eh=(e,t,n)=>e.map((e=>Ih(e,t,n))),Oh=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(n.find((n=>e instanceof t[n])))};function Th(e,t,n,r){const o=[];try{const i=yp(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o,...i){if(!Ap(this,t,n,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(o);if("__context"in this||(this.__context=e),r&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[o,...i])}}));o.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{o.forEach((e=>e()))}}function Lh(e,t,n,r,o,i){const a=[],s=Object.getOwnPropertyNames(e);for(const l of s)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const s=yp(e,l,(function(e){return function(...a){const s=e.apply(this,a);if(Ch(s,i,this),"tagName"in this.canvas&&!Ap(this.canvas,r,o,!0)){const e=Eh(a,i,this),r={type:t,property:l,args:e};n(this.canvas,r)}return s}}));a.push(s)}catch{const r=Cp(e,l,{set(e){n(this.canvas,{type:t,property:l,args:[e],setter:!0})}});a.push(r)}return a}const Ah="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Mh="undefined"!=typeof window&&window.Blob&&new Blob([(Rh=Ah,Uint8Array.from(atob(Rh),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var Rh;function Ph(e){let t;try{if(t=Mh&&(window.URL||window.webkitURL).createObjectURL(Mh),!t)throw"";const n=new Worker(t,{name:null==e?void 0:e.name});return n.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),n}catch(n){return new Worker("data:text/javascript;base64,"+Ah,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Nh{constructor(e){Nr(this,"pendingCanvasMutations",new Map),Nr(this,"rafStamps",{latestId:0,invokeId:null}),Nr(this,"mirror"),Nr(this,"mutationCb"),Nr(this,"resetObservers"),Nr(this,"frozen",!1),Nr(this,"locked",!1),Nr(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));const{sampling:t="all",win:n,blockClass:r,blockSelector:o,recordCanvas:i,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(n,r,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,r,o){const i=Th(t,n,r,!0),a=new Map,s=new Ph;s.onmessage=e=>{const{id:t}=e.data;if(a.set(t,!1),!("base64"in e.data))return;const{base64:n,type:r,width:o,height:i}=e.data;this.mutationCb({id:t,type:Gp["2D"],commands:[{property:"clearRect",args:[0,0,o,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})};const l=1e3/e;let c,u=0;const d=e=>{u&&e-u<l||(u=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach((t=>{Ap(t,n,r,!0)||e.push(t)})),e})().forEach((async e=>{var t;const n=this.mirror.getId(e);if(a.get(n))return;if(0===e.width||0===e.height)return;if(a.set(n,!0),["webgl","webgl2"].includes(e.__context)){const n=e.getContext(e.__context);!1===(null==(t=null==n?void 0:n.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}const r=await createImageBitmap(e);s.postMessage({id:n,bitmap:r,width:e.width,height:e.height,dataURLOptions:o.dataURLOptions},[r])}))),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Th(e,t,n,!1),o=function(e,t,n,r){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])continue;const i=yp(t.CanvasRenderingContext2D.prototype,a,(function(o){return function(...i){return Ap(this.canvas,n,r,!0)||setTimeout((()=>{const n=Eh(i,t,this);e(this.canvas,{type:Gp["2D"],property:a,args:n})}),0),o.apply(this,i)}}));o.push(i)}catch{const n=Cp(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:Gp["2D"],property:a,args:[t],setter:!0})}});o.push(n)}return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,r){const o=[];return o.push(...Lh(t.WebGLRenderingContext.prototype,Gp.WebGL,e,n,r,t)),void 0!==t.WebGL2RenderingContext&&o.push(...Lh(t.WebGL2RenderingContext.prototype,Gp.WebGL2,e,n,r,t)),()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map((e=>{const{type:t,...n}=e;return n})),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}class _h{constructor(e){Nr(this,"trackedLinkElements",new WeakSet),Nr(this,"mutationCb"),Nr(this,"adoptedStyleSheetCb"),Nr(this,"styleMirror",new jp),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const o of e){let e;this.styleMirror.has(o)?e=this.styleMirror.getId(o):(e=this.styleMirror.add(o),r.push({styleId:e,rules:Array.from(o.rules||CSSRule,((e,t)=>({rule:$r(e,o.href),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Dh{constructor(){Nr(this,"nodeMap",new WeakMap),Nr(this,"active",!1)}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let jh,Fh,Bh,Uh=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Rr=e.contentWindow)?void 0:Rr.Array.from)||Array.from,document.body.removeChild(e)}}catch(xv){console.debug("Unable to override Array.from",xv)}const Hh=new Qr;function zh(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:s=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:h,maskInputFn:f,maskTextFn:g,hooks:m,packFn:v,sampling:y={},dataURLOptions:b={},mousemoveWait:w,recordDOM:k=!0,recordCanvas:x=!1,recordCrossOriginIframes:S=!1,recordAfter:C=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:I=!1,collectFonts:E=!1,inlineImages:O=!1,plugins:T,keepIframeSrcFn:L=(()=>!1),ignoreCSSAttributes:A=new Set([]),errorHandler:M}=e;nh=M;const R=!S||window.parent===window;let P=!1;if(!R)try{window.parent.document&&(P=!1)}catch(V){P=!0}if(R&&!t)throw new Error("emit function is required");if(!R&&!P)return()=>{};void 0!==w&&void 0===y.mousemove&&(y.mousemove=w),Hh.reset();const N=!0===d?{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!==p?p:{password:!0},_=Mo(h);let D;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let j=0;const F=e=>{for(const t of T||[])t.eventProcessor&&(e=t.eventProcessor(e));return v&&!P&&(e=v(e)),e};jh=(e,o)=>{var i;const a=e;if(a.timestamp=Ip(),!(null==(i=oh[0])?void 0:i.isFrozen())||a.type===Hp.FullSnapshot||a.type===Hp.IncrementalSnapshot&&a.data.source===zp.Mutation||oh.forEach((e=>e.unfreeze())),R)null==t||t(F(a),o);else if(P){const e={type:"rrweb",event:F(a),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(a.type===Hp.FullSnapshot)D=a,j=0;else if(a.type===Hp.IncrementalSnapshot){if(a.data.source===zp.Mutation&&a.data.isAttachIframe)return;j++;const e=r&&j>=r,t=n&&a.timestamp-D.timestamp>n;(e||t)&&Fh(!0)}};const B=e=>{jh({type:Hp.IncrementalSnapshot,data:{source:zp.Mutation,...e}})},U=e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.Scroll,...e}}),H=e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.CanvasMutation,...e}}),z=new _h({mutationCb:B,adoptedStyleSheetCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.AdoptedStyleSheet,...e}})}),q=new yh({mirror:Hh,mutationCb:B,stylesheetManager:z,recordCrossOriginIframes:S,wrappedEmit:jh});for(const Y of T||[])Y.getMirror&&Y.getMirror({nodeMirror:Hh,crossOriginIframeMirror:q.crossOriginIframeMirror,crossOriginIframeStyleMirror:q.crossOriginIframeStyleMirror});const W=new Dh;Bh=new Nh({recordCanvas:x,mutationCb:H,win:window,blockClass:o,blockSelector:i,mirror:Hh,sampling:y.canvas,dataURLOptions:b});const G=new bh({mutationCb:B,scrollCb:U,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:N,dataURLOptions:b,maskTextFn:g,maskInputFn:f,recordCanvas:x,inlineImages:O,sampling:y,slimDOMOptions:_,iframeManager:q,stylesheetManager:z,canvasManager:Bh,keepIframeSrcFn:L,processedNodeManager:W},mirror:Hh});Fh=(e=!1)=>{if(!k)return;jh({type:Hp.Meta,data:{href:window.location.href,width:Tp(),height:Op()}},e),z.reset(),G.init(),oh.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new Qr,blockClass:r="rr-block",blockSelector:o=null,maskTextClass:i="rr-mask",maskTextSelector:a=null,inlineStylesheet:s=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:d,maskInputFn:p,slimDOM:h=!1,dataURLOptions:f,preserveWhiteSpace:g,onSerialize:m,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k=(()=>!1)}=t||{};return Ro(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,maskTextClass:i,maskTextSelector:a,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===u?{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===u?{password:!0}:u,maskTextFn:d,maskInputFn:p,slimDOMOptions:Mo(h),dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:g,onSerialize:m,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:b,stylesheetLoadTimeout:w,keepIframeSrcFn:k,newlyAddedElement:!1})}(document,{mirror:Hh,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:N,maskTextFn:g,maskInputFn:f,slimDOM:_,dataURLOptions:b,recordCanvas:x,inlineImages:O,onSerialize:e=>{Np(e,Hh)&&q.addIframe(e),_p(e,Hh)&&z.trackLinkElement(e),Dp(e)&&G.addShadowRoot(bp.shadowRoot(e),document)},onIframeLoad:(e,t)=>{q.attachIframe(e,t),G.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{z.attachLinkElement(e,t)},keepIframeSrcFn:L});if(!t)return console.warn("Failed to snapshot the document");jh({type:Hp.FullSnapshot,data:{node:t,initialOffset:Ep(window)}},e),oh.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&z.adoptStyleSheets(document.adoptedStyleSheets,Hh.getId(document))};try{const e=[],t=e=>{var t;return rh(fh)({mutationCb:B,mousemoveCb:(e,t)=>jh({type:Hp.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.MouseInteraction,...e}}),scrollCb:U,viewportResizeCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.ViewportResize,...e}}),inputCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.Input,...e}}),mediaInteractionCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.MediaInteraction,...e}}),styleSheetRuleCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.StyleSheetRule,...e}}),styleDeclarationCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.StyleDeclaration,...e}}),canvasMutationCb:H,fontCb:e=>jh({type:Hp.IncrementalSnapshot,data:{source:zp.Font,...e}}),selectionCb:e=>{jh({type:Hp.IncrementalSnapshot,data:{source:zp.Selection,...e}})},customElementCb:e=>{jh({type:Hp.IncrementalSnapshot,data:{source:zp.CustomElement,...e}})},blockClass:o,ignoreClass:a,ignoreSelector:s,maskTextClass:l,maskTextSelector:c,maskInputOptions:N,inlineStylesheet:u,sampling:y,recordDOM:k,recordCanvas:x,inlineImages:O,userTriggeredOnInput:I,collectFonts:E,doc:e,maskInputFn:f,maskTextFn:g,keepIframeSrcFn:L,blockSelector:i,slimDOMOptions:_,dataURLOptions:b,mirror:Hh,iframeManager:q,stylesheetManager:z,shadowDomManager:G,processedNodeManager:W,canvasManager:Bh,ignoreCSSAttributes:A,plugins:(null==(t=null==T?void 0:T.filter((e=>e.observer)))?void 0:t.map((e=>({observer:e.observer,options:e.options,callback:t=>jh({type:Hp.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},m)};q.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(r){console.warn(r)}}));const n=()=>{Fh(),e.push(t(document)),Uh=!0};return["interactive","complete"].includes(document.readyState)?n():(e.push(wp("DOMContentLoaded",(()=>{jh({type:Hp.DomContentLoaded,data:{}}),"DOMContentLoaded"===C&&n()}))),e.push(wp("load",(()=>{jh({type:Hp.Load,data:{}}),"load"===C&&n()}),window))),()=>{e.forEach((e=>{try{e()}catch(t){String(t).toLowerCase().includes("cross-origin")||console.warn(t)}})),W.destroy(),Uh=!1,nh=void 0}}catch(J){console.warn(J)}}var qh,Wh;function Gh(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 Vh(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 Vh(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 Vh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jh(e){return Jh="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},Jh(e)}function Yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yh(Object(n),!0).forEach((function(t){Zh(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$h(r.key),r)}}function Zh(e,t,n){return(t=$h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $h(e){var t=function(e,t){if("object"!=Jh(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Jh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jh(t)?t:String(t)}zh.addCustomEvent=(e,t)=>{if(!Uh)throw new Error("please add custom event after start recording");jh({type:Hp.Custom,data:{tag:e,payload:t}})},zh.freezePage=()=>{oh.forEach((e=>e.freeze()))},zh.takeFullSnapshot=e=>{if(!Uh)throw new Error("please take full snapshot after start recording");Fh(e)},zh.mirror=Hh,(Wh=qh||(qh={}))[Wh.NotStarted=0]="NotStarted",Wh[Wh.Running=1]="Running",Wh[Wh.Stopped=2]="Stopped";var Qh=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Zh(this,"startDate",void 0),Zh(this,"events",[]),Zh(this,"bufferSize",0),Zh(this,"stopFunction",void 0),Zh(this,"customOptions",{})}var t,n,r;return t=e,r=[{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=zh(Kh(Kh(Kh({},{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,r=/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim,o=Gh(t.matchAll(r));try{for(o.s();!(n=o.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(xv){o.e(xv)}finally{o.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:x(),type:"rrweb"}}}])&&Xh(t.prototype,n),r&&Xh(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ef(e){return ef="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},ef(e)}function tf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rf(r.key),r)}}function nf(e,t,n){return(t=rf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rf(e){var t=function(e,t){if("object"!=ef(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ef(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ef(t)?t:String(t)}Zh(Qh,"instance",void 0);var of=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),nf(this,"rerender",void 0),nf(this,"svgElement",null),nf(this,"path",null),nf(this,"strPath",void 0),nf(this,"strokeWidth",12),nf(this,"strokeWidthRect",6),nf(this,"bufferSize",4),nf(this,"buffer",[]),nf(this,"startPoint",null),nf(this,"tool","rect"),nf(this,"color","#EB144C"),nf(this,"mouseDown",null),nf(this,"mouseMove",null),nf(this,"mouseUp",null),nf(this,"resizeListener",null),nf(this,"pathBuffer",[]);var r=this;this.rerender=t,this.svgElement=document.querySelector(".bb-capture-svg"),this.svgElement.style.minHeight="".concat(document.documentElement.scrollHeight,"px"),this.resizeListener=function(e){r.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"),r.fadeOutToolbar(),"pen"!==r.tool&&"blur"!==r.tool||r.mouseDownPen(e),"rect"===r.tool&&r.mouseDownRect(e)},this.mouseMove=function(e){e.preventDefault(),"pen"!==r.tool&&"blur"!==r.tool||r.mouseMovePen(e),"rect"===r.tool&&r.mouseMoveRect(e)},this.mouseUp=function(e){e.preventDefault(),r.fadeInToolbar(),"pen"!==r.tool&&"blur"!==r.tool||r.mouseUpPen(e),"rect"===r.tool&&r.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,r;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),r=Math.abs(t.y-this.startPoint.y),o=t.x,i=t.y;t.x>this.startPoint.x&&(o=this.startPoint.x),t.y>this.startPoint.y&&(i=this.startPoint.y),this.path.setAttributeNS(null,"x",o),this.path.setAttributeNS(null,"y",i),this.path.setAttributeNS(null,"width",n),this.path.setAttributeNS(null,"height",r)}}},{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 r=this.getMousePosition(e);this.appendToBuffer(r),this.strPath="M"+r.x+" "+r.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,r,o=0,i=0,a=0;for(r=e;r<t;r++)a++,o+=(n=this.buffer[r]).x,i+=n.y;return{x:o/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&&tf(t.prototype,n),r&&tf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function af(e){return af="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},af(e)}function sf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cf(r.key),r)}}function lf(e,t,n){return(t=cf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cf(e){var t=function(e,t){if("object"!=af(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=af(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==af(t)?t:String(t)}var uf=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),lf(this,"keys",{37:1,38:1,39:1,40:1}),lf(this,"supportsPassive",!1),lf(this,"wheelOpt",!!this.supportsPassive&&{passive:!1}),lf(this,"wheelEvent","onwheel"in document.createElement("div")?"wheel":"mousewheel"),lf(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,r;return t=e,r=[{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}}])&&sf(t.prototype,n),r&&sf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function df(e){return df="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},df(e)}function pf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ff(r.key),r)}}function hf(e,t,n){return(t=ff(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ff(e){var t=function(e,t){if("object"!=df(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=df(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==df(t)?t:String(t)}lf(uf,"instance",void 0);var gf=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),hf(this,"type","screenshot"),hf(this,"dragCursor",null),hf(this,"screenRecorder",null),hf(this,"callback",null),hf(this,"screenDrawer",null),hf(this,"escListener",null),hf(this,"pageLeaveListener",null),hf(this,"overrideLanguage",bv.getInstance().overrideLanguage),hf(this,"showNextStep",(function(){this.showWidgetUI(),this.callback&&(er.getInstance().sendMessage({name:"set-form-data",data:{formKey:"capture",data:{value:this.type,dirty:!0}}}),this.callback(!0))})),this.type=t}var t,n,r;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&&uf.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 r=document.querySelector(".bb-feedback-button");r&&(r.style.display="flex");var o=document.querySelector(".bb-feedback-dialog-container");o&&(o.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);var e=document.querySelector(".bb-capture-toolbar-item[data-type='drag']");e&&(e.removeEventListener("mousedown",this.dragStart),e.removeEventListener("touchstart",this.dragStart),document.removeEventListener("mousemove",this.drag),document.removeEventListener("touchmove",this.drag),document.removeEventListener("mouseup",this.dragEnd),document.removeEventListener("touchend",this.dragEnd)),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 <div class="bb-capture-toolbar-item bb-capture-item-rec bb-capture-toolbar-item-tool drag-handle-item" data-type="drag">\n ').concat(p("drag"),"\n </div>\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(wf.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(wf.translateText("undo"),"</span>\n </div>\n ").concat("capture"!==this.type?'<div class="bb-capture-button-next">'.concat(wf.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(wf.translateText("retry"),'</div>\n <div class="bb-capture-preview-sendbutton">').concat(wf.translateText("next"),"</div>\n </div>\n </div>\n </div>\n "),document.body.appendChild(e),e.setAttribute("dir",wf.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,r=!1;"key"in(t=t||window.event)&&(n="Escape"===t.key,r="Enter"===t.key),n&&e.dismiss(),"screenshot"===e.type&&r&&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?(bv.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY}),uf.disableScroll()):this.setupScreenRecording(),this.screenDrawer=new of(this.captureScreenDrawerRerender.bind(this)),this.setupColorPicker(),this.setupToolbar()}},{key:"setupColorPicker",value:function(){for(var t=this,n=document.querySelector(".bb-capture-toolbar-item-selectedcolor"),r=document.querySelectorAll(".bb-capture-toolbar-item-color"),o=document.querySelector(".bb-capture-toolbar-item-colorpicker"),i=function(){var i=r[a],s=i.getAttribute("data-color");i.style.backgroundColor=s,i.onclick=function(){i&&(t.screenDrawer.setColor(s),o&&(o.style.display="none"),n.style.backgroundColor=i.style.backgroundColor,e.setPenColor(s))}},a=0;a<r.length;a++)i()}},{key:"dismiss",value:function(){this.showWidgetUI(),this.callback&&this.callback(!1)}},{key:"setupToolbar",value:function(){var e,t,n,r,o=this,i=document.querySelector(".bb-capture-toolbar"),a=!1,s=0,l=0;this.dragStart=function(e){var t=function(){var e=window.getComputedStyle(i).transform;if("none"===e)return{x:0,y:0};var t=new DOMMatrix(e);return{x:t.m41,y:t.m42}}(),o=t.x,c=t.y;s=o,l=c,"mousedown"===e.type?(n=e.clientX-s,r=e.clientY-l):(n=e.touches[0].clientX-s,r=e.touches[0].clientY-l),a=!0},this.dragEnd=function(){a=!1},this.drag=function(o){a&&(o.preventDefault(),"mousemove"===o.type?(e=o.clientX-n,t=o.clientY-r):(e=o.touches[0].clientX-n,t=o.touches[0].clientY-r),s=e,l=t,i.style.transform="translate(".concat(e,"px, ").concat(t,"px)"))};var c=document.querySelector(".bb-capture-toolbar-item[data-type='drag']");c.addEventListener("mousedown",this.dragStart),c.addEventListener("touchstart",this.dragStart),document.addEventListener("mousemove",this.drag),document.addEventListener("touchmove",this.drag),document.addEventListener("mouseup",this.dragEnd),document.addEventListener("touchend",this.dragEnd),document.querySelector(".bb-capture-dismiss").onclick=function(){o.dismiss()};var u=document.querySelector(".bb-capture-button-next");u&&(u.onclick=this.showNextStep.bind(this));for(var d=document.querySelector(".bb-capture-toolbar-item-colorpicker"),p=document.querySelector(".bb-capture-svg"),h=function(e,t){for(var n=document.querySelectorAll(".bb-capture-toolbar-item-tool"),r=0;r<n.length;r++)n[r].classList.remove("bb-capture-toolbar-item--active");if(t.classList.add("bb-capture-toolbar-item--active"),o.screenDrawer.setTool(e),o.dragCursor.innerHTML="","pointer"===e)p.style.pointerEvents="none";else{p.style.pointerEvents="auto";try{var i=t.querySelector("svg").cloneNode(!0);i&&o.dragCursor&&o.dragCursor.appendChild(i)}catch(a){}}},f=document.querySelectorAll(".bb-capture-toolbar-item"),g=function(){var e=f[m];e.onclick=function(){var t=e.getAttribute("data-type");d&&"colorpicker"!==t&&(d.style.display="none"),"mic"===t&&o.screenRecorder.toggleAudio(),"recording"===t&&(o.screenRecorder.isRecording?o.screenRecorder.stopScreenRecording():(o.screenRecorder.startScreenRecording(),h("pointer",document.querySelector(".bb-capture-toolbar-item[data-type='pointer']")))),("capture"!==o.type||o.screenRecorder.isRecording)&&("pen"!==t&&"blur"!==t&&"rect"!==t&&"pointer"!==t||h(t,e),"colorpicker"===t&&("flex"===d.style.display?d.style.display="none":d.style.display="flex"),"undo"===t&&o.screenDrawer.removeLastAddedPathFromSvg())}},m=0;m<f.length;m++)g()}},{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 r=t[n];"undo"===r.getAttribute("data-type")&&(null!=this.screenDrawer.pathBuffer&&this.screenDrawer.pathBuffer.length>0?r.classList.remove(e):r.classList.add(e))}}},{key:"captureRenderer",value:function(){if(this.screenRecorder){this.screenRecorder.file&&bv.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"),r=document.querySelector(".bb-tooltip-screen-recording"),o=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"),o.innerHTML=wf.translateText("unmute")):(u.classList.remove("bb-capture-toolbar-item--inactivecross"),o.innerHTML=wf.translateText("mute"))):(u.classList.add(e),u.classList.add("bb-capture-toolbar-item--inactivecross"),o.innerHTML=wf.translateText("browserNotSupported"));break;case"recording":this.screenRecorder.available?(u.classList.remove(e),this.screenRecorder.isRecording?(u.setAttribute("data-active","true"),r.innerHTML=wf.translateText("stopRecording"),t.style.display="block"):(u.setAttribute("data-active","false"),r.innerHTML=wf.translateText("startRecording"),t.style.display="none")):(u.classList.add(e),r.innerHTML=wf.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 Tn(this.captureRenderer.bind(this),wf.translateText("accessToScreenSharingDenied"))}}],r=[{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&&pf(t.prototype,n),r&&pf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function mf(e){return mf="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},mf(e)}function vf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bf(r.key),r)}}function yf(e,t,n){return(t=bf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bf(e){var t=function(e,t){if("object"!=mf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=mf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==mf(t)?t:String(t)}var wf=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),yf(this,"overrideLanguage",""),yf(this,"isRTLLayout",!1)}var t,n,r;return t=e,r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"translateText",value:function(e){if(!e)return"";var t=tn.getInstance().getFlowConfig().staticTranslations;return t&&t[e]?t[e]:e}},{key:"translateTextWithVars",value:function(e,t){if(!e)return"";var n=this.translateText(e);return n?n.replace(/{(\w+)}/g,(function(e,n){return t[n]})):""}}],(n=[{key:"getOverrideLanguage",value:function(){return this.overrideLanguage}},{key:"setOverrideLanguage",value:function(e){this.overrideLanguage=e}},{key:"updateRTLSupport",value:function(){var e=tn.getInstance().getFlowConfig();this.isRTLLayout=!1,e&&e.localizationOptions&&e.localizationOptions.rtl&&(this.isRTLLayout=!0),a.getInstance().updateFeedbackButtonState(),er.getInstance().updateFrameStyle()}},{key:"getActiveLanguage",value:function(){var e="en";if("undefined"!=typeof navigator&&(e=navigator.language.toLowerCase()),"undefined"!=typeof document&&document.documentElement){var t=document.documentElement.lang;t&&""!==t.trim()&&(e=t.toLowerCase().trim())}return this.overrideLanguage&&""!==this.overrideLanguage&&(e=this.overrideLanguage.toLowerCase()),e}}])&&vf(t.prototype,n),r&&vf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function kf(e){return kf="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},kf(e)}function xf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Cf(r.key),r)}}function Sf(e,t,n){return(t=Cf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cf(e){var t=function(e,t){if("object"!=kf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=kf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==kf(t)?t:String(t)}yf(wf,"instance",void 0);var If=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Sf(this,"shortCutListener",void 0)}var t,n,r;return t=e,r=[{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,r=(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"!==r&&"U"!==r&&85!==r||bv.startFeedbackFlowWithOptions("bugreporting",{autostartDrawing:!0})})))}},{key:"stop",value:function(){this.shortCutListener&&(document.removeEventListener("keyup",this.shortCutListener),this.shortCutListener=void 0)}}])&&xf(t.prototype,n),r&&xf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ef(e){return Ef="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},Ef(e)}function Of(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Lf(r.key),r)}}function Tf(e,t,n){return(t=Lf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lf(e){var t=function(e,t){if("object"!=Ef(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Ef(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Ef(t)?t:String(t)}Sf(If,"instance",void 0);var Af=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Tf(this,"formPreFill",{})}var t,n,r;return t=e,r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=null)&&Of(t.prototype,n),r&&Of(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Mf(e){return Mf="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},Mf(e)}function Rf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nf(r.key),r)}}function Pf(e,t,n){return(t=Nf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nf(e){var t=function(e,t){if("object"!=Mf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Mf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Mf(t)?t:String(t)}Tf(Af,"instance",void 0);var _f=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Pf(this,"notificationContainer",null),Pf(this,"notifications",[]),Pf(this,"unreadCount",0),Pf(this,"unreadNotificationsKey","unread-notifications"),Pf(this,"isTabActive",!0),Pf(this,"showNotificationBadge",!0),Pf(this,"currentNewsIndex",0)}var t,n,r;return t=e,n=[{key:"updateTabBarNotificationCount",value:function(){Un.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(){try{var e=E(this.unreadNotificationsKey);if(e&&e.length>0){var t=e.filter((function(e){return new Date(e.createdAt)>new Date(Date.now()-36e5)}));t.length>2?this.notifications=t.splice(0,t.length-2):this.notifications=t,this.renderNotifications()}}catch(n){}}},{key:"setNotificationCount",value:function(e){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&&cg.ping()),this.notifications.length>2&&this.notifications.shift(),O(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(),e.currentNewsIndex=0},t.className="gleap-notification-close",t.innerHTML=p("dismiss"),this.notificationContainer.appendChild(t);var n=this.notifications.filter((function(e){return e.data.news})).sort((function(e,t){return new Date(e.createdAt)-new Date(t.createdAt)})),r=this.notifications.filter((function(e){return!e.data.news}));if(n.length>0){var o=this.currentNewsIndex<n.length?this.currentNewsIndex:0,i=n[o],a=document.createElement("div");a.className="gleap-notification-item-news";var s=document.createElement("div");if(s.className="gleap-notification-item-news-container",i.data.coverImageUrl&&""!==i.data.coverImageUrl&&!i.data.coverImageUrl.includes("NewsImagePlaceholder")){var l=document.createElement("img");l.className="gleap-notification-item-news-image",l.src=i.data.coverImageUrl,l.onclick=function(t){t.stopPropagation(),e.openNews(i)},s.appendChild(l)}var c=document.createElement("div");c.className="gleap-notification-item-news-content";var u=document.createElement("div");u.className="gleap-notification-item-news-content-title";var d=i.data.text||"";d=d.replaceAll("{{name}}",Wt.getInstance().getName()),u.innerText=d,u.onclick=function(t){t.stopPropagation(),e.openNews(i)},c.appendChild(u);var h=this.renderDescription(i);if(h){var f=document.createElement("div");f.className="gleap-notification-item-news-preview",f.innerHTML=h,c.appendChild(f)}if(n.length>1){var g=document.createElement("div");g.className="gleap-news-pagination";var m=document.createElement("span");m.className="gleap-news-page-indicator",m.innerText="".concat(o+1," / ").concat(n.length),g.appendChild(m);var v=document.createElement("button");v.className="gleap-news-next-button",o<n.length-1?(v.innerText=wf.translateText("next"),v.onclick=function(t){t.stopPropagation(),e.currentNewsIndex++,e.renderNotifications()}):(v.innerText=wf.translateText("done"),v.onclick=function(t){t.stopPropagation(),e.clearAllNotifications(),e.currentNewsIndex=0}),g.appendChild(v),c.appendChild(g)}s.appendChild(c),a.appendChild(s),this.notificationContainer.appendChild(a)}for(var y=function(){var t=r[b],n=t.data.text||"";n=n.replaceAll("{{name}}",Wt.getInstance().getName());var o=document.createElement("div");if(o.onclick=function(){t.data.conversation?bv.openConversation(t.data.conversation.shareToken,!0):t.data.checklist?bv.openChecklist(t.data.checklist.id,!0):bv.open()},t.data.checklist){var i=Math.round(t.data.currentStep/t.data.totalSteps*100);i<100&&(i+=4),o.className="gleap-notification-item-checklist",o.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">\n '.concat(t.data.text,'\n </div>\n <div class="gleap-notification-item-checklist-content-progress">\n <div class="gleap-notification-item-checklist-content-progress-inner" style="width: ').concat(i,'%;"></div>\n </div>\n <div class="gleap-notification-item-checklist-content-next">\n <svg width="24" height="24" viewBox="0 0 24 24"\n fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M4 12H20M20 12L14 6M20 12L14 18"\n stroke="currentColor" stroke-width="2"\n stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n ').concat(t.data.nextStepTitle,"\n </div>\n </div>\n </div>")}else o.className="gleap-notification-item",o.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">\n '.concat(t.data.sender.name,"\n </div>"):"",'\n <div class="gleap-notification-item-content">').concat(n,"</div>\n </div>");e.notificationContainer.appendChild(o)},b=0;b<r.length;b++)y();n.length>0||r.length>0||this.clearAllNotifications(!0)}}},{key:"openNews",value:function(e){e.data.news?bv.openNewsArticle(e.data.news.id,!0):bv.open()}},{key:"renderDescription",value:function(e){var t=e.data,n=t.previewText,r=t.sender;return n&&n.length>0?n:r?'\n <div class="gleap-notification-item-news-sender">\n '.concat(r.profileImageUrl?'<img src="'.concat(r.profileImageUrl,'" alt="').concat(r.name,'" />'):"","\n ").concat(r.name,"\n </div>\n "):""}},{key:"clearAllNotifications",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.notificationContainer)for(e||(this.notifications=[],this.currentNewsIndex=0,O(this.unreadNotificationsKey,this.notifications));this.notificationContainer.firstChild;)this.notificationContainer.removeChild(this.notificationContainer.firstChild)}},{key:"updateContainerStyle",value:function(){if(this.notificationContainer){var e=tn.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",wf.getInstance().isRTLLayout?"rtl":"ltr")}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Rf(t.prototype,n),r&&Rf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Df(e){return Df="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},Df(e)}function jf(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 Ff(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 Ff(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 Ff(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Uf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bf(Object(n),!0).forEach((function(t){zf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Hf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qf(r.key),r)}}function zf(e,t,n){return(t=qf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qf(e){var t=function(e,t){if("object"!=Df(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Df(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Df(t)?t:String(t)}Pf(_f,"instance",void 0);var Wf=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),zf(this,"chatbarUrl","https://outboundmedia.gleap.io/chatbar"),zf(this,"chatbarContainer",null),zf(this,"chatbarFrame",null),zf(this,"config",null),zf(this,"agentId","kai"),zf(this,"agentContext",null),zf(this,"isHidden",!0),zf(this,"manuallyHidden",!1),zf(this,"manuallyShown",!1),zf(this,"iframeReady",!1),zf(this,"pendingMessages",[]),this._listenForMessages(),this._listenForOutsideClicks()}var t,n,r;return t=e,n=[{key:"_listenForOutsideClicks",value:function(){var e=this;document.addEventListener("click",(function(t){e.chatbarContainer&&(e.chatbarContainer.contains(t.target)||e._suppressOutsideClick||e._postMessage({name:"chatbar-outside-click"}))}))}},{key:"_listenForMessages",value:function(){var e=this;window.addEventListener("message",(function(t){if(!e.chatbarUrl||e.chatbarUrl.includes(t.origin))try{var n=JSON.parse(t.data);if("CHATBAR"!==(null==n?void 0:n.type))return;"chatbar-loaded"===n.name&&(e.iframeReady=!0,e._sendChatbarData(),e._flushPendingMessages()),"chatbar-resize"===n.name&&n.data&&e._resizeFrame(n.data),"chatbar-message-sent"===n.name&&Un.notifyEvent("agent-message-sent",n.data),"chatbar-conversation-created"===n.name&&Un.notifyEvent("agent-conversation-created",n.data),"chatbar-reply-received"===n.name&&Un.notifyEvent("agent-reply-received",n.data),"chatbar-tool-executed"===n.name&&n.data&&Jn.getInstance().triggerToolAction(n.data),"chatbar-error"===n.name&&Un.notifyEvent("agent-error",n.data),"chatbar-panel-blur"===n.name&&n.data&&e._updateBlurBackdrop(n.data)}catch(r){}}))}},{key:"_postMessage",value:function(e){try{var t;if(!this.iframeReady||null===(t=this.chatbarFrame)||void 0===t||!t.contentWindow)return void this.pendingMessages.push(e);this.chatbarFrame.contentWindow.postMessage(JSON.stringify(Uf(Uf({},e),{},{type:"chatbar"})),"*")}catch(n){}}},{key:"_flushPendingMessages",value:function(){var e=this.pendingMessages;this.pendingMessages=[];var t,n=jf(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;this._postMessage(r)}}catch(xv){n.e(xv)}finally{n.f()}}},{key:"_sendChatbarData",value:function(){var e,t,n,r,o;if(this.chatbarContainer){var i={},a="https://api.gleap.io",s="",l="",c="";try{i=tn.getInstance().getFlowConfig()||{}}catch(f){}try{var u,d,p=Wt.getInstance();a=p.apiUrl||a,s=p.sdkKey||"",l=(null===(u=p.session)||void 0===u?void 0:u.gleapId)||"",c=(null===(d=p.session)||void 0===d?void 0:d.gleapHash)||""}catch(f){}var h=(null===(e=i)||void 0===e||null===(e=e.aiBar)||void 0===e?void 0:e.defaultAgentName)||"Kai";this._postMessage({name:"chatbar-data",data:{agentId:this.agentId,defaultAgentName:h,placeholder:(null===(t=this.config)||void 0===t?void 0:t.placeholder)||"Ask me anything...",quickActions:(null===(n=this.config)||void 0===n?void 0:n.quickActions)||[],style:(null===(r=this.config)||void 0===r?void 0:r.style)||"glow",primaryColor:(null===(o=i)||void 0===o?void 0:o.color)||"#485BFF",agentTools:Jn.getInstance().getAgentTools(),apiUrl:a,sdkKey:s,gleapId:l,gleapHash:c}})}}},{key:"_resizeFrame",value:function(e){var t=e.width,n=e.height;this.chatbarContainer&&(this.chatbarContainer.style.width=Math.ceil(t)+"px",this.chatbarContainer.style.height=Math.ceil(n)+"px",this.isHidden||(this.chatbarContainer.style.display="block"))}},{key:"_updateBlurBackdrop",value:function(e){var t=e.visible,n=e.height,r=e.borderRadius;this.blurBackdrop&&(t?(this.blurBackdrop.style.height=n+"px",this.blurBackdrop.style.borderRadius=r+"px",this.blurBackdrop.style.display="block"):this.blurBackdrop.style.display="none")}},{key:"setConfig",value:function(e){this.config=e,"kai"!==this.agentId&&this.agentId||(e.agentId&&"default"!==e.agentId?this.agentId=e.agentId:this.agentId="kai"),e.enabled?this.show():this.manuallyShown||this.hide(),this._sendChatbarData()}},{key:"setPlaceholder",value:function(e){this.config||(this.config={}),this.config.placeholder=e,this._sendChatbarData()}},{key:"setQuickActions",value:function(e){this.config||(this.config={}),this.config.quickActions=e,this._sendChatbarData()}},{key:"sendAgentToolsUpdate",value:function(){this._postMessage({name:"chatbar-set-agent-tools",data:{tools:Jn.getInstance().getAgentTools()}})}},{key:"updateUIVisibility",value:function(){var e;er.getInstance().isOpened()?this.hide():null!==(e=this.config)&&void 0!==e&&e.enabled||this.manuallyShown?this.show():this.hide()}},{key:"show",value:function(){this.manuallyHidden||(this.isHidden=!1,this._preloadIframe(),this.chatbarContainer&&(this.chatbarContainer.style.display="block"))}},{key:"hide",value:function(){this.isHidden=!0,this._removeUI()}},{key:"_removeUI",value:function(){this.chatbarContainer&&(document.body&&document.body.contains(this.chatbarContainer)&&document.body.removeChild(this.chatbarContainer),this.chatbarContainer=null,this.chatbarFrame=null,this.blurBackdrop=null,this.iframeReady=!1,this.pendingMessages=[])}},{key:"_resolveAgentId",value:function(e){return e&&"default"!==e?e:"kai"}},{key:"_sendAgentCommand",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this._resolveAgentId(e);this.agentId=o,n.context&&(this.agentContext=n.context),this.manuallyHidden=!1;var i={agentId:this.agentId,context:this.agentContext,primaryColor:n.primaryColor||void 0,initialMessage:n.initialMessage||void 0},a=r?"chatbar-show-agent":"chatbar-set-agent";this._suppressOutsideClick=!0,setTimeout((function(){t._suppressOutsideClick=!1}),0),this.show(),this._postMessage({name:a,data:i})}},{key:"setAgent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._sendAgentCommand(e,t,!1)}},{key:"showWithAgent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._sendAgentCommand(e,t,!0)}},{key:"_preloadIframe",value:function(){var e=this;this.chatbarContainer||T((function(){return e._injectUI()}))}},{key:"_injectUI",value:function(){if(document.body&&!this.chatbarContainer){try{tn.getInstance().getFlowConfig()}catch(r){}var e=document.createElement("div");e.className="gleap-chatbar",e.style.cssText="\n position: fixed;\n bottom: 10px;\n z-index: 2147483000;\n border: 0;\n width: 280px;\n overflow: hidden;\n height: 80px;\n display: none;\n transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n left: 50%;\n transform: translateX(-50%);\n ";var t=document.createElement("iframe");t.src=this.chatbarUrl,t.className="gleap-chatbar-frame",t.title="Gleap AI Chatbar",t.setAttribute("role","dialog"),t.setAttribute("frameborder","0"),t.setAttribute("allow","autoplay; encrypted-media; microphone *;"),t.style.cssText="\n position: relative;\n width: 100%;\n height: 100%;\n border: 0;\n background: transparent;\n z-index: 1;\n ";var n=document.createElement("div");n.style.cssText="\n position: absolute;\n bottom: 70px;\n left: 20px;\n right: 20px;\n height: 0;\n display: none;\n backdrop-filter: blur(40px) saturate(180%);\n -webkit-backdrop-filter: blur(40px) saturate(180%);\n border-radius: 20px;\n pointer-events: none;\n z-index: 0;\n ",e.appendChild(n),e.appendChild(t),document.body.appendChild(e),this.chatbarContainer=e,this.chatbarFrame=t,this.blurBackdrop=n}}},{key:"destroy",value:function(){this._removeUI(),this.config=null,this.agentId=null,this.agentContext=null,this.isHidden=!0,this.iframeReady=!1,this.pendingMessages=[],e.instance=null}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Hf(t.prototype,n),r&&Hf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Gf(e){return Gf="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},Gf(e)}function Vf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vf(Object(n),!0).forEach((function(t){Kf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xf(r.key),r)}}function Kf(e,t,n){return(t=Xf(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xf(e){var t=function(e,t){if("object"!=Gf(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Gf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Gf(t)?t:String(t)}zf(Wf,"instance",void 0);var Zf=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Kf(this,"bannerUrl","https://outboundmedia.gleap.io"),Kf(this,"bannerContainer",null),Kf(this,"bannerData",null),Kf(this,"disabled",!1),this.startCommunication()}var t,n,r;return t=e,r=[{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){var n;if(null!==(n=e.bannerUrl)&&void 0!==n&&n.includes(t.origin))try{var r,o,i,a,s,l,c,u,d,p,h,f=JSON.parse(t.data);if("BANNER"!==(null==f?void 0:f.type))return;if("banner-loaded"===f.name&&e.bannerData&&e.sendMessage({name:"banner-data",data:e.bannerData}),"banner-height"===f.name&&document.documentElement.style.setProperty("--gleap-margin-top",f.data.height+"px"),"banner-data-set"===f.name&&(document.body.classList.add("gleap-b-shown"),"floating"===(null===(r=e.bannerData)||void 0===r?void 0:r.format)&&document.body.classList.add("gleap-b-f")),"banner-close"===f.name&&e.removeBannerUI(),"start-conversation"===f.name&&bv.startBot(null===(o=f.data)||void 0===o?void 0:o.botId),"start-custom-action"===f.name&&bv.triggerCustomAction(null===(i=f.data)||void 0===i?void 0:i.action),"start-product-tour"===f.name&&bv.startProductTour(null===(a=f.data)||void 0===a?void 0:a.tourId,!0),"open-url"===f.name){var g=f.data,m=!!f.newTab;er.getInstance().urlHandler(g,m)}"show-form"===f.name&&bv.startFeedbackFlow(null===(s=f.data)||void 0===s?void 0:s.formId),"show-survey"===f.name&&bv.showSurvey(null===(l=f.data)||void 0===l?void 0:l.formId,null===(c=f.data)||void 0===c?void 0:c.surveyFormat),"show-news-article"===f.name&&bv.openNewsArticle(null===(u=f.data)||void 0===u?void 0:u.articleId),"show-help-article"===f.name&&bv.openHelpCenterArticle(null===(d=f.data)||void 0===d?void 0:d.articleId),"show-checklist"===f.name&&bv.startChecklist(null===(p=f.data)||void 0===p?void 0:p.checklistId,!0,null===(h=f.data)||void 0===h?void 0:h.sharedKey)}catch(v){}}))}},{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:"disable",value:function(){this.disabled=!0,this.removeBannerUI()}},{key:"injectBannerUI",value:function(e){if(!document.body)return!1;if(this.disabled)return!1;this.bannerContainer&&this.removeBannerUI(),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(Jf(Jf({},e),{},{type:"banner"})),"*")}catch(n){}}},{key:"showBanner",value:function(e){this.injectBannerUI(e)}}])&&Yf(t.prototype,n),r&&Yf(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();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 Qf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qf(Object(n),!0).forEach((function(t){ng(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rg(r.key),r)}}function ng(e,t,n){return(t=rg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rg(e){var t=function(e,t){if("object"!=$f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=$f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==$f(t)?t:String(t)}Kf(Zf,"instance",void 0);var og=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ng(this,"modalUrl","https://outboundmedia.gleap.io/modal"),ng(this,"modalContainer",null),ng(this,"modalData",null),ng(this,"modalBackdropClickListener",null),ng(this,"disabled",!1),this._listenForMessages()}var t,n,r;return t=e,r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],(n=[{key:"setModalUrl",value:function(e){this.modalUrl=e}},{key:"disable",value:function(){this.disabled=!0,this.hideModal()}},{key:"_listenForMessages",value:function(){var e=this;window.addEventListener("message",(function(t){var n;if(null!==(n=e.modalUrl)&&void 0!==n&&n.includes(t.origin))try{var r,o,i,a,s,l,c,u,d,p,h=JSON.parse(t.data);if("MODAL"!==(null==h?void 0:h.type))return;if("modal-loaded"===h.name&&e.modalData){var f=tn.getInstance().getFlowConfig(),g=f.color?f.color:"#485BFF",m=f.backgroundColor?f.backgroundColor:"#FFFFFF";e._postMessage({name:"modal-data",data:eg(eg({},e.modalData),{},{primaryColor:g,backgroundColor:m})})}if("modal-height"===h.name){var v,y=null==h||null===(v=h.data)||void 0===v?void 0:v.height;if(y){var b=e.modalContainer.querySelector(".gleap-modal-frame");b&&(b.style.height="".concat(y,"px"))}}if(h.name,"modal-close"===h.name&&e.hideModal(),"start-conversation"===h.name&&bv.startBot(null===(r=h.data)||void 0===r?void 0:r.botId),"start-custom-action"===h.name&&bv.triggerCustomAction(null===(o=h.data)||void 0===o?void 0:o.action),"start-product-tour"===h.name&&bv.startProductTour(null===(i=h.data)||void 0===i?void 0:i.tourId,!0),"open-url"===h.name){var w=h.data,k=!!h.newTab;er.getInstance().urlHandler(w,k)}"show-form"===h.name&&bv.startFeedbackFlow(null===(a=h.data)||void 0===a?void 0:a.formId),"show-survey"===h.name&&bv.showSurvey(null===(s=h.data)||void 0===s?void 0:s.formId,null===(l=h.data)||void 0===l?void 0:l.surveyFormat),"show-news-article"===h.name&&bv.openNewsArticle(null===(c=h.data)||void 0===c?void 0:c.articleId),"show-help-article"===h.name&&bv.openHelpCenterArticle(null===(u=h.data)||void 0===u?void 0:u.articleId),"show-checklist"===h.name&&bv.startChecklist(null===(d=h.data)||void 0===d?void 0:d.checklistId,!0,null===(p=h.data)||void 0===p?void 0:p.sharedKey)}catch(x){}}))}},{key:"_injectModalUI",value:function(e){var t=this;if(!document.body)return!1;if(this.disabled)return!1;this.modalContainer&&this.hideModal(),this.modalData=e;var n=document.createElement("div");n.className="gleap-modal-wrapper",n.innerHTML='\n <div class="gleap-modal-backdrop"></div>\n <div class="gleap-modal">\n <iframe\n src="'.concat(this.modalUrl,'"\n class="gleap-modal-frame"\n scrolling="no"\n title="Gleap Modal"\n role="dialog"\n frameborder="0"\n allow="autoplay; encrypted-media; fullscreen; microphone *;"\n ></iframe>\n </div>\n '),document.body.appendChild(n),this.modalContainer=n,this.modalBackdropClickListener=this.modalContainer.querySelector(".gleap-modal-backdrop").addEventListener("click",(function(){var e,n;(null===(e=null===(n=t.modalData)||void 0===n?void 0:n.showCloseButton)||void 0===e||e)&&t.hideModal()})),document.body.classList.add("gleap-modal-open")}},{key:"_postMessage",value:function(e){try{var t=this.modalContainer.querySelector(".gleap-modal-frame");null!=t&&t.contentWindow&&t.contentWindow.postMessage(JSON.stringify(eg(eg({},e),{},{type:"modal"})),this.modalUrl)}catch(xv){}}},{key:"showModal",value:function(e){e&&e.config&&this._injectModalUI(e.config)}},{key:"hideModal",value:function(){this.modalContainer&&(this.modalBackdropClickListener&&this.modalContainer.querySelector(".gleap-modal-backdrop").removeEventListener("click",this.modalBackdropClickListener),document.body.removeChild(this.modalContainer),this.modalContainer=null,document.body.classList.remove("gleap-modal-open"))}}])&&tg(t.prototype,n),r&&tg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ig(e){return ig="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},ig(e)}function ag(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lg(r.key),r)}}function sg(e,t,n){return(t=lg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lg(e){var t=function(e,t){if("object"!=ig(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ig(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ig(t)?t:String(t)}ng(og,"instance",void 0);var cg=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,r;return t=e,r=[{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)&&ag(t.prototype,n),r&&ag(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ug(e){return ug="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},ug(e)}function dg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hg(r.key),r)}}function pg(e,t,n){return(t=hg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hg(e){var t=function(e,t){if("object"!=ug(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ug(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ug(t)?t:String(t)}sg(cg,"audio",void 0),sg(cg,"settings",{play:!0});var fg=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),pg(this,"tags",[])}var t,n,r;return t=e,r=[{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}}])&&dg(t.prototype,n),r&&dg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function gg(e){var t=e.getAttribute("id");return null!==t&&""!==t?t.match(/(?:^\d|:)/)?'[id="'.concat(t,'"]'):"#"+t:null}function mg(e){var t=function(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(" ")}}(e).filter(Boolean);return t.map((function(e){return".".concat(e)}))}function vg(e,t,n,r,o,i,a){if(i!==a)for(var s=r;s<=o&&o-s+1>=a-i;++s)n[i]=t[s],vg(e,t,n,s+1,o,i+1,a);else e.push(n.slice(0,i).join(""))}function yg(e){return function(e){if(Array.isArray(e))return bg(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 bg(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 bg(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 bg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wg(e){return wg="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},wg(e)}function kg(e){return"object"===("undefined"==typeof HTMLElement?"undefined":wg(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===wg(e)&&1===e.nodeType&&"string"==typeof e.nodeName}function xg(e){var t,n,r=0,o=e.parentNode;if(Boolean(o)){var i=o.childNodes,a=i.length;for(t=0;t<a;t++)if(kg(n=i[t])&&(r++,n===e))return":nth-child(".concat(r,")")}return null}function Sg(e){return e.tagName.toLowerCase().replace(/:/g,"\\:")}function Cg(e,t){if(!Boolean(t))return!1;var n=e.ownerDocument.querySelectorAll(t);return 1===n.length&&n[0]===e}function Ig(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 Eg(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 Eg(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(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 Eg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Og(e,t,n){var r={Tag:Sg,NthChild:xg,Attributes:function(e){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["id","class","length"];return yg(e.attributes).reduce((function(e,n){return t.indexOf(n.nodeName)>-1||e.push("[".concat(n.nodeName,'="').concat(n.value,'"]')),e}),[])}(e,n)},Class:mg,ID:gg};return t.reduce((function(t,n){return t[n]=r[n](e),t}),{})}function Tg(e,t){try{var n=e.parentNode.querySelectorAll(t);return 1===n.length&&n[0]===e}catch(r){return!1}}function Lg(e,t){return t.find(Tg.bind(null,e))}function Ag(e,t,n){var r=function(e,t){for(var n=[],r=e.length,o=[],i=1;i<=t;++i)vg(n,e,o,0,r-1,0,i);return n}(t,3),o=Lg(e,r);return Boolean(o)||Boolean(n)&&(o=Lg(e,r=r.map((function(e){return n+e}))),Boolean(o))?o:null}function Mg(e,t,n,r){var o,i=Og(e,t,n);r&&r instanceof RegExp&&(i.ID=r.test(i.ID)?null:i.ID,i.Class=i.Class.filter((function(e){return!r.test(e)})));var a,s=Ig(t);try{for(s.s();!(a=s.n()).done;){var l=a.value,c=i.ID,u=i.Tag,d=i.Class,p=i.Attributes,h=i.NthChild;switch(l){case"ID":if(Boolean(c)&&Tg(e,c))return c;break;case"Tag":if(Boolean(u)&&Tg(e,u))return u;break;case"Class":if(Boolean(d)&&d.length&&(o=Ag(e,d,u)))return o;break;case"Attributes":if(Boolean(p)&&p.length&&(o=Ag(e,p,u)))return o;break;case"NthChild":if(Boolean(h))return h}}}catch(xv){s.e(xv)}finally{s.f()}return"*"}function Rg(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.selectorTypes,o=void 0===r?["ID","Class","Tag","NthChild"]:r,i=n.attributesToIgnore,a=void 0===i?["id","class","length"]:i,s=n.excludeRegex,l=void 0===s?null:s,c=[],u=function(e){for(var t=[],n=e;kg(n);)t.push(n),n=n.parentNode;return t}(e),d=Ig(u);try{for(d.s();!(t=d.n()).done;){var p=Mg(t.value,o,a,l);Boolean(p)&&c.push(p)}}catch(xv){d.e(xv)}finally{d.f()}for(var h=[],f=0,g=c;f<g.length;f++){var m=g[f];h.unshift(m);var v=h.join(" > ");if(Cg(e,v))return v}return null}function Pg(e){return Pg="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},Pg(e)}function Ng(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jg(r.key),r)}}function Dg(e,t,n){return t&&_g(e.prototype,t),n&&_g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jg(e){var t=function(e,t){if("object"!=Pg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Pg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Pg(t)?t:String(t)}pg(fg,"instance",void 0);var Fg=function(){function e(t){Ng(this,e),this.overlay=document.createElement("div"),this.overlay.className=t.className||"_ext-element-overlay",this.overlay.style.background=t.style&&t.style.background||"rgba(250, 240, 202, 0.2)",this.overlay.style.borderColor=t.style&&t.style.borderColor||"#F95738",this.overlay.style.borderStyle=t.style&&t.style.borderStyle||"solid",this.overlay.style.borderRadius=t.style&&t.style.borderRadius||"1px",this.overlay.style.borderWidth=t.style&&t.style.borderWidth||"1px",this.overlay.style.boxSizing=t.style&&t.style.boxSizing||"border-box",this.overlay.style.cursor=t.style&&t.style.cursor||"crosshair",this.overlay.style.position=t.style&&t.style.position||"absolute",this.overlay.style.zIndex=t.style&&t.style.zIndex||"2147483647",this.overlay.style.margin=t.style&&t.style.margin||"0px",this.overlay.style.padding=t.style&&t.style.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"})}return Dg(e,[{key:"addToDOM",value:function(e,t){this.usingShadowDOM=t,t?(e.insertBefore(this.shadowContainer,e.firstChild),this.shadowRoot.appendChild(this.overlay)):e.appendChild(this.overlay)}},{key:"removeFromDOM",value:function(){this.setBounds({x:0,y:0,width:0,height:0}),this.overlay.remove?this.overlay.remove():this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay),this.usingShadowDOM&&(this.shadowContainer.remove?this.shadowContainer.remove():this.shadowContainer.parentNode&&this.shadowContainer.parentNode.removeChild(this.shadowContainer))}},{key:"captureCursor",value:function(){this.overlay.style.pointerEvents="auto"}},{key:"ignoreCursor",value:function(){this.overlay.style.pointerEvents="none"}},{key:"setBounds",value:function(e){var t=e.x,n=e.y,r=e.width,o=e.height;this.overlay.style.left=t+"px",this.overlay.style.top=n+"px",this.overlay.style.width=r+"px",this.overlay.style.height=o+"px"}}]),e}(),Bg=function(){function e(t){Ng(this,e),this.active=!1,this.overlay=new Fg(t||{}),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleClick=this.handleClick.bind(this),this.tick=this.tick.bind(this)}return Dg(e,[{key:"start",value:function(e){if(this.active)return!1;this.active=!0,this.options=e,document.addEventListener("mousemove",this.handleMouseMove,!0),document.addEventListener("click",this.handleClick,!0);var t=e.parentElement||document.body,n=void 0===e.useShadowDOM||e.useShadowDOM;return this.overlay.addToDOM(t,n),this.tick(),!0}},{key:"stop",value:function(){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)}},{key:"handleMouseMove",value:function(e){this.mouseX=e.clientX,this.mouseY=e.clientY}},{key:"handleClick",value:function(e){var t=document.elementFromPoint(e.clientX,e.clientY);this.options&&this.options.elementFilter&&t&&!this.options.elementFilter(t)||(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.target&&this.options&&this.options.onClick&&this.options.onClick(this.target))}},{key:"tick",value:function(){this.updateTarget(),this.tickReq=window.requestAnimationFrame(this.tick)}},{key:"updateTarget",value:function(){if(void 0!==this.mouseX&&void 0!==this.mouseY){this.overlay.ignoreCursor();var e=document.elementFromPoint(this.mouseX,this.mouseY);if(this.overlay.captureCursor(),e&&e!==this.target){if(this.options&&this.options.elementFilter&&!this.options.elementFilter(e))return this.target=void 0,void this.overlay.setBounds({x:0,y:0,width:0,height:0});this.target=e;var t,n,r=(n=(t=e).getBoundingClientRect(),{x:window.pageXOffset+n.left,y:window.pageYOffset+n.top,width:t.offsetWidth,height:t.offsetHeight});this.overlay.setBounds(r),this.options&&this.options.onHover&&this.options.onHover(e)}}}}]),e}();const Ug=Bg;function Hg(e){return Hg="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},Hg(e)}function zg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gg(r.key),r)}}function qg(e,t,n){return t&&zg(e.prototype,t),n&&zg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wg(e,t,n){return(t=Gg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gg(e){var t=function(e,t){if("object"!=Hg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Hg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Hg(t)?t:String(t)}const Vg=qg((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Wg(this,"picker",null),Wg(this,"onElementPicked",null),Wg(this,"stopPicker",(function(){if(t.picker)return t.picker.stop(),void(t.picker=null)})),Wg(this,"startPicker",(function(){t.stopPicker();var e=t;t.picker=new Ug({style:{borderColor:"#2142E7",background:"transparent",borderWidth:"4px",borderRadius:"5px"}}),t.picker.start({useShadowDOM:!1,onClick:function(t){try{var n,r=t.getAttribute("data-gleap-tour");n=r?'[data-gleap-tour="'.concat(r,'"]'):Rg(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")}})})),Wg(this,"setMode",(function(e){t.mode=e,"navigate"===e&&t.stopPicker(),"picker"===e&&t.startPicker()}))}));function Jg(e){return Jg="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},Jg(e)}function Yg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yg(Object(n),!0).forEach((function(t){Zg(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$g(r.key),r)}}function Zg(e,t,n){return(t=$g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $g(e){var t=function(e,t){if("object"!=Jg(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Jg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Jg(t)?t:String(t)}var Qg=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),Zg(this,"libraryInstance",null),Zg(this,"lastUrl",void 0),Zg(this,"injectedFrame",!1),Zg(this,"gleapFrameContainer",null),Zg(this,"gleapCollapseUI",null),Zg(this,"injectedCollapseUI",!1),Zg(this,"gleapFrame",null),Zg(this,"configData",null),Zg(this,"adminHelper",null),Zg(this,"status","navigate"),Zg(this,"initialized",!1),Zg(this,"toggleCollapseUI",(function(){var e="gleap-admin-collapse-ui-active",n="gleap-admin-frame-container-active",r=function(e,t){return e&&e.classList.contains(t)};(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0])||r(t.gleapCollapseUI,e)&&r(t.gleapFrameContainer,n))&&(t.gleapCollapseUI&&t.gleapCollapseUI.classList.toggle(e),t.gleapFrameContainer&&t.gleapFrameContainer.classList.toggle(n))})),Zg(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(e){e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t.toggleCollapseUI()}))}})),Zg(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,r;return t=e,r=[{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;this.initialized=!0,Om.getInstance().disable(),Zf.getInstance().disable(),og.getInstance().disable(),bv.close(),bv.showFeedbackButton(!1),e.adminHelper=new Vg;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("https://app.gleap.io"===n.origin)try{var r=JSON.parse(n.data);if("admin"===r.type&&("load"===r.name&&(t.configData=r.data,t.initAdminHelper()),"smartlink-search-result"===r.name&&e.sendMessageToTourBuilder({name:"smartlink-search-result",data:r.data}),"translate-complete"===r.name&&e.sendMessageToTourBuilder({name:"translate-complete",data:r.data})),"tourbuilder"===r.type){var o;if("loaddata"===r.name&&e.sendMessageToTourBuilder({name:"data",data:Kg(Kg({},t.configData),{},{currentPage:window.location.href})}),"highlight-element"===r.name&&(document.querySelectorAll(".gleap-admin-highlight").forEach((function(e){e.classList.remove("gleap-admin-highlight")})),null!=r&&null!==(o=r.data)&&void 0!==o&&o.selector)){var i,a=document.querySelector(null==r||null===(i=r.data)||void 0===i?void 0:i.selector);a&&a.classList.add("gleap-admin-highlight")}if("smartlink-search"===r.name&&e.sendMessage({name:"smartlink-search",data:r.data}),"product-tour-started"===r.name&&e.sendMessage({name:"product-tour-started",data:r.data}),"translate"===r.name&&e.sendMessage({name:"translate",data:r.data}),"save"===r.name&&e.sendMessage({name:"save",data:r.data}),"update-steps"===r.name&&e.sendMessage({name:"update-steps",data:r.data}),"click"===r.name)try{document.querySelector(r.data.selector).click()}catch(s){console.log(s)}"status-changed"===r.name&&(t.status=r.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(Kg(Kg({},e),{},{type:"admin"})),"*")}catch(t){}}},{key:"sendMessageToTourBuilder",value:function(e){try{this.gleapFrame&&this.gleapFrame.contentWindow&&this.gleapFrame.contentWindow.postMessage(JSON.stringify(Kg(Kg({},e),{},{type:"tourbuilder"})),"*")}catch(t){}}}])&&Xg(t.prototype,n),r&&Xg(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function em(e){return em="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},em(e)}function tm(e){return function(e){if(Array.isArray(e))return nm(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 nm(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 nm(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 nm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function om(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rm(Object(n),!0).forEach((function(t){im(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function im(e,t,n){return t=function(e){var t=function(e,t){if("object"!=em(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=em(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==em(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Zg(Qg,"instance",void 0);var am=function(){var e={};function t(){e=om({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 r(e,t,n,r){return(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function o(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),r=Array.from(e.querySelectorAll(t));return[].concat(tm(n?[e]:[]),r)})).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 h(e){var t;null==(t=d[e])||t.call(d)}function f(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,r=window.innerHeight,o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.classList.add("gleap-tour-overlay","gleap-tour-overlay-animated"),o.setAttribute("viewBox","0 0 ".concat(t," ").concat(r)),o.setAttribute("xmlSpace","preserve"),o.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),o.setAttribute("version","1.1"),o.setAttribute("preserveAspectRatio","xMinYMin slice"),o.style.fillRule="evenodd",o.style.clipRule="evenodd",o.style.strokeLinejoin="round",o.style.strokeMiterlimit="2",o.style.zIndex="10000",o.style.position="fixed",o.style.top="0",o.style.left="0",o.style.width="100%",o.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",o.appendChild(i),o}(e);document.body.appendChild(t),S(t,(function(e){"path"===e.target.tagName&&h("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,r=window.innerHeight,o=n("stagePadding")||0,i=n("stageRadius")||0,a=e.width+2*o,s=e.height+2*o,l=Math.min(i,a/2,s/2),c=Math.floor(Math.max(l,0)),u=e.x-o+c,d=e.y-o,p=a-2*c,h=s-2*c;return"M".concat(t,",0L0,0L0,").concat(r,"L").concat(t,",").concat(r,"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(h," 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(h," a").concat(c,",").concat(c," 0 0 1 ").concat(c,",-").concat(c," z")}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3,o=e.element,a=o;if("string"==typeof a)try{a=document.querySelector(o)}catch(u){var s=o.replace(/(#[^#\s]+)/g,(function(e){return e.replace(/:/g,"\\:")}));a=document.querySelector(s)}if(o&&!a&&t>=0)setTimeout((function(){C(),y(e,t-100)}),100);else{if(!a&&("INPUT"===e.mode||"CLICK"===e.mode))return n("onElementNotFound")(e);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 o,a,s=400,u=Date.now(),d=c("__activeStep"),p=c("__activeElement")||e,h=!p||p===e,g="gleap-tour-dummy-element"===e.id,v="gleap-tour-dummy-element"===p.id,y=n("animate"),b=t.onHighlightStarted||n("onHighlightStarted"),w=(null==t?void 0:t.onHighlighted)||n("onHighlighted"),k=(null==d?void 0:d.onDeselected)||n("onDeselected"),x=n(),S=c();!h&&k&&k(v?void 0:p,d,{config:x,state:S});b&&b(g?void 0:e,t,{config:x,state:S});var E=!h&&y,O=!1;C(),l("previousStep",d),l("previousElement",p),l("activeStep",t),l("activeElement",e);var T=function o(){if(c("__transitionCallback")===o){var i=Date.now()-u,a=s-i<=s/2;t.popover&&a&&!O&&E&&(I(e,t),O=!0),n("animate")&&i<s?function(e,t,n,o){var i=c("__activeStagePosition"),a=i||n.getBoundingClientRect(),s=o.getBoundingClientRect();m(i={x:r(e,a.x,s.x-a.x,t),y:r(e,a.y,s.y-a.y,t),width:r(e,a.width,s.width-a.width,t),height:r(e,a.height,s.height-a.height,t)}),l("__activeStagePosition",i)}(i,s,p,e):(f(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(o)}};l("__transitionCallback",T),window.requestAnimationFrame(T),i(e),!E&&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!==(o=null!==(a=t.disableActiveInteraction)&&void 0!==a?a:n("disableActiveInteraction"))&&void 0!==o&&o&&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 b(){var e=c("__activeElement"),t=c("__activeStep");if(e&&t){if(!document.body.contains(e)&&t.element&&"string"==typeof t.element)try{var n=document.querySelector(t.element);if(!n){var r=t.element.replace(/(#[^#\s]+)/g,(function(e){return e.replace(/:/g,"\\:")}));n=document.querySelector(r)}n&&(e=n,l("__activeElement",n),l("activeElement",n),n.classList.add("gleap-tour-active-element"))}catch(o){}f(e),function(){var e=c("__activeStagePosition"),t=c("__overlaySvg");if(e)if(t){var n=window.innerWidth,r=window.innerHeight;t.setAttribute("viewBox","0 0 ".concat(n," ").concat(r))}else console.warn("No stage svg found.")}(),L(e,t)}}function w(){var e=c("__resizeTimeout");e&&window.cancelAnimationFrame(e),l("__resizeTimeout",window.requestAnimationFrame(b))}function k(e){var t;if(c("isInitialized")&&("Tab"===e.key||9===e.keyCode)){var n=c("__activeElement"),r=null==(t=c("popover"))?void 0:t.wrapper,i=o([].concat(tm(r?[r]:[]),tm(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 x(e){var t;(null==(t=n("allowKeyboardControl"))||t)&&("Escape"===e.key?h("escapePress"):"ArrowRight"===e.key?h("arrowRightPress"):"ArrowLeft"===e.key&&h("arrowLeftPress"))}function S(e,t,n){var r=function(t,r){var o=t.target;e.contains(o)&&(n&&!n(o)||(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()),null==r||r(t))},o=!0;document.addEventListener("pointerdown",r,o),document.addEventListener("mousedown",r,o),document.addEventListener("pointerup",r,o),document.addEventListener("mouseup",r,o),document.addEventListener("click",(function(e){r(e,t)}),o)}function C(){var e=c("popover");e&&(e.wrapper.style.display="none")}function I(e,t){var r,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 r=document.createElement("div");r.id="gleap-tour-popover-description",r.classList.add("gleap-tour-popover-description"),r.style.display="none",r.innerText="Popover description is here";var o=document.createElement("button");o.type="button",o.classList.add("gleap-tour-popover-close-btn"),o.setAttribute("aria-label","Close"),o.innerHTML="×";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="← Previous";var c=document.createElement("button");return c.type="button",c.classList.add("gleap-tour-popover-next-btn"),c.innerHTML="Next →",s.appendChild(l),s.appendChild(c),i.appendChild(a),i.appendChild(s),e.appendChild(o),e.appendChild(t),e.appendChild(n),e.appendChild(r),e.appendChild(i),{wrapper:e,arrow:t,title:n,description:r,footer:i,previousButton:l,nextButton:c,closeButton:o,footerButtons:s,progress:a}}(),document.body.appendChild(s.wrapper);var u=t.popover||{},d=u.title,p=u.description,f=u.showButtons,g=u.disableButtons,m=u.showProgress,v=u.nextBtnText,y=void 0===v?n("nextBtnText")||"Next":v,b=u.prevBtnText,w=void 0===b?n("prevBtnText")||"Previous":b,k=u.progressText,x=void 0===k?n("progressText")||"{current} of {total}":k;s.nextButton.innerHTML=y,s.previousButton.innerHTML=w,s.progress.innerHTML=x,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=f||n("showButtons"),I=m||n("showProgress")||!1,E=(null==C?void 0:C.includes("next"))||(null==C?void 0:C.includes("previous"))||I;s.closeButton.style.display=C.includes("close")?"block":"none",E?(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 O=g||n("disableButtons")||[];(null==O?void 0:O.includes("next"))&&(s.nextButton.disabled=!0,s.nextButton.classList.add("gleap-tour-popover-btn-disabled")),(null==O?void 0:O.includes("previous"))&&(s.previousButton.disabled=!0,s.previousButton.classList.add("gleap-tour-popover-btn-disabled")),(null==O?void 0:O.includes("close"))&&(s.closeButton.disabled=!0,s.closeButton.classList.add("gleap-tour-popover-btn-disabled"));var T=s.wrapper;T.style.display="block",T.style.left="",T.style.top="",T.style.bottom="",T.style.right="",T.id="gleap-tour-popover-content",T.setAttribute("role","dialog"),T.setAttribute("aria-labelledby","gleap-tour-popover-title"),T.setAttribute("aria-describedby","gleap-tour-popover-description"),s.arrow.className="gleap-tour-popover-arrow";var A=(null==(r=t.popover)?void 0:r.popoverClass)||n("popoverClass")||"";T.className="gleap-tour-popover ".concat(A).trim(),S(s.wrapper,(function(r){var o,i,a,s=r.target,l=(null==(o=t.popover)?void 0:o.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()}):h("nextClick"):s.classList.contains("gleap-tour-popover-prev-btn")?u?u(e,t,{config:n(),state:c()}):h("prevClick"):s.classList.contains("gleap-tour-popover-close-btn")?d?d(e,t,{config:n(),state:c()}):h("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 M=(null==(a=t.popover)?void 0:a.onPopoverRender)||n("onPopoverRender");M&&M(s,{config:n(),state:c()}),L(e,t),i(T);var R=e.classList.contains("gleap-tour-dummy-element"),P=o([T].concat(tm(R?[]:[e])));P.length>0&&P[0].focus()}function E(){var e=c("popover");if(null==e?void 0:e.wrapper){var t=e.wrapper.getBoundingClientRect(),r=n("stagePadding")||0,o=n("popoverOffset")||0;return{width:t.width+r+o,height:t.height+r+o,realWidth:t.width,realHeight:t.height}}}function O(e,t){var n=t.elementDimensions,r=t.popoverDimensions,o=t.popoverPadding,i=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.top-o,window.innerHeight-r.realHeight-i.width),i.width):"end"===e?Math.max(Math.min(n.top-(null==r?void 0:r.realHeight)+n.height+o,window.innerHeight-(null==r?void 0:r.realHeight)-i.width),i.width):"center"===e?Math.max(Math.min(n.top+n.height/2-(null==r?void 0:r.realHeight)/2,window.innerHeight-(null==r?void 0:r.realHeight)-i.width),i.width):0}function T(e,t){var n=t.elementDimensions,r=t.popoverDimensions,o=t.popoverPadding,i=t.popoverArrowDimensions;return"start"===e?Math.max(Math.min(n.left-o,window.innerWidth-r.realWidth-i.width),i.width):"end"===e?Math.max(Math.min(n.left-(null==r?void 0:r.realWidth)+n.width+o,window.innerWidth-(null==r?void 0:r.realWidth)-i.width),i.width):"center"===e?Math.max(Math.min(n.left+n.width/2-(null==r?void 0:r.realWidth)/2,window.innerWidth-(null==r?void 0:r.realWidth)-i.width),i.width):0}function L(e,t){var r=c("popover");if(r){var o=(null==t?void 0:t.popover)||{},i=o.align,a=void 0===i?"start":i,s=o.side,l=void 0===s?"left":s,u=a,d="gleap-tour-dummy-element"===e.id?"over":l,p=n("stagePadding")||0,h=E(),f=r.arrow.getBoundingClientRect(),g=e.getBoundingClientRect(),m=g.top-h.height,v=m>=0,y=window.innerHeight-(g.bottom+h.height),b=y>=0,w=g.left-h.width,k=w>=0,x=window.innerWidth-(g.right+h.width),S=x>=0,C=!(v||b||k||S),I=d;if("top"===d&&v?S=k=b=!1:"bottom"===d&&b?S=k=v=!1:"left"===d&&k?S=v=b=!1:"right"===d&&S&&(k=v=b=!1),"over"===d){var L=window.innerWidth/2-h.realWidth/2,A=window.innerHeight/2-h.realHeight/2;r.wrapper.style.left="".concat(L,"px"),r.wrapper.style.right="auto",r.wrapper.style.top="".concat(A,"px"),r.wrapper.style.bottom="auto"}else if(C){var M=window.innerWidth/2-(null==h?void 0:h.realWidth)/2;r.wrapper.style.left="".concat(M,"px"),r.wrapper.style.right="auto",r.wrapper.style.bottom="".concat(10,"px"),r.wrapper.style.top="auto"}else if(k){var R=Math.min(w,window.innerWidth-(null==h?void 0:h.realWidth)-f.width),P=O(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});r.wrapper.style.left="".concat(R,"px"),r.wrapper.style.top="".concat(P,"px"),r.wrapper.style.bottom="auto",r.wrapper.style.right="auto",I="left"}else if(S){var N=Math.min(x,window.innerWidth-(null==h?void 0:h.realWidth)-f.width),_=O(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});r.wrapper.style.right="".concat(N,"px"),r.wrapper.style.top="".concat(_,"px"),r.wrapper.style.bottom="auto",r.wrapper.style.left="auto",I="right"}else if(v){var D=Math.min(m,window.innerHeight-h.realHeight-f.width),j=T(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});r.wrapper.style.top="".concat(D,"px"),r.wrapper.style.left="".concat(j,"px"),r.wrapper.style.bottom="auto",r.wrapper.style.right="auto",I="top"}else if(b){var F=Math.min(y,window.innerHeight-(null==h?void 0:h.realHeight)-f.width),B=T(u,{elementDimensions:g,popoverDimensions:h,popoverPadding:p,popoverArrowDimensions:f});r.wrapper.style.left="".concat(B,"px"),r.wrapper.style.bottom="".concat(F,"px"),r.wrapper.style.top="auto",r.wrapper.style.right="auto",I="bottom"}C?r.arrow.classList.add("gleap-tour-popover-arrow-none"):function(e,t,n){var r=c("popover");if(!r)return;var o=n.getBoundingClientRect(),i=E(),a=r.arrow,s=i.width,l=window.innerWidth,u=o.width,d=o.left,p=i.height,h=window.innerHeight,f=o.top,g=o.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?(f+g<=0?(m="bottom",v="end"):f+g-p<=0&&(m="left",v="start"),f>=h?(m="top",v="end"):f+p>=h&&(m="left",v="end")):"right"===t&&(f+g<=0?(m="bottom",v="start"):f+g-p<=0&&(m="right",v="start"),f>=h?(m="top",v="start"):f+p>=h&&(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")&&f()}function r(){var e=c("activeIndex"),t=n("steps")||[];if(void 0!==e){var r=e+1;t[r]?h(r):f()}}function o(){var e=c("activeIndex"),t=n("steps")||[];if(void 0!==e){var r=e-1;t[r]?h(r):f()}}function i(){var e;if(!c("__transitionCallback")){var t=c("activeIndex"),r=c("__activeStep"),i=c("__activeElement");if("CLICK"!==r.mode)if(void 0!==t&&void 0!==r)if(void 0!==c("activeIndex")){var a=(null==(e=r.popover)?void 0:e.onPrevClick)||n("onPrevClick");if(a)return a(i,r,{config:n(),state:c()});o()}}}function a(){var e;if(!c("__transitionCallback")){var t=c("activeIndex"),o=c("__activeStep"),i=c("__activeElement");if("CLICK"!==o.mode&&void 0!==t&&void 0!==o){var a=(null==(e=o.popover)?void 0:e.onNextClick)||n("onNextClick");if(a)return a(i,o,{config:n(),state:c()});r()}}}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",x,!1),window.addEventListener("keydown",k,!1),window.addEventListener("resize",w),window.addEventListener("scroll",w),l("__positionInterval",setInterval((function(){c("isInitialized")&&w()}),1e3)),p("overlayClick",e),p("escapePress",e),p("arrowLeftPress",i),p("arrowRightPress",a))}function h(){var e,t,r,o,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 f();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",b=n("allowClose"),w=void 0!==(null==(t=p.popover)?void 0:t.showProgress)?null==(r=p.popover)?void 0:r.showProgress:n("showProgress"),k=((null==(o=p.popover)?void 0:o.progressText)||n("progressText")||"{{current}} of {{total}}").replace("{{current}}","".concat(u+1)).replace("{{total}}","".concat(d.length)),x=(null==(i=p.popover)?void 0:i.showButtons)||n("showButtons"),S=["next","previous"].concat(tm(b?["close"]:[])).filter((function(e){return!(null==x?void 0:x.length)||x.includes(e)})),C=(null==(a=p.popover)?void 0:a.onNextClick)||n("onNextClick"),I=(null==(s=p.popover)?void 0:s.onPrevClick)||n("onPrevClick"),E=(null==(c=p.popover)?void 0:c.onCloseClick)||n("onCloseClick");y(om(om({},p),{},{popover:om({showButtons:S,nextBtnText:g?void 0:v,disableButtons:tm(m?[]:["previous"]),showProgress:w,progressText:k,onNextClick:C||function(){g?h(u+1):f()},onPrevClick:I||function(){h(u-1)},onCloseClick:E||function(){f()}},(null==p?void 0:p.popover)||{})}))}else f()}function f(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=c("__activeElement"),r=c("__activeStep"),o=c("__activeOnDestroyed"),i=n("onDestroyStarted");if(e&&i){i(!t||"gleap-tour-dummy-element"===(null==t?void 0:t.id)?void 0:t,r,{config:n(),state:c()})}else{var a,s=(null==r?void 0:r.onDeselected)||n("onDeselected"),l=n("onDestroyed");if(document.body.classList.remove("gleap-tour-active","gleap-tour-fade","gleap-tour-simple"),function(){window.removeEventListener("keyup",x),window.removeEventListener("resize",w),window.removeEventListener("scroll",w);var e=c("__positionInterval");e&&clearInterval(e)}(),function(){var e,t=c("popover");t&&(null==(e=t.wrapper.parentElement)||e.removeChild(t.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")}))}(),(a=c("__overlaySvg"))&&a.remove(),d={},u(),t&&r){var p="gleap-tour-dummy-element"===t.id;s&&s(p?void 0:t,r,{config:n(),state:c()}),l&&l(p?void 0:t,r,{config:n(),state:c()})}o&&o.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(),h(e)},setConfig:t,setSteps:function(e){u(),t(om(om({},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:r,movePrevious:o,moveTo:function(e){(n("steps")||[])[e]?h(e):f()},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(),y(om(om({},e),{},{popover:e.popover?om({showButtons:[],showProgress:!1,progressText:""},e.popover):void 0}))},destroy:function(){f(!1)}}}}();const sm=am;function lm(e){return lm="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},lm(e)}function cm(){cm=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==lm(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(lm(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function um(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pm(r.key),r)}}function dm(e,t,n){return(t=pm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pm(e){var t=function(e,t){if("object"!=lm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lm(t)?t:String(t)}function hm(e,t,n,r,o,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(r,o)}var fm="gleap-tour-data",gm="copilot-pointer-container",mm="copilot-tour-styles",vm="copilot-joined-container";function ym(){var e;return e=cm().mark((function e(){var t;return cm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!=typeof window){e.next=2;break}return e.abrupt("return");case 2:return t=new Audio("data:audio/wav;base64,UklGRigAAABXQVZFZm10IBAAAAABAAEARKwAABCxAgAEABAAZGF0YQAAAAA="),e.prev=3,e.next=6,t.play();case 6:return e.abrupt("return",!0);case 9:return e.prev=9,e.t0=e.catch(3),e.abrupt("return",!1);case 12:case"end":return e.stop()}}),e,null,[[3,9]])})),ym=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){hm(i,r,o,a,s,"next",e)}function s(e){hm(i,r,o,a,s,"throw",e)}a(void 0)}))},ym.apply(this,arguments)}var bm=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),dm(this,"productTourData",void 0),dm(this,"productTourId",void 0),dm(this,"currentActiveIndex",void 0),dm(this,"lastArrowPositionX",void 0),dm(this,"lastArrowPositionY",void 0),dm(this,"onCompleteCallback",void 0),dm(this,"audioMuted",!1),dm(this,"currentAudio",void 0),dm(this,"_pointerContainer",null),dm(this,"_scrollListeners",[]),dm(this,"_currentAnchor",null),dm(this,"_currentStep",null),dm(this,"_scrollDebounceTimer",null);var t=this;"undefined"!=typeof window&&(this._scrollListeners=[],this._currentAnchor=null,this._currentStep=null,this._scrollDebounceTimer=null,window.addEventListener("resize",(function(){if(t.productTourId&&t.currentActiveIndex>=0&&t.productTourData&&t.productTourData.steps){var e=t.productTourData.steps[t.currentActiveIndex];e&&e.selector&&""!==e.selector&&t.updatePointerPosition(document.querySelector(e.selector),e)}})))}var t,n,r;return t=e,n=[{key:"disable",value:function(){this.disabled=!0,this.cleanup()}},{key:"startWithConfig",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;"undefined"!=typeof window&&(this.productTourId||this.disabled||(this.productTourId=e,this.productTourData=t,this.currentActiveIndex=0,this.onCompleteCallback=n,this.start()))}},{key:"storeUncompletedTour",value:function(){if("undefined"!=typeof window)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(fm,JSON.stringify(e))}catch(t){}else localStorage.removeItem(fm)}},{key:"attachScrollListeners",value:function(e,t){var n=this;if("undefined"!=typeof window&&e){var r=function(e){if("undefined"!=typeof window){for(var t=[],n=e.parentElement;n;){var r=window.getComputedStyle(n);("auto"===r.overflowY||"scroll"===r.overflowY)&&n.scrollHeight>n.clientHeight&&t.push(n),n=n.parentElement}return t}}(e);r.push(window),r.forEach((function(r){var o=function(){clearTimeout(n._scrollDebounceTimer),n._scrollDebounceTimer=setTimeout((function(){n.updatePointerPosition(e,t)}),150)};r.addEventListener("scroll",o,{passive:!0}),n._scrollListeners.push({el:r,handler:o})}))}}},{key:"removeScrollListeners",value:function(){"undefined"!=typeof window&&(this._scrollListeners&&this._scrollListeners.length>0&&(this._scrollListeners.forEach((function(e){var t=e.el,n=e.handler;t.removeEventListener("scroll",n)})),this._scrollListeners=[]),this._scrollDebounceTimer&&(clearTimeout(this._scrollDebounceTimer),this._scrollDebounceTimer=null))}},{key:"updatePointerPosition",value:function(e,t){var n,r=this;if("undefined"!=typeof window)try{var o=this._pointerContainer||document.getElementById(gm);if(!o)return;if(!e)return o.style.position="fixed",o.style.left="50%",o.style.top="50%",o.style.transform="translate(-50%, -50%)",function(e){if("undefined"!=typeof window){var t=e-window.innerHeight/2;window.scrollTo({top:t,behavior:"smooth"})}}(window.innerHeight/2),this.removeScrollListeners(),this._currentAnchor=null,void(this._currentStep=null);n=e,"undefined"!=typeof window&&n&&n.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});var i=0;!function n(){if(function(e){if("undefined"!=typeof window){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}}(e)||i>=20){var a=e.getBoundingClientRect(),s=a.left+a.width/2,l=a.top+a.height/2+10;o.style.position="fixed",o.style.left="".concat(s,"px"),o.style.top="".concat(l,"px"),o.style.transform="translate(-50%, -50%)";var c=350;c>window.innerWidth-40&&(c=window.innerWidth-40),s+c>window.innerWidth-20?o.classList.add("copilot-pointer-container-right"):o.classList.remove("copilot-pointer-container-right"),r._currentAnchor===e&&r._currentStep===t||(r.removeScrollListeners(),r._currentAnchor=e,r._currentStep=t,r.attachScrollListeners(e,t))}else i++,setTimeout(n,100)}()}catch(a){}}},{key:"cleanup",value:function(){var e=this;"undefined"!=typeof window&&(document.body.classList.add("gl-copilot-fade-out"),this.currentAudio&&this.currentAudio.pause(),setTimeout((function(){if(e._pointerContainer)e._pointerContainer.remove(),e._pointerContainer=null;else{var t=document.getElementById(gm);t&&t.remove()}var n=document.getElementById(vm);n&&n.remove();var r=document.getElementById(mm);r&&r.remove(),document.body.classList.remove("gl-copilot-fade-out")}),800),this.productTourId=void 0,this.productTourData=void 0,this.removeScrollListeners())}},{key:"toggleAudio",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.audioMuted=e,this.currentAudio&&(this.currentAudio.muted=this.audioMuted),document.querySelector(".".concat(vm,"-mute")).innerHTML=p(this.audioMuted?"unmute":"mute")}},{key:"setupCopilotTour",value:function(){var e,t,n,r,o,i,a=this;if("undefined"!=typeof window){var s,l,c=null!==(e=null===(t=tn.getInstance().flowConfig)||void 0===t?void 0:t.color)&&void 0!==e?e:"#485BFF",u=d(c),h=document.getElementById(mm);h||((h=document.createElement("style")).id=mm,h.type="text/css",h.textContent="\n #".concat(gm," {\n position: absolute;\n top: 0;\n left: 0;\n display: flex;\n align-items: flex-start;\n pointer-events: none;\n z-index: 2147483610;\n transition: all 0.5s ease;\n }\n .").concat(gm,"-clickmode {\n cursor: pointer;\n pointer-events: all !important;\n }\n .").concat(gm,"-clickmode #copilot-info-bubble-content {\n display: flex !important;\n }\n .").concat(gm,"-clickmode svg {\n display: none !important;\n }\n #").concat(gm," svg {\n width: 20px;\n height: auto;\n fill: none;\n }\n #copilot-info-bubble {\n position: relative;\n }\n #copilot-info-bubble-content-container {\n position: absolute;\n top: 0px;\n left: 0px;\n min-width: min(300px, 80vw);\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n .").concat(gm,"-right #copilot-info-bubble-content-container {\n left: auto !important;\n right: 0px !important;\n align-items: flex-end;\n }\n .").concat(gm,"-right .copilot-info-bubble-content {\n margin-right: 5px;\n }\n .").concat(gm,"-right svg {\n transform: scaleX(-1);\n }\n #copilot-info-bubble-content svg {\n width: 16px;\n height: 16px;\n display: inline-block !important;\n margin-left: 5px;\n }\n #copilot-info-bubble-content {\n margin-top: 18px;\n margin-left: 5px;\n padding: 10px 15px;\n border-radius: 20px;\n background-color: black;\n color: white;\n font-family: Arial, sans-serif;\n font-size: 14px;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);\n max-width: 100%;\n white-space: normal;\n overflow-wrap: break-word;\n word-break: normal;\n hyphens: none;\n }\n .").concat(gm,"-right #copilot-info-bubble-content {\n margin-top: 30px;\n margin-left: 0px;\n margin-right: 5px;\n }\n .click-wave {\n position: absolute;\n width: 34px;\n height: 34px;\n border-radius: 50%;\n background-color: rgba(0, 0, 0, 0.5);\n pointer-events: none;\n z-index: 2147483611;\n animation: click-wave-animation 0.8s ease forwards;\n }\n @keyframes click-wave-animation {\n 0% {\n transform: scale(0.2);\n opacity: 1;\n }\n 100% {\n transform: scale(2);\n opacity: 0;\n }\n }\n @keyframes slideInFromTop {\n 0% {\n transform: translateY(-100%);\n opacity: 0;\n }\n 100% {\n transform: translateY(0);\n opacity: 1;\n }\n }\n .").concat(vm," {\n position: fixed;\n top: 20px;\n right: 20px;\n z-index: 2147483610;\n background: #fff;\n padding: 6px;\n border-radius: 10px;\n box-shadow: 0 0 20px 0 #C294F2;\n display: flex;\n align-items: center;\n gap: 8px;\n border: 1px solid rgba(192, 146, 242, 0.5);\n animation: slideInFromTop 0.5s ease-out forwards;\n }\n .").concat(vm," span {\n font-size: 13px;\n color: #000;\n font-family: sans-serif;\n }\n .").concat(vm,"-avatar {\n width: 24px;\n height: 24px;\n flex-shrink: 0;\n border-radius: 6px;\n }\n .").concat(vm,"-mute {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .").concat(vm,"-mute svg {\n width: 20px;\n height: auto;\n cursor: pointer;\n animation: pulsate 2s infinite;\n }\n .").concat(vm,"-mute svg:hover {\n opacity: 0.8;\n }\n .").concat(vm,"-dismiss {\n display: flex;\n align-items: center;\n justify-content: center;\n padding-right: 3px;\n }\n .").concat(vm,"-dismiss svg {\n width: 15px;\n height: auto;\n cursor: pointer;\n }\n .").concat(vm,"-dismiss svg:hover {\n opacity: 0.8;\n }\n @keyframes pulsate {\n 0% {\n transform: scale(1);\n opacity: 1;\n }\n 50% {\n transform: scale(1.1);\n opacity: 0.8;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n }\n @keyframes glCoFadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n @keyframes glCoFadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n }\n\n .gleap-audio-unmute-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 2147483620;\n }\n\n .gleap-audio-unmute-modal {\n background-color: #fff;\n padding: 20px;\n border-radius: 8px;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);\n text-align: center;\n max-width: 90%;\n width: 400px;\n }\n\n .gleap-audio-unmute-modal p {\n margin-bottom: 20px;\n font-size: 16px;\n line-height: 22px;\n font-weight: normal;\n }\n\n .gleap-audio-unmute-button {\n background: ").concat(c,";\n color: ").concat(u,";\n outline: none;\n border: none;\n padding: 10px 14px;\n border-radius: 12px;\n font-size: 14px;\n font-weight: bold;\n cursor: pointer;\n }\n\n .gleap-audio-unmute-button:hover {\n opacity: 0.8;\n }\n\n .gleap-tour-continue-button {\n color: ").concat(c,";\n text-decoration: none;\n cursor: pointer;\n font-size: 14px;\n font-weight: bold;\n border: none;\n background: none;\n padding: 0;\n margin: 0;\n margin-left: 20px;\n }\n\n .gleap-tour-continue-button:hover {\n opacity: 0.8;\n }\n\n body.gl-copilot-fade-out::before,\n body.gl-copilot-fade-out::after,\n body.gl-copilot-fade-out #").concat(vm," {\n animation: glCoFadeOut 0.8s ease-out forwards;\n }\n ").concat(null===(s=null===(l=this.productTourData)||void 0===l?void 0:l.playVoice)||void 0===s||s?"":"\n .".concat(vm,"-mute {\n display: none;\n }\n "),"\n ").concat(this.productTourData.gradient?'body::before {\n content: "";\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n pointer-events: all;\n z-index: 2147483609;\n box-sizing: border-box;\n border: 18px solid transparent;\n filter: blur(25px);\n border-image-slice: 1;\n border-image-source: linear-gradient(45deg, #ED5587, #FBE6A9, #a6e3f8, #C294F2);\n animation: glCoFadeIn 1.5s ease-out forwards;\n }\n \n body::after {\n content: "";\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n pointer-events: all;\n z-index: 2147483609;\n opacity: 0.5;\n box-sizing: border-box;\n border: 3px solid transparent;\n border-image-slice: 1;\n border-image-source: linear-gradient(45deg, #ED5587, #FBE6A9, #a6e3f8, #C294F2);\n animation: glCoFadeIn 1.5s ease-out forwards;\n }':'body::after {\n content: "";\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n pointer-events: all;\n z-index: 2147483609;\n opacity: 0;\n }',"\n "),document.head.appendChild(h));var f=document.createElement("div");f.id=gm,f.style.opacity=0,this._pointerContainer=f;var g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("viewBox","0 0 380 476"),g.innerHTML='<path d="M352.595 268.315L352.581 268.302L352.566 268.29L78.6092 24.7278C71.6245 18.433 62.5487 15 53.2 15C32.1157 15 15 32.1157 15 53.2V424C15 444.34 31.4714 461 52 461C62.6797 461 72.8089 456.467 79.8863 448.38C79.8871 448.379 79.8879 448.378 79.8886 448.378L180.804 333.1H327.9C348.384 333.1 365 316.484 365 296C365 285.404 360.46 275.344 352.595 268.315Z" fill="black" stroke="white" stroke-width="30"/>';var m=document.createElement("div");m.id="copilot-info-bubble",m.innerHTML="<div id='copilot-info-bubble-content-container'><div id='copilot-info-bubble-content'></div></div>";var v=document.createElement("div");v.id=vm,v.classList.add(vm),v.innerHTML='\n <img class="'.concat(vm,'-avatar" src="').concat(null===(n=this.productTourData)||void 0===n?void 0:n.kaiAvatar,'" />\n <span>').concat(null===(r=this.productTourData)||void 0===r?void 0:r.kaiSlug,'</span>\n <div class="').concat(vm,'-mute">\n ').concat(p(this.audioMuted?"unmute":"mute"),"\n </div>\n ").concat(null!==(o=this.productTourData)&&void 0!==o&&o.allowClose?'<div class="'.concat(vm,'-dismiss">\n ').concat(p("dismiss"),"\n </div>"):"","\n "),document.body.appendChild(v),document.querySelector(".".concat(vm,"-mute")).addEventListener("click",(function(){a.toggleAudio(!a.audioMuted)})),null!==(i=this.productTourData)&&void 0!==i&&i.allowClose&&document.querySelector(".".concat(vm,"-dismiss")).addEventListener("click",(function(){a.completeTour(!1)})),f.appendChild(g),f.appendChild(m),document.body.appendChild(f)}}},{key:"start",value:function(){var e=this;if("undefined"!=typeof window&&!this.disabled){var t=this.productTourData;t&&function(){return ym.apply(this,arguments)}().then((function(n){e.audioMuted=!n,e.setupCopilotTour(),e.audioMuted&&null!=t&&t.showUnmuteModal?e.showAudioUnmuteModal():setTimeout((function(){e.renderNextStep()}),1500)}))}}},{key:"showAudioUnmuteModal",value:function(){var e,t,n,r=this,o=document.createElement("div");o.classList.add("gleap-audio-unmute-modal-overlay");var i=document.createElement("div");i.classList.add("gleap-audio-unmute-modal");var a=document.createElement("p");a.textContent=null===(e=this.productTourData)||void 0===e?void 0:e.unmuteModalTitle,i.appendChild(a);var s=document.createElement("button");s.classList.add("gleap-audio-unmute-button"),s.textContent=null===(t=this.productTourData)||void 0===t?void 0:t.unmuteModalButton,s.addEventListener("click",(function(){r.toggleAudio(!1),o.parentNode&&o.parentNode.removeChild(o),setTimeout((function(){r.renderNextStep()}),1e3)})),i.appendChild(s);var l=document.createElement("button");l.classList.add("gleap-tour-continue-button"),l.textContent=null===(n=this.productTourData)||void 0===n?void 0:n.unmuteModalContinue,l.addEventListener("click",(function(){o.parentNode&&o.parentNode.removeChild(o),setTimeout((function(){r.renderNextStep()}),1e3)})),i.appendChild(l),o.appendChild(i),document.body.appendChild(o)}},{key:"completeTour",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];"undefined"!=typeof window&&(this.cleanup(),this.onCompleteCallback&&this.onCompleteCallback(e))}},{key:"renderNextStep",value:function(){var e=this;if("undefined"!=typeof window&&!this.disabled){var t=this,n=this.productTourData.steps;if(this.currentActiveIndex>=n.length)setTimeout((function(){e.completeTour()}),500);else{var r=n[this.currentActiveIndex],o=function(n){if(e._pointerContainer.style.display="flex",r.selector&&r.selector.length>0&&!n)e.completeTour(!1);else{var o=function(){if("INPUT"===r.mode&&n){var e,o=function(){document.querySelector("#".concat(gm)).classList.remove("copilot-pointer-container-clickmode"),n.classList.remove("gleap-input-highlight"),document.getElementById(gm).style.display="none",t.currentActiveIndex++,t.storeUncompletedTour(),t.renderNextStep()};if("default"===(null!==(e=r.inputType)&&void 0!==e?e:"default")){var i=function e(t){var r;if(0!==(null==t||null===(r=t.target)||void 0===r||null===(r=r.value)||void 0===r?void 0:r.length)){var i=document.getElementById("copilot-info-bubble-content");i&&(i.innerHTML="".concat(wf.translateText("next"),' <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">\n <path fill="currentColor" d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"/>\n</svg>'),i.addEventListener("click",o,{once:!0}),n.classList.add("gleap-input-highlight"),document.querySelector("#".concat(gm)).classList.add("copilot-pointer-container-clickmode"),n.removeEventListener("input",e))}};n.addEventListener("input",i,{once:!1}),n.hasAttribute("contenteditable")&&n.addEventListener("keyup",i,{once:!1}),n.addEventListener("blur",(function(){n.focus()}),{once:!0}),n.focus()}else{var a,s=null!==(a=r.inputValue)&&void 0!==a?a:"",l=0;!function e(){l<s.length?(n.value+=s[l],l++,setTimeout(e,100)):setTimeout((function(){o()}),1200)}()}}else{if(t.currentActiveIndex++,t.storeUncompletedTour(),"CLICK"===r.mode&&n){var c=n.getBoundingClientRect(),u=window.scrollX||0,d=window.scrollY||0;!function(e,t){if("undefined"!=typeof window){var n=document.createElement("div");n.className="click-wave",n.style.left="".concat(e-17,"px"),n.style.top="".concat(t-17,"px"),document.body.appendChild(n),setTimeout((function(){n.remove()}),800)}}(c.left+c.width/2+u,c.top+c.height/2+d),n.click()}t.renderNextStep()}};e.updatePointerPosition(n,r);var i=null!=r&&r.message?function(e){if("undefined"!=typeof window){var t=document.createElement("div");return t.innerHTML=e,t.textContent||""}}(r.message):"🤔";document.getElementById("copilot-info-bubble-content").textContent=i,e._pointerContainer.style.opacity=1;var a=function(e){if("undefined"!=typeof window){var t=e.split(/\s+/).filter((function(e){return e.length>0})).length;return Math.ceil(t/3.6)+1}}(i),s=function(){e.currentAudio=void 0,setTimeout((function(){o()}),1e3*a)};r.voice&&r.voice.length>0?(e.currentAudio=new Audio(r.voice),e.audioMuted&&(e.currentAudio.muted=!0),e.currentAudio.addEventListener("ended",(function(){setTimeout((function(){o()}),1e3)})),e.currentAudio.play().then((function(){})).catch((function(e){s()}))):s()}},i=r.selector?function(e){if("undefined"!=typeof window){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3)/100,n=0;return new Promise((function(r,o){var i=setInterval((function(){var a=document.querySelector(e);a?(clearInterval(i),r(a)):n>=t&&(clearInterval(i),o(new Error("Element not found for selector: ".concat(e)))),n++}),100)}))}}(r.selector):Promise.resolve(null);i.then(o).catch((function(){return o(null)}))}}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&um(t.prototype,n),r&&um(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wm(e){return wm="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},wm(e)}function km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?km(Object(n),!0).forEach((function(t){Cm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):km(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Im(r.key),r)}}function Cm(e,t,n){return(t=Im(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Im(e){var t=function(e,t){if("object"!=wm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=wm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==wm(t)?t:String(t)}dm(bm,"instance",void 0);var Em="gleap-tour-data",Om=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Cm(this,"productTourData",void 0),Cm(this,"productTourId",void 0),Cm(this,"unmuted",!1),Cm(this,"currentActiveIndex",void 0),Cm(this,"gleapTourObj",void 0),Cm(this,"disabled",!1);var t=this;if("undefined"!=typeof window){"undefined"!=typeof window&&window.addEventListener("beforeunload",(function(e){var n;null!=t&&t.disabled||null==t||!t.productTourId||null==t||!t.productTourData||"cobrowse"===(null==t||null===(n=t.productTourData)||void 0===n?void 0:n.tourType)||t.storeUncompletedTour()}))}}var t,n,r;return t=e,n=[{key:"disable",value:function(){this.gleapTourObj&&this.gleapTourObj.destroy(),bm.getInstance().disable(),this.gleapTourObj=void 0,this.disabled=!0}},{key:"startWithConfig",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!this.productTourId&&!this.disabled)if(this.productTourId=e,this.productTourData=t,this.currentActiveIndex=0,o)this.start();else{var i=this;Wt.getInstance().validateProductTour(e).then((function(){return r>0?setTimeout((function(){i.start()}),r):n.start()})).catch((function(e){console.log("Product tour is not live. Cleaning up..."),console.error(e),i.onComplete(!1)}))}}},{key:"onComplete",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={tourId:this.productTourId};e?(Un.notifyEvent("productTourCompleted",t),bv.trackEvent("tour-".concat(this.productTourId,"-completed"),t)):(Un.notifyEvent("productTourQuit",t),bv.trackEvent("tour-".concat(this.productTourId,"-quit"),t)),this.gleapTourObj&&this.gleapTourObj.destroy(),this.gleapTourObj=void 0,this.productTourData=void 0,this.productTourId=void 0,this.currentActiveIndex=void 0,this.clearUncompletedTour()}},{key:"loadUncompletedTour",value:function(){try{var e=JSON.parse(localStorage.getItem(Em));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(Em,JSON.stringify(e))}catch(t){}else this.clearUncompletedTour()}},{key:"clearUncompletedTour",value:function(){try{localStorage.removeItem(Em)}catch(e){}}},{key:"start",value:function(){var e=this,t=this.productTourData;if(t){if("cobrowse"===t.tourType)return bm.getInstance().startWithConfig(this.productTourId,t,(function(t){e.onComplete(t)}));this.unmuted=!1;for(var n=t.steps,r=this,o=[],i=0;i<n.length;i++){var a=n[i],s="CLICK"===a.mode,l="INPUT"===a.mode,c="INTERACTION"===a.mode,u="",d=!1;if("video-pointer"===a.type)u='<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 h="";t.sender&&t.sender.firstName&&(d=!0,h='<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>")),u="".concat(h,'<div class="gleap-tour-message">').concat(a.message,"</div>")}var f={disableActiveInteraction:!s&&!l&&!c,mode:a.mode,popover:xm({description:u,popoverClass:"gleap-tour-popover-".concat(a.type," ").concat(!d&&"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),o.push(f)}var g=["next","close"];t.backButton&&g.push("previous"),this.gleapTourObj=sm(Cm(Cm(Cm(Cm(Cm(Cm(Cm(Cm(Cm(Cm({showProgress:!0,allowKeyboardControl:!1,steps:o},"showProgress",n.length>1),"allowClose",t.allowClose),"nextBtnText",t.nextText),"doneBtnText",t.doneText),"prevBtnText",t.prevText),"showButtons",g),"onHighlightStarted",(function(t,n,r){var o;e.currentActiveIndex=null==r||null===(o=r.state)||void 0===o?void 0:o.activeIndex,e.storeUncompletedTour()})),"onElementNotFound",(function(t){document.removeEventListener("click",m),e.onComplete(!1)})),"onDestroyStarted",(function(){e.gleapTourObj.hasNextStep()?e.onComplete(!1):e.onComplete(!0),document.removeEventListener("click",m)})),"onPopoverRender",(function(t){if(t)for(var n=document.querySelectorAll(".gleap-tour-popover-description img, .gleap-tour-popover-description video"),o=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(){o()})),a.addEventListener("error",(function(){o()}))):"VIDEO"===a.tagName&&(a.addEventListener("canplaythrough",(function(){o()})),a.addEventListener("error",(function(){o()})))}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");r.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?(r.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",m,!0)}function m(e){try{var t=document.querySelector(".gleap-tour-popover");if(t&&!t.contains(e.target)){var o,i=r.gleapTourObj.getActiveIndex(),a=n[i],s=r.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;r.currentActiveIndex=(r.currentActiveIndex||0)+1,r.storeUncompletedTour(),s&&"INPUT"===s.tagName||"INPUT"===a.mode||"INTERACTION"===a.mode||null!=e&&null!==(o=e.target)&&void 0!==o&&o.id.includes("tooltip-svg")||r.gleapTourObj.moveNext()}}catch(l){}}}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}}],n&&Sm(t.prototype,n),r&&Sm(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Tm(e){return Tm="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},Tm(e)}function Lm(e){return function(e){if(Array.isArray(e))return Am(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 Am(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 Am(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 Am(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bm(r.key),r)}}function Rm(e,t,n){return t=jm(t),function(e,t){if(t&&("object"===Tm(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Pm(e)}(e,_m()?Reflect.construct(t,n||[],jm(e).constructor):t.apply(e,n))}function Pm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nm(e){var t="function"==typeof Map?new Map:void 0;return Nm=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(_m())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&Dm(o,n.prototype),o}(e,arguments,jm(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Dm(n,e)},Nm(e)}function _m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_m=function(){return!!e})()}function Dm(e,t){return Dm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dm(e,t)}function jm(e){return jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},jm(e)}function Fm(e,t,n){return(t=Bm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bm(e){var t=function(e,t){if("object"!=Tm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Tm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Tm(t)?t:String(t)}Cm(Om,"instance",void 0);function Um(e){return Um="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},Um(e)}function Hm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Km(r.key),r)}}function zm(e,t,n){return t=Jm(t),function(e,t){if(t&&("object"===Um(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return qm(e)}(e,Gm()?Reflect.construct(t,n||[],Jm(e).constructor):t.apply(e,n))}function qm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wm(e){var t="function"==typeof Map?new Map:void 0;return Wm=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Gm())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&Vm(o,n.prototype),o}(e,arguments,Jm(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Vm(n,e)},Wm(e)}function Gm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Gm=function(){return!!e})()}function Vm(e,t){return Vm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vm(e,t)}function Jm(e){return Jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jm(e)}function Ym(e,t,n){return(t=Km(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Km(e){var t=function(e,t){if("object"!=Um(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Um(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Um(t)?t:String(t)}function Xm(e){return Xm="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},Xm(e)}function Zm(){Zm=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=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,r){var i=t&&t.prototype instanceof v?t:v,a=Object.create(i.prototype),s=new A(r||[]);return o(a,"_invoke",{value:E(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",h="suspendedYield",f="executing",g="completed",m={};function v(){}function y(){}function b(){}var w={};c(w,a,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(M([])));x&&x!==n&&r.call(x,a)&&(w=x);var S=b.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(o,i,a,s){var l=d(e[o],e,i);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==Xm(u)&&r.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;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return i=i?i.then(o,o):o()}})}function E(t,n,r){var o=p;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var s=r.delegate;if(s){var l=O(s,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=f;var c=d(t,n,r);if("normal"===c.type){if(o=r.done?g:h,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(o=g,r.method="throw",r.arg=c.arg)}}}function O(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var i=d(o,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 T(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function M(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 o=-1,i=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(Xm(t)+" is not iterable")}return y.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=c(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,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,r,o,i){void 0===i&&(i=Promise);var a=new I(u(e,n,r,o),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 r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=M,A.prototype={constructor:A,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(L),!t)for(var n in this)"t"===n.charAt(0)&&r.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 o(r,o){return s.type="throw",s.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;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),L(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 r=n.completion;if("throw"===r.type){var o=r.arg;L(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:M(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),m}},t}function $m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$m(Object(n),!0).forEach((function(t){ev(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ev(e,t,n){return(t=iv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tv(e){return function(e){if(Array.isArray(e))return nv(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 nv(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 nv(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 nv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rv(e,t,n,r,o,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(r,o)}function ov(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iv(r.key),r)}}function iv(e){var t=function(e,t){if("object"!=Xm(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Xm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Xm(t)?t:String(t)}var av=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._agentId=t.agentId||"kai",this._context=t.context||null,this._onChange=t.onChange||null,this._onError=t.onError||null,this._onReplyReceived=t.onReplyReceived||null,this._onConversationCreated=t.onConversationCreated||null,this._onToken=t.onToken||null,this._messages=[],this._conversationId=t.conversationId||null,this._isExecuting=!1,this._error=null,this._destroyed=!1,this._abortController=null;try{this._networkManager=re.getInstance()}catch(n){this._networkManager=null}}var t,n,r,o,i;return t=e,n=[{key:"sendMessage",value:(o=Zm().mark((function e(t){var n,r,o,i,a,s,l,c=this;return Zm().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=(t||"").trim())&&!this._isExecuting&&!this._destroyed){e.next=3;break}return e.abrupt("return");case 3:return this._messages=[].concat(tv(this._messages),[{id:"user-".concat(Date.now()),role:"user",content:n,createdAt:(new Date).toISOString()}]),r="stream-".concat(Date.now()),this._messages=[].concat(tv(this._messages),[{id:r,role:"assistant",content:"",createdAt:(new Date).toISOString(),isStreaming:!0}]),this._isExecuting=!0,this._error=null,this._notify(),o="kai"===this._agentId,i=o?this._messages.filter((function(e){return!e.isStreaming&&e.content})).map((function(e){return{role:e.role,content:e.content}})):[{role:"user",content:n}],a={messages:i},this._conversationId&&(a.conversationId=this._conversationId),this._context&&(a.additionalContext=this._context),this._abortController=new AbortController,s=!this._conversationId,l=this._messages.length-1,e.next=19,this._networkManager.streamAgent(this._agentId,a,{onMeta:function(e){c._destroyed||(e.conversationId&&(c._conversationId=e.conversationId,c._networkManager._invalidateMessagesCache(e.conversationId),s&&c._onConversationCreated&&c._onConversationCreated(e.conversationId)),e.runId&&c._messages[l]&&(c._messages[l]=Qm(Qm({},c._messages[l]),{},{id:e.runId})))},onToken:function(e){if(!c._destroyed){var t=c._messages[l];t&&(t.content+=e.content||""),c._notify(),c._onToken&&c._onToken(e)}},onDone:function(e){if(!c._destroyed){var t=c._messages[l];t&&(t.isStreaming=!1,e.response&&!t.content&&(t.content=e.response)),c._isExecuting=!1,c._abortController=null,c._notify(),c._onReplyReceived&&c._onReplyReceived(e)}},onError:function(e){if(!c._destroyed){var t=c._messages[l];t&&!t.content?c._messages.splice(l,1):t&&(t.isStreaming=!1),c._isExecuting=!1,c._error=e,c._abortController=null,c._notify(),c._onError&&c._onError(e)}},onToolStart:function(){},onToolEnd:function(){}},this._abortController.signal);case 19:case"end":return e.stop()}}),e,this)})),i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){rv(i,n,r,a,s,"next",e)}function s(e){rv(i,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return i.apply(this,arguments)})},{key:"cancelStream",value:function(){this._abortController&&(this._abortController.abort(),this._abortController=null),this._messages=this._messages.map((function(e){return e.isStreaming?Qm(Qm({},e),{},{isStreaming:!1}):e})),this._messages=this._messages.filter((function(e){return e.content||"user"===e.role})),this._isExecuting=!1,this._notify()}},{key:"clearMessages",value:function(){this._messages=[],this._conversationId=null,this._isExecuting=!1,this._error=null,this.cancelStream(),re.getInstance().clearCache(),this._notify()}},{key:"setContext",value:function(e){this._context=e}},{key:"getState",value:function(){return{messages:this._messages,isExecuting:this._isExecuting,error:this._error,conversationId:this._conversationId}}},{key:"destroy",value:function(){this.cancelStream(),this._destroyed=!0,this._onChange=null,this._onError=null,this._onReplyReceived=null,this._onConversationCreated=null,this._onToken=null}},{key:"_notify",value:function(){this._onChange&&!this._destroyed&&this._onChange(this.getState())}}],n&&ov(t.prototype,n),r&&ov(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();const sv=av;function lv(e){return lv="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},lv(e)}function cv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hv(r.key),r)}}function uv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uv(Object(n),!0).forEach((function(t){pv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pv(e,t,n){return(t=hv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hv(e){var t=function(e,t){if("object"!=lv(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=lv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==lv(t)?t:String(t)}"undefined"!=typeof window&&"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,dv(dv({},t),{},{preserveDrawingBuffer:!0}))}),"undefined"!=typeof customElements&&"undefined"!=typeof HTMLElement&&"undefined"!=typeof window&&(function(){if("undefined"!=typeof customElements&&"undefined"!=typeof HTMLElement&&"undefined"!=typeof window){var e=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Fm(Pm(e=Rm(this,t)),"activeStep",-1),Fm(Pm(e),"checklistData",null),Fm(Pm(e),"_isInitialLoad",!1),Fm(Pm(e),"_initialActiveSet",!1),Fm(Pm(e),"_hasLoaded",!1),Fm(Pm(e),"_isSessionReady",!1),Fm(Pm(e),"_boundHandleChecklistUpdate",e.handleChecklistUpdate.bind(Pm(e))),Fm(Pm(e),"_boundHandleSessionUpdate",e.handleSessionUpdate.bind(Pm(e))),e.attachShadow({mode:"open"});try{e._networkManager=void 0!==Wt&&void 0!==D?D.getInstance():null}catch(n){e._networkManager=null}return e._boundFloatingLauncherClick=e.handleFloatingLauncherClick.bind(Pm(e)),e._boundFloatingCloseClick=e.handleFloatingCloseClick.bind(Pm(e)),e._floatingHideTimeout=null,e}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dm(e,t)}(t,Nm(HTMLElement)),n=t,r=[{key:"connectedCallback",value:function(){window.addEventListener("checkListUpdate",this._boundHandleChecklistUpdate),window.addEventListener("session-updated",this._boundHandleSessionUpdate),window.addEventListener("resize",this._boundResizeHandler=this.handleResize.bind(this)),this._checkSessionAndLoad()}},{key:"disconnectedCallback",value:function(){window.removeEventListener("checkListUpdate",this._boundHandleChecklistUpdate),window.removeEventListener("session-updated",this._boundHandleSessionUpdate),window.removeEventListener("resize",this._boundResizeHandler),this.removeFloatingClickListeners(),this._floatingHideTimeout&&(clearTimeout(this._floatingHideTimeout),this._floatingHideTimeout=null),this.checklistData=null,this.activeStep=-1,this._hasLoaded=!1,this._isSessionReady=!1,this._initialActiveSet=!1,this.renderResponse()}},{key:"handleResize",value:function(){this.updateActiveTaskMaxHeight()}},{key:"attributeChangedCallback",value:function(e,t,n){t!==n&&("checklistId"===e&&this._isSessionReady?this.loadChecklist():"checklistId"!==e&&this._hasLoaded&&this.checklistData&&this.renderChecklist(this.checklistData))}},{key:"_checkSessionAndLoad",value:function(){var e=this._getGleapSessionInstance(),t=this.getAttribute("checklistId");e.ready&&t?(this._isSessionReady=!0,this._networkManager=D.getInstance(),this.loadChecklist()):(this._isSessionReady=!1,this._hasLoaded=!1,this.checklistData=null,this.activeStep=-1,this._initialActiveSet=!1,this.renderResponse())}},{key:"handleSessionUpdate",value:function(){this._checkSessionAndLoad()}},{key:"_getGleapSessionInstance",value:function(){try{return void 0!==Wt?Wt.getInstance():null}catch(e){return null}}},{key:"infoEnabled",get:function(){var e=this.getAttribute("info");return null===e||"false"!==e.toLowerCase()}},{key:"progressbarEnabled",get:function(){var e=this.getAttribute("progressbar");return null===e||"false"!==e.toLowerCase()}},{key:"floatingEnabled",get:function(){return"true"===this.getAttribute("floating")}},{key:"_translate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return wf.translateText(e)||t}},{key:"_translateWithVars",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return wf.translateTextWithVars(e,t)||n}},{key:"getCheckIcon",value:function(){return'<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block;">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.7071 5.29289C21.0976 5.68342 21.0976 6.31658 20.7071 6.70711L9.70711 17.7071C9.31658 18.0976 8.68342 18.0976 8.29289 17.7071L3.29289 12.7071C2.90237 12.3166 2.90237 11.6834 3.29289 11.2929C3.68342 10.9024 4.31658 10.9024 4.70711 11.2929L9 15.5858L19.2929 5.29289C19.6834 4.90237 20.3166 4.90237 20.7071 5.29289Z" fill="currentColor"/>\n </svg>'}},{key:"loadChecklist",value:function(){if(this._isSessionReady&&this._networkManager){var e=this.getAttribute("checklistId");e?(this.activeStep=-1,this._initialActiveSet=!1,this.validateChecklist(e)):(this.renderResponse(),this.checklistData=null,this._hasLoaded=!1)}}},{key:"getQueryParams",value:function(){var e=this._getGleapSessionInstance();if(null==e||!e.session)return"";var t=e.session,n="en";try{void 0!==wf&&(n=wf.getInstance().getActiveLanguage()||"en")}catch(r){}return"gleapId=".concat(t.gleapId||"","&gleapHash=").concat(t.gleapHash||"","&lang=").concat(n)}},{key:"makeRequest",value:function(e,t,n,r){var o=this._getGleapSessionInstance();if(null!=o&&o.session){var i=new XMLHttpRequest;i.open(e,t);try{o.injectSession(i)}catch(a){}n&&i.setRequestHeader("Content-Type","application/json;charset=UTF-8"),i.onreadystatechange=function(){4===i.readyState&&r(i)},i.onerror=function(){r(i)},i.send(n?JSON.stringify(n):null)}else r({readyState:4,status:0,responseText:"Session unavailable",_isMock:!0})}},{key:"validateChecklist",value:function(e){var t=this;if(this._isSessionReady&&this._networkManager){this.checklistData=null,this._hasLoaded=!1,this.renderResponse();var n=this.getAttribute("sharedKey");this._networkManager.validateChecklist(e,n).then((function(e){t.isConnected&&t._isSessionReady&&e&&t.fetchChecklist(e)})).catch((function(e){t.renderResponse(),t.checklistData=null,t._hasLoaded=!1}))}}},{key:"fetchChecklist",value:function(e){var t=this;this._isSessionReady&&this._networkManager&&(this._isInitialLoad=!this._hasLoaded,this._networkManager.fetchChecklist(e).then((function(e){var n;if(!t.isConnected||!t._isSessionReady||!e)return t._hasLoaded=!1,t.checklistData=null,void t._checkSessionAndLoad();if(t.checklistData=e,t._hasLoaded=!0,"done"!==e.status){if(t._isInitialLoad&&!t._initialActiveSet){var r,o=(null===(r=e.outbound)||void 0===r||null===(r=r.config)||void 0===r?void 0:r.steps)||[],i=e.completedSteps||[],a=o.findIndex((function(e){return!i.includes(e.id)}));t.activeStep=a>=0?a:-1,-1!==t.activeStep&&(t._initialActiveSet=!0)}t.renderChecklist(t.checklistData),Un.notifyEvent("checklist-loaded",{checklistId:t.checklistData.id,outboundId:null===(n=t.checklistData.outbound)||void 0===n?void 0:n.id,completedSteps:t.checklistData.completedSteps,status:t.checklistData.status,data:t.checklistData})}else t.renderResponse()})).catch((function(e){t.renderResponse(),t.checklistData=null,t._hasLoaded=!1})))}},{key:"updateChecklist",value:function(e,t){var n,r,o=this._getGleapSessionInstance();if(null!=o&&o.session){var i=o.apiUrl;if(i){var a=o.session,s=null!==(n=null==a?void 0:a.gleapId)&&void 0!==n?n:"",l=null!==(r=null==a?void 0:a.gleapHash)&&void 0!==r?r:"",c="en";try{void 0!==wf&&(c=wf.getInstance().getActiveLanguage()||"en")}catch(d){}var u="".concat(i,"/outbound/checklists/").concat(e);t.checkedStep&&(u+="/increment/".concat(t.checkedStep)),u+="?gleapId=".concat(s,"&gleapHash=").concat(l,"&lang=").concat(c),this.makeRequest("PUT",u,t,(function(e){e._isMock||200!==e.status&&e.status}))}}}},{key:"handleChecklistUpdate",value:function(e){if(this._hasLoaded&&this.checklistData){var t=e.detail;if(t&&t.id===this.checklistData.id){var n,r=Lm(this.checklistData.completedSteps||[]),o=!1,i=!1,a=this.activeStep;if(t.completedSteps&&JSON.stringify(t.completedSteps)!==JSON.stringify(r)&&(this.checklistData.completedSteps=Lm(t.completedSteps),o=!0,-1!==a)){var s,l=null===(s=this.checklistData.outbound)||void 0===s||null===(s=s.config)||void 0===s||null===(s=s.steps)||void 0===s||null===(s=s[a])||void 0===s?void 0:s.id;l&&this.checklistData.completedSteps.includes(l)&&!r.includes(l)&&(i=!0)}if(t.status&&t.status!==this.checklistData.status&&(this.checklistData.status=t.status,o=!0),i){for(var c,u=(null===(c=this.checklistData.outbound)||void 0===c||null===(c=c.config)||void 0===c?void 0:c.steps)||[],d=-1,p=a+1;p<u.length;p++)if(!this.checklistData.completedSteps.includes(u[p].id)){d=p;break}this.activeStep!==d&&this.setActiveStep(d),o=!0}o&&(this.renderChecklist(this.checklistData),Un.notifyEvent("checklist-update",{checklistId:this.checklistData.id,outboundId:null===(n=this.checklistData.outbound)||void 0===n?void 0:n.id,completedSteps:this.checklistData.completedSteps,status:this.checklistData.status,data:this.checklistData}))}}}},{key:"handleFloatingLauncherClick",value:function(e){if(e.stopPropagation(),"done"!==this.checklistData.status){var t=this.shadowRoot.querySelector(".checklist-tasks");t&&(t.style.display="block"===t.style.display?"none":"block")}}},{key:"handleFloatingCloseClick",value:function(e){e.stopPropagation();var t=this.shadowRoot.querySelector(".checklist-tasks");t&&(t.style.display="none")}},{key:"addFloatingClickListeners",value:function(){var e=this.shadowRoot.querySelector(".checklist-floating-launcher");e&&e.addEventListener("click",this._boundFloatingLauncherClick);var t=this.shadowRoot.querySelector(".checklist-floating-header");t&&t.addEventListener("click",this._boundFloatingCloseClick)}},{key:"removeFloatingClickListeners",value:function(){var e=this.shadowRoot.querySelector(".checklist-floating-launcher");e&&e.removeEventListener("click",this._boundFloatingLauncherClick);var t=this.shadowRoot.querySelector(".checklist-floating-header");t&&t.removeEventListener("click",this._boundFloatingCloseClick)}},{key:"renderResponse",value:function(){this.shadowRoot.innerHTML=""}},{key:"renderFloatingLauncher",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"checklist-floating",o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=(null===(t=e.config)||void 0===t?void 0:t.steps)||[],a=(null===(n=this.checklistData)||void 0===n?void 0:n.completedSteps)||[],s=0;if(this.progressbarEnabled&&i.length>0){var l=i.length,c=a.length;s=l>0?c/l*100:0}var u,d,p=i.find((function(e){return!a.includes(e.id)})),h=i.length>0?p?p.title||this._translateWithVars("stepDefaultTitle",{index:i.indexOf(p)+1},"Step ".concat(i.indexOf(p)+1)):"":e.subject||"",f=i.length>0?p&&p.description||"":e.message||"";o&&(h=(null===(u=e.config)||void 0===u?void 0:u.successTitle)||"",f=(null===(d=e.config)||void 0===d?void 0:d.successMessage)||"",s=100);var g=2*Math.PI*7,m=g-s/100*g,v="checklist-floating-header"===r,y=v?'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <line x1="18" y1="6" x2="6" y2="18"></line>\n <line x1="6" y1="6" x2="18" y2="18"></line>\n </svg>':'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>';return'\n <div part="'.concat(r,'" class="').concat(v?"checklist-floating-header":"checklist-floating-launcher"," ").concat(o?"checklist-floating-launcher--done":"",'">\n <div class="floating-header">\n <div class="floating-circular-progress">\n <svg viewBox="0 0 20 20">\n <circle class="track" cx="10" cy="10" r="7"></circle>\n <circle class="progress" cx="10" cy="10" r="7" stroke-dasharray="').concat(g.toFixed(2),'" stroke-dashoffset="').concat(m.toFixed(2),'"></circle>\n </svg>\n </div>\n <div class="floating-title">').concat(h,"</div>\n ").concat(o?"":'<span class="floating-icon">'.concat(y,"</span>"),'\n </div>\n <div class="floating-subtitle">').concat(f,"</div>\n </div>\n ")}},{key:"renderInfoSection",value:function(e){var t;if(!this.infoEnabled||!e)return"";var n=e.subject||this._translate("checklistDefaultTitle","Checklist"),r=e.message||"",o="";return null!==(t=e.sender)&&void 0!==t&&t.profileImageUrl&&(o='\n <div part="sender" class="checklists-sender">\n <img part="sender-image" src="'.concat(e.sender.profileImageUrl,'" alt="').concat(e.sender.firstName||"Sender",'\'s profile picture" style="object-fit: cover;" />\n <span part="sender-name">').concat(e.sender.firstName||"","</span>\n </div>")),'\n <div part="info" class="checklists-info">\n '.concat(n?'<div part="info-title" class="checklists-title">'.concat(n,"</div>"):"","\n ").concat(r?'<div part="info-description" class="checklists-description">'.concat(r,"</div>"):"","\n ").concat(o,"\n </div>")}},{key:"renderProgressSection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!this.progressbarEnabled||!e.length)return"";var n=e.length,r=t.length,o=n>0?r/n*100:0,i=0;e.forEach((function(e){!t.includes(e.id)&&e.duration>0&&(i+=e.duration)}));var a=this._translateWithVars("taskProgress",{a:r,b:n},"".concat(r," of ").concat(n," done")),s=i>0?this._translateWithVars("aboutMinutes",{a:i},"About ".concat(i," min left")):"";return'\n <div part="progress-labels" class="checklist-progress-labels">\n <div part="progress-label-primary" class="checklist-progress-label">'.concat(a,"</div>\n ").concat(s?'<div part="progress-label-secondary" class="checklist-progress-label">'.concat(s,"</div>"):"",'\n </div>\n <div part="progress-bar" class="checklist-progress-bar">\n <div part="progress-bar-progress" class="checklist-progress-bar-progress" style="width: ').concat(o,'%;"></div>\n </div>')}},{key:"renderTasks",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t&&0!==t.length?t.map((function(t,r){var o=n.includes(t.id),i=e.activeStep===r,a=o?'<span part="task-badge" class="checklist-task-header--badge checklist-task-header--badge-done">'.concat(e.getCheckIcon(),"</span>"):'<span part="task-badge" class="checklist-task-header--badge">'.concat(r+1,"</span>"),s=t.title||e._translateWithVars("stepDefaultTitle",{index:r+1},"Step ".concat(r+1)),l=t.description||"",c=t.actionTitle||e._translate("actionDefaultTitle","Action"),u=t.action&&"none"!==t.action?'<div part="task-action" class="checklist-task-body-action" data-action-index="'.concat(r,'">\n <button type="button" class="action-button form-send-button">').concat(c,"</button>\n </div>"):"",d=e._translate("markAsDone","Mark as done"),p=t.allowMarkDone&&!o?'<div part="task-mark-done" class="checklist-task-body-markdone" data-markdone-index="'.concat(r,'">\n ').concat(e.getCheckIcon(),'\n <div class="checklist-task-body-markdone-label">').concat(d,"</div>\n </div>"):"",h=["checklist-task",o?"checklist-task--done":"",i?"checklist-task--active":""].filter(Boolean).join(" ");return'\n <div part="task" class="'.concat(h,'" data-task-index="').concat(r,'">\n <div part="task-header" class="checklist-task-header" role="button" aria-expanded="').concat(i,'" aria-controls="task-body-').concat(r,'">\n ').concat(a,'\n <div part="task-header-title" class="checklist-task-header--title">').concat(s,'</div>\n <span part="task-header-chevron" class="checklist-task-header--chevron">\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <polyline points="6 9 12 15 18 9"></polyline>\n </svg>\n </span>\n </div>\n <div part="task-body" class="checklist-task-body" id="task-body-').concat(r,'">\n <div part="task-body-inner" class="checklist-task-body-inner">\n ').concat(l?'<div part="task-body-content" class="checklist-task-body-content">'.concat(l,"</div>"):"","\n ").concat(u,"\n ").concat(p,"\n </div>\n </div>\n </div>")})).join(""):"<p>".concat(this._translate("noStepsDefined","No steps defined."),"</p>")}},{key:"renderChecklist",value:function(e){var t;if(this._hasLoaded&&e&&e.outbound){var n=e.outbound,r=(null===(t=n.config)||void 0===t?void 0:t.steps)||[],o=e.completedSteps||[],i="";if("done"===e.status||r.length>0&&o.length>=r.length){var a,s,l=(null===(a=n.config)||void 0===a?void 0:a.successTitle)||"",c=(null===(s=n.config)||void 0===s?void 0:s.successMessage)||"";i=this.floatingEnabled?this.renderFloatingLauncher(n,"checklist-floating-launcher",!0):'\n <div part="content" class="checklists-content checklists-content--done">\n <div part="success-icon" class="checklists-success-icon">\n <span part="success-icon-circle" class="checklists-success-icon--circle">'.concat(this.getCheckIcon(),'</span>\n </div>\n <div part="success-title" class="checklists-title">').concat(l,'</div>\n <div part="success-description" class="checklists-description">').concat(c,"</div>\n </div>"),-1!==this.activeStep&&(this.activeStep=-1)}else i='\n <div part="content" class="checklists-content">\n '.concat(this.floatingEnabled?"":this.renderInfoSection(n),"\n ").concat(this.floatingEnabled?"":this.renderProgressSection(r,o),"\n ").concat(this.floatingEnabled?this.renderFloatingLauncher(n):"",'\n <div part="tasks" class="checklist-tasks">\n ').concat(this.floatingEnabled?this.renderFloatingLauncher(n,"checklist-floating-header"):"","\n ").concat(this.renderTasks(r,o),"\n </div>\n </div>");var u=tn.getInstance().getFlowConfig(),d=u.color?u.color:"#485BFF",p="\n <style>\n :host {\n display: block;\n --color-bg: #ffffff;\n --color-font-title: #1f2937;\n --color-font-text: #4b5563;\n --color-font-light: #6b7280;\n --color-primary: ".concat(d,";\n --color-primary-light: ").concat(d,'22;\n --color-primary-contrast: #ffffff;\n --color-border: #e5e7eb;\n --color-gray-light: #f3f4f6;\n --color-gray-lighter: #f9fafb;\n --color-gray-dark: #6b7280;\n --color-success: #10b981;\n --color-success-light: #ffffff;\n --radius-sm: 4px;\n --radius-lg: 12px;\n --radius-full: 9999px;\n --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);\n --shadow-lg: rgba(0, 0, 0, 0.2) 0px 7px 29px 0px;\n --animation-duration: 0.2s;\n --animation-timing: ease-in-out;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n box-sizing: border-box;\n }\n :host([dark]) {\n --color-bg: #1f2937;\n --color-font-title: #f9fafb;\n --color-font-text: #d1d5db;\n --color-font-light: #9ca3af;\n --color-primary: ').concat(d,";\n --color-primary-light: ").concat(d,'22;\n --color-primary-contrast: #ffffff;\n --color-border: #374151;\n --color-gray-light: #374151;\n --color-gray-lighter: #111827;\n --color-gray-dark: #9ca3af;\n --color-success: #34d399;\n --color-success-light: #1f2937;\n }\n *, *:before, *:after { box-sizing: inherit; }\n .checklists-content { color: var(--color-font-text); }\n .checklists-content--done { text-align: center; }\n .checklists-info { margin-bottom: 24px; text-align: center; }\n .checklists-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; color: var(--color-font-title); }\n .checklists-description { font-size: 0.9rem; margin-bottom: 16px; color: var(--color-font-text); line-height: 1.5; }\n .checklists-sender { display: flex; align-items: center; justify-content: center; gap: 8px; }\n .checklists-sender img { width: 28px; height: 28px; border-radius: var(--radius-full); object-fit: cover; }\n .checklists-sender span { font-size: 0.875rem; color: var(--color-font-light); font-weight: 500; }\n .checklists-success-icon { margin-bottom: 16px; line-height: 0; }\n .checklists-success-icon--circle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-full); background-color: var(--color-success); color: var(--color-success-light); font-size: 22px; }\n .checklist-progress-labels { display: flex; justify-content: space-between; margin-bottom: 8px; }\n .checklist-progress-label { font-size: 0.75rem; color: var(--color-font-light); font-weight: 500; }\n .checklist-progress-bar { width: 100%; height: 6px; background-color: var(--color-gray-light); border-radius: var(--radius-full); overflow: hidden; margin-bottom: 20px; }\n .checklist-progress-bar-progress { height: 100%; background-color: var(--color-primary); transition: width var(--animation-duration) var(--animation-timing); border-radius: var(--radius-full); }\n .checklist-tasks { display: flex; flex-direction: column; gap: 12px; }\n .checklist-task { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background-color: var(--color-bg); box-shadow: var(--shadow-sm); overflow: hidden; transition: background-color var(--animation-duration) var(--animation-timing), border-color var(--animation-duration) var(--animation-timing); }\n .checklist-task-header { display: flex; align-items: center; padding: 15px 20px; cursor: pointer; gap: 12px; position: relative; }\n .checklist-task-header:hover { background: var(--color-gray-lighter); }\n .checklist-task-header:hover .checklist-task-header--chevron {\n color: var(--color-font-title);\n }\n .checklist-task-header--badge { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--radius-full); background-color: var(--color-primary-light); color: var(--color-primary); font-size: 0.875rem; font-weight: 600; flex-shrink: 0; transition: background-color var(--animation-duration) var(--animation-timing), color var(--animation-duration) var(--animation-timing); line-height: 1; }\n .checklist-task-header--badge svg { width: 16px; height: 16px; }\n .checklist-task-header--title { flex-grow: 1; font-size: 0.9rem; font-weight: 500; color: var(--color-font-title); transition: font-weight var(--animation-duration) var(--animation-timing), color var(--animation-duration) var(--animation-timing), text-decoration var(--animation-duration) var(--animation-timing); }\n .checklist-task-header--chevron { color: var(--color-font-light); transition: transform var(--animation-duration) var(--animation-timing); flex-shrink: 0; margin-left: auto; }\n .checklist-task-header--chevron svg { display: block; width: 18px; height: 18px; }\n .checklist-task-body {\n overflow: hidden;\n transition: max-height var(--animation-duration) var(--animation-timing), opacity var(--animation-duration) var(--animation-timing);\n max-height: 0;\n opacity: 0;\n }\n .checklist-task--active .checklist-task-body {\n max-height: var(--task-body-active-height, 200px);\n opacity: 1;\n }\n .checklist-task-body-inner { padding: 4px 16px 20px 60px; font-size: 0.875rem; color: var(--color-font-text); line-height: 1.5; }\n .checklist-task-body-content { margin-bottom: 16px; }\n .checklist-task-body-content p:first-child { margin-top: 0; }\n .checklist-task-body-content p:last-child { margin-bottom: 0; }\n .checklist-task-body-content iframe { width: 100%; height: 315px; object-fit: contain; border: none; }\n .checklist-task-body-action { margin-top: 16px; }\n .action-button { display: inline-flex; align-items: center; justify-content: center; background-color: var(--color-primary); color: var(--color-primary-contrast); padding: 10px 18px; font-size: 0.875rem; font-weight: 500; border-radius: var(--radius-lg); border: none; text-align: center; cursor: pointer; transition: background-color var(--animation-duration) var(--animation-timing), box-shadow var(--animation-duration) var(--animation-timing); box-shadow: var(--shadow-sm); }\n .action-button:hover { background-color: color-mix(in srgb, var(--color-primary) 90%, black); box-shadow: var(--shadow-md); }\n .action-button:focus { outline: 2px solid color-mix(in srgb, var(--color-primary) 50%, transparent); outline-offset: 2px; }\n .checklist-task-body-markdone { margin-top: 20px; border-top: 1px solid var(--color-border); padding: 16px 0 0px 0; display: flex; align-items: center; cursor: pointer; color: var(--color-primary); transition: color var(--animation-duration) var(--animation-timing); }\n .checklist-task-body-markdone:hover { color: color-mix(in srgb, var(--color-primary) 80%, black); }\n .checklist-task-body-markdone svg { width: 18px; height: 18px; margin-right: 6px; flex-shrink: 0; font-size: 18px; }\n .checklist-task-body-markdone-label { font-size: 0.875rem; font-weight: 500; line-height: 1; }\n .checklist-task--active .checklist-task-header--title { font-weight: 600; }\n .checklist-task--active .checklist-task-header--chevron { transform: rotate(180deg); }\n .checklist-task--active .checklist-task-header:hover { background: linear-gradient(180deg, var(--color-gray-lighter), transparent); }\n .checklist-task--done { background-color: var(--color-gray-lighter); border-color: var(--color-gray-light); box-shadow: none; }\n .checklist-task--done .checklist-task-header--badge { background-color: var(--color-success); color: var(--color-success-light); }\n .checklist-task--done .checklist-task-header--title { color: var(--color-font-light); }\n .checklist-task--done .checklist-task-body-inner { color: var(--color-font-light); }\n .checklist-task--done .checklist-task-header--title {\n text-decoration: line-through;\n }\n \n /* -------------------------\n Floating style addition\n Only applies if floating="true"\n ------------------------- */\n :host([floating="true"]) .checklists-content {\n position: relative;\n }\n :host([floating="true"]) .checklist-tasks {\n position: absolute;\n bottom: 0;\n left: 0;\n z-index: 1000;\n max-height: 90vh;\n display: none;\n padding: 0px;\n min-width: min(380px, 90vw);\n background-color: var(--color-bg);\n border-radius: var(--radius-lg);\n box-shadow: var(--shadow-lg);\n overflow: hidden;\n }\n :host([floating="true"]) .checklist-task {\n border-radius: 0px;\n border: none;\n box-shadow: none;\n border-bottom: 1px solid var(--color-border);\n }\n :host([floating="true"]) .checklist-task:last-child {\n border-bottom: none;\n }\n :host([floating="true"]) .checklist-task--done {\n background-color: transparent;\n }\n :host([floating="true"]) .checklist-task-header:hover {\n background: linear-gradient(180deg, var(--color-gray-lighter), transparent);\n }\n \n /* -------------------------\n Floating Launcher Styles\n ------------------------- */\n .checklist-floating-launcher {\n padding: 12px;\n background-color: var(--color-bg);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-lg);\n box-shadow: var(--shadow-md);\n transition: transform 0.3s ease;\n cursor: pointer;\n }\n .checklist-floating-launcher--done {\n cursor: default !important;\n }\n .checklist-floating-header {\n padding: 20px;\n padding-bottom: 16px;\n border-bottom: 1px solid var(--color-border);\n cursor: pointer;\n }\n .checklist-floating-header:hover .floating-icon,\n .checklist-floating-launcher:hover .floating-icon {\n color: var(--color-font-title);\n }\n .floating-header {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n }\n .floating-title {\n font-size: 0.875rem;\n font-weight: 600;\n color: var(--color-font-title);\n max-width: calc(100% - 32px);\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n .floating-subtitle {\n font-size: 0.875rem;\n color: var(--color-font-text);\n margin-top: 8px;\n max-width: 100%;\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n .floating-circular-progress {\n width: 26px;\n height: 26px;\n margin-right: 6px;\n }\n .floating-circular-progress svg {\n width: 100%;\n height: 100%;\n transform: rotate(-90deg);\n }\n .floating-circular-progress .track {\n fill: none;\n stroke: var(--color-gray-light);\n stroke-width: 3;\n }\n .floating-circular-progress .progress {\n fill: none;\n stroke: var(--color-primary);\n stroke-width: 3;\n stroke-linecap: round;\n transition: stroke-dashoffset var(--animation-duration) var(--animation-timing);\n }\n .checklist-floating-launcher--done .floating-circular-progress .progress {\n stroke: var(--color-success);\n }\n .floating-icon {\n margin-left: auto;\n color: var(--color-font-light);\n }\n </style>\n ');this.shadowRoot.innerHTML=p+i,this.addTaskEventListeners(),this.floatingEnabled&&this.addFloatingClickListeners(),-1!==this.activeStep&&this.toggleTask(this.activeStep,!0)}else this._checkSessionAndLoad()}},{key:"updateActiveTaskMaxHeight",value:function(){if(-1!==this.activeStep){var e=this.shadowRoot.querySelector('.checklist-task[data-task-index="'.concat(this.activeStep,'"] .checklist-task-body-inner')),t=this.shadowRoot.querySelector('.checklist-task[data-task-index="'.concat(this.activeStep,'"] .checklist-task-body'));if(e&&t){var n=e.offsetHeight;t.style.setProperty("--task-body-active-height","".concat(n,"px"))}}}},{key:"addTaskEventListeners",value:function(){var e=this;this.shadowRoot.querySelectorAll(".checklist-task").forEach((function(t){var n=t.querySelector(".checklist-task-header"),r=parseInt(t.getAttribute("data-task-index"),10);n&&n.addEventListener("click",(function(){var t=e.activeStep===r?-1:r;e.setActiveStep(t)}));var o=t.querySelector(".checklist-task-body-markdone");o&&o.addEventListener("click",(function(t){var n;if(t.stopPropagation(),null!==(n=e.checklistData)&&void 0!==n&&null!==(n=n.outbound)&&void 0!==n&&null!==(n=n.config)&&void 0!==n&&n.steps){var o=e.checklistData.outbound.config.steps[r];if(o){var i=e.activeStep;if(e.checklistData.completedSteps||(e.checklistData.completedSteps=[]),!e.checklistData.completedSteps.includes(o.id)){e.checklistData.completedSteps.push(o.id);var a=e.checklistData.outbound.config.steps,s=-1;if(i===r){for(var l=r+1;l<a.length;l++)if(!e.checklistData.completedSteps.includes(a[l].id)){s=l;break}e.setActiveStep(s)}setTimeout((function(){var t=!1;if(e.floatingEnabled){var n=e.shadowRoot.querySelector(".checklist-tasks");t=n&&"block"===n.style.display}if(e.renderChecklist(e.checklistData),e.floatingEnabled&&t){var r=e.shadowRoot.querySelector(".checklist-tasks");r&&(r.style.display="block")}}),300);var c={checkedStep:o.id};a.length>0&&e.checklistData.completedSteps.length>=a.length&&(e.checklistData.status="done",c.status="done"),e.updateChecklist(e.checklistData.id,c)}}}}));var i=t.querySelector(".checklist-task-body-action .action-button");i&&i.addEventListener("click",(function(t){var n;if(t.stopPropagation(),null!==(n=e.checklistData)&&void 0!==n&&null!==(n=n.outbound)&&void 0!==n&&null!==(n=n.config)&&void 0!==n&&n.steps&&void 0!==bv){var o=e.checklistData.outbound.config.steps[r];if(o&&o.action&&"none"!==o.action)try{"BOT"===o.action?bv.startBot(o.botId):"CUSTOM_ACTION"===o.action?bv.triggerCustomAction(o.actionBody):"REDIRECT_URL"===o.action?(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),bv.openURL(o.actionBody,!!o.actionOpenInNewTab)):"FEEDBACK_FLOW"===o.action?bv.startFeedbackFlow(o.formId):"NEWS_ARTICLE"===o.action?bv.openNewsArticle(o.articleId):"HELP_ARTICLE"===o.action?bv.openHelpCenterArticle(o.articleId):"CHECKLIST"===o.action?bv.startChecklist(o.outboundId,!0,null==o?void 0:o.sharedKey):"PRODUCT_TOUR"===o.action&&bv.startProductTour(o.productTourId,!0)}catch(i){}}}))}))}},{key:"setActiveStep",value:function(e){var t=this,n=this.activeStep;this.activeStep=e;var r=[];-1!==n&&n!==this.activeStep&&r.push({index:n,open:!1}),-1!==this.activeStep&&this.activeStep!==n&&r.push({index:this.activeStep,open:!0}),r.forEach((function(e){var n=e.index,r=e.open;t.toggleTask(n,r)}))}},{key:"toggleTask",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this.shadowRoot.querySelector('.checklist-task[data-task-index="'.concat(e,'"]'));if(r){var o=r.querySelector(".checklist-task-header");if(o){var i=r.classList.contains("checklist-task--active"),a=null!==n?n:!i;if(a){i||(r.classList.add("checklist-task--active"),o.setAttribute("aria-expanded","true"));var s=r.querySelector(".checklist-task-body-inner");if(s){var l=s.offsetHeight,c=r.querySelector(".checklist-task-body");c&&c.style.setProperty("--task-body-active-height","".concat(l,"px"))}r.querySelectorAll("iframe").forEach((function(n){n._heightListenerAdded||(n._heightListenerAdded=!0,n.addEventListener("load",(function(){t.activeStep===e&&t.updateActiveTaskMaxHeight()})))}))}else!a&&i&&(r.classList.remove("checklist-task--active"),o.setAttribute("aria-expanded","false"))}}}}],o=[{key:"observedAttributes",get:function(){return["checklistId","info","progressbar","dark","floating","sharedKey"]}}],r&&Mm(n.prototype,r),o&&Mm(n,o),Object.defineProperty(n,"prototype",{writable:!1}),t}();"undefined"==typeof customElements||customElements.get("gleap-checklist")||customElements.define("gleap-checklist",e)}}(),function(){if("undefined"!=typeof customElements&&"undefined"!=typeof HTMLElement&&"undefined"!=typeof window&&!customElements.get("gleap-agent-conversation")){var e=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return Ym(qm(e=zm(this,t,[].concat(r))),"_iframe",null),Ym(qm(e),"_agentConvUrl","https://outboundmedia.gleap.io/agent-conversation"),Ym(qm(e),"_messageListener",null),Ym(qm(e),"_config",{}),e}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vm(e,t)}(t,Wm(HTMLElement)),n=t,o=[{key:"observedAttributes",get:function(){return["agentId","conversationId","dark","placeholder","agentColor","emptyText","context"]}}],(r=[{key:"connectedCallback",value:function(){this._injectIframe(),this._listenForMessages()}},{key:"disconnectedCallback",value:function(){this._messageListener&&window.removeEventListener("message",this._messageListener),this._messageListener=null}},{key:"attributeChangedCallback",value:function(e,t,n){t!==n&&this._iframe&&this._sendConfig()}},{key:"_injectIframe",value:function(){if(!this._iframe){this.style.display="block",this.style.width="100%",this.style.height="100%";var e=document.createElement("iframe");e.src=this._agentConvUrl,e.style.cssText="width: 100%; height: 100%; border: 0; background: transparent;",e.setAttribute("frameborder","0"),e.setAttribute("allow","autoplay; encrypted-media; microphone *;"),e.title="Gleap Agent Conversation",this.appendChild(e),this._iframe=e}}},{key:"_listenForMessages",value:function(){var e=this;this._messageListener||(this._messageListener=function(t){var n,r;try{var o=new URL(e._agentConvUrl);if(t.origin!==o.origin)return}catch(i){return}try{r=JSON.parse(t.data)}catch(i){return}"AGENT_CONVERSATION"===(null===(n=r)||void 0===n?void 0:n.type)&&("agent-conv-loaded"===r.name&&e._sendConfig(),"agent-conv-conversation-created"===r.name&&e.dispatchEvent(new CustomEvent("gleap-agent-conversation-created",{bubbles:!0,composed:!0,detail:r.data})),"agent-conv-message-sent"===r.name&&e.dispatchEvent(new CustomEvent("gleap-agent-message-sent",{bubbles:!0,composed:!0,detail:r.data})),"agent-conv-reply-received"===r.name&&e.dispatchEvent(new CustomEvent("gleap-agent-reply-received",{bubbles:!0,composed:!0,detail:r.data})),"agent-conv-error"===r.name&&e.dispatchEvent(new CustomEvent("gleap-agent-error",{bubbles:!0,composed:!0,detail:r.data})))},window.addEventListener("message",this._messageListener))}},{key:"_sendConfig",value:function(){var e,t=this;if(null!==(e=this._iframe)&&void 0!==e&&e.contentWindow){var n="https://api.gleap.io",r="",o="",i="";try{var a,s,l=Wt.getInstance();n=l.apiUrl||n,r=l.sdkKey||"",o=(null===(a=l.session)||void 0===a?void 0:a.gleapId)||"",i=(null===(s=l.session)||void 0===s?void 0:s.gleapHash)||""}catch(u){}var c={agentId:this.getAttribute("agentId")||"",conversationId:this.getAttribute("conversationId")||null,dark:"true"===this.getAttribute("dark")||""===this.getAttribute("dark"),placeholder:this.getAttribute("placeholder")||"Type a message...",agentColor:this.getAttribute("agentColor")||null,emptyText:this.getAttribute("emptyText")||"How can I help you today?",context:function(){try{var e=t.getAttribute("context");return e?JSON.parse(e):null}catch(n){return null}}(),apiUrl:n,sdkKey:r,gleapId:o,gleapHash:i};this._config=c,this._iframe.contentWindow.postMessage(JSON.stringify({type:"agent-conversation",name:"agent-conv-data",data:c}),"*")}}},{key:"sendMessage",value:function(e){var t;null!==(t=this._iframe)&&void 0!==t&&t.contentWindow&&null!=e&&e.trim()&&this._iframe.contentWindow.postMessage(JSON.stringify({type:"agent-conversation",name:"agent-conv-send-message",data:{content:e}}),"*")}},{key:"clearConversation",value:function(){var e;null!==(e=this._iframe)&&void 0!==e&&e.contentWindow&&this._iframe.contentWindow.postMessage(JSON.stringify({type:"agent-conversation",name:"agent-conv-clear",data:{}}),"*")}}])&&Hm(n.prototype,r),o&&Hm(n,o),Object.defineProperty(n,"prototype",{writable:!1}),t}();customElements.define("gleap-agent-conversation",e)}}());var fv=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),pv(this,"initialized",!1),pv(this,"offlineMode",!1),pv(this,"disablePageTracking",!1),pv(this,"disableInAppNotifications",!1),pv(this,"disableQueryParams",!1),pv(this,"globalData",{screenRecordingData:null,webReplay:null,snapshotPosition:{x:0,y:0}}),"undefined"!=typeof window&&(ir.getInstance(),pr.getInstance().start(),br.getInstance().start(),Qg.getInstance().start())}var t,n,r;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(){er.getInstance().destroy(),tn.getInstance().start().then((function(){a.getInstance().refresh(),_f.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 r=t[n];if(r&&r.actionType){var o,i;if(((null===(o=r.pageRules)||void 0===o?void 0:o.length)>0||r.pageFilter)&&window&&window.location&&!At(window.location.href,r))continue;"notification"===r.actionType?"widget"===(null==r||null===(i=r.data)||void 0===i||null===(i=i.checklist)||void 0===i?void 0:i.popupType)?e.openChecklist(r.data.checklist.id,!0):this.disableInAppNotifications||e.showNotification(r):"banner"===r.actionType?e.showBanner(r):"modal"===r.actionType?e.showModal(r):"tour"===r.actionType?e.startProductTourWithConfig(r.outbound,r.data,!1):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=Qh.getInstance().getReplayData();this.setGlobalDataItem("webReplay",e)}}],r=[{key:"getInstance",value:function(){return this.instance||(this.instance=new e),this.instance}},{key:"setEnvironment",value:function(e){ir.getInstance().environment=e}},{key:"setTags",value:function(e){fg.getInstance().setTags(e)}},{key:"setUrlHandler",value:function(e){er.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(){pr.getInstance().stop()}},{key:"setAiTools",value:function(e){Jn.getInstance().setAgentTools(e),Wf.getInstance().sendAgentToolsUpdate(),er.getInstance().sendConfigUpdate()}},{key:"attachNetworkLogs",value:function(e){y.getInstance().externalRequests=S(e)}},{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"INFO";pr.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(o){}var r=Wt.getInstance();r.sdkKey=t,r.setOnSessionReady((function(){setTimeout((function(){tn.getInstance().start().then((function(){Kt.getInstance().start(),T((function(){a.getInstance().injectFeedbackButton(),_f.getInstance().injectNotificationUI(),e.checkForUncompletedTour(),e.checkForUrlParams(),Un.notifyEvent("initialized")}))})).catch((function(e){console.warn("Failed to initialize Gleap.")}))}),0)})),r.startSession()}}},{key:"openURL",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];er.getInstance().urlHandler(e,t)}},{key:"disableQueryParams",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.getInstance().disableQueryParams=e}},{key:"checkForUrlParams",value:function(){if(this.getInstance().disableQueryParams)console.log("Query params are disabled.");else 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 r=t.get("gleap_conversation");r&&r.length>0&&("true"===r?e.startConversation(!0):e.startBot(r,!0));var o=t.get("gleap_feedback");o&&o.length>0&&e.startFeedbackFlow(o);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=2),setTimeout((function(){e.startProductTour(s)}),1e3*l)}}catch(c){}}},{key:"destroy",value:function(){Qh.getInstance().stop(),Kt.getInstance().stop(),er.getInstance().destroy(),a.getInstance().destroy(),_f.getInstance().clearAllNotifications(!0),Wf.getInstance().destroy(),Wt.getInstance().clearSession(0,!1),Zf.getInstance().removeBannerUI(),this.instance=null}},{key:"closeBanner",value:function(){Zf.getInstance().removeBannerUI()}},{key:"closeModal",value:function(){og.getInstance().hideModal()}},{key:"showAiChatbar",value:function(){var e=Wf.getInstance();e.manuallyHidden=!1,e.manuallyShown=!0,e.show()}},{key:"hideAiChatbar",value:function(){var e=Wf.getInstance();e.manuallyHidden=!0,e.manuallyShown=!1,e.hide()}},{key:"setAiChatbarQuickActions",value:function(e){Wf.getInstance().setQuickActions(e)}},{key:"setAiChatbarPlaceholder",value:function(e){Wf.getInstance().setPlaceholder(e)}},{key:"setUseCookies",value:function(e){Wt.getInstance().useCookies=e}},{key:"disableLocalStorage",value:function(){Wt.getInstance().localStorageDisabled=!0}},{key:"identify",value:function(e,t,n){return Wt.getInstance().identifySession(e,S(t),n)}},{key:"updateContact",value:function(e){return Wt.getInstance().updateSession(S(e))}},{key:"clearIdentity",value:function(){Wt.getInstance().clearSession()}},{key:"getIdentity",value:function(){return Wt.getInstance().getSession()}},{key:"isUserIdentified",value:function(){var e=Wt.getInstance().session;return!!(e&&e.userId&&e.userId.length>0)}},{key:"isOpened",value:function(){return er.getInstance().isOpened()}},{key:"hide",value:function(){er.getInstance().hideWidget()}},{key:"setMaxNetworkRequests",value:function(e){y.getInstance().setMaxRequests(e)}},{key:"startNetworkLogger",value:function(){y.getInstance().start()}},{key:"setNetworkLogsBlacklist",value:function(e){y.getInstance().setBlacklist(e)}},{key:"setNetworkLogPropsToIgnore",value:function(e){y.getInstance().setFilters(e)}},{key:"setReplayOptions",value:function(e){Qh.getInstance().setOptions(e)}},{key:"close",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];er.getInstance().hideWidget(e)}},{key:"open",value:function(){er.getInstance().setAppMode("widget"),er.getInstance().showWidget()}},{key:"trackEvent",value:function(e,t){Kt.getInstance().logEvent(e,t)}},{key:"logEvent",value:function(e,t){Kt.getInstance().logEvent(e,t)}},{key:"preFillForm",value:function(e){var t=S(e);Af.getInstance().formPreFill=t,er.getInstance().sendMessage({name:"prefill-form-data",data:t},!0)}},{key:"on",value:function(e,t){Un.on(e,t)}},{key:"enableShortcuts",value:function(e){e?If.getInstance().start():If.getInstance().stop()}},{key:"showFeedbackButton",value:function(e){a.getInstance().toggleFeedbackButton(e)}},{key:"setAppVersionCode",value:function(e){ir.setAppVersionCode(e)}},{key:"setAppBuildNumber",value:function(e){ir.setAppBuildNumber(e)}},{key:"setWSApiUrl",value:function(e){Wt.getInstance().wsApiUrl=e}},{key:"setApiUrl",value:function(e){Wt.getInstance().apiUrl=e}},{key:"setBannerUrl",value:function(e){Zf.getInstance().setBannerUrl(e)}},{key:"setModalUrl",value:function(e){og.getInstance().setModalUrl(e)}},{key:"setFrameUrl",value:function(e){er.getInstance().frameUrl=e}},{key:"setTicketAttribute",value:function(e,t){Cr.getInstance().setTicketAttribute(e,t)}},{key:"unsetTicketAttribute",value:function(e){Cr.getInstance().unsetTicketAttribute(e)}},{key:"clearTicketAttributes",value:function(){Cr.getInstance().clearTicketAttributes()}},{key:"attachCustomData",value:function(e){Cr.getInstance().attachCustomData(e)}},{key:"setCustomData",value:function(e,t){Cr.getInstance().setCustomData(e,t)}},{key:"removeCustomData",value:function(e){Cr.getInstance().removeCustomData(e)}},{key:"clearCustomData",value:function(){Cr.getInstance().clearCustomData()}},{key:"playSound",value:function(e){cg.playSound(e)}},{key:"showTabNotificationBadge",value:function(e){var t=_f.getInstance();t.showNotificationBadge=e,t.updateTabBarNotificationCount()}},{key:"setLanguage",value:function(t){wf.getInstance().setOverrideLanguage(t),e.getInstance().initialized&&setTimeout((function(){e.getInstance().softReInitialize(),e.updateContact({lang:t})}),1e3)}},{key:"registerAgentToolAction",value:function(e){Jn.getInstance().registerAgentToolAction(e)}},{key:"registerCustomAction",value:function(e){Mr.registerCustomAction(e)}},{key:"triggerCustomAction",value:function(e){Mr.triggerCustomAction(e)}},{key:"setStyles",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#ffffff",o=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;T((function(){!function(e,t,n,r,o,i,s,l){var c=d(e),p=d(n),h=d(o),f=d(t),g="#ffffff"===h,m=u(t,"#ffffff"===f?-35:-15),v=u(o,g?100:-120),y=u(o,g?30:-12),b=u(o,g?80:-30),w=(r=parseInt(r,10),Math.round(1.05*r)),k=Math.round(.8*r),x=Math.round(.6*r),S=Math.round(.4*r),C=Math.round(.25*r),I=57+s;l===a.FEEDBACK_BUTTON_CLASSIC_BOTTOM?I=s+15:(l&&l.includes("CLASSIC")||l===a.FEEDBACK_BUTTON_NONE)&&(I=s);var E='\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-ai-ui-widget {\n display: none;\n }\n .gleap-input-highlight {\n box-shadow: 0 0 0 3px '.concat(e," !important;\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(k,"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 word-break: break-word;\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 z-index: ").concat(2147483699,";\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(h,"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(o,";\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(o,"1A 70%,\n ").concat(o," 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;\n height: 100dvh !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;\n max-height: 100dvh !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(k,"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(o,";\n }\n\n .gleap-notification-item-checklist-container {\n display: flex;\n animation: fadeIn;\n animation-duration: .45s;\n background-color: ").concat(o,";\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(x,"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(h,";\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(y,";\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(h,";\n }\n\n .gleap-notification-item-news {\n width: 100%;\n }\n\n .gleap-news-pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 10px;\n width: 100%;\n }\n\n .gleap-news-page-indicator {\n font-size: 12px;\n color: ").concat(v,";\n }\n\n .gleap-news-next-button {\n background-color: ").concat(e,";\n color: ").concat(c,";\n border-radius: ").concat(C,"px;\n box-sizing: border-box;\n padding: 5px 10px;\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-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: 14px;\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(h,";\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 cursor: pointer;\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(o,";\n border-radius: ").concat(v,";\n box-sizing: border-box;\n flex-direction: column;\n overflow: hidden;\n box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.2);\n border-radius: ").concat(x,"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 cursor: pointer;\n }\n \n .gleap-notification-item-news-content-title:hover {\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(x,"px;\n border-bottom-left-radius: 0px;\n padding: 20px;\n background-color: ").concat(o,";\n margin-bottom: 12px;\n cursor: pointer;\n font-size: 15px;\n line-height: 21px;\n color: ").concat(h,';\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(o,";\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(h,";\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(84+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(k,"px);\n top: ").concat(k,"px;\n background-color: ").concat(o,";\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 !important;\n pointer-events: auto !important;\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 @keyframes bbRedDotPulse {\n 0% {\n opacity: 1;\n }\n 50% {\n opacity: 0.8;\n }\n 100% {\n opacity: 1;\n }\n }\n\n .bb-feedback-button--red-dot {\n position: absolute;\n top: 0px;\n right: 0px;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n background-color: #ff3b30;\n box-shadow: 0 2px 4px rgba(0,0,0,0.2);\n z-index: ").concat(2147483631,";\n animation: bbRedDotPulse 2s ease-in-out infinite;\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: 12px;\n padding: 0px 4px;\n height: 20px;\n min-width: 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 .drag-handle-item {\n cursor: grab !important;\n width: 34px;\n min-width: 34px;\n }\n\n .drag-handle-item svg {\n width: 18px !important;\n height: 18px !important;\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(h,";\n border-radius: ").concat(w,"px;\n background-color: ").concat(y,";\n }\n .bb-capture-preview-retrybutton:hover {\n background-color: ").concat(b,";\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(y,";\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(b,";\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(o,";\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(h,";\n }\n .bb-capture-toolbar-item {\n border-radius: ").concat(S,"px;\n }\n .bb-capture-toolbar {\n background-color: ").concat(o,";\n border-radius: ").concat(S,"px;\n }\n .bb-capture-toolbar-item-colorpicker {\n background-color: ").concat(o,";\n }\n .bb-capture-toolbar-item--active {\n background-color: ").concat(y,";\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 max-height: 100vh;\n min-height: 100dvh !important;\n max-height: 100dvh !important;\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: 10px;\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(h,";\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 margin-bottom: 10px !important;\n margin-top: 10px !important;\n }\n\n .gleap-tour-message ul {\n line-height: 1.3;\n padding-left: 20px;\n margin-top: 10px !important;\n margin-bottom: 10px !important;\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(b,"; \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 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% !important;\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(h," !important;\n background-color: ").concat(y," !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 .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\n /* Modal styles */\n .gleap-modal-wrapper {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: ').concat(2147483640,";\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .gleap-modal-backdrop {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: ").concat(2147483641,";\n }\n\n .gleap-modal {\n position: relative;\n width: 90%;\n max-width: 600px;\n max-height: 90vh;\n z-index: ").concat(2147483700,";\n background-color: ").concat(o,";\n border-radius: ").concat(k,"px;\n overflow: hidden;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n }\n\n .gleap-modal-frame {\n width: 100%;\n border: none;\n display: block;\n outline: none;\n }\n\n body.gleap-modal-open {\n overflow: hidden;\n }\n\n /* Agent Popup styles */\n .gleap-agent-popup-wrapper {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: ").concat(2147483640,";\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n .gleap-agent-popup-backdrop {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n z-index: ").concat(2147483641,";\n }\n\n .gleap-agent-popup {\n position: relative;\n width: 95%;\n max-width: 700px;\n height: 85vh;\n max-height: 800px;\n z-index: ").concat(2147483700,";\n background-color: ").concat(o,";\n border-radius: ").concat(k,"px;\n overflow: hidden;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);\n animation-duration: 0.3s;\n animation-fill-mode: both;\n animation-name: gleapFadeInUp;\n }\n\n .gleap-agent-popup-frame {\n width: 100%;\n height: 100%;\n border: none;\n display: block;\n outline: none;\n }\n\n body.gleap-agent-popup-open {\n overflow: hidden;\n }\n\n @keyframes gleapFadeInUp {\n from {\n opacity: 0;\n transform: translate3d(0, 20px, 0);\n }\n to {\n opacity: 1;\n transform: translate3d(0, 0, 0);\n }\n }\n\n .gleap-admin-frame-container,\n .gleap-frame-container,\n .bb-feedback-button,\n .gleap-notification-container,\n .gleap-tooltip,\n .gleap-ai-ui-widget {\n pointer-events: auto !important;\n }\n "),O=document.querySelector(".gleap-styles");O&&O.remove();var T=document.createElement("style");T.innerHTML=E,T.className="gleap-styles",document.body.appendChild(T)}(e,t,n,o,r,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",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{screenshot:!0,replays:!0,attachments:!0};return e.sendSilentCrashReportWithFormData({description:t},n,r)}},{key:"sendSilentCrashReportWithFormData",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MEDIUM",r=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 o=r?S(r):{},i=Wt.getInstance();if(i.ready){var a=e||{};i.session.email&&(a.reportedBy=i.session.email),new _n("CRASH",n,a,!0,o).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]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=n.autostartDrawing,i=n.hideBackButton,a=n.format;if(Wt.getInstance().ready){e.getInstance().setGlobalDataItem("snapshotPosition",{x:window.scrollX,y:window.scrollY});var s="start-feedbackflow";r&&(s="start-survey"),er.getInstance().setAppMode(r?a:"widget"),er.getInstance().sendMessage({name:s,data:{flow:t,hideBackButton:i,format:a}},!0),o?er.getInstance().showDrawingScreen("screenshot"):er.getInstance().showWidget()}}},{key:"openConversations",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-conversations",data:{hideBackButton:!e}},!0),er.getInstance().showWidget()}},{key:"openConversation",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-conversation",data:{shareToken:e,hideBackButton:!t}},!0),er.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];er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"start-bot",data:{botId:e||"",hideBackButton:!t}},!0),er.getInstance().showWidget()}},{key:"askAI",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"ask-ai",data:{question:e,hideBackButton:!t}},!0),er.getInstance().showWidget()}},{key:"sendAgentMessage",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||!t)return Promise.reject(new Error("agentId and message are required."));var r={messages:[{role:"user",content:t.trim()}]};return n.conversationId&&(r.conversationId=n.conversationId),n.additionalContext&&(r.additionalContext=n.additionalContext),new Promise((function(t,o){var i="",a=n.conversationId||null,s=null;re.getInstance().streamAgent(e,r,{onMeta:function(e){e.conversationId&&(a=e.conversationId),e.runId&&(s=e.runId)},onToken:function(e){i+=e.content||"",n.onToken&&n.onToken(e)},onDone:function(e){t({runId:s||(null==e?void 0:e.runId),status:(null==e?void 0:e.status)||"completed",response:i||(null==e?void 0:e.response)||"",conversationId:a})},onError:function(e){o(e)},onToolStart:function(){},onToolEnd:function(){}})}))}},{key:"clearAgentConversation",value:function(){re.getInstance().clearCache()}},{key:"createAgentChat",value:function(e){return new sv(e)}},{key:"openHelpCenterCollection",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-help-collection",data:{collectionId:e,hideBackButton:!t}},!0),er.getInstance().showWidget())}},{key:"openHelpCenterArticle",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-help-article",data:{articleId:e,hideBackButton:!t}},!0),er.getInstance().showWidget())}},{key:"openHelpCenter",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-helpcenter",data:{hideBackButton:!e}},!0),er.getInstance().showWidget()}},{key:"searchHelpCenter",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-helpcenter-search",data:{term:e,hideBackButton:!t}},!0),er.getInstance().showWidget())}},{key:"openNewsArticle",value:function(e){e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-news-article",data:{id:e}},!0),er.getInstance().showWidget())}},{key:"openChecklists",value:function(){er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-checklists",data:{}},!0),er.getInstance().showWidget()}},{key:"startChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return!!e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"start-checklist",data:dv({outboundId:e,hideBackButton:!t},n?{sharedKey:n}:{})},!0),er.getInstance().showWidget(),!0)}},{key:"openChecklist",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&(er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-checklist",data:{id:e,hideBackButton:!t}},!0),er.getInstance().showWidget())}},{key:"getChecklistData",value:function(e,t){if(!e)return Promise.reject(new Error("outboundId is required"));var n=D.getInstance();return n.validateChecklist(e,t).then((function(e){return n.fetchChecklist(e)}))}},{key:"openNews",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-news",data:{hideBackButton:!e}},!0),er.getInstance().showWidget()}},{key:"openFeatureRequests",value:function(){er.getInstance().setAppMode("widget"),er.getInstance().sendMessage({name:"open-feature-requests",data:{}},!0),er.getInstance().showWidget()}},{key:"startProductTour",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this;Wt.getInstance().startProductTourConfig(e).then((function(r){var o;!t||null==r||!r.startURL||null!==(o=window)&&void 0!==o&&null!==(o=o.location)&&void 0!==o&&null!==(o=o.href)&&void 0!==o&&o.includes(null==r?void 0:r.baseURL)?n.startProductTourWithConfig(e,r,!0):window.location.href="".concat(r.startURL,"?gleap_tour=").concat(e,"&gleap_tour_delay=1")})).catch((function(e){}))}},{key:"checkForUncompletedTour",value:function(){var e=Om.getInstance().loadUncompletedTour();e&&Om.getInstance().startWithConfig(e.tourId,e.tourData,500)}},{key:"startProductTourWithConfig",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Om.getInstance().startWithConfig(e,t,0,n)}},{key:"showBanner",value:function(e){try{Zf.getInstance().showBanner(e)}catch(t){}}},{key:"showModal",value:function(e){try{og.getInstance().showModal(e)}catch(t){}}},{key:"startAgent",value:function(e,t){try{Wf.getInstance().showWithAgent(e,t)}catch(n){}}},{key:"setAIAgent",value:function(e,t){try{Wf.getInstance().setAgent(e,t)}catch(n){}}},{key:"showNotification",value:function(e){_f.getInstance().showNotification(e)}}],n&&cv(t.prototype,n),r&&cv(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();if(pv(fv,"invoked",!0),pv(fv,"silentCrashReportSent",!1),pv(fv,"instance",void 0),"undefined"!=typeof window){var gv=window.GleapActions;if(gv&&gv.length>0)for(var mv=0;mv<gv.length;mv++){var vv=gv[mv];vv&&vv.e&&fv[vv.e]&&fv[vv.e].apply(fv,vv.a)}}var yv=function(e){try{var t=e.split("/"),n=t[2];if("article"===n){var r=t[3];fv.openHelpCenterArticle(r,!0)}if("collection"===n){var o=t[3];fv.openHelpCenterCollection(o,!0)}if("flow"===n){var i=t[3];fv.startFeedbackFlow(i,!0)}if("survey"===n){var a=t[3];fv.showSurvey(a)}if("bot"===n){var s=t[3];fv.startBot(s,!0)}if("news"===n){var l=t[3];fv.openNewsArticle(l,!0)}if("checklist"===n){var c=t[3];fv.startChecklist(c,!0,t[4])}if("tour"===n){var u=t[3];fv.startProductTour(u)}}catch(d){console.error("Failed to handle Gleap link: ",e)}};const bv=fv,wv=bv;var kv=t.A;export{kv as default};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|