@v-tilt/browser 1.12.0 → 1.13.1
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/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.chat.js +2 -0
- package/dist/array.chat.js.map +1 -0
- package/dist/array.chat.no-external.js +2 -0
- package/dist/array.chat.no-external.js.map +1 -0
- package/dist/array.full.chat.js +2 -0
- package/dist/array.full.chat.js.map +1 -0
- package/dist/array.full.chat.no-external.js +2 -0
- package/dist/array.full.chat.no-external.js.map +1 -0
- package/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +2 -0
- package/dist/array.full.no-external.js.map +1 -0
- package/dist/array.js +1 -1
- package/dist/array.js.map +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/array.no-external.js.map +1 -1
- package/dist/chat.js +1 -1
- package/dist/chat.js.map +1 -1
- package/dist/entrypoints/all-external-dependencies.d.ts +10 -3
- package/dist/entrypoints/array.chat.d.ts +10 -0
- package/dist/entrypoints/array.chat.no-external.d.ts +6 -0
- package/dist/entrypoints/array.full.chat.d.ts +13 -0
- package/dist/entrypoints/array.full.chat.no-external.d.ts +7 -0
- package/dist/entrypoints/array.full.d.ts +5 -9
- package/dist/entrypoints/array.full.no-external.d.ts +12 -0
- package/dist/entrypoints/module.chat.es.d.ts +7 -0
- package/dist/entrypoints/module.full.chat.es.d.ts +12 -0
- package/dist/entrypoints/module.full.es.d.ts +12 -0
- package/dist/entrypoints/module.no-external.es.d.ts +1 -0
- package/dist/extensions/chat/bubble-drag.d.ts +20 -5
- package/dist/extensions/chat/chat-wrapper.d.ts +8 -2
- package/dist/extensions/chat/chat.d.ts +21 -221
- package/dist/extensions/chat/controller/__tests__/fakes/ably-realtime-fake.d.ts +84 -0
- package/dist/extensions/chat/controller/ably-client.d.ts +160 -0
- package/dist/extensions/chat/controller/ably-handlers.d.ts +95 -0
- package/dist/extensions/chat/controller/ably-token.d.ts +67 -0
- package/dist/extensions/chat/controller/chat-controller.d.ts +194 -0
- package/dist/extensions/chat/controller/message-delivery-status.d.ts +6 -0
- package/dist/extensions/chat/controller/message-order.d.ts +12 -0
- package/dist/extensions/chat/controller/message-stream.d.ts +49 -0
- package/dist/extensions/chat/lib/bubble-offset.d.ts +18 -0
- package/dist/extensions/chat/lib/merge-chat-config.d.ts +3 -0
- package/dist/extensions/chat/normalize-send-content.d.ts +2 -0
- package/dist/extensions/chat/outbox/message-delivery.d.ts +17 -0
- package/dist/extensions/chat/outbox/message-outbox.d.ts +57 -0
- package/dist/extensions/chat/store/chat-store.d.ts +122 -0
- package/dist/extensions/chat/types.d.ts +1 -19
- package/dist/extensions/chat/ui/ChannelItem.d.ts +12 -0
- package/dist/extensions/chat/ui/ChannelListView.d.ts +14 -0
- package/dist/extensions/chat/ui/ChatBubble.d.ts +14 -0
- package/dist/extensions/chat/ui/ChatHeader.d.ts +13 -0
- package/dist/extensions/chat/ui/ChatPanel.d.ts +14 -0
- package/dist/extensions/chat/ui/ChatRoot.d.ts +31 -0
- package/dist/extensions/chat/ui/ClosedBanner.d.ts +7 -0
- package/dist/extensions/chat/ui/ConnectionBanner.d.ts +32 -0
- package/dist/extensions/chat/ui/ConversationView.d.ts +14 -0
- package/dist/extensions/chat/ui/MessageBubble.d.ts +25 -0
- package/dist/extensions/chat/ui/MessageInput.d.ts +14 -0
- package/dist/extensions/chat/ui/MessageList.d.ts +19 -0
- package/dist/extensions/chat/ui/NewMessagesPill.d.ts +13 -0
- package/dist/extensions/chat/ui/Skeletons.d.ts +14 -0
- package/dist/extensions/chat/ui/TypingBubble.d.ts +23 -0
- package/dist/extensions/chat/ui/TypingIndicator.d.ts +12 -0
- package/dist/extensions/chat/ui/WidgetSlot.d.ts +20 -0
- package/dist/extensions/chat/ui/hooks/use-auto-mark-read.d.ts +18 -0
- package/dist/extensions/chat/ui/hooks/use-scroll-preservation.d.ts +33 -0
- package/dist/extensions/chat/ui/icons.d.ts +18 -0
- package/dist/extensions/chat/ui/message-render.d.ts +18 -0
- package/dist/extensions/chat/ui/shadow-styles.d.ts +13 -0
- package/dist/extensions/chat/ui/utils/mobile-body-scroll-lock.d.ts +14 -0
- package/dist/extensions/chat/widget-registry.d.ts +21 -5
- package/dist/extensions/chat/widgets/collect-email.d.ts +4 -2
- package/dist/extensions/chat/widgets/escalate-to-human.d.ts +2 -1
- package/dist/external-scripts-loader.js +1 -1
- package/dist/external-scripts-loader.js.map +1 -1
- package/dist/feature.d.ts +1 -0
- package/dist/lib/merge-vtilt-config.d.ts +9 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.chat.d.ts +1788 -0
- package/dist/module.chat.js +2 -0
- package/dist/module.chat.js.map +1 -0
- package/dist/module.d.ts +48 -3
- package/dist/module.full.chat.d.ts +1792 -0
- package/dist/module.full.chat.js +2 -0
- package/dist/module.full.chat.js.map +1 -0
- package/dist/module.full.d.ts +1793 -0
- package/dist/module.full.js +2 -0
- package/dist/module.full.js.map +1 -0
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/dist/module.no-external.d.ts +48 -3
- package/dist/module.no-external.js +1 -1
- package/dist/module.no-external.js.map +1 -1
- package/dist/recorder.js.map +1 -1
- package/dist/snippet-stub-methods.d.ts +14 -0
- package/dist/utils/globals.d.ts +53 -27
- package/dist/utils/index.d.ts +8 -0
- package/dist/vtilt.d.ts +6 -1
- package/dist/web-vitals.js.map +1 -1
- package/package.json +4 -1
- package/dist/extensions/chat/chat-styles.d.ts +0 -27
- package/dist/extensions/chat/message-content-styles.d.ts +0 -1
- package/dist/extensions/chat/message-html.d.ts +0 -6
- package/dist/extensions/chat/message-markdown.d.ts +0 -8
- package/dist/extensions/ga4-proxy.d.ts +0 -59
- package/dist/utils/type-utils.d.ts +0 -4
- package/dist/web-vitals.d.ts +0 -81
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(){"use strict";function e(e,t,r,i,n,s,o){try{var a=e[s](o),l=a.value}catch(e){return void r(e)}a.done?t(l):Promise.resolve(l).then(i,n)}function t(t){return function(){var r=this,i=arguments;return new Promise(function(n,s){var o=t.apply(r,i);function a(t){e(o,n,s,a,l,"next",t)}function l(t){e(o,n,s,a,l,"throw",t)}a(void 0)})}}function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},r.apply(null,arguments)}function i(e,t){if(null==e)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;r[i]=e[i]}return r}var n,s=["inputs"],o=["inputId"],a=["inputs"],l=["inputId"],u=["type"],h=Object.defineProperty,d=(e,t,r)=>((e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),c=Object.defineProperty,p=(e,t,r)=>((e,t,r)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),f=(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))(f||{}),v={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},g={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},m={};function y(e){if(m[e])return m[e];var t=globalThis[e],r=t.prototype,i=e in v?v[e]:void 0,n=Boolean(i&&i.every(e=>{var t,i;return Boolean(null==(i=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:i.toString().includes("[native code]"))})),s=e in g?g[e]:void 0,o=Boolean(s&&s.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return m[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var l=a.contentWindow;if(!l)return t.prototype;var u=l[e].prototype;return document.body.removeChild(a),u?m[e]=u:r}catch(e){return r}}var _={};function b(e,t,r){var i,n=e+"."+String(r);if(_[n])return _[n].call(t);var s=y(e),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(_[n]=o,o.call(t)):t[r]}var w={};function S(e,t,r){var i=e+"."+String(r);if(w[i])return w[i].bind(t);var n=y(e)[r];return"function"!=typeof n?t[r]:(w[i]=n,n.bind(t))}var C={ownerDocument:function(e){return b("Node",e,"ownerDocument")},childNodes:function(e){return b("Node",e,"childNodes")},parentNode:function(e){return b("Node",e,"parentNode")},parentElement:function(e){return b("Node",e,"parentElement")},textContent:function(e){return b("Node",e,"textContent")},contains:function(e,t){return S("Node",e,"contains")(t)},getRootNode:function(e){return S("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?b("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?b("Element",e,"shadowRoot"):null},querySelector:function(e,t){return b("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return b("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return y("MutationObserver").constructor},patch:function(e,t,r){try{if(!(t in e))return()=>{};var i=e[t],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i}}catch(e){return()=>{}}}};function I(e){return e.nodeType===e.ELEMENT_NODE}function k(e){var t=e&&"host"in e&&"mode"in e&&C.host(e)||null;return Boolean(t&&"shadowRoot"in t&&C.shadowRoot(t)===e)}function x(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function M(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);var i=Array.from(t,e=>E(e,r)).join("");return(n=i).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(e){return null}var n}function E(e,t){if(function(e){return"styleSheet"in e}(e)){var r;try{r=M(e.styleSheet)||function(e){var{cssText:t}=e;if(t.split('"').length<3)return t;var r=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer("+e.layerName+")"),e.supportsText&&r.push("supports("+e.supportsText+")"),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(t){r=e.cssText}return e.styleSheet.href?U(r,e.styleSheet.href):r}var i,n=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(i=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,n=n.replace(i,"$1\\$2")),t?U(n,t):n}class A{constructor(){p(this,"idNodeMap",new Map),p(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-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){var 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){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function O(e){var{element:t,maskInputOptions:r,tagName:i,type:n,value:s,maskInputFn:o}=e,a=s||"",l=n&&R(n);return(r[i.toLowerCase()]||l&&r[l])&&(a=o?o(a,t):"*".repeat(a.length)),a}function R(e){return e.toLowerCase()}var T="__rrweb_original__";function L(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?R(t):null}function P(e,t){var r,i;try{i=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}var N=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,D=/^(?:[a-z+]+:)?\/\//i,F=/^www\..*/i,B=/^(data:)([^,]*),(.*)/i;function U(e,t){return(e||"").replace(N,(e,r,i,n,s,o)=>{var a,l=i||s||o,u=r||n||"";if(!l)return e;if(D.test(l)||F.test(l))return"url("+u+l+u+")";if(B.test(l))return"url("+u+l+u+")";if("/"===l[0])return"url("+u+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+l)+u+")";var h=t.split("/"),d=l.split("/");for(var c of(h.pop(),d))"."!==c&&(".."===c?h.pop():h.push(c));return"url("+u+h.join("/")+u+")"})}function j(e,t){return void 0===t&&(t=!1),t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function z(e,t){return function(e,t,r){void 0===r&&(r=!1);var i=Array.from(t.childNodes),n=[],s=0;if(i.length>1&&e&&"string"==typeof e)for(var o=j(e,r),a=o.length/e.length,l=1;l<i.length;l++)if(i[l].textContent&&"string"==typeof i[l].textContent){for(var u=j(i[l].textContent,r),h=3;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||-1!==u.indexOf(u.substring(0,h),1));h++);for(;h<u.length;h++){var d=u.substring(0,h),c=o.split(d),p=-1;if(2===c.length)p=c[0].length;else if(c.length>2&&""===c[0]&&""!==i[l-1].textContent)p=o.indexOf(d,1);else if(1===c.length){if(d=d.substring(0,d.length-1),(c=o.split(d)).length<=1)return n.push(e),n;h=101}else h===u.length-1&&(p=o.indexOf(d));if(c.length>=2&&h>100){var f=i[l-1].textContent;if(f&&"string"==typeof f){var v=j(f).length;p=o.indexOf(d,v)}-1===p&&(p=c[0].length)}if(-1!==p){for(var g=Math.floor(p/a);g>0&&g<e.length;){if((s+=1)>50*i.length)return n.push(e),n;var m=j(e.substring(0,g),r);if(m.length===p){n.push(e.substring(0,g)),e=e.substring(g),o=o.substring(p);break}m.length<p?g+=Math.max(1,Math.floor((p-m.length)/a)):g-=Math.max(1,Math.floor((m.length-p)*a))}break}}}return n.push(e),n}(e,t).join("/* rr_split */")}var W,$,V=1,H=new RegExp("[^a-z0-9-_:]");function G(){return V++}var q=/^[^ \t\n\r\u000c]+/,Z=/^[, \t\n\r\u000c]+/;var Y=new WeakMap;function J(e,t){return t&&""!==t.trim()?X(e,t):t}function K(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function X(e,t){var r=Y.get(e);if(r||(r=e.createElement("a"),Y.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function Q(e,t,r,i){return i?"src"===r||"href"===r&&("use"!==t||"#"!==i[0])||"xlink:href"===r&&"#"!==i[0]||"background"===r&&["table","td","th"].includes(t)?J(e,i):"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function i(e){var i,n=e.exec(t.substring(r));return n?(i=n[0],r+=i.length,i):""}for(var n=[];i(Z),!(r>=t.length);){var s=i(q);if(","===s.slice(-1))s=J(e,s.substring(0,s.length-1)),n.push(s);else{var o="";s=J(e,s);for(var a=!1;;){var l=t.charAt(r);if(""===l){n.push((s+o).trim());break}if(a)")"===l&&(a=!1);else{if(","===l){r+=1,n.push((s+o).trim());break}"("===l&&(a=!0)}o+=l,r+=1}}}return n.join(", ")}(e,i):"style"===r?U(i,X(e)):"object"===t&&"data"===r?J(e,i):i:i}function ee(e,t,r){return["video","audio"].includes(e)&&"autoplay"===t}function te(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&te(C.parentNode(e),t,r);for(var i=e.classList.length;i--;){var n=e.classList[i];if(t.test(n))return!0}return!!r&&te(C.parentNode(e),t,r)}function re(e,t,r,i){var n;if(I(e)){if(n=e,!C.childNodes(n).length)return!1}else{if(null===C.parentElement(e))return!1;n=C.parentElement(e)}try{if("string"==typeof t){if(i){if(n.closest("."+t))return!0}else if(n.classList.contains(t))return!0}else if(te(n,t,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function ie(e,t){var{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:h,dataURLOptions:d={},inlineImages:c,recordCanvas:p,keepIframeSrcFn:v,newlyAddedElement:g=!1,cssCaptured:m=!1}=t,y=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:f.Document,childNodes:[],compatMode:e.compatMode}:{type:f.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:f.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){for(var r,{doc:i,blockClass:n,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:l,dataURLOptions:u={},inlineImages:h,recordCanvas:d,keepIframeSrcFn:c,newlyAddedElement:p=!1,rootId:v}=t,g=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var i=e.classList.length;i--;){var n=e.classList[i];if(t.test(n))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,n,s),m=function(e){if(e instanceof HTMLFormElement)return"form";var t=R(e.tagName);return H.test(t)?"div":t}(e),y={},_=e.attributes.length,b=0;b<_;b++){var w=e.attributes[b];ee(m,w.name,w.value)||(y[w.name]=Q(i,m,R(w.name),w.value))}if("link"===m&&o){var S=Array.from(i.styleSheets).find(t=>t.href===e.href),C=null;S&&(C=M(S)),C&&(delete y.rel,delete y.href,y._cssText=C)}if("style"===m&&e.sheet){var I=M(e.sheet);I&&(e.childNodes.length>1&&(I=z(I,e)),y._cssText=I)}if(["input","textarea","select"].includes(m)){var k=e.value,x=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&k?y.value=O({element:e,type:L(e),tagName:m,value:k,maskInputOptions:a,maskInputFn:l}):x&&(y.checked=x)}"option"===m&&(e.selected&&!a.select?y.selected=!0:delete y.selected);"dialog"===m&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===m&&d)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var i=0;i<e.height;i+=50){var n=t.getImageData,s=T in n?n[T]:n;if(new Uint32Array(s.call(t,r,i,Math.min(50,e.width-r),Math.min(50,e.height-i)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(y.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){var E=e.toDataURL(u.type,u.quality),A=i.createElement("canvas");A.width=e.width,A.height=e.height,E!==A.toDataURL(u.type,u.quality)&&(y.rr_dataURL=E)}if("img"===m&&h){W||(W=i.createElement("canvas"),$=W.getContext("2d"));var P=e,N=P.currentSrc||P.getAttribute("src")||"<unknown-src>",D=P.crossOrigin,F=()=>{P.removeEventListener("load",F);try{W.width=P.naturalWidth,W.height=P.naturalHeight,$.drawImage(P,0,0),y.rr_dataURL=W.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==P.crossOrigin)return P.crossOrigin="anonymous",void(P.complete&&0!==P.naturalWidth?F():P.addEventListener("load",F));console.warn("Cannot inline img src="+N+"! Error: "+e)}"anonymous"===P.crossOrigin&&(D?y.crossOrigin=D:P.removeAttribute("crossorigin"))};P.complete&&0!==P.naturalWidth?F():P.addEventListener("load",F)}if(["audio","video"].includes(m)){var B=y;B.rr_mediaState=e.paused?"paused":"played",B.rr_mediaCurrentTime=e.currentTime,B.rr_mediaPlaybackRate=e.playbackRate,B.rr_mediaMuted=e.muted,B.rr_mediaLoop=e.loop,B.rr_mediaVolume=e.volume}p||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(g){var{width:U,height:j}=e.getBoundingClientRect();y={class:y.class,rr_width:U+"px",rr_height:j+"px"}}"iframe"!==m||c(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);try{customElements.get(m)&&(r=!0)}catch(e){}return{type:f.Element,tagName:m,attributes:y,childNodes:[],isSVG:K(e)||void 0,needBlock:g,rootId:v,isCustom:r}}(e,{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:d,inlineImages:c,recordCanvas:p,keepIframeSrcFn:v,newlyAddedElement:g,rootId:y});case e.TEXT_NODE:return function(e,t){var{needsMask:r,maskTextFn:i,rootId:n,cssCaptured:s}=t,o=C.parentNode(e),a=o&&o.tagName,l="",u="STYLE"===a||void 0,h="SCRIPT"===a||void 0;h?l="SCRIPT_PLACEHOLDER":s||(l=C.textContent(e),u&&l&&(l=U(l,X(t.doc))));!u&&!h&&l&&r&&(l=i?i(l,C.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:f.Text,textContent:l||"",rootId:n}}(e,{doc:r,needsMask:o,maskTextFn:u,rootId:y,cssCaptured:m});case e.CDATA_SECTION_NODE:return{type:f.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:f.Comment,textContent:C.textContent(e)||"",rootId:y};default:return!1}}function ne(e){return null==e?"":e.toLowerCase()}function se(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 oe(e,t){var{doc:r,mirror:i,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:c,slimDOMOptions:p,dataURLOptions:v={},inlineImages:g=!1,recordCanvas:m=!1,onSerialize:y,onIframeLoad:_,iframeLoadTimeout:b=5e3,onStylesheetLoad:w,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:E=!1,cssCaptured:A=!1}=t,{needsMask:O}=t,{preserveWhiteSpace:R=!0}=t;O||(O=re(e,o,a,void 0===O));var T,L=ie(e,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:O,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:c,dataURLOptions:v,inlineImages:g,recordCanvas:m,keepIframeSrcFn:M,newlyAddedElement:E,cssCaptured:A});if(!L)return console.warn(e,"not serialized"),null;T=i.hasNode(e)?i.getId(e):function(e,t){if(t.comment&&e.type===f.Comment)return!0;if(e.type===f.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"===P(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(ne(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ne(e.attributes.name)||"icon"===ne(e.attributes.rel)||"apple-touch-icon"===ne(e.attributes.rel)||"shortcut icon"===ne(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&ne(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ne(e.attributes.property).match(/^(og|twitter|fb):/)||ne(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===ne(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===ne(e.attributes.name)||"googlebot"===ne(e.attributes.name)||"bingbot"===ne(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===ne(e.attributes.name)||"generator"===ne(e.attributes.name)||"framework"===ne(e.attributes.name)||"publisher"===ne(e.attributes.name)||"progid"===ne(e.attributes.name)||ne(e.attributes.property).match(/^article:/)||ne(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===ne(e.attributes.name)||"yandex-verification"===ne(e.attributes.name)||"csrf-token"===ne(e.attributes.name)||"p:domain_verify"===ne(e.attributes.name)||"verify-v1"===ne(e.attributes.name)||"verification"===ne(e.attributes.name)||"shopify-checkout-api-token"===ne(e.attributes.name)))return!0}}return!1}(L,p)||!R&&L.type===f.Text&&!L.textContent.replace(/^\s+|\s+$/gm,"").length?-2:G();var N=Object.assign(L,{id:T});if(i.add(e,N),-2===T)return null;y&&y(e);var D=!l;if(N.type===f.Element){D=D&&!N.needBlock,delete N.needBlock;var F=C.shadowRoot(e);F&&x(F)&&(N.isShadowHost=!0)}if((N.type===f.Document||N.type===f.Element)&&D){p.headWhitespace&&N.type===f.Element&&"head"===N.tagName&&(R=!1);var B={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:p,dataURLOptions:v,inlineImages:g,recordCanvas:m,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:_,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:M,cssCaptured:!1};if(N.type===f.Element&&"textarea"===N.tagName&&void 0!==N.attributes.value);else for(var U of(N.type===f.Element&&void 0!==N.attributes._cssText&&"string"==typeof N.attributes._cssText&&(B.cssCaptured=!0),Array.from(C.childNodes(e)))){var j=oe(U,B);j&&N.childNodes.push(j)}var z=null;if(I(e)&&(z=C.shadowRoot(e)))for(var W of Array.from(C.childNodes(z))){var $=oe(W,B);$&&(x(z)&&($.isShadow=!0),N.childNodes.push($))}}var V=C.parentNode(e);return V&&k(V)&&x(V)&&(N.isShadow=!0),N.type===f.Element&&"iframe"===N.tagName&&function(e,t,r){var i=e.contentWindow;if(i){var n,s=!1;try{n=i.document.readyState}catch(e){return}if("complete"===n){var o="about:blank";if(i.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()})}}}(e,()=>{var t=e.contentDocument;if(t&&_){var r=oe(t,{doc:t,mirror:i,blockClass:n,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:p,dataURLOptions:v,inlineImages:g,recordCanvas:m,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:_,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:M});r&&_(e,r)}},b),N.type===f.Element&&"link"===N.tagName&&"string"==typeof N.attributes.rel&&("stylesheet"===N.attributes.rel||"preload"===N.attributes.rel&&"string"==typeof N.attributes.href&&"css"===P(N.attributes.href))&&function(e,t,r){var i,n=!1;try{i=e.sheet}catch(e){return}if(!i){var s=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(s),n=!0,t()})}}(e,()=>{if(w){var t=oe(e,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:O,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:p,dataURLOptions:v,inlineImages:g,recordCanvas:m,preserveWhiteSpace:R,onSerialize:y,onIframeLoad:_,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:M});t&&w(e,t)}},S),N}function ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function le(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}),r}var ue={exports:{}},he=String,de=function(){return{isColorSupported:!1,reset:he,bold:he,dim:he,italic:he,underline:he,inverse:he,hidden:he,strikethrough:he,black:he,red:he,green:he,yellow:he,blue:he,magenta:he,cyan:he,white:he,gray:he,bgBlack:he,bgRed:he,bgGreen:he,bgYellow:he,bgBlue:he,bgMagenta:he,bgCyan:he,bgWhite:he}};ue.exports=de(),ue.exports.createColors=de;var ce=ue.exports,pe=le(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),fe=ce,ve=pe,ge=class e extends Error{constructor(t,r,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==i&&("number"==typeof r?(this.line=r,this.column=i):(this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.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"";var t=this.source;null==e&&(e=fe.isColorSupported),ve&&e&&(t=ve(t));var r,i,n=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){var{bold:l,gray:u,red:h}=fe.createColors(!0);r=e=>l(h(e)),i=e=>u(e)}else r=i=e=>e;return n.slice(s,o).map((e,t)=>{var n=s+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){var l=i(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+i(o)+e+"\n "+l+r("^")}return" "+i(o)+e}).join("\n")}toString(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}},me=ge;ge.default=ge;var ye={};ye.isClean=Symbol("isClean"),ye.my=Symbol("my");var _e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var be=class{constructor(e){this.builder=e}atrule(e,t){var r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{var n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){var r;r="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");for(var i=e.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(e,null,"indent");if(s.length)for(var o=0;o<n;o++)r+=s}return r}block(e,t){var r,i=this.raw(e,"between","beforeOpen");this.builder(t+i+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var r=this.raw(e,"semicolon"),i=0;i<e.nodes.length;i++){var n=e.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,t!==i||r)}}comment(e){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){var r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){var i;if(r||(r=t),t&&void 0!==(i=e.raws[t]))return i;var n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return _e[r];var s=e.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);var o,a="raw"+((o=r)[0].toUpperCase()+o.slice(1));return this[a]?i=this[a](s,e):s.walk(e=>{if(void 0!==(i=e.raws[t]))return!1}),void 0===i&&(i=_e[r]),s.rawCache[r]=i,i}rawBeforeClose(e){var t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){var r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){var r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){var t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){var t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){var t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){var t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){return e.raws.indent?e.raws.indent:(e.walk(r=>{var i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return t=(t=n[n.length-1]).replace(/\S/g,""),!1}}),t);var t}rawSemicolon(e){var t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){var r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}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)}},we=be;be.default=be;var Se=we;function Ce(e,t){new Se(t).stringify(e)}var Ie=Ce;Ce.default=Ce;var{isClean:ke,my:xe}=ye,Me=me,Ee=we,Ae=Ie;function Oe(e,t){var r=new e.constructor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&"proxyCache"!==i){var n=e[i],s=typeof n;"parent"===i&&"object"===s?t&&(r[i]=t):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map(e=>Oe(e,r)):("object"===s&&null!==n&&(n=Oe(n)),r[i]=n)}return r}var Re=class{constructor(e){for(var t in void 0===e&&(e={}),this.raws={},this[ke]=!1,this[xe]=!0,e)if("nodes"===t)for(var r of(this.nodes=[],e[t]))"function"==typeof r.clone?this.append(r.clone()):this.append(r);else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var 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(var t in void 0===e&&(e={}),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){void 0===e&&(e={});var t=Oe(this);for(var r in e)t[r]=e[r];return t}cloneAfter(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t){if(void 0===t&&(t={}),this.source){var{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Me(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[ke]){this[ke]=!1;for(var e=this;e=e.parent;)e[ke]=!1}}next(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}}positionBy(e,t){var r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){var i=(t=this.toString()).indexOf(e.word);-1!==i&&(r=this.positionInside(i,t))}return r}positionInside(e,t){for(var r=t||this.toString(),i=this.source.start.column,n=this.source.start.line,s=0;s<e;s++)"\n"===r[s]?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}}rangeBy(e){var t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var i=this.toString(),n=i.indexOf(e.word);-1!==n&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new Ee).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var e=this,t=!1,r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];for(var s of i)s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s);t||this.remove()}return this}root(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){var r={},i=null==t;t=t||new Map;var n=0;for(var s in this)if(Object.prototype.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,t);else if("source"===s){var a=t.get(o.input);null==a&&(a=n,t.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e){void 0===e&&(e=Ae),e.stringify&&(e=e.stringify);var t="";return e(this,e=>{t+=e}),t}warn(e,t,r){var i={node:this};for(var n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}},Te=Re;Re.default=Re;var Le=Te,Pe=class extends Le{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e=r({},e,{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},Ne=Pe;Pe.default=Pe;var De={nanoid:function(e){void 0===e&&(e=21);for(var t="",r=e;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}},{SourceMapConsumer:Fe,SourceMapGenerator:Be}=pe,{existsSync:Ue,readFileSync:je}=pe,{dirname:ze,join:We}=pe;var $e=class{constructor(e,t){if(!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ze(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new Fe(this.text)),this.consumerCache}decodeInline(e){var t;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 r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}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){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}}loadFile(e){if(this.root=ze(e),Ue(e))return this.mapFile=e,je(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 Fe)return Be.fromSourceMap(t).toString();if(t instanceof Be)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var r=t(e);if(r){var i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;return e&&(n=We(ze(e),n)),this.loadFile(n)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Ve=$e;$e.default=$e;var{SourceMapConsumer:He,SourceMapGenerator:Ge}=pe,{fileURLToPath:qe,pathToFileURL:Ze}=pe,{isAbsolute:Ye,resolve:Je}=pe,{nanoid:Ke}=De,Xe=pe,Qe=me,et=Ve,tt=Symbol("fromOffsetCache"),rt=Boolean(He&&Ge),it=Boolean(Je&&Ye),nt=class{constructor(e,t){if(void 0===t&&(t={}),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&&(!it||/^\w+:\/\//.test(t.from)||Ye(t.from)?this.file=t.from:this.file=Je(t.from)),it&&rt){var r=new et(this.css,t);if(r.text){this.map=r;var i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Ke(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i){var n,s,o;if(void 0===i&&(i={}),t&&"object"==typeof t){var a=t,l=r;if("number"==typeof a.offset){var u=this.fromOffset(a.offset);t=u.line,r=u.col}else t=a.line,r=a.column;if("number"==typeof l.offset){var h=this.fromOffset(l.offset);s=h.line,o=h.col}else s=l.line,o=l.column}else if(!r){var d=this.fromOffset(t);t=d.line,r=d.col}var c=this.origin(t,r,s,o);return(n=c?new Qe(e,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,i.plugin):new Qe(e,void 0===s?t:{column:r,line:t},void 0===s?r:{column:o,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:o,endLine:s,line:t,source:this.css},this.file&&(Ze&&(n.input.url=Ze(this.file).toString()),n.input.file=this.file),n}fromOffset(e){var t;if(this[tt])t=this[tt];else{var r=this.css.split("\n");t=new Array(r.length);for(var i=0,n=0,s=r.length;n<s;n++)t[n]=i,i+=r[n].length+1;this[tt]=t}var o=0;if(e>=t[t.length-1])o=t.length-1;else for(var a,l=t.length-2;o<l;)if(e<t[a=o+(l-o>>1)])l=a-1;else{if(!(e>=t[a+1])){o=a;break}o=a+1}return{col:e-t[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Je(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;var n,s,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=o.originalPositionFor({column:i,line:r})),s=Ye(a.source)?Ze(a.source):new URL(a.source,this.map.consumer().sourceRoot||Ze(this.map.mapFile));var l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:s.toString()};if("file:"===s.protocol){if(!qe)throw new Error("file: protocol is not available in this PostCSS build");l.file=qe(s)}var u=o.sourceContentFor(a.source);return u&&(l.source=u),l}toJSON(){var e={};for(var t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map=r({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},st=nt;nt.default=nt,Xe&&Xe.registerInput&&Xe.registerInput(nt);var{SourceMapConsumer:ot,SourceMapGenerator:at}=pe,{dirname:lt,relative:ut,resolve:ht,sep:dt}=pe,{pathToFileURL:ct}=pe,pt=st,ft=Boolean(ot&&at),vt=Boolean(lt&&ht&&ut&&dt),gt=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var 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";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(var e of this.previous()){var t=this.toUrl(this.path(e.file)),r=e.root||lt(e.file),i=void 0;!1===this.mapOpts.sourcesContent?(i=new ot(e.text)).sourcesContent&&(i.sourcesContent=null):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).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(),vt&&ft&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,t=>{e+=t}),[e]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=at.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new at({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 at({file:this.outputFile(),ignoreInvalidMapping:!0});var e,t,r=1,i=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(s.generated.line=r,s.generated.column=i-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(e=o.match(/\n/g))?(r+=e.length,t=o.lastIndexOf("\n"),i=o.length-t):i+=o.length,a&&"start"!==l){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=r,s.generated.column=i-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=i-1,this.map.addMapping(s)))}})}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;var 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;var t=this.memoizedPaths.get(e);if(t)return t;var r=this.opts.to?lt(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=lt(ht(r,this.mapOpts.annotation)));var i=ut(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){var t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{var e=new pt(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){var e={};if(this.root)this.root.walk(t=>{if(t.source){var r=t.source.input.from;if(r&&!e[r]){e[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){var t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,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){var t=this.memoizedFileURLs.get(e);if(t)return t;if(ct){var r=ct(e).toString();return this.memoizedFileURLs.set(e,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===dt&&(e=e.replace(/\\/g,"/"));var r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},mt=Te,yt=class extends mt{constructor(e){super(e),this.type="comment"}},_t=yt;yt.default=yt;var bt,wt,St,Ct,{isClean:It,my:kt}=ye,xt=Ne,Mt=_t,Et=Te;function At(e){return e.map(e=>(e.nodes&&(e.nodes=At(e.nodes)),delete e.source,e))}function Ot(e){if(e[It]=!1,e.proxyOf.nodes)for(var t of e.proxyOf.nodes)Ot(t)}var Rt=class e extends Et{append(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var i of t){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(var t of this.nodes)t.cleanRaws(e)}each(e){if(this.proxyOf.nodes){for(var t,r,i=this.getIterator();this.indexes[i]<this.proxyOf.nodes.length&&(t=this.indexes[i],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var 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")?function(){for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return e[t](...i.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))}:"every"===t||"some"===t?r=>e[t](function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return r(e.toProxy(),...i)}):"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,r)=>(e[t]===r||(e[t]=r,"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){var r,i=this.index(e),n=this.normalize(t,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(e),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)i<(r=this.indexes[o])&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(e,t){var r,i=this.index(e),n=0===i&&"prepend",s=this.normalize(t,this.proxyOf.nodes[i],n).reverse();for(var o of(i=this.index(e),s))this.proxyOf.nodes.splice(i,0,o);for(var a in this.indexes)i<=(r=this.indexes[a])&&(this.indexes[a]=r+s.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=At(bt(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(var i of t=t.slice(0))i.parent&&i.parent.removeChild(i,"ignore");else if("root"===t.type&&"document"!==this.type)for(var n of t=t.nodes.slice(0))n.parent&&n.parent.removeChild(n,"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 xt(t)]}else if(t.selector)t=[new wt(t)];else if(t.name)t=[new St(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Mt(t)]}var s=t.map(t=>(t[kt]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[It]&&Ot(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t));return s}prepend(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var i of t=t.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(var e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){var t;for(var r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{var i;try{i=e(t,r)}catch(e){throw t.addToError(e)}return!1!==i&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if("atrule"===r.type&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if("atrule"===r.type&&r.name===e)return t(r,i)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if("decl"===r.type&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if("decl"===r.type&&r.prop===e)return t(r,i)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if("rule"===r.type&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if("rule"===r.type&&r.selector===e)return t(r,i)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}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]}};Rt.registerParse=e=>{bt=e},Rt.registerRule=e=>{wt=e},Rt.registerAtRule=e=>{St=e},Rt.registerRoot=e=>{Ct=e};var Tt=Rt;Rt.default=Rt,Rt.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,St.prototype):"rule"===e.type?Object.setPrototypeOf(e,wt.prototype):"decl"===e.type?Object.setPrototypeOf(e,xt.prototype):"comment"===e.type?Object.setPrototypeOf(e,Mt.prototype):"root"===e.type&&Object.setPrototypeOf(e,Ct.prototype),e[kt]=!0,e.nodes&&e.nodes.forEach(e=>{Rt.rebuild(e)})};var Lt,Pt,Nt=Tt,Dt=class extends Nt{constructor(e){super(r({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e){return void 0===e&&(e={}),new Lt(new Pt,this,e).stringify()}};Dt.registerLazyResult=e=>{Lt=e},Dt.registerProcessor=e=>{Pt=e};var Ft=Dt;Dt.default=Dt;var Bt={},Ut=function(e){Bt[e]||(Bt[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))},jt=class{constructor(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in t)this[i]=t[i]}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}},zt=jt;jt.default=jt;var Wt=zt,$t=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var r=new Wt(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}},Vt=$t;$t.default=$t;var Ht="'".charCodeAt(0),Gt='"'.charCodeAt(0),qt="\\".charCodeAt(0),Zt="/".charCodeAt(0),Yt="\n".charCodeAt(0),Jt=" ".charCodeAt(0),Kt="\f".charCodeAt(0),Xt="\t".charCodeAt(0),Qt="\r".charCodeAt(0),er="[".charCodeAt(0),tr="]".charCodeAt(0),rr="(".charCodeAt(0),ir=")".charCodeAt(0),nr="{".charCodeAt(0),sr="}".charCodeAt(0),or=";".charCodeAt(0),ar="*".charCodeAt(0),lr=":".charCodeAt(0),ur="@".charCodeAt(0),hr=/[\t\n\f\r "#'()/;[\\\]{}]/g,dr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,cr=/.[\r\n"'(/\\]/,pr=/[\da-f]/i,fr=Tt,vr=class extends fr{constructor(e){super(e),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}},gr=vr;vr.default=vr,fr.registerAtRule(vr);var mr,yr,_r=Tt,br=class extends _r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){var i=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(var n of i)n.raws.before=t.raws.before;return i}removeChild(e,t){var r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e){return void 0===e&&(e={}),new mr(new yr,this,e).stringify()}};br.registerLazyResult=e=>{mr=e},br.registerProcessor=e=>{yr=e};var wr=br;br.default=br,_r.registerRoot(br);var Sr={comma:e=>Sr.split(e,[","],!0),space:e=>Sr.split(e,[" ","\n","\t"]),split(e,t,r){var i=[],n="",s=!1,o=0,a=!1,l="",u=!1;for(var h of e)u?u=!1:"\\"===h?u=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=h;return(r||""!==n)&&i.push(n.trim()),i}},Cr=Sr;Sr.default=Sr;var Ir=Tt,kr=Cr,xr=class extends Ir{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return kr.comma(this.selector)}set selectors(e){var t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},Mr=xr;xr.default=xr,Ir.registerRule(xr);var Er=Ne,Ar=function(e,t){void 0===t&&(t={});var r,i,n,s,o,a,l,u,h,d,c=e.css.valueOf(),p=t.ignoreErrors,f=c.length,v=0,g=[],m=[];function y(t){throw e.error("Unclosed "+t,v)}return{back:function(e){m.push(e)},endOfFile:function(){return 0===m.length&&v>=f},nextToken:function(e){if(m.length)return m.pop();if(!(v>=f)){var t=!!e&&e.ignoreUnclosed;switch(r=c.charCodeAt(v)){case Yt:case Jt:case Xt:case Qt:case Kt:i=v;do{i+=1,r=c.charCodeAt(i)}while(r===Jt||r===Yt||r===Xt||r===Qt||r===Kt);d=["space",c.slice(v,i)],v=i-1;break;case er:case tr:case nr:case sr:case lr:case or:case ir:var _=String.fromCharCode(r);d=[_,_,v];break;case rr:if(u=g.length?g.pop()[1]:"",h=c.charCodeAt(v+1),"url"===u&&h!==Ht&&h!==Gt&&h!==Jt&&h!==Yt&&h!==Xt&&h!==Kt&&h!==Qt){i=v;do{if(a=!1,-1===(i=c.indexOf(")",i+1))){if(p||t){i=v;break}y("bracket")}for(l=i;c.charCodeAt(l-1)===qt;)l-=1,a=!a}while(a);d=["brackets",c.slice(v,i+1),v,i],v=i}else i=c.indexOf(")",v+1),s=c.slice(v,i+1),-1===i||cr.test(s)?d=["(","(",v]:(d=["brackets",s,v,i],v=i);break;case Ht:case Gt:n=r===Ht?"'":'"',i=v;do{if(a=!1,-1===(i=c.indexOf(n,i+1))){if(p||t){i=v+1;break}y("string")}for(l=i;c.charCodeAt(l-1)===qt;)l-=1,a=!a}while(a);d=["string",c.slice(v,i+1),v,i],v=i;break;case ur:hr.lastIndex=v+1,hr.test(c),i=0===hr.lastIndex?c.length-1:hr.lastIndex-2,d=["at-word",c.slice(v,i+1),v,i],v=i;break;case qt:for(i=v,o=!0;c.charCodeAt(i+1)===qt;)i+=1,o=!o;if(r=c.charCodeAt(i+1),o&&r!==Zt&&r!==Jt&&r!==Yt&&r!==Xt&&r!==Qt&&r!==Kt&&(i+=1,pr.test(c.charAt(i)))){for(;pr.test(c.charAt(i+1));)i+=1;c.charCodeAt(i+1)===Jt&&(i+=1)}d=["word",c.slice(v,i+1),v,i],v=i;break;default:r===Zt&&c.charCodeAt(v+1)===ar?(0===(i=c.indexOf("*/",v+2)+1)&&(p||t?i=c.length:y("comment")),d=["comment",c.slice(v,i+1),v,i],v=i):(dr.lastIndex=v+1,dr.test(c),i=0===dr.lastIndex?c.length-1:dr.lastIndex-2,d=["word",c.slice(v,i+1),v,i],g.push(d),v=i)}return v++,d}},position:function(){return v}}},Or=_t,Rr=gr,Tr=wr,Lr=Mr,Pr={empty:!0,space:!0};var Nr=class{constructor(e){this.input=e,this.root=new Tr,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){var t,r,i,n=new Rr;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);for(var s=!1,o=!1,a=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a[i=a.length-1];r&&"space"===r[0];)r=a[--i];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),s&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){var t=this.colon(e);if(!1!==t){for(var r,i=0,n=t-1;n>=0&&("space"===(r=e[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(e){var t,r,i,n=0;for(var[s,o]of e.entries()){if("("===(r=(t=o)[0])&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(i){if("word"===i[0]&&"progid"===i[1])continue;return s}this.doubleColon(t)}i=t}return!1}comment(e){var t=new Or;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Ar(this.input)}decl(e,t){var r=new Er;this.init(r,e[0][2]);var i,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(var t=e.length-1;t>=0;t--){var r=e[t],i=r[3]||r[2];if(i)return i}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){var s=e[0][0];if(":"===s||"space"===s||"comment"===s)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(":"===(i=e.shift())[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var o,a=[];e.length&&("space"===(o=e[0][0])||"comment"===o);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var l=e.length-1;l>=0;l--){if("!important"===(i=e[l])[1].toLowerCase()){r.important=!0;var u=this.stringFrom(e,l);" !important"!==(u=this.spacesFromEnd(e)+u)&&(r.raws.important=u);break}if("important"===i[1].toLowerCase()){for(var h=e.slice(0),d="",c=l;c>0;c--){var p=h[c][0];if(0===d.trim().indexOf("!")&&"space"!==p)break;d=h.pop()[1]+d}0===d.trim().indexOf("!")&&(r.important=!0,r.raws.important=d,e=h)}if("space"!==i[0]&&"comment"!==i[0])break}var f=e.some(e=>"space"!==e[0]&&"comment"!==e[0]);f&&(r.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.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){var t=new Lr;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){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){var 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){for(var t=!1,r=null,i=!1,n=null,s=[],o=e[1].startsWith("--"),a=[],l=e;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=l),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),s.length>0&&this.unclosedBracket(n),t&&i){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[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,r,i){for(var n,s,o,a,l=r.length,u="",h=!0,d=0;d<l;d+=1)"space"!==(s=(n=r[d])[0])||d!==l-1||i?"comment"===s?(a=r[d-1]?r[d-1][0]:"empty",o=r[d+1]?r[d+1][0]:"empty",Pr[a]||Pr[o]||","===u.slice(-1)?h=!1:u+=n[1]):u+=n[1]:h=!1;if(!h){var c=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:c,value:u}}e[t]=u}rule(e){e.pop();var t=new Lr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){for(var t,r="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){for(var t,r="";e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){for(var r="",i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){var 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})}},Dr=Tt,Fr=Nr,Br=st;function Ur(e,t){var r=new Br(e,t),i=new Fr(r);try{i.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return i.root}var jr=Ur;Ur.default=Ur,Dr.registerParse(Ur);var{isClean:zr,my:Wr}=ye,$r=gt,Vr=Ie,Hr=Tt,Gr=Ft,qr=Ut,Zr=Vt,Yr=jr,Jr=wr,Kr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Xr={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},Qr={Once:!0,postcssPlugin:!0,prepare:!0};function ei(e){return"object"==typeof e&&"function"==typeof e.then}function ti(e){var t=!1,r=Kr[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function ri(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:ti(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function ii(e){return e[zr]=!1,e.nodes&&e.nodes.forEach(e=>ii(e)),e}var ni={},si=class e{constructor(t,i,n){var s;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof e||i instanceof Zr)s=ii(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var o=Yr;n.syntax&&(o=n.syntax.parse),n.parser&&(o=n.parser),o.parse&&(o=o.parse);try{s=o(i,n)}catch(e){this.processed=!0,this.error=e}s&&!s[Wr]&&Hr.rebuild(s)}else s=ii(i);this.result=new Zr(t,s,n),this.helpers=r({},ni,{postcss:ni,result:this.result}),this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?r({},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){var r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};var e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(var t of this.plugins)if("object"==typeof t)for(var r in t){if(!Xr[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+t.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!Qr[r])if("object"==typeof t[r])for(var i in t[r])e(t,"*"===i?r:r+"-"+i.toLowerCase(),t[r][i]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var e=this;return t(function*(){e.plugin=0;for(var t=0;t<e.plugins.length;t++){var r=e.plugins[t],i=e.runOnRoot(r);if(ei(i))try{yield i}catch(t){throw e.handleError(t)}}if(e.prepareVisitors(),e.hasListener){for(var n=e.result.root;!n[zr];){n[zr]=!0;for(var s=[ri(n)];s.length>0;){var o=e.visitTick(s);if(ei(o))try{yield o}catch(t){var a=s[s.length-1].node;throw e.handleError(t,a)}}}if(e.listeners.OnceExit){var l=function*(t){e.result.lastPlugin=u;try{if("document"===n.type){var r=n.nodes.map(r=>t(r,e.helpers));yield Promise.all(r)}else yield t(n,e.helpers)}catch(t){throw e.handleError(t)}};for(var[u,h]of e.listeners.OnceExit)yield*l(h)}}return e.processed=!0,e.stringify()})()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){var t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return ei(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(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=Vr;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var r=new $r(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(var e of this.plugins){if(ei(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var t=this.result.root;!t[zr];)t[zr]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(var r of t.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||qr("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(var[r,i]of e){this.result.lastPlugin=r;var n=void 0;try{n=i(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(ei(n))throw this.getAsyncError()}}visitTick(e){var t=e[e.length-1],{node:r,visitors:i}=t;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&t.visitorIndex<i.length){var[n,s]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){for(var o,a=t.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[zr])return o[zr]=!0,void e.push(ri(o));t.iterator=0,delete r.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,0===u)return void(r.nodes&&r.nodes.length&&(r[zr]=!0,t.iterator=r.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}e.pop()}else e.pop()}walkSync(e){e[zr]=!0;var t=ti(e);for(var r of t)if(0===r)e.nodes&&e.each(e=>{e[zr]||this.walkSync(e)});else{var i=this.listeners[r];if(i&&this.visitSync(i,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"}};si.registerPostcss=e=>{ni=e};var oi=si;si.default=si,Jr.registerLazyResult(si),Gr.registerLazyResult(si);var ai=gt,li=Ie,ui=Ut,hi=jr,di=Vt,ci=class{constructor(e,t,r){var i;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;var n=li;this.result=new di(this._processor,i,this._opts),this.result.css=t;var s=this;Object.defineProperty(this.result,"root",{get:()=>s.root});var o=new ai(n,i,this._opts,t);if(o.isMap()){var[a,l]=o.generate();a&&(this.result.css=a),l&&(this.result.map=l)}else o.clearAnnotation(),this.result.css=o.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"production"!==process.env.NODE_ENV&&("from"in this._opts||ui("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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;var e,t=hi;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},pi=ci;ci.default=ci;var fi=pi,vi=oi,gi=Ft,mi=wr,yi=class{constructor(e){void 0===e&&(e=[]),this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){var t=[];for(var r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t){return void 0===t&&(t={}),this.plugins.length||t.parser||t.stringifier||t.syntax?new vi(this,e,t):new fi(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},_i=yi;yi.default=yi,mi.registerProcessor(yi),gi.registerProcessor(yi);var bi=Ne,wi=Ve,Si=_t,Ci=gr,Ii=st,ki=wr,xi=Mr;function Mi(e,t){if(Array.isArray(e))return e.map(e=>Mi(e));var{inputs:n}=e,a=i(e,s);if(n)for(var l of(t=[],n)){var u=r({},l,{__proto__:Ii.prototype});u.map&&(u.map=r({},u.map,{__proto__:wi.prototype})),t.push(u)}if(a.nodes&&(a.nodes=e.nodes.map(e=>Mi(e,t))),a.source){var h=a.source,{inputId:d}=h,c=i(h,o);a.source=c,null!=d&&(a.source.input=t[d])}if("root"===a.type)return new ki(a);if("decl"===a.type)return new bi(a);if("rule"===a.type)return new xi(a);if("comment"===a.type)return new Si(a);if("atrule"===a.type)return new Ci(a);throw new Error("Unknown node type: "+e.type)}var Ei=Mi;Mi.default=Mi;var Ai=me,Oi=Ne,Ri=oi,Ti=Tt,Li=_i,Pi=Ie,Ni=Ei,Di=Ft,Fi=zt,Bi=_t,Ui=gr,ji=Vt,zi=st,Wi=jr,$i=Cr,Vi=Mr,Hi=wr,Gi=Te;function qi(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new Li(t)}qi.plugin=function(e,t){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!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"));var r=t(...arguments);return r.postcssPlugin=e,r.postcssVersion=(new Li).version,r}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return qi([n(r)]).process(e,t)},n},qi.stringify=Pi,qi.parse=Wi,qi.fromJSON=Ni,qi.list=$i,qi.comment=e=>new Bi(e),qi.atRule=e=>new Ui(e),qi.decl=e=>new Oi(e),qi.rule=e=>new Vi(e),qi.root=e=>new Hi(e),qi.document=e=>new Di(e),qi.CssSyntaxError=Ai,qi.Declaration=Oi,qi.Container=Ti,qi.Processor=Li,qi.Document=Di,qi.Comment=Bi,qi.Warning=Fi,qi.AtRule=Ui,qi.Result=ji,qi.Input=zi,qi.Rule=Vi,qi.Root=Hi,qi.Node=Gi,Ri.registerPostcss(qi);var Zi=qi;qi.default=qi;var Yi=ae(Zi);Yi.stringify,Yi.fromJSON,Yi.plugin,Yi.parse,Yi.list,Yi.document,Yi.comment,Yi.atRule,Yi.rule,Yi.decl,Yi.root,Yi.CssSyntaxError,Yi.Declaration,Yi.Container,Yi.Processor,Yi.Document,Yi.Comment,Yi.Warning,Yi.AtRule,Yi.Result,Yi.Input,Yi.Rule,Yi.Root,Yi.Node;var Ji=Object.defineProperty,Ki=(e,t,r)=>((e,t,r)=>t in e?Ji(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Xi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Qi(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}),r}var en={exports:{}},tn=String,rn=function(){return{isColorSupported:!1,reset:tn,bold:tn,dim:tn,italic:tn,underline:tn,inverse:tn,hidden:tn,strikethrough:tn,black:tn,red:tn,green:tn,yellow:tn,blue:tn,magenta:tn,cyan:tn,white:tn,gray:tn,bgBlack:tn,bgRed:tn,bgGreen:tn,bgYellow:tn,bgBlue:tn,bgMagenta:tn,bgCyan:tn,bgWhite:tn}};en.exports=rn(),en.exports.createColors=rn;var nn=en.exports,sn=Qi(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),on=nn,an=sn,ln=class e extends Error{constructor(t,r,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==i&&("number"==typeof r?(this.line=r,this.column=i):(this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.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"";var t=this.source;null==e&&(e=on.isColorSupported),an&&e&&(t=an(t));var r,i,n=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){var{bold:l,gray:u,red:h}=on.createColors(!0);r=e=>l(h(e)),i=e=>u(e)}else r=i=e=>e;return n.slice(s,o).map((e,t)=>{var n=s+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){var l=i(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+i(o)+e+"\n "+l+r("^")}return" "+i(o)+e}).join("\n")}toString(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}},un=ln;ln.default=ln;var hn={};hn.isClean=Symbol("isClean"),hn.my=Symbol("my");var dn={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var cn=class{constructor(e){this.builder=e}atrule(e,t){var r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{var n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){var r;r="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");for(var i=e.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(e,null,"indent");if(s.length)for(var o=0;o<n;o++)r+=s}return r}block(e,t){var r,i=this.raw(e,"between","beforeOpen");this.builder(t+i+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var r=this.raw(e,"semicolon"),i=0;i<e.nodes.length;i++){var n=e.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,t!==i||r)}}comment(e){var t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){var r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){var i;if(r||(r=t),t&&void 0!==(i=e.raws[t]))return i;var n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return dn[r];var s=e.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);var o,a="raw"+((o=r)[0].toUpperCase()+o.slice(1));return this[a]?i=this[a](s,e):s.walk(e=>{if(void 0!==(i=e.raws[t]))return!1}),void 0===i&&(i=dn[r]),s.rawCache[r]=i,i}rawBeforeClose(e){var t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){var r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){var r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){var t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){var t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){var t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){var t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){return e.raws.indent?e.raws.indent:(e.walk(r=>{var i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return t=(t=n[n.length-1]).replace(/\S/g,""),!1}}),t);var t}rawSemicolon(e){var t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){var r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}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)}},pn=cn;cn.default=cn;var fn=pn;function vn(e,t){new fn(t).stringify(e)}var gn=vn;vn.default=vn;var{isClean:mn,my:yn}=hn,_n=un,bn=pn,wn=gn;function Sn(e,t){var r=new e.constructor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&"proxyCache"!==i){var n=e[i],s=typeof n;"parent"===i&&"object"===s?t&&(r[i]=t):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map(e=>Sn(e,r)):("object"===s&&null!==n&&(n=Sn(n)),r[i]=n)}return r}var Cn=class{constructor(e){for(var t in void 0===e&&(e={}),this.raws={},this[mn]=!1,this[yn]=!0,e)if("nodes"===t)for(var r of(this.nodes=[],e[t]))"function"==typeof r.clone?this.append(r.clone()):this.append(r);else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var 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(var t in void 0===e&&(e={}),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){void 0===e&&(e={});var t=Sn(this);for(var r in e)t[r]=e[r];return t}cloneAfter(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t){if(void 0===t&&(t={}),this.source){var{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new _n(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[mn]){this[mn]=!1;for(var e=this;e=e.parent;)e[mn]=!1}}next(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}}positionBy(e,t){var r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){var i=(t=this.toString()).indexOf(e.word);-1!==i&&(r=this.positionInside(i,t))}return r}positionInside(e,t){for(var r=t||this.toString(),i=this.source.start.column,n=this.source.start.line,s=0;s<e;s++)"\n"===r[s]?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}}rangeBy(e){var t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var i=this.toString(),n=i.indexOf(e.word);-1!==n&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new bn).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var e=this,t=!1,r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];for(var s of i)s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s);t||this.remove()}return this}root(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){var r={},i=null==t;t=t||new Map;var n=0;for(var s in this)if(Object.prototype.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,t);else if("source"===s){var a=t.get(o.input);null==a&&(a=n,t.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e){void 0===e&&(e=wn),e.stringify&&(e=e.stringify);var t="";return e(this,e=>{t+=e}),t}warn(e,t,r){var i={node:this};for(var n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}},In=Cn;Cn.default=Cn;var kn=In,xn=class extends kn{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e=r({},e,{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},Mn=xn;xn.default=xn;var En={nanoid:function(e){void 0===e&&(e=21);for(var t="",r=e;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}},{SourceMapConsumer:An,SourceMapGenerator:On}=sn,{existsSync:Rn,readFileSync:Tn}=sn,{dirname:Ln,join:Pn}=sn;var Nn=class{constructor(e,t){if(!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ln(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new An(this.text)),this.consumerCache}decodeInline(e){var t;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 r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}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){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}}loadFile(e){if(this.root=Ln(e),Rn(e))return this.mapFile=e,Tn(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 An)return On.fromSourceMap(t).toString();if(t instanceof On)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var r=t(e);if(r){var i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;return e&&(n=Pn(Ln(e),n)),this.loadFile(n)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Dn=Nn;Nn.default=Nn;var{SourceMapConsumer:Fn,SourceMapGenerator:Bn}=sn,{fileURLToPath:Un,pathToFileURL:jn}=sn,{isAbsolute:zn,resolve:Wn}=sn,{nanoid:$n}=En,Vn=sn,Hn=un,Gn=Dn,qn=Symbol("fromOffsetCache"),Zn=Boolean(Fn&&Bn),Yn=Boolean(Wn&&zn),Jn=class{constructor(e,t){if(void 0===t&&(t={}),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&&(!Yn||/^\w+:\/\//.test(t.from)||zn(t.from)?this.file=t.from:this.file=Wn(t.from)),Yn&&Zn){var r=new Gn(this.css,t);if(r.text){this.map=r;var i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+$n(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i){var n,s,o;if(void 0===i&&(i={}),t&&"object"==typeof t){var a=t,l=r;if("number"==typeof a.offset){var u=this.fromOffset(a.offset);t=u.line,r=u.col}else t=a.line,r=a.column;if("number"==typeof l.offset){var h=this.fromOffset(l.offset);s=h.line,o=h.col}else s=l.line,o=l.column}else if(!r){var d=this.fromOffset(t);t=d.line,r=d.col}var c=this.origin(t,r,s,o);return(n=c?new Hn(e,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,i.plugin):new Hn(e,void 0===s?t:{column:r,line:t},void 0===s?r:{column:o,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:o,endLine:s,line:t,source:this.css},this.file&&(jn&&(n.input.url=jn(this.file).toString()),n.input.file=this.file),n}fromOffset(e){var t;if(this[qn])t=this[qn];else{var r=this.css.split("\n");t=new Array(r.length);for(var i=0,n=0,s=r.length;n<s;n++)t[n]=i,i+=r[n].length+1;this[qn]=t}var o=0;if(e>=t[t.length-1])o=t.length-1;else for(var a,l=t.length-2;o<l;)if(e<t[a=o+(l-o>>1)])l=a-1;else{if(!(e>=t[a+1])){o=a;break}o=a+1}return{col:e-t[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Wn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;var n,s,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=o.originalPositionFor({column:i,line:r})),s=zn(a.source)?jn(a.source):new URL(a.source,this.map.consumer().sourceRoot||jn(this.map.mapFile));var l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:s.toString()};if("file:"===s.protocol){if(!Un)throw new Error("file: protocol is not available in this PostCSS build");l.file=Un(s)}var u=o.sourceContentFor(a.source);return u&&(l.source=u),l}toJSON(){var e={};for(var t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map=r({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Kn=Jn;Jn.default=Jn,Vn&&Vn.registerInput&&Vn.registerInput(Jn);var{SourceMapConsumer:Xn,SourceMapGenerator:Qn}=sn,{dirname:es,relative:ts,resolve:rs,sep:is}=sn,{pathToFileURL:ns}=sn,ss=Kn,os=Boolean(Xn&&Qn),as=Boolean(es&&rs&&ts&&is),ls=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var 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";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(var e of this.previous()){var t=this.toUrl(this.path(e.file)),r=e.root||es(e.file),i=void 0;!1===this.mapOpts.sourcesContent?(i=new Xn(e.text)).sourcesContent&&(i.sourcesContent=null):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).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(),as&&os&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,t=>{e+=t}),[e]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Qn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Qn({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 Qn({file:this.outputFile(),ignoreInvalidMapping:!0});var e,t,r=1,i=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(s.generated.line=r,s.generated.column=i-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(e=o.match(/\n/g))?(r+=e.length,t=o.lastIndexOf("\n"),i=o.length-t):i+=o.length,a&&"start"!==l){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=r,s.generated.column=i-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=i-1,this.map.addMapping(s)))}})}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;var 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;var t=this.memoizedPaths.get(e);if(t)return t;var r=this.opts.to?es(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=es(rs(r,this.mapOpts.annotation)));var i=ts(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){var t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{var e=new ss(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){var e={};if(this.root)this.root.walk(t=>{if(t.source){var r=t.source.input.from;if(r&&!e[r]){e[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){var t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,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){var t=this.memoizedFileURLs.get(e);if(t)return t;if(ns){var r=ns(e).toString();return this.memoizedFileURLs.set(e,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===is&&(e=e.replace(/\\/g,"/"));var r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},us=In,hs=class extends us{constructor(e){super(e),this.type="comment"}},ds=hs;hs.default=hs;var cs,ps,fs,vs,{isClean:gs,my:ms}=hn,ys=Mn,_s=ds,bs=In;function ws(e){return e.map(e=>(e.nodes&&(e.nodes=ws(e.nodes)),delete e.source,e))}function Ss(e){if(e[gs]=!1,e.proxyOf.nodes)for(var t of e.proxyOf.nodes)Ss(t)}var Cs=class e extends bs{append(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var i of t){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(var t of this.nodes)t.cleanRaws(e)}each(e){if(this.proxyOf.nodes){for(var t,r,i=this.getIterator();this.indexes[i]<this.proxyOf.nodes.length&&(t=this.indexes[i],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var 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")?function(){for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return e[t](...i.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))}:"every"===t||"some"===t?r=>e[t](function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return r(e.toProxy(),...i)}):"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,r)=>(e[t]===r||(e[t]=r,"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){var r,i=this.index(e),n=this.normalize(t,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(e),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)i<(r=this.indexes[o])&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(e,t){var r,i=this.index(e),n=0===i&&"prepend",s=this.normalize(t,this.proxyOf.nodes[i],n).reverse();for(var o of(i=this.index(e),s))this.proxyOf.nodes.splice(i,0,o);for(var a in this.indexes)i<=(r=this.indexes[a])&&(this.indexes[a]=r+s.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=ws(cs(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(var i of t=t.slice(0))i.parent&&i.parent.removeChild(i,"ignore");else if("root"===t.type&&"document"!==this.type)for(var n of t=t.nodes.slice(0))n.parent&&n.parent.removeChild(n,"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 ys(t)]}else if(t.selector)t=[new ps(t)];else if(t.name)t=[new fs(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new _s(t)]}var s=t.map(t=>(t[ms]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[gs]&&Ss(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t));return s}prepend(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var i of t=t.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(var e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){var t;for(var r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{var i;try{i=e(t,r)}catch(e){throw t.addToError(e)}return!1!==i&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if("atrule"===r.type&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if("atrule"===r.type&&r.name===e)return t(r,i)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if("decl"===r.type&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if("decl"===r.type&&r.prop===e)return t(r,i)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if("rule"===r.type&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if("rule"===r.type&&r.selector===e)return t(r,i)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}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]}};Cs.registerParse=e=>{cs=e},Cs.registerRule=e=>{ps=e},Cs.registerAtRule=e=>{fs=e},Cs.registerRoot=e=>{vs=e};var Is=Cs;Cs.default=Cs,Cs.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,fs.prototype):"rule"===e.type?Object.setPrototypeOf(e,ps.prototype):"decl"===e.type?Object.setPrototypeOf(e,ys.prototype):"comment"===e.type?Object.setPrototypeOf(e,_s.prototype):"root"===e.type&&Object.setPrototypeOf(e,vs.prototype),e[ms]=!0,e.nodes&&e.nodes.forEach(e=>{Cs.rebuild(e)})};var ks,xs,Ms=Is,Es=class extends Ms{constructor(e){super(r({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e){return void 0===e&&(e={}),new ks(new xs,this,e).stringify()}};Es.registerLazyResult=e=>{ks=e},Es.registerProcessor=e=>{xs=e};var As=Es;Es.default=Es;var Os={},Rs=function(e){Os[e]||(Os[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))},Ts=class{constructor(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in t)this[i]=t[i]}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}},Ls=Ts;Ts.default=Ts;var Ps=Ls,Ns=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var r=new Ps(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}},Ds=Ns;Ns.default=Ns;var Fs="'".charCodeAt(0),Bs='"'.charCodeAt(0),Us="\\".charCodeAt(0),js="/".charCodeAt(0),zs="\n".charCodeAt(0),Ws=" ".charCodeAt(0),$s="\f".charCodeAt(0),Vs="\t".charCodeAt(0),Hs="\r".charCodeAt(0),Gs="[".charCodeAt(0),qs="]".charCodeAt(0),Zs="(".charCodeAt(0),Ys=")".charCodeAt(0),Js="{".charCodeAt(0),Ks="}".charCodeAt(0),Xs=";".charCodeAt(0),Qs="*".charCodeAt(0),eo=":".charCodeAt(0),to="@".charCodeAt(0),ro=/[\t\n\f\r "#'()/;[\\\]{}]/g,io=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,no=/.[\r\n"'(/\\]/,so=/[\da-f]/i,oo=Is,ao=class extends oo{constructor(e){super(e),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}},lo=ao;ao.default=ao,oo.registerAtRule(ao);var uo,ho,co=Is,po=class extends co{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){var i=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(var n of i)n.raws.before=t.raws.before;return i}removeChild(e,t){var r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e){return void 0===e&&(e={}),new uo(new ho,this,e).stringify()}};po.registerLazyResult=e=>{uo=e},po.registerProcessor=e=>{ho=e};var fo=po;po.default=po,co.registerRoot(po);var vo={comma:e=>vo.split(e,[","],!0),space:e=>vo.split(e,[" ","\n","\t"]),split(e,t,r){var i=[],n="",s=!1,o=0,a=!1,l="",u=!1;for(var h of e)u?u=!1:"\\"===h?u=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=h;return(r||""!==n)&&i.push(n.trim()),i}},go=vo;vo.default=vo;var mo=Is,yo=go,_o=class extends mo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return yo.comma(this.selector)}set selectors(e){var t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},bo=_o;_o.default=_o,mo.registerRule(_o);var wo=Mn,So=function(e,t){void 0===t&&(t={});var r,i,n,s,o,a,l,u,h,d,c=e.css.valueOf(),p=t.ignoreErrors,f=c.length,v=0,g=[],m=[];function y(t){throw e.error("Unclosed "+t,v)}return{back:function(e){m.push(e)},endOfFile:function(){return 0===m.length&&v>=f},nextToken:function(e){if(m.length)return m.pop();if(!(v>=f)){var t=!!e&&e.ignoreUnclosed;switch(r=c.charCodeAt(v)){case zs:case Ws:case Vs:case Hs:case $s:i=v;do{i+=1,r=c.charCodeAt(i)}while(r===Ws||r===zs||r===Vs||r===Hs||r===$s);d=["space",c.slice(v,i)],v=i-1;break;case Gs:case qs:case Js:case Ks:case eo:case Xs:case Ys:var _=String.fromCharCode(r);d=[_,_,v];break;case Zs:if(u=g.length?g.pop()[1]:"",h=c.charCodeAt(v+1),"url"===u&&h!==Fs&&h!==Bs&&h!==Ws&&h!==zs&&h!==Vs&&h!==$s&&h!==Hs){i=v;do{if(a=!1,-1===(i=c.indexOf(")",i+1))){if(p||t){i=v;break}y("bracket")}for(l=i;c.charCodeAt(l-1)===Us;)l-=1,a=!a}while(a);d=["brackets",c.slice(v,i+1),v,i],v=i}else i=c.indexOf(")",v+1),s=c.slice(v,i+1),-1===i||no.test(s)?d=["(","(",v]:(d=["brackets",s,v,i],v=i);break;case Fs:case Bs:n=r===Fs?"'":'"',i=v;do{if(a=!1,-1===(i=c.indexOf(n,i+1))){if(p||t){i=v+1;break}y("string")}for(l=i;c.charCodeAt(l-1)===Us;)l-=1,a=!a}while(a);d=["string",c.slice(v,i+1),v,i],v=i;break;case to:ro.lastIndex=v+1,ro.test(c),i=0===ro.lastIndex?c.length-1:ro.lastIndex-2,d=["at-word",c.slice(v,i+1),v,i],v=i;break;case Us:for(i=v,o=!0;c.charCodeAt(i+1)===Us;)i+=1,o=!o;if(r=c.charCodeAt(i+1),o&&r!==js&&r!==Ws&&r!==zs&&r!==Vs&&r!==Hs&&r!==$s&&(i+=1,so.test(c.charAt(i)))){for(;so.test(c.charAt(i+1));)i+=1;c.charCodeAt(i+1)===Ws&&(i+=1)}d=["word",c.slice(v,i+1),v,i],v=i;break;default:r===js&&c.charCodeAt(v+1)===Qs?(0===(i=c.indexOf("*/",v+2)+1)&&(p||t?i=c.length:y("comment")),d=["comment",c.slice(v,i+1),v,i],v=i):(io.lastIndex=v+1,io.test(c),i=0===io.lastIndex?c.length-1:io.lastIndex-2,d=["word",c.slice(v,i+1),v,i],g.push(d),v=i)}return v++,d}},position:function(){return v}}},Co=ds,Io=lo,ko=fo,xo=bo,Mo={empty:!0,space:!0};var Eo=class{constructor(e){this.input=e,this.root=new ko,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){var t,r,i,n=new Io;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);for(var s=!1,o=!1,a=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a[i=a.length-1];r&&"space"===r[0];)r=a[--i];r&&(n.source.end=this.getPosition(r[3]||r[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),s&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){var t=this.colon(e);if(!1!==t){for(var r,i=0,n=t-1;n>=0&&("space"===(r=e[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(e){var t,r,i,n=0;for(var[s,o]of e.entries()){if("("===(r=(t=o)[0])&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(i){if("word"===i[0]&&"progid"===i[1])continue;return s}this.doubleColon(t)}i=t}return!1}comment(e){var t=new Co;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{var i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=So(this.input)}decl(e,t){var r=new wo;this.init(r,e[0][2]);var i,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(n[3]||n[2]||function(e){for(var t=e.length-1;t>=0;t--){var r=e[t],i=r[3]||r[2];if(i)return i}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){var s=e[0][0];if(":"===s||"space"===s||"comment"===s)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(":"===(i=e.shift())[0]){r.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),r.raws.between+=i[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var o,a=[];e.length&&("space"===(o=e[0][0])||"comment"===o);)a.push(e.shift());this.precheckMissedSemicolon(e);for(var l=e.length-1;l>=0;l--){if("!important"===(i=e[l])[1].toLowerCase()){r.important=!0;var u=this.stringFrom(e,l);" !important"!==(u=this.spacesFromEnd(e)+u)&&(r.raws.important=u);break}if("important"===i[1].toLowerCase()){for(var h=e.slice(0),d="",c=l;c>0;c--){var p=h[c][0];if(0===d.trim().indexOf("!")&&"space"!==p)break;d=h.pop()[1]+d}0===d.trim().indexOf("!")&&(r.important=!0,r.raws.important=d,e=h)}if("space"!==i[0]&&"comment"!==i[0])break}var f=e.some(e=>"space"!==e[0]&&"comment"!==e[0]);f&&(r.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.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){var t=new xo;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){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){var 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){for(var t=!1,r=null,i=!1,n=null,s=[],o=e[1].startsWith("--"),a=[],l=e;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=l),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),s.length>0&&this.unclosedBracket(n),t&&i){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[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,r,i){for(var n,s,o,a,l=r.length,u="",h=!0,d=0;d<l;d+=1)"space"!==(s=(n=r[d])[0])||d!==l-1||i?"comment"===s?(a=r[d-1]?r[d-1][0]:"empty",o=r[d+1]?r[d+1][0]:"empty",Mo[a]||Mo[o]||","===u.slice(-1)?h=!1:u+=n[1]):u+=n[1]:h=!1;if(!h){var c=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:c,value:u}}e[t]=u}rule(e){e.pop();var t=new xo;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){for(var t,r="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){for(var t,r="";e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){for(var r="",i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){var 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})}},Ao=Is,Oo=Eo,Ro=Kn;function To(e,t){var r=new Ro(e,t),i=new Oo(r);try{i.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return i.root}var Lo=To;To.default=To,Ao.registerParse(To);var{isClean:Po,my:No}=hn,Do=ls,Fo=gn,Bo=Is,Uo=As,jo=Rs,zo=Ds,Wo=Lo,$o=fo,Vo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ho={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},Go={Once:!0,postcssPlugin:!0,prepare:!0};function qo(e){return"object"==typeof e&&"function"==typeof e.then}function Zo(e){var t=!1,r=Vo[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function Yo(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Zo(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function Jo(e){return e[Po]=!1,e.nodes&&e.nodes.forEach(e=>Jo(e)),e}var Ko={},Xo=class e{constructor(t,i,n){var s;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof e||i instanceof zo)s=Jo(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var o=Wo;n.syntax&&(o=n.syntax.parse),n.parser&&(o=n.parser),o.parse&&(o=o.parse);try{s=o(i,n)}catch(e){this.processed=!0,this.error=e}s&&!s[No]&&Bo.rebuild(s)}else s=Jo(i);this.result=new zo(t,s,n),this.helpers=r({},Ko,{postcss:Ko,result:this.result}),this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?r({},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){var r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};var e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(var t of this.plugins)if("object"==typeof t)for(var r in t){if(!Ho[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+t.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!Go[r])if("object"==typeof t[r])for(var i in t[r])e(t,"*"===i?r:r+"-"+i.toLowerCase(),t[r][i]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var e=this;return t(function*(){e.plugin=0;for(var t=0;t<e.plugins.length;t++){var r=e.plugins[t],i=e.runOnRoot(r);if(qo(i))try{yield i}catch(t){throw e.handleError(t)}}if(e.prepareVisitors(),e.hasListener){for(var n=e.result.root;!n[Po];){n[Po]=!0;for(var s=[Yo(n)];s.length>0;){var o=e.visitTick(s);if(qo(o))try{yield o}catch(t){var a=s[s.length-1].node;throw e.handleError(t,a)}}}if(e.listeners.OnceExit){var l=function*(t){e.result.lastPlugin=u;try{if("document"===n.type){var r=n.nodes.map(r=>t(r,e.helpers));yield Promise.all(r)}else yield t(n,e.helpers)}catch(t){throw e.handleError(t)}};for(var[u,h]of e.listeners.OnceExit)yield*l(h)}}return e.processed=!0,e.stringify()})()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){var t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return qo(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(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=Fo;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var r=new Do(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[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(var e of this.plugins){if(qo(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var t=this.result.root;!t[Po];)t[Po]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(var r of t.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||jo("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(var[r,i]of e){this.result.lastPlugin=r;var n=void 0;try{n=i(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(qo(n))throw this.getAsyncError()}}visitTick(e){var t=e[e.length-1],{node:r,visitors:i}=t;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&t.visitorIndex<i.length){var[n,s]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){for(var o,a=t.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[Po])return o[Po]=!0,void e.push(Yo(o));t.iterator=0,delete r.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,0===u)return void(r.nodes&&r.nodes.length&&(r[Po]=!0,t.iterator=r.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}e.pop()}else e.pop()}walkSync(e){e[Po]=!0;var t=Zo(e);for(var r of t)if(0===r)e.nodes&&e.each(e=>{e[Po]||this.walkSync(e)});else{var i=this.listeners[r];if(i&&this.visitSync(i,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"}};Xo.registerPostcss=e=>{Ko=e};var Qo=Xo;Xo.default=Xo,$o.registerLazyResult(Xo),Uo.registerLazyResult(Xo);var ea=ls,ta=gn,ra=Rs,ia=Lo,na=Ds,sa=class{constructor(e,t,r){var i;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;var n=ta;this.result=new na(this._processor,i,this._opts),this.result.css=t;var s=this;Object.defineProperty(this.result,"root",{get:()=>s.root});var o=new ea(n,i,this._opts,t);if(o.isMap()){var[a,l]=o.generate();a&&(this.result.css=a),l&&(this.result.map=l)}else o.clearAnnotation(),this.result.css=o.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"production"!==process.env.NODE_ENV&&("from"in this._opts||ra("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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;var e,t=ia;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},oa=sa;sa.default=sa;var aa=oa,la=Qo,ua=As,ha=fo,da=class{constructor(e){void 0===e&&(e=[]),this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){var t=[];for(var r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t){return void 0===t&&(t={}),this.plugins.length||t.parser||t.stringifier||t.syntax?new la(this,e,t):new aa(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},ca=da;da.default=da,ha.registerProcessor(da),ua.registerProcessor(da);var pa=Mn,fa=Dn,va=ds,ga=lo,ma=Kn,ya=fo,_a=bo;function ba(e,t){if(Array.isArray(e))return e.map(e=>ba(e));var{inputs:n}=e,s=i(e,a);if(n)for(var o of(t=[],n)){var u=r({},o,{__proto__:ma.prototype});u.map&&(u.map=r({},u.map,{__proto__:fa.prototype})),t.push(u)}if(s.nodes&&(s.nodes=e.nodes.map(e=>ba(e,t))),s.source){var h=s.source,{inputId:d}=h,c=i(h,l);s.source=c,null!=d&&(s.source.input=t[d])}if("root"===s.type)return new ya(s);if("decl"===s.type)return new pa(s);if("rule"===s.type)return new _a(s);if("comment"===s.type)return new va(s);if("atrule"===s.type)return new ga(s);throw new Error("Unknown node type: "+e.type)}var wa=ba;ba.default=ba;var Sa=un,Ca=Mn,Ia=Qo,ka=Is,xa=ca,Ma=gn,Ea=wa,Aa=As,Oa=Ls,Ra=ds,Ta=lo,La=Ds,Pa=Kn,Na=Lo,Da=go,Fa=bo,Ba=fo,Ua=In;function ja(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new xa(t)}ja.plugin=function(e,t){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!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"));var r=t(...arguments);return r.postcssPlugin=e,r.postcssVersion=(new xa).version,r}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(e,t,r){return ja([n(r)]).process(e,t)},n},ja.stringify=Ma,ja.parse=Na,ja.fromJSON=Ea,ja.list=Da,ja.comment=e=>new Ra(e),ja.atRule=e=>new Ta(e),ja.decl=e=>new Ca(e),ja.rule=e=>new Fa(e),ja.root=e=>new Ba(e),ja.document=e=>new Aa(e),ja.CssSyntaxError=Sa,ja.Declaration=Ca,ja.Container=ka,ja.Processor=xa,ja.Document=Aa,ja.Comment=Ra,ja.Warning=Oa,ja.AtRule=Ta,ja.Result=La,ja.Input=Pa,ja.Rule=Fa,ja.Root=Ba,ja.Node=Ua,Ia.registerPostcss(ja);var za=ja;ja.default=ja;var Wa=Xi(za);Wa.stringify,Wa.fromJSON,Wa.plugin,Wa.parse,Wa.list,Wa.document,Wa.comment,Wa.atRule,Wa.rule,Wa.decl,Wa.root,Wa.CssSyntaxError,Wa.Declaration,Wa.Container,Wa.Processor,Wa.Document,Wa.Comment,Wa.Warning,Wa.AtRule,Wa.Result,Wa.Input,Wa.Rule,Wa.Root,Wa.Node;class $a{constructor(){Ki(this,"parentElement",null),Ki(this,"parentNode",null),Ki(this,"ownerDocument"),Ki(this,"firstChild",null),Ki(this,"lastChild",null),Ki(this,"previousSibling",null),Ki(this,"nextSibling",null),Ki(this,"ELEMENT_NODE",1),Ki(this,"TEXT_NODE",3),Ki(this,"nodeType"),Ki(this,"nodeName"),Ki(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof $a))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"}}var Va={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ha={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ga={};function qa(e){if(Ga[e])return Ga[e];var t=globalThis[e],r=t.prototype,i=e in Va?Va[e]:void 0,n=Boolean(i&&i.every(e=>{var t,i;return Boolean(null==(i=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:i.toString().includes("[native code]"))})),s=e in Ha?Ha[e]:void 0,o=Boolean(s&&s.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return Ga[e]=t.prototype,t.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var l=a.contentWindow;if(!l)return t.prototype;var u=l[e].prototype;return document.body.removeChild(a),u?Ga[e]=u:r}catch(e){return r}}var Za={};function Ya(e,t,r){var i,n=e+"."+String(r);if(Za[n])return Za[n].call(t);var s=qa(e),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(Za[n]=o,o.call(t)):t[r]}var Ja={};function Ka(e,t,r){var i=e+"."+String(r);if(Ja[i])return Ja[i].bind(t);var n=qa(e)[r];return"function"!=typeof n?t[r]:(Ja[i]=n,n.bind(t))}function Xa(){return qa("MutationObserver").constructor}function Qa(e,t,r){try{if(!(t in e))return()=>{};var i=e[t],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i}}catch(e){return()=>{}}}var el={ownerDocument:function(e){return Ya("Node",e,"ownerDocument")},childNodes:function(e){return Ya("Node",e,"childNodes")},parentNode:function(e){return Ya("Node",e,"parentNode")},parentElement:function(e){return Ya("Node",e,"parentElement")},textContent:function(e){return Ya("Node",e,"textContent")},contains:function(e,t){return Ka("Node",e,"contains")(t)},getRootNode:function(e){return Ka("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ya("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ya("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ya("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ya("Element",e,"querySelectorAll")(t)},mutationObserver:Xa,patch:Qa};function tl(e,t,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(e,t,i),()=>r.removeEventListener(e,t,i)}var rl="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.",il={map:{},getId:()=>(console.error(rl),-1),getNode:()=>(console.error(rl),null),removeNodeFromMap(){console.error(rl)},has:()=>(console.error(rl),!1),reset(){console.error(rl)}};function nl(e,t,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];var l=Date.now();n||!1!==r.leading||(n=l);var u=t-(l-n),h=this;u<=0||u>t?(i&&(clearTimeout(i),i=null),n=l,e.apply(h,o)):i||!1===r.trailing||(i=setTimeout(()=>{n=!1===r.leading?0:Date.now(),i=null,e.apply(h,o)},u))}}function sl(e,t,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,i?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>sl(e,t,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(il=new Proxy(il,{get:(e,t,r)=>("map"===t&&console.error(rl),Reflect.get(e,t,r))}));var ol=Date.now;function al(e){var t,r,i,n,s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(t=el.parentElement(s.body))?void 0:t.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(i=el.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function ll(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ul(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function hl(e){return e?e.nodeType===e.ELEMENT_NODE?e:el.parentElement(e):null}function dl(e,t,r,i){if(!e)return!1;var n=hl(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(i&&null!==n.closest("."+t))return!0}else if(te(n,t,i))return!0}catch(e){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function cl(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function pl(e,t){if(k(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var i=el.parentNode(e);return(!i||i.nodeType!==e.DOCUMENT_NODE)&&(!i||pl(i,t))}function fl(e){return Boolean(e.changedTouches)}function vl(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function gl(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function ml(e){return!!e&&(e instanceof $a&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(el.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(ol=()=>(new Date).getTime());class yl{constructor(){d(this,"id",1),d(this,"styleIDMap",new WeakMap),d(this,"idStyleMap",new Map)}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}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 _l(e){var t,r=null;return"getRootNode"in e&&(null==(t=el.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&el.host(el.getRootNode(e))&&(r=el.host(el.getRootNode(e))),r}function bl(e){var t=el.ownerDocument(e);if(!t)return!1;var r=function(e){for(var t,r=e;t=_l(r);)r=t;return r}(e);return el.contains(t,r)}function wl(e){var t=el.ownerDocument(e);return!!t&&(el.contains(t,e)||bl(e))}var Sl=(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))(Sl||{}),Cl=(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))(Cl||{}),Il=(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))(Il||{}),kl=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(kl||{}),xl=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(xl||{}),Ml=(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))(Ml||{}),El=(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))(El||{});function Al(e){return"__ln"in e}class Ol{constructor(){d(this,"length",0),d(this,"head",null),d(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Al(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Al(e.nextSibling)&&e.nextSibling.__ln.previous){var i=e.nextSibling.__ln.previous;t.previous=i,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,i&&(i.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){var 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--)}}var Rl,Tl=(e,t)=>e+"@"+t;class Ll{constructor(){d(this,"frozen",!1),d(this,"locked",!1),d(this,"texts",[]),d(this,"attributes",[]),d(this,"attributeMap",new WeakMap),d(this,"removes",[]),d(this,"mapRemoves",[]),d(this,"movedMap",{}),d(this,"addedSet",new Set),d(this,"movedSet",new Set),d(this,"droppedSet",new Set),d(this,"removesSubTreeCache",new Set),d(this,"mutationCb"),d(this,"blockClass"),d(this,"blockSelector"),d(this,"maskTextClass"),d(this,"maskTextSelector"),d(this,"inlineStylesheet"),d(this,"maskInputOptions"),d(this,"maskTextFn"),d(this,"maskInputFn"),d(this,"keepIframeSrcFn"),d(this,"recordCanvas"),d(this,"inlineImages"),d(this,"slimDOMOptions"),d(this,"dataURLOptions"),d(this,"doc"),d(this,"mirror"),d(this,"iframeManager"),d(this,"stylesheetManager"),d(this,"shadowDomManager"),d(this,"canvasManager"),d(this,"processedNodeManager"),d(this,"unattachedDoc"),d(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),d(this,"emit",()=>{if(!this.frozen&&!this.locked){for(var e=[],t=new Set,r=new Ol,i=e=>{for(var t=e,r=-2;-2===r;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},n=n=>{var s=el.parentNode(n);if(s&&wl(n)){var o=!1;if(n.nodeType===Node.TEXT_NODE){var a=s.tagName;if("TEXTAREA"===a)return;"STYLE"===a&&this.addedSet.has(s)&&(o=!0)}var l=k(s)?this.mirror.getId(_l(n)):this.mirror.getId(s),u=i(n);if(-1===l||-1===u)return r.addNode(n);var h=oe(n,{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=>{vl(e,this.mirror)&&this.iframeManager.addIframe(e),gl(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),ml(n)&&this.shadowDomManager.addShadowRoot(el.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});h&&(e.push({parentId:l,nextId:u,node:h}),t.add(h.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)Nl(this.removesSubTreeCache,s,this.mirror)&&!this.movedSet.has(el.parentNode(s))||n(s);for(var o of this.addedSet)Dl(this.droppedSet,o)||Nl(this.removesSubTreeCache,o,this.mirror)?Dl(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var a=null;r.length;){var l=null;if(a){var u=this.mirror.getId(el.parentNode(a.value)),h=i(a.value);-1!==u&&-1!==h&&(l=a)}if(!l)for(var d=r.tail;d;){var c=d;if(d=d.previous,c){var p=this.mirror.getId(el.parentNode(c.value));if(-1===i(c.value))continue;if(-1!==p){l=c;break}var f=c.value,v=el.parentNode(f);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var g=el.host(v);if(-1!==this.mirror.getId(g)){l=c;break}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}a=l.previous,r.removeNode(l.value),n(l.value)}var m={texts:this.texts.map(e=>{var t=e.node,r=el.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{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=>{var{attributes:t}=e;if("string"==typeof t.style){var r=JSON.stringify(e.styleDiff),i=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+i).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};(m.texts.length||m.attributes.length||m.removes.length||m.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(m))}}),d(this,"genTextAreaValueMutation",e=>{var t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));var r=Array.from(el.childNodes(e),e=>el.textContent(e)||"").join("");t.attributes.value=O({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:L(e),value:r,maskInputFn:this.maskInputFn})}),d(this,"processMutation",e=>{if(!cl(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=el.textContent(e.target);dl(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:re(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,hl(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var r=e.target,i=e.attributeName,n=e.target.getAttribute(i);if("value"===i){var s=L(r);n=O({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(dl(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;var o=this.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===i&&!this.keepIframeSrcFn(n)){if(r.contentDocument)return;i="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===i&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!ee(r.tagName,i))if(o.attributes[i]=Q(this.doc,R(r.tagName),R(i),n),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var a=this.unattachedDoc.createElement("span");for(var l of(e.oldValue&&a.setAttribute("style",e.oldValue),Array.from(r.style))){var u=r.style.getPropertyValue(l),h=r.style.getPropertyPriority(l);u!==a.style.getPropertyValue(l)||h!==a.style.getPropertyPriority(l)?o.styleDiff[l]=""===h?u:[u,h]:o._unchangedStyles[l]=[u,h]}for(var d of Array.from(a.style))""===r.style.getPropertyValue(d)&&(o.styleDiff[d]=!1)}else"open"===i&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break;case"childList":if(dl(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=>{var r=this.mirror.getId(t),i=k(e.target)?this.mirror.getId(el.host(e.target)):this.mirror.getId(e.target);dl(e.target,this.blockClass,this.blockSelector,!1)||cl(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Pl(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||pl(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Tl(r,i)]?Pl(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:!(!k(e.target)||!x(e.target))||void 0}),function(e,t){var r=[e];for(;r.length;){var i=r.pop();t.has(i)||(t.add(i),el.childNodes(i).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),d(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(cl(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Tl(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);dl(e,this.blockClass,this.blockSelector,!1)||(el.childNodes(e).forEach(e=>this.genAdds(e)),ml(e)&&el.childNodes(el.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 Pl(e,t){e.delete(t),el.childNodes(t).forEach(t=>Pl(e,t))}function Nl(e,t,r){return 0!==e.size&&function(e,t){var r=el.parentNode(t);return!!r&&e.has(r)}(e,t)}function Dl(e,t){return 0!==e.size&&Fl(e,t)}function Fl(e,t){var r=el.parentNode(t);return!!r&&(!!e.has(r)||Fl(e,r))}var Bl=e=>{if(!Rl)return e;return function(){try{return e(...arguments)}catch(e){if(Rl&&!0===Rl(e))return;throw e}}},Ul=[];function jl(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function zl(e,t){var r=new Ll;Ul.push(r),r.init(e);var i=new(Xa())(Bl(r.processMutations.bind(r)));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function Wl(e){var{mouseInteractionCb:t,doc:i,mirror:n,blockClass:s,blockSelector:o,sampling:a}=e;if(!1===a.mouseInteraction)return()=>{};var l=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],h=null;return Object.keys(Il).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==l[e]).forEach(e=>{var a=R(e),l=(e=>i=>{var a=jl(i);if(!dl(a,s,o,!0)){var l=null,u=e;if("pointerType"in i){switch(i.pointerType){case"mouse":l=kl.Mouse;break;case"touch":l=kl.Touch;break;case"pen":l=kl.Pen}l===kl.Touch?Il[e]===Il.MouseDown?u="TouchStart":Il[e]===Il.MouseUp&&(u="TouchEnd"):kl.Pen}else fl(i)&&(l=kl.Touch);null!==l?(h=l,(u.startsWith("Touch")&&l===kl.Touch||u.startsWith("Mouse")&&l===kl.Mouse)&&(l=null)):Il[e]===Il.Click&&(l=h,h=null);var d=fl(i)?i.changedTouches[0]:i;if(d){var c=n.getId(a),{clientX:p,clientY:f}=d;Bl(t)(r({type:Il[u],id:c,x:p,y:f},null!==l&&{pointerType:l}))}}})(e);if(window.PointerEvent)switch(Il[e]){case Il.MouseDown:case Il.MouseUp:a=a.replace("mouse","pointer");break;case Il.TouchStart:case Il.TouchEnd:return}u.push(tl(a,l,i))}),Bl(()=>{u.forEach(e=>e())})}function $l(e){var{scrollCb:t,doc:r,mirror:i,blockClass:n,blockSelector:s,sampling:o}=e;return tl("scroll",Bl(nl(Bl(e=>{var o=jl(e);if(o&&!dl(o,n,s,!0)){var a=i.getId(o);if(o===r&&r.defaultView){var l=al(r.defaultView);t({id:a,x:l.left,y:l.top})}else t({id:a,x:o.scrollLeft,y:o.scrollTop})}}),o.scroll||100)),r)}var Vl=["INPUT","TEXTAREA","SELECT"],Hl=new WeakMap;function Gl(e){return function(e,t){if(Jl("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Jl("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Jl("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Jl("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){var i=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(i)}return t}(e,[])}function ql(e,t,r){var i,n;return e?(e.ownerNode?i=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:i}):{}}function Zl(e,t){var r,i,n,{mirror:s,stylesheetManager:o}=e,a=null;a="#document"===t.nodeName?s.getId(t):s.getId(el.host(t));var l="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(n=null==(i=t.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,u=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&l&&u?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var e;return null==(e=u.get)?void 0:e.call(this)},set(e){var t,r=null==(t=u.set)?void 0:t.call(this,e);if(null!==a&&-1!==a)try{o.adoptStyleSheets(e,a)}catch(e){}return r}}),Bl(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})})):()=>{}}function Yl(e,t){void 0===t&&(t={});var i,n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){var{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:h,canvasMutationCb:d,fontCb:c,selectionCb:p,customElementCb:f}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),r(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),i(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),n(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),s(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),o(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),a(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),l(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),u(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),h(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),d(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),c(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),p(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),f(...arguments)}}(e,t),e.recordDOM&&(i=zl(e,e.doc));var s=function(e){var{mousemoveCb:t,sampling:r,doc:i,mirror:n}=e;if(!1===r.mousemove)return()=>{};var s,o="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,l=[],u=nl(Bl(e=>{var r=Date.now()-s;t(l.map(e=>(e.timeOffset-=r,e)),e),l=[],s=null}),a),h=Bl(nl(Bl(e=>{var t=jl(e),{clientX:r,clientY:i}=fl(e)?e.changedTouches[0]:e;s||(s=ol()),l.push({x:r,y:i,id:n.getId(t),timeOffset:ol()-s}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?Cl.Drag:e instanceof MouseEvent?Cl.MouseMove:Cl.TouchMove)}),o,{trailing:!1})),d=[tl("mousemove",h,i),tl("touchmove",h,i),tl("drag",h,i)];return Bl(()=>{d.forEach(e=>e())})}(e),o=Wl(e),a=$l(e),l=function(e,t){var{viewportResizeCb:r}=e,{win:i}=t,n=-1,s=-1;return tl("resize",Bl(nl(Bl(()=>{var e=ll(),t=ul();n===e&&s===t||(r({width:Number(t),height:Number(e)}),n=e,s=t)}),200)),i)}(e,{win:n}),u=function(e){var{inputCb:t,doc:i,mirror:n,blockClass:s,blockSelector:o,ignoreClass:a,ignoreSelector:l,maskInputOptions:u,maskInputFn:h,sampling:d,userTriggeredOnInput:c}=e;function p(e){var t=jl(e),r=e.isTrusted,n=t&&t.tagName;if(t&&"OPTION"===n&&(t=el.parentElement(t)),t&&n&&!(Vl.indexOf(n)<0)&&!dl(t,s,o,!0)&&!(t.classList.contains(a)||l&&t.matches(l))){var d=t.value,p=!1,v=L(t)||"";"radio"===v||"checkbox"===v?p=t.checked:(u[n.toLowerCase()]||u[v])&&(d=O({element:t,maskInputOptions:u,tagName:n,type:v,value:d,maskInputFn:h})),f(t,c?{text:d,isChecked:p,userTriggered:r}:{text:d,isChecked:p});var g=t.name;"radio"===v&&g&&p&&i.querySelectorAll('input[type="radio"][name="'+g+'"]').forEach(e=>{if(e!==t){var r=e.value;f(e,c?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}})}}function f(e,i){var s=Hl.get(e);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){Hl.set(e,i);var o=n.getId(e);Bl(t)(r({},i,{id:o}))}}var v=("last"===d.input?["change"]:["input","change"]).map(e=>tl(e,Bl(p),i)),g=i.defaultView;if(!g)return()=>{v.forEach(e=>e())};var m=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),y=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&v.push(...y.map(e=>sl(e[0],e[1],{set(){Bl(p)({target:this,isTrusted:!1})}},!1,g))),Bl(()=>{v.forEach(e=>e())})}(e),h=function(e){var{mediaInteractionCb:t,blockClass:r,blockSelector:i,mirror:n,sampling:s,doc:o}=e,a=Bl(e=>nl(Bl(s=>{var o=jl(s);if(o&&!dl(o,r,i,!0)){var{currentTime:a,volume:l,muted:u,playbackRate:h,loop:d}=o;t({type:e,id:n.getId(o),currentTime:a,volume:l,muted:u,playbackRate:h,loop:d})}}),s.media||500)),l=[tl("play",a(Ml.Play),o),tl("pause",a(Ml.Pause),o),tl("seeked",a(Ml.Seeked),o),tl("volumechange",a(Ml.VolumeChange),o),tl("ratechange",a(Ml.RateChange),o)];return Bl(()=>{l.forEach(e=>e())})}(e),d=()=>{},c=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(d=function(e,t){var{styleSheetRuleCb:r,mirror:i,stylesheetManager:n}=e,{win:s}=t;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Bl((e,t,s)=>{var[o,a]=s,{id:l,styleId:u}=ql(t,i,n.styleMirror);return(l&&-1!==l||u&&-1!==u)&&r({id:l,styleId:u,adds:[{rule:o,index:a}]}),e.apply(t,s)})}),s.CSSStyleSheet.prototype.addRule=function(e,t,r){void 0===r&&(r=this.cssRules.length);var i=e+" { "+t+" }";return s.CSSStyleSheet.prototype.insertRule.apply(this,[i,r])};var a,l,u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:Bl((e,t,s)=>{var[o]=s,{id:a,styleId:l}=ql(t,i,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&r({id:a,styleId:l,removes:[{index:o}]}),e.apply(t,s)})}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:Bl((e,t,s)=>{var[o]=s,{id:a,styleId:l}=ql(t,i,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&r({id:a,styleId:l,replace:o}),e.apply(t,s)})})),s.CSSStyleSheet.prototype.replaceSync&&(l=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:Bl((e,t,s)=>{var[o]=s,{id:a,styleId:l}=ql(t,i,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&r({id:a,styleId:l,replaceSync:o}),e.apply(t,s)})}));var h={};Kl("CSSGroupingRule")?h.CSSGroupingRule=s.CSSGroupingRule:(Kl("CSSMediaRule")&&(h.CSSMediaRule=s.CSSMediaRule),Kl("CSSConditionRule")&&(h.CSSConditionRule=s.CSSConditionRule),Kl("CSSSupportsRule")&&(h.CSSSupportsRule=s.CSSSupportsRule));var d={};return Object.entries(h).forEach(e=>{var[t,s]=e;d[t]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(d[t].insertRule,{apply:Bl((e,t,s)=>{var[o,a]=s,{id:l,styleId:u}=ql(t.parentStyleSheet,i,n.styleMirror);return(l&&-1!==l||u&&-1!==u)&&r({id:l,styleId:u,adds:[{rule:o,index:[...Gl(t),a||0]}]}),e.apply(t,s)})}),s.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:Bl((e,t,s)=>{var[o]=s,{id:a,styleId:l}=ql(t.parentStyleSheet,i,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&r({id:a,styleId:l,removes:[{index:[...Gl(t),o]}]}),e.apply(t,s)})})}),Bl(()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=u,a&&(s.CSSStyleSheet.prototype.replace=a),l&&(s.CSSStyleSheet.prototype.replaceSync=l),Object.entries(h).forEach(e=>{var[t,r]=e;r.prototype.insertRule=d[t].insertRule,r.prototype.deleteRule=d[t].deleteRule})})}(e,{win:n}),c=Zl(e,e.doc),p=function(e,t){var{styleDeclarationCb:r,mirror:i,ignoreCSSAttributes:n,stylesheetManager:s}=e,{win:o}=t,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Bl((e,t,o)=>{var l,[u,h,d]=o;if(n.has(u))return a.apply(t,[u,h,d]);var{id:c,styleId:p}=ql(null==(l=t.parentRule)?void 0:l.parentStyleSheet,i,s.styleMirror);return(c&&-1!==c||p&&-1!==p)&&r({id:c,styleId:p,set:{property:u,value:h,priority:d},index:Gl(t.parentRule)}),e.apply(t,o)})});var l=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:Bl((e,t,o)=>{var a,[u]=o;if(n.has(u))return l.apply(t,[u]);var{id:h,styleId:d}=ql(null==(a=t.parentRule)?void 0:a.parentStyleSheet,i,s.styleMirror);return(h&&-1!==h||d&&-1!==d)&&r({id:h,styleId:d,remove:{property:u},index:Gl(t.parentRule)}),e.apply(t,o)})}),Bl(()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=l})}(e,{win:n}),e.collectFonts&&(f=function(e){var{fontCb:t,doc:r}=e,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,o=i.FontFace;i.FontFace=function(e,t,r){var i=new o(e,t,r);return s.set(i,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),i};var a=Qa(r.fonts,"add",function(e){return function(r){return setTimeout(Bl(()=>{var e=s.get(r);e&&(t(e),s.delete(r))}),0),e.apply(this,[r])}});return n.push(()=>{i.FontFace=o}),n.push(a),Bl(()=>{n.forEach(e=>e())})}(e)));var v=function(e){var{doc:t,mirror:r,blockClass:i,blockSelector:n,selectionCb:s}=e,o=!0,a=Bl(()=>{var e=t.getSelection();if(!(!e||o&&(null==e?void 0:e.isCollapsed))){o=e.isCollapsed||!1;for(var a=[],l=e.rangeCount||0,u=0;u<l;u++){var h=e.getRangeAt(u),{startContainer:d,startOffset:c,endContainer:p,endOffset:f}=h;dl(d,i,n,!0)||dl(p,i,n,!0)||a.push({start:r.getId(d),startOffset:c,end:r.getId(p),endOffset:f})}s({ranges:a})}});return a(),tl("selectionchange",a)}(e),g=function(e){var{doc:t,customElementCb:r}=e,i=t.defaultView;return i&&i.customElements?Qa(i.customElements,"define",function(e){return function(t,i,n){try{r({define:{name:t}})}catch(e){console.warn("Custom element callback failed for "+t)}return e.apply(this,[t,i,n])}}):()=>{}}(e),m=[];for(var y of e.plugins)m.push(y.observer(y.callback,n,y.options));return Bl(()=>{Ul.forEach(e=>e.reset()),null==i||i.disconnect(),s(),o(),a(),l(),u(),h(),d(),c(),p(),f(),v(),g(),m.forEach(e=>e())})}function Jl(e){return void 0!==window[e]}function Kl(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Xl{constructor(e){d(this,"iframeIdToRemoteIdMap",new WeakMap),d(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){var n=r||this.getIdToRemoteIdMap(e),s=i||this.getRemoteIdToIdMap(e),o=n.get(t);return o||(o=this.generateIdFn(),n.set(t,o),s.set(o,t)),o}getIds(e,t){var r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,i))}getRemoteId(e,t,r){var i=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var n=i.get(t);return n||-1}getRemoteIds(e,t){var r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Ql{constructor(e){d(this,"iframes",new WeakMap),d(this,"crossOriginIframeMap",new WeakMap),d(this,"crossOriginIframeMirror",new Xl(G)),d(this,"crossOriginIframeStyleMirror"),d(this,"crossOriginIframeRootIdMap",new WeakMap),d(this,"mirror"),d(this,"mutationCb"),d(this,"wrappedEmit"),d(this,"loadListener"),d(this,"stylesheetManager"),d(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Xl(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 r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(i=this.loadListener)||i.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){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var r=this.crossOriginIframeMap.get(e.source);if(r){var i=this.transformCrossOriginEvent(r,t.data.event);i&&this.wrappedEmit(i,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var r;switch(t.type){case Sl.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:Sl.IncrementalSnapshot,data:{source:Cl.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Sl.Meta:case Sl.Load:case Sl.DomContentLoaded:return!1;case Sl.Plugin:return t;case Sl.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Sl.IncrementalSnapshot:switch(t.data.source){case Cl.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),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 Cl.Drag:case Cl.TouchMove:case Cl.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Cl.ViewportResize:return!1;case Cl.MediaInteraction:case Cl.MouseInteraction:case Cl.Scroll:case Cl.CanvasMutation:case Cl.Input:return this.replaceIds(t.data,e,["id"]),t;case Cl.StyleSheetRule:case Cl.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Cl.Font:return t;case Cl.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Cl.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(var n of i)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}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===El.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class eu{constructor(e){d(this,"shadowDoms",new WeakSet),d(this,"mutationCb"),d(this,"scrollCb"),d(this,"bypassOptions"),d(this,"mirror"),d(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(x(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var i=zl(r({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push($l(r({},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(el.host(e))),this.restoreHandlers.push(Zl({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){var r=this;this.restoreHandlers.push(Qa(e.prototype,"attachShadow",function(e){return function(i){var n=e.call(this,i),s=el.shadowRoot(this);return s&&wl(this)&&r.addShadowRoot(s,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var tu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ru="undefined"==typeof Uint8Array?[]:new Uint8Array(256),iu=0;iu<64;iu++)ru[tu.charCodeAt(iu)]=iu;var nu=new Map;var su=(e,t,r)=>{if(e&&(lu(e,t)||"object"==typeof e)){var i=function(e,t){var r=nu.get(e);return r||(r=new Map,nu.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),n=i.indexOf(e);return-1===n&&(n=i.length,i.push(e)),n}};function ou(e,t,r){if(e instanceof Array)return e.map(e=>ou(e,t,r));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,r=new Uint8Array(e),i=r.length,n="";for(t=0;t<i;t+=3)n+=tu[r[t]>>2],n+=tu[(3&r[t])<<4|r[t+1]>>4],n+=tu[(15&r[t+1])<<2|r[t+2]>>6],n+=tu[63&r[t+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[ou(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var i=e.constructor.name,{src:n}=e;return{rr_type:i,src:n}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[ou(e.data,t,r),e.width,e.height]}:lu(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:su(e,t,r)}:e}var au=(e,t,r)=>e.map(e=>ou(e,t,r)),lu=(e,t)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(r.find(r=>e instanceof t[r]))};function uu(e,t,r,i){var n=[];try{var s=Qa(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n){for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;a<s;a++)o[a-1]=arguments[a];if(!dl(this,t,r,!0)){var l=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=l),i&&["webgl","webgl2"].includes(l))if(o[0]&&"object"==typeof o[0]){var u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...o])}});n.push(s)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function hu(e,t,r,i,n,s){var o=[],a=Object.getOwnPropertyNames(e),l=function(a){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))return 0;try{if("function"!=typeof e[a])return 0;var l=Qa(e,a,function(e){return function(){for(var o=arguments.length,l=new Array(o),u=0;u<o;u++)l[u]=arguments[u];var h=e.apply(this,l);if(su(h,s,this),"tagName"in this.canvas&&!dl(this.canvas,i,n,!0)){var d=au(l,s,this),c={type:t,property:a,args:d};r(this.canvas,c)}return h}});o.push(l)}catch(i){var u=sl(e,a,{set(e){r(this.canvas,{type:t,property:a,args:[e],setter:!0})}});o.push(u)}};for(var u of a)l(u);return o}var du,cu,pu,fu,vu="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",gu="undefined"!=typeof window&&window.Blob&&new Blob([(du=vu,Uint8Array.from(atob(du),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});function mu(e){var t;try{if(!(t=gu&&(window.URL||window.webkitURL).createObjectURL(gu)))throw"";var r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch(t){return new Worker("data:text/javascript;base64,"+vu,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class yu{constructor(e){d(this,"pendingCanvasMutations",new Map),d(this,"rafStamps",{latestId:0,invokeId:null}),d(this,"mirror"),d(this,"mutationCb"),d(this,"resetObservers"),d(this,"frozen",!1),d(this,"locked",!1),d(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)});var{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:s,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&"all"===t&&this.initCanvasMutationObserver(r,i,n),s&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:o})}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,r,i,n,s){var o=this,a=uu(r,i,n,!0),l=new Map,u=new mu;u.onmessage=e=>{var{id:t}=e.data;if(l.set(t,!1),"base64"in e.data){var{base64:r,type:i,width:n,height:s}=e.data;this.mutationCb({id:t,type:xl["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var h,d=1e3/e,c=0,p=e=>{var a;c&&e-c<d?h=requestAnimationFrame(p):(c=e,(a=[],r.document.querySelectorAll("canvas").forEach(e=>{dl(e,i,n,!0)||a.push(e)}),a).forEach(function(){var e=t(function*(e){var t,r=o.mirror.getId(e);if(!l.get(r)&&0!==e.width&&0!==e.height){if(l.set(r,!0),["webgl","webgl2"].includes(e.__context)){var i=e.getContext(e.__context);!1===(null==(t=null==i?void 0:i.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&i.clear(i.COLOR_BUFFER_BIT)}var n=yield createImageBitmap(e);u.postMessage({id:r,bitmap:n,width:e.width,height:e.height,dataURLOptions:s.dataURLOptions},[n])}});return function(t){return e.apply(this,arguments)}}()),h=requestAnimationFrame(p))};h=requestAnimationFrame(p),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var i=uu(e,t,r,!1),n=function(e,t,r,i){var n=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),o=function(s){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])return 1;var o=Qa(t.CanvasRenderingContext2D.prototype,s,function(n){return function(){for(var o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return dl(this.canvas,r,i,!0)||setTimeout(()=>{var r=au(a,t,this);e(this.canvas,{type:xl["2D"],property:s,args:r})},0),n.apply(this,a)}});n.push(o)}catch(r){var a=sl(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:xl["2D"],property:s,args:[t],setter:!0})}});n.push(a)}};for(var a of s)o(a);return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),s=function(e,t,r,i){var n=[];return n.push(...hu(t.WebGLRenderingContext.prototype,xl.WebGL,e,r,i,t)),void 0!==t.WebGL2RenderingContext&&n.push(...hu(t.WebGL2RenderingContext.prototype,xl.WebGL2,e,r,i,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){var e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var n=r.map(e=>i(e,u)),{type:s}=r[0];this.mutationCb({id:t,type:s,commands:n}),this.pendingCanvasMutations.delete(e)}}}}class _u{constructor(e){d(this,"trackedLinkElements",new WeakSet),d(this,"mutationCb"),d(this,"adoptedStyleSheetCb"),d(this,"styleMirror",new yl),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){var r=this;if(0!==e.length){var i={id:t,styleIds:[]},n=[],s=function(e){var t;r.styleMirror.has(e)?t=r.styleMirror.getId(e):(t=r.styleMirror.add(e),n.push({styleId:t,rules:Array.from(e.rules||CSSRule,(t,r)=>({rule:E(t,e.href),index:r}))})),i.styleIds.push(t)};for(var o of e)s(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class bu{constructor(){d(this,"nodeMap",new WeakMap),d(this,"active",!1)}inOtherBuffer(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).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(){}}var wu=!1;try{if(2!==Array.from([1],e=>2*e)[0]){var Su=document.createElement("iframe");document.body.appendChild(Su),Array.from=(null==(n=Su.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(Su)}}catch(e){console.debug("Unable to override Array.from",e)}var Cu,Iu,ku=new A;function xu(e){void 0===e&&(e={});var{emit:t,checkoutEveryNms:i,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:u="rr-mask",maskTextSelector:h=null,inlineStylesheet:d=!0,maskAllInputs:c,maskInputOptions:p,slimDOMOptions:f,maskInputFn:v,maskTextFn:g,hooks:m,packFn:y,sampling:_={},dataURLOptions:b={},mousemoveWait:w,recordDOM:S=!0,recordCanvas:C=!1,recordCrossOriginIframes:I=!1,recordAfter:k=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:M=!1,inlineImages:E=!1,plugins:O,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:T=new Set([]),errorHandler:L}=e;Rl=L;var P=!I||window.parent===window,N=!1;if(!P)try{window.parent.document&&(N=!1)}catch(e){N=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!N)return()=>{};void 0!==w&&void 0===_.mousemove&&(_.mousemove=w),ku.reset();var D,F=!0===c?{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},B=se(f);!function(e){void 0===e&&(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)}();var U=0,j=e=>{for(var t of O||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!N&&(e=y(e)),e};cu=(e,r)=>{var s,o=e;if(o.timestamp=ol(),!(null==(s=Ul[0])?void 0:s.isFrozen())||o.type===Sl.FullSnapshot||o.type===Sl.IncrementalSnapshot&&o.data.source===Cl.Mutation||Ul.forEach(e=>e.unfreeze()),P)null==t||t(j(o),r);else if(N){var a={type:"rrweb",event:j(o),origin:window.location.origin,isCheckout:r};window.parent.postMessage(a,"*")}if(o.type===Sl.FullSnapshot)D=o,U=0;else if(o.type===Sl.IncrementalSnapshot){if(o.data.source===Cl.Mutation&&o.data.isAttachIframe)return;U++;var l=n&&U>=n,u=i&&o.timestamp-D.timestamp>i;(l||u)&&pu(!0)}};var z=e=>{cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.Mutation},e)})},W=e=>cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.Scroll},e)}),$=e=>cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.CanvasMutation},e)}),V=new _u({mutationCb:z,adoptedStyleSheetCb:e=>cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.AdoptedStyleSheet},e)})}),H=new Ql({mirror:ku,mutationCb:z,stylesheetManager:V,recordCrossOriginIframes:I,wrappedEmit:cu});for(var G of O||[])G.getMirror&&G.getMirror({nodeMirror:ku,crossOriginIframeMirror:H.crossOriginIframeMirror,crossOriginIframeStyleMirror:H.crossOriginIframeStyleMirror});var q=new bu;fu=new yu({recordCanvas:C,mutationCb:$,win:window,blockClass:s,blockSelector:o,mirror:ku,sampling:_.canvas,dataURLOptions:b});var Z=new eu({mutationCb:z,scrollCb:W,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:h,inlineStylesheet:d,maskInputOptions:F,dataURLOptions:b,maskTextFn:g,maskInputFn:v,recordCanvas:C,inlineImages:E,sampling:_,slimDOMOptions:B,iframeManager:H,stylesheetManager:V,canvasManager:fu,keepIframeSrcFn:R,processedNodeManager:q},mirror:ku});pu=function(e){if(void 0===e&&(e=!1),S){cu({type:Sl.Meta,data:{href:window.location.href,width:ul(),height:ll()}},e),V.reset(),Z.init(),Ul.forEach(e=>e.lock());var t=function(e,t){var{mirror:r=new A,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:d,maskInputFn:c,slimDOM:p=!1,dataURLOptions:f,preserveWhiteSpace:v,onSerialize:g,onIframeLoad:m,iframeLoadTimeout:y,onStylesheetLoad:_,stylesheetLoadTimeout:b,keepIframeSrcFn:w=()=>!1}=t||{};return oe(e,{doc:e,mirror:r,blockClass:i,blockSelector:n,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{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===h?{password:!0}:h,maskTextFn:d,maskInputFn:c,slimDOMOptions:se(p),dataURLOptions:f,inlineImages:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:g,onIframeLoad:m,iframeLoadTimeout:y,onStylesheetLoad:_,stylesheetLoadTimeout:b,keepIframeSrcFn:w,newlyAddedElement:!1})}(document,{mirror:ku,blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:h,inlineStylesheet:d,maskAllInputs:F,maskTextFn:g,maskInputFn:v,slimDOM:B,dataURLOptions:b,recordCanvas:C,inlineImages:E,onSerialize:e=>{vl(e,ku)&&H.addIframe(e),gl(e,ku)&&V.trackLinkElement(e),ml(e)&&Z.addShadowRoot(el.shadowRoot(e),document)},onIframeLoad:(e,t)=>{H.attachIframe(e,t),Z.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");cu({type:Sl.FullSnapshot,data:{node:t,initialOffset:al(window)}},e),Ul.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,ku.getId(document))}};try{var Y=[],J=e=>{var t;return Bl(Yl)({mutationCb:z,mousemoveCb:(e,t)=>cu({type:Sl.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.MouseInteraction},e)}),scrollCb:W,viewportResizeCb:e=>cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.ViewportResize},e)}),inputCb:e=>cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.Input},e)}),mediaInteractionCb:e=>cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.MediaInteraction},e)}),styleSheetRuleCb:e=>cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.StyleSheetRule},e)}),styleDeclarationCb:e=>cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.StyleDeclaration},e)}),canvasMutationCb:$,fontCb:e=>cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.Font},e)}),selectionCb:e=>{cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.Selection},e)})},customElementCb:e=>{cu({type:Sl.IncrementalSnapshot,data:r({source:Cl.CustomElement},e)})},blockClass:s,ignoreClass:a,ignoreSelector:l,maskTextClass:u,maskTextSelector:h,maskInputOptions:F,inlineStylesheet:d,sampling:_,recordDOM:S,recordCanvas:C,inlineImages:E,userTriggeredOnInput:x,collectFonts:M,doc:e,maskInputFn:v,maskTextFn:g,keepIframeSrcFn:R,blockSelector:o,slimDOMOptions:B,dataURLOptions:b,mirror:ku,iframeManager:H,stylesheetManager:V,shadowDomManager:Z,processedNodeManager:q,canvasManager:fu,ignoreCSSAttributes:T,plugins:(null==(t=null==O?void 0:O.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>cu({type:Sl.Plugin,data:{plugin:e.name,payload:t}})})))||[]},m)};H.addLoadListener(e=>{try{Y.push(J(e.contentDocument))}catch(e){console.warn(e)}});var K=()=>{pu(),Y.push(J(document)),wu=!0};return["interactive","complete"].includes(document.readyState)?K():(Y.push(tl("DOMContentLoaded",()=>{cu({type:Sl.DomContentLoaded,data:{}}),"DOMContentLoaded"===k&&K()})),Y.push(tl("load",()=>{cu({type:Sl.Load,data:{}}),"load"===k&&K()},window))),()=>{Y.forEach(e=>{try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),q.destroy(),wu=!1,Rl=void 0}}catch(e){console.warn(e)}}xu.addCustomEvent=(e,t)=>{if(!wu)throw new Error("please add custom event after start recording");cu({type:Sl.Custom,data:{tag:e,payload:t}})},xu.freezePage=()=>{Ul.forEach(e=>e.freeze())},xu.takeFullSnapshot=e=>{if(!wu)throw new Error("please take full snapshot after start recording");pu(e)},xu.mirror=ku,(Iu=Cu||(Cu={}))[Iu.NotStarted=0]="NotStarted",Iu[Iu.Running=1]="Running",Iu[Iu.Stopped=2]="Stopped";var Mu=Object.defineProperty,Eu=(e,t,r)=>((e,t,r)=>t in e?Mu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);class Au{constructor(e){Eu(this,"fileName"),Eu(this,"functionName"),Eu(this,"lineNumber"),Eu(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t}}var Ou=/(^|@)\S+:\d+/,Ru=/^\s*at .*(\S+:\d+|\(native\))/m,Tu=/^(eval@)?(\[native code])?$/,Lu={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Ru)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Ru)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:i.pop()),s=i.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Au({functionName:s,fileName:o,lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(Tu)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Au({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),i=r&&r[1]?r[1]:void 0,n=this.extractLocation(e.replace(t,""));return new Au({functionName:i,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),i=[],n=2,s=r.length;n<s;n+=2){var o=t.exec(r[n]);o&&i.push(new Au({fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),i=[],n=0,s=r.length;n<s;n+=2){var o=t.exec(r[n]);o&&i.push(new Au({functionName:o[3]||void 0,fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Ou)&&!e.match(/^Error created at/)},this).map(function(e){var t=e.split("@"),r=this.extractLocation(t.pop()),i=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Au({functionName:i,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})},this)}};function Pu(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var i=e.parentElement,n=[];if(i.children&&i.children.length>0)for(var s=0;s<i.children.length;s++){var o=i.children[s];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===r&&n.push(o)}n.length>1&&(r+=":eq("+n.indexOf(e)+")"),t=r+(t?">"+t:""),e=i}return t}function Nu(e){return"[object Object]"===Object.prototype.toString.call(e)}function Du(e,t){if(0===t)return!0;var r=Object.keys(e);for(var i of r)if(Nu(e[i])&&Du(e[i],t-1))return!0;return!1}function Fu(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var i=[],n=[];return JSON.stringify(e,function(e,t){if(i.length>0){var s=i.indexOf(this);~s?i.splice(s+1):i.push(this),~s?n.splice(s,1/0,e):n.push(e),~i.indexOf(t)&&(t=i[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,i.indexOf(t)).join(".")+"]")}else i.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Nu(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Nu(e)&&Du(e,r.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=t.slice(0,r.stringLengthLimit)+"...");return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){var o={};for(var a in t){var l=t[a];Array.isArray(l)?o[a]=Pu(l.length?l[0]:null):o[a]=l}return o}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}var Bu={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Uu(e,t,r){var i,n=r?Object.assign({},Bu,r):Bu,s=n.logger;if(!s)return()=>{};i="string"==typeof s?t[s]:s;var o=0,a=!1,l=[];if(n.level.includes("error")){var u=t=>{var r=t.message,i=t.error,s=Lu.parse(i).map(e=>e.toString()),o=[Fu(r,n.stringifyOptions)];e({level:"error",trace:s,payload:o})};t.addEventListener("error",u),l.push(()=>{t.removeEventListener("error",u)});var h=t=>{var r,i;t.reason instanceof Error?i=[Fu("Uncaught (in promise) "+(r=t.reason).name+": "+r.message,n.stringifyOptions)]:(r=new Error,i=[Fu("Uncaught (in promise)",n.stringifyOptions),Fu(t.reason,n.stringifyOptions)]);var s=Lu.parse(r).map(e=>e.toString());e({level:"error",trace:s,payload:i})};t.addEventListener("unhandledrejection",h),l.push(()=>{t.removeEventListener("unhandledrejection",h)})}for(var d of n.level)l.push(c(i,d));return()=>{l.forEach(e=>e())};function c(t,r){var i=this;return t[r]?function(e,t,r){try{if(!(t in e))return()=>{};var i=e[t],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=n,()=>{e[t]=i}}catch(e){return()=>{}}}(t,r,t=>function(){for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];if(t.apply(i,l),!("assert"===r&&l[0]||a)){a=!0;try{var h=Lu.parse(new Error).map(e=>e.toString()).splice(1),d=("assert"===r?l.slice(1):l).map(e=>Fu(e,n.stringifyOptions));++o<n.lengthThreshold?e({level:r,trace:h,payload:d}):o===n.lengthThreshold&&e({level:"warn",trace:[],payload:[Fu("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...l)}finally{a=!1}}}):()=>{}}}var ju="undefined"!=typeof window?window:void 0,zu="undefined"!=typeof globalThis?globalThis:ju,Wu=null==zu?void 0:zu.navigator,$u=null==zu?void 0:zu.document,Vu=null==zu?void 0:zu.location,Hu=null==zu?void 0:zu.fetch;ju&&$u&&$u.createElement,null==zu||zu.XMLHttpRequest,null==zu||zu.AbortController;var Gu=null==Wu?void 0:Wu.userAgent,qu=null!=ju?ju:{},Zu=(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))(Zu||{}),Yu=(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))(Yu||{});function Ju(e){return"string"==typeof e}function Ku(e){return void 0===e}function Xu(e){return null==e}function Qu(e){return Array.isArray(e)}function eh(e){return"function"==typeof e}var th={none:0,error:1,warn:2,info:3,debug:4},rh="[vTilt]",ih=new Set(["none","error","warn","info","debug"]);function nh(){return"undefined"!=typeof console}function sh(e){var t=e.length>0&&"string"==typeof e[0]?e[0]:"",r=t?e.slice(1):e;return[t?rh+":"+t:rh,...r]}var oh="warn",ah=!1;var lh=null;function uh(){return lh||(lh={setLevel(e,t){void 0===t&&(t=!1),oh=e,t&&(ah=!0)},setLevelFromRemote(e){ah||e&&ih.has(e)&&(oh=e)},getLevel:()=>oh,isLockedByInit:()=>ah,debug(){if(!(th[oh]<th.debug)&&nh()){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];console.log(...sh(t))}},info(){if(!(th[oh]<th.info)&&nh()){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];console.log(...sh(t))}},warn(){if(!(th[oh]<th.warn)&&nh()){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];console.warn(...sh(t))}},error(){if(!(th[oh]<th.error)&&nh()){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];console.error(...sh(t))}}}),lh}function hh(e,t){void 0===t&&(t=!0);var r=void 0!==e.log_level||!!e.debug,i=function(e){return e.log_level&&ih.has(e.log_level)?e.log_level:e.debug?"debug":"warn"}(e);return uh().setLevel(i,t&&r),i}function dh(e,t){try{return e()}catch(e){return t}}var ch="x-api-key";function ph(e,t,r){void 0===r&&(r={});var{api_host:i,token:n}=e,s=""+(i?i.replace(/\/+$/gm,""):"")+t;if(r.includeTokenQuery&&n){var o=s.includes("?")?"&":"?";s=""+s+o+"token="+n}return s}function fh(e){return e.token?{[ch]:e.token}:{}}class vh{constructor(){this._events=new Map,this._onceEvents=new Map}on(e,t){return this._events.has(e)||this._events.set(e,new Set),this._events.get(e).add(t),()=>{var r;null===(r=this._events.get(e))||void 0===r||r.delete(t)}}once(e,t){return this._onceEvents.has(e)||this._onceEvents.set(e,new Set),this._onceEvents.get(e).add(t),()=>{var r;null===(r=this._onceEvents.get(e))||void 0===r||r.delete(t)}}emit(e,t){var r,i;null===(r=this._events.get(e))||void 0===r||r.forEach(r=>{try{r(t)}catch(t){uh().error("emitter",'error in event listener for "'+e+'":',t)}});var n=this._onceEvents.get(e);n&&(n.forEach(r=>{try{r(t)}catch(t){uh().error("emitter",'error in once listener for "'+e+'":',t)}}),this._onceEvents.delete(e)),null===(i=this._events.get("*"))||void 0===i||i.forEach(r=>{try{r({event:e,payload:t})}catch(e){uh().error("emitter","error in wildcard listener:",e)}})}off(e){e?(this._events.delete(e),this._onceEvents.delete(e)):(this._events.clear(),this._onceEvents.clear())}listenerCount(e){var t,r,i,n;return(null!==(r=null===(t=this._events.get(e))||void 0===t?void 0:t.size)&&void 0!==r?r:0)+(null!==(n=null===(i=this._onceEvents.get(e))||void 0===i?void 0:i.size)&&void 0!==n?n:0)}hasListeners(e){return this.listenerCount(e)>0}}var gh="sdk:initialized",mh="sdk:config_updated",yh="sdk:remote_config_loaded",_h="consent:updated",bh="event:captured",wh="recording:started",Sh="recording:stopped",Ch=0,Ih=!1,kh=!1;function xh(e){(Ch+=1)<2||(Ih=!0,kh||(kh=!0,uh().warn(e,"vTilt network requests are being cancelled before reaching the server (likely an ad blocker, privacy extension, or DNS-level filter). Further retries and snapshots have been suspended for this page. Route SDK traffic through your own domain to avoid this — see https://www.vtilt.com/docs/browser/reverse-proxy.")))}function Mh(){Ch=0}function Eh(){return Ih}var Ah="23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";function Oh(e){for(var t=(2<<31-Math.clz32(57))-1,r=Math.ceil(1.6*t*e/57),i="";i.length<e;)for(var n=crypto.getRandomValues(new Uint8Array(r)),s=0;s<r&&i.length<e;s++){var o=n[s]&t;o<57&&(i+=Ah[o])}return i}var Rh=1048576;function Th(e,t,r){if(e)if(Array.isArray(e))e.forEach((e,i)=>{t.call(r,e,i)});else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(r,e[i],i)}function Lh(e,t,r,i){var{capture:n=!1,passive:s=!0}=null!=i?i:{};null==e||e.addEventListener(t,r,{capture:n,passive:s})}function Ph(e,t){if(!t)return e;for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function Nh(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];for(var n of r)for(var s of n)e.push(s);return e}function Dh(e){var t={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];null!=i&&""!==i&&(t[r]=i)}return t}var Fh=[".sr-only",".visually-hidden",".w-condition-invisible",'[class*="w-condition-invisible"]','[class*="condition-invisible"]','input[type="hidden"]'].join(", ");function Bh(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];var n=function(){for(var e=new Set,t=[],r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];for(var s of i)if(s)for(var o of s.split(",")){var a=o.trim();a&&!e.has(a)&&(e.add(a),t.push(a))}return t}(...e?[]:[Fh],...r);return n.length>0?n.join(", "):void 0}var Uh=[Yu.MouseMove,Yu.MouseInteraction,Yu.Scroll,Yu.ViewportResize,Yu.Input,Yu.TouchMove,Yu.MediaInteraction,Yu.Drag];function jh(e){try{return new Blob([JSON.stringify(e)]).size}catch(t){return 2*JSON.stringify(e).length}}function zh(e,t){if(void 0===t&&(t=6606028.8),e.size>=t&&e.data.length>1){var r=Math.floor(e.data.length/2),i=e.data.slice(0,r),n=e.data.slice(r);return[...zh({size:jh(i),data:i,sessionId:e.sessionId,windowId:e.windowId}),...zh({size:jh(n),data:n,sessionId:e.sessionId,windowId:e.windowId})]}return[e]}function Wh(e){return e.type===Zu.Custom&&"sessionIdle"===e.data.tag}function $h(e){return 3===e.type&&Uh.includes(e.data.source)}function Vh(e,t,r,i,n){return e<t||e>r?(uh().warn("replay",i+" must be between "+t+" and "+r+". Using default: "+n),n):e}var Hh=Uint8Array,Gh=Uint16Array,qh=Int32Array,Zh=new Hh([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Yh=new Hh([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Jh=new Hh([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Kh=function(e,t){for(var r=new Gh(31),i=0;i<31;++i)r[i]=t+=1<<e[i-1];var n=new qh(r[30]);for(i=1;i<30;++i)for(var s=r[i];s<r[i+1];++s)n[s]=s-r[i]<<5|i;return{b:r,r:n}},Xh=Kh(Zh,2),Qh=Xh.b,ed=Xh.r;Qh[28]=258,ed[258]=28;for(var td=Kh(Yh,0).r,rd=new Gh(32768),id=0;id<32768;++id){var nd=(43690&id)>>1|(21845&id)<<1;nd=(61680&(nd=(52428&nd)>>2|(13107&nd)<<2))>>4|(3855&nd)<<4,rd[id]=((65280&nd)>>8|(255&nd)<<8)>>1}var sd=function(e,t,r){for(var i=e.length,n=0,s=new Gh(t);n<i;++n)e[n]&&++s[e[n]-1];var o,a=new Gh(t);for(n=1;n<t;++n)a[n]=a[n-1]+s[n-1]<<1;if(r){o=new Gh(1<<t);var l=15-t;for(n=0;n<i;++n)if(e[n])for(var u=n<<4|e[n],h=t-e[n],d=a[e[n]-1]++<<h,c=d|(1<<h)-1;d<=c;++d)o[rd[d]>>l]=u}else for(o=new Gh(i),n=0;n<i;++n)e[n]&&(o[n]=rd[a[e[n]-1]++]>>15-e[n]);return o},od=new Hh(288);for(id=0;id<144;++id)od[id]=8;for(id=144;id<256;++id)od[id]=9;for(id=256;id<280;++id)od[id]=7;for(id=280;id<288;++id)od[id]=8;var ad=new Hh(32);for(id=0;id<32;++id)ad[id]=5;var ld=sd(od,9,0),ud=sd(ad,5,0),hd=function(e){return(e+7)/8|0},dd=function(e,t,r){return(null==r||r>e.length)&&(r=e.length),new Hh(e.subarray(t,r))},cd=function(e,t,r){r<<=7&t;var i=t/8|0;e[i]|=r,e[i+1]|=r>>8},pd=function(e,t,r){r<<=7&t;var i=t/8|0;e[i]|=r,e[i+1]|=r>>8,e[i+2]|=r>>16},fd=function(e,t){for(var r=[],i=0;i<e.length;++i)e[i]&&r.push({s:i,f:e[i]});var n=r.length,s=r.slice();if(!n)return{t:wd,l:0};if(1==n){var o=new Hh(r[0].s+1);return o[r[0].s]=1,{t:o,l:1}}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var a=r[0],l=r[1],u=0,h=1,d=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};h!=n-1;)a=r[r[u].f<r[d].f?u++:d++],l=r[u!=h&&r[u].f<r[d].f?u++:d++],r[h++]={s:-1,f:a.f+l.f,l:a,r:l};var c=s[0].s;for(i=1;i<n;++i)s[i].s>c&&(c=s[i].s);var p=new Gh(c+1),f=vd(r[h-1],p,0);if(f>t){i=0;var v=0,g=f-t,m=1<<g;for(s.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});i<n;++i){var y=s[i].s;if(!(p[y]>t))break;v+=m-(1<<f-p[y]),p[y]=t}for(v>>=g;v>0;){var _=s[i].s;p[_]<t?v-=1<<t-p[_]++-1:++i}for(;i>=0&&v;--i){var b=s[i].s;p[b]==t&&(--p[b],++v)}f=t}return{t:new Hh(p),l:f}},vd=function(e,t,r){return-1==e.s?Math.max(vd(e.l,t,r+1),vd(e.r,t,r+1)):t[e.s]=r},gd=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Gh(++t),i=0,n=e[0],s=1,o=function(e){r[i++]=e},a=1;a<=t;++a)if(e[a]==n&&a!=t)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=e[a]}return{c:r.subarray(0,i),n:t}},md=function(e,t){for(var r=0,i=0;i<t.length;++i)r+=e[i]*t[i];return r},yd=function(e,t,r){var i=r.length,n=hd(t+2);e[n]=255&i,e[n+1]=i>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var s=0;s<i;++s)e[n+s+4]=r[s];return 8*(n+4+i)},_d=function(e,t,r,i,n,s,o,a,l,u,h){cd(t,h++,r),++n[256];for(var d=fd(n,15),c=d.t,p=d.l,f=fd(s,15),v=f.t,g=f.l,m=gd(c),y=m.c,_=m.n,b=gd(v),w=b.c,S=b.n,C=new Gh(19),I=0;I<y.length;++I)++C[31&y[I]];for(I=0;I<w.length;++I)++C[31&w[I]];for(var k=fd(C,7),x=k.t,M=k.l,E=19;E>4&&!x[Jh[E-1]];--E);var A,O,R,T,L=u+5<<3,P=md(n,od)+md(s,ad)+o,N=md(n,c)+md(s,v)+o+14+3*E+md(C,x)+2*C[16]+3*C[17]+7*C[18];if(l>=0&&L<=P&&L<=N)return yd(t,h,e.subarray(l,l+u));if(cd(t,h,1+(N<P)),h+=2,N<P){A=sd(c,p,0),O=c,R=sd(v,g,0),T=v;var D=sd(x,M,0);cd(t,h,_-257),cd(t,h+5,S-1),cd(t,h+10,E-4),h+=14;for(I=0;I<E;++I)cd(t,h+3*I,x[Jh[I]]);h+=3*E;for(var F=[y,w],B=0;B<2;++B){var U=F[B];for(I=0;I<U.length;++I){var j=31&U[I];cd(t,h,D[j]),h+=x[j],j>15&&(cd(t,h,U[I]>>5&127),h+=U[I]>>12)}}}else A=ld,O=od,R=ud,T=ad;for(I=0;I<a;++I){var z=i[I];if(z>255){pd(t,h,A[(j=z>>18&31)+257]),h+=O[j+257],j>7&&(cd(t,h,z>>23&31),h+=Zh[j]);var W=31&z;pd(t,h,R[W]),h+=T[W],W>3&&(pd(t,h,z>>5&8191),h+=Yh[W])}else pd(t,h,A[z]),h+=O[z]}return pd(t,h,A[256]),h+O[256]},bd=new qh([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),wd=new Hh(0),Sd=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,i=9;--i;)r=(1&r&&-306674912)^r>>>1;e[t]=r}return e}(),Cd=function(e,t,r,i,n){if(!n&&(n={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),o=new Hh(s.length+e.length);o.set(s),o.set(e,s.length),e=o,n.w=s.length}return function(e,t,r,i,n,s){var o=s.z||e.length,a=new Hh(i+o+5*(1+Math.ceil(o/7e3))+n),l=a.subarray(i,a.length-n),u=s.l,h=7&(s.r||0);if(t){h&&(l[0]=s.r>>3);for(var d=bd[t-1],c=d>>13,p=8191&d,f=(1<<r)-1,v=s.p||new Gh(32768),g=s.h||new Gh(f+1),m=Math.ceil(r/3),y=2*m,_=function(t){return(e[t]^e[t+1]<<m^e[t+2]<<y)&f},b=new qh(25e3),w=new Gh(288),S=new Gh(32),C=0,I=0,k=s.i||0,x=0,M=s.w||0,E=0;k+2<o;++k){var A=_(k),O=32767&k,R=g[A];if(v[O]=R,g[A]=O,M<=k){var T=o-k;if((C>7e3||x>24576)&&(T>423||!u)){h=_d(e,l,0,b,w,S,I,x,E,k-E,h),x=C=I=0,E=k;for(var L=0;L<286;++L)w[L]=0;for(L=0;L<30;++L)S[L]=0}var P=2,N=0,D=p,F=O-R&32767;if(T>2&&A==_(k-F))for(var B=Math.min(c,T)-1,U=Math.min(32767,k),j=Math.min(258,T);F<=U&&--D&&O!=R;){if(e[k+P]==e[k+P-F]){for(var z=0;z<j&&e[k+z]==e[k+z-F];++z);if(z>P){if(P=z,N=F,z>B)break;var W=Math.min(F,z-2),$=0;for(L=0;L<W;++L){var V=k-F+L&32767,H=V-v[V]&32767;H>$&&($=H,R=V)}}}F+=(O=R)-(R=v[O])&32767}if(N){b[x++]=268435456|ed[P]<<18|td[N];var G=31&ed[P],q=31&td[N];I+=Zh[G]+Yh[q],++w[257+G],++S[q],M=k+P,++C}else b[x++]=e[k],++w[e[k]]}}for(k=Math.max(k,M);k<o;++k)b[x++]=e[k],++w[e[k]];h=_d(e,l,u,b,w,S,I,x,E,k-E,h),u||(s.r=7&h|l[h/8|0]<<3,h-=7,s.h=g,s.p=v,s.i=k,s.w=M)}else{for(k=s.w||0;k<o+u;k+=65535){var Z=k+65535;Z>=o&&(l[h/8|0]=u,Z=o),h=yd(l,h+1,e.subarray(k,Z))}s.i=o}return dd(a,0,i+hd(h)+n)}(e,null==t.level?6:t.level,null==t.mem?n.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,r,i,n)},Id=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function kd(e,t){t||(t={});var r=function(){var e=-1;return{p:function(t){for(var r=e,i=0;i<t.length;++i)r=Sd[255&r^t[i]]^r>>>8;e=r},d:function(){return~e}}}(),i=e.length;r.p(e);var n=Cd(e,t,function(e){return 10+(e.filename?e.filename.length+1:0)}(t),8),s=n.length;return function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Id(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var i=0;i<=r.length;++i)e[i+10]=r.charCodeAt(i)}}(n,t),Id(n,s-8,r.d()),Id(n,s-4,i),n}var xd="undefined"!=typeof TextEncoder&&new TextEncoder,Md="undefined"!=typeof TextDecoder&&new TextDecoder;try{Md.decode(wd,{stream:!0})}catch(e){}function Ed(e,t){if(xd)return xd.encode(e);for(var r=e.length,i=new Hh(e.length+(e.length>>1)),n=0,s=function(e){i[n++]=e},o=0;o<r;++o){if(n+5>i.length){var a=new Hh(n+8+(r-o<<1));a.set(i),i=a}var l=e.charCodeAt(o);l<128||t?s(l):l<2048?(s(192|l>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>18),s(128|l>>12&63),s(128|l>>6&63),s(128|63&l)):(s(224|l>>12),s(128|l>>6&63),s(128|63&l))}return dd(i,0,n)}function Ad(e){if("undefined"==typeof btoa)throw new Error("btoa is not available in this environment");for(var t="",r=0;r<e.length;r+=32768){var i=Math.min(r+32768,e.length),n=e.subarray(r,i);t+=String.fromCharCode.apply(null,n)}return btoa(t)}var Od="replay";function Rd(){var e,t;return null===(t=null===(e=null==qu?void 0:qu.__VTiltExtensions__)||void 0===e?void 0:e.rrweb)||void 0===t?void 0:t.record}function Td(e,t){var r=e.includes("?")?"&":"?";return""+e+r+"compression="+t}function Ld(e){return{rrwebMethod:e,enqueuedAt:Date.now(),attempt:1}}class Pd{constructor(e,t){void 0===t&&(t={}),this._endpoint="/api/s",this._captureStarted=!1,this._isIdle="unknown",this._lastActivityTimestamp=Date.now(),this._sessionId="",this._windowId="",this._queuedRRWebEvents=[],this._onBeforeUnload=()=>{this._forceFlushBuffer()},this._onPageHide=()=>{this._forceFlushBuffer()},this._onOffline=()=>{this._tryAddCustomEvent("browser offline",{})},this._onOnline=()=>{this._tryAddCustomEvent("browser online",{})},this._onVisibilityChange=()=>{if(null==$u?void 0:$u.visibilityState){var e="window "+$u.visibilityState;this._tryAddCustomEvent(e,{}),"hidden"===$u.visibilityState&&this._forceFlushBuffer()}},this._instance=e,this._config=t,this._buffer=this._clearBuffer()}get isStarted(){return this._captureStarted}get started(){return this._captureStarted}get sessionId(){return this._sessionId}get status(){return this._captureStarted?!0===this._isIdle?"paused":"active":"disabled"}start(e){this._isRecordingEnabled()?(this._startCapture(e),ju&&(Lh(ju,"beforeunload",this._onBeforeUnload),Lh(ju,"pagehide",this._onPageHide),Lh(ju,"offline",this._onOffline),Lh(ju,"online",this._onOnline),Lh(ju,"visibilitychange",this._onVisibilityChange))):this.stop()}stop(){this._captureStarted&&this._stopRrweb&&(this._stopRrweb(),this._stopRrweb=void 0,this._captureStarted=!1,ju&&(ju.removeEventListener("beforeunload",this._onBeforeUnload),ju.removeEventListener("pagehide",this._onPageHide),ju.removeEventListener("offline",this._onOffline),ju.removeEventListener("online",this._onOnline),ju.removeEventListener("visibilitychange",this._onVisibilityChange)),this._forceFlushBuffer(),this._clearBuffer(),this._fullSnapshotTimer&&clearInterval(this._fullSnapshotTimer),uh().info(Od,"stopped"))}stopRecording(){this.stop()}addCustomEvent(e,t){return this._tryAddCustomEvent(e,t)}takeFullSnapshot(){return this._tryTakeFullSnapshot()}log(e,t){void 0===t&&(t="log"),this.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:t,trace:[],payload:[JSON.stringify(e)]}},timestamp:Date.now()})}updateConfig(e){this._config=r({},this._config,e)}_isRecordingEnabled(){return!!this._config.enabled&&!!ju}_startCapture(e){var t;if(void 0!==Object.assign&&void 0!==Array.from&&!this._captureStarted){this._captureStarted=!0;var r=this._instance.getSessionId();this._sessionId=r||this._generateId(),this._windowId=(null===(t=this._instance.sessionManager)||void 0===t?void 0:t.getWindowId())||this._generateId(),Rd()?this._onScriptLoaded():this._loadRecorder(()=>{this._onScriptLoaded()}),uh().info(Od,"starting"),e&&this._reportStarted(e)}}_loadRecorder(e){var t,r=null===(t=qu.__VTiltExtensions__)||void 0===t?void 0:t.loadExternalDependency;r?r(this._instance,"recorder",t=>{t?uh().error(Od,"could not load recorder:",t):e()}):uh().error(Od,"loadExternalDependency not available; make sure external-scripts-loader is initialized")}_onScriptLoaded(){var e,t,i=Rd();if(i){var n={blockClass:this._config.blockClass||"vt-no-capture",ignoreClass:this._config.ignoreClass||"vt-ignore-input",maskTextClass:this._config.maskTextClass||"vt-mask",maskTextSelector:this._config.maskTextSelector,maskTextFn:void 0,maskAllInputs:null===(e=this._config.maskAllInputs)||void 0===e||e,maskInputOptions:r({password:!0},this._config.maskInputOptions),maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},s=this._getCanvasConfig();s.enabled&&(n.recordCanvas=!0,n.sampling={canvas:s.fps},n.dataURLOptions={type:"image/webp",quality:s.quality});var o=this._getMaskingConfig();o&&(n.maskAllInputs=null===(t=o.maskAllInputs)||void 0===t||t,n.maskTextSelector=o.maskTextSelector),n.blockSelector=Bh(this._config.skipDefaultInvisibleBlocking,this._config.blockSelector,null==o?void 0:o.blockSelector);var a=this._gatherRRWebPlugins();this._stopRrweb=i(r({emit:e=>{this.onRRwebEmit(e)},plugins:a},n)),this._lastActivityTimestamp=Date.now(),this._isIdle="boolean"==typeof this._isIdle?this._isIdle:"unknown",this._tryAddCustomEvent("$session_options",{sessionRecordingOptions:n,activePlugins:a.map(e=>null==e?void 0:e.name)})}else uh().error(Od,"onScriptLoaded was called but rrwebRecord is not available")}_gatherRRWebPlugins(){var e,t,r=[];if(this._config.captureConsole)try{var i=null===(t=null===(e=qu.__VTiltExtensions__)||void 0===e?void 0:e.rrwebPlugins)||void 0===t?void 0:t.getRecordConsolePlugin;i&&r.push(i())}catch(e){uh().warn(Od,"failed to load console plugin",e)}return r}onRRwebEmit(e){if(this._processQueuedEvents(),e&&"object"==typeof e){if(e.type===Zu.Meta){var t=e.data;this._lastHref=t.href}if(function(e){return e.type===Zu.Custom&&"recording paused"===e.data.tag}(e)||Wh(e));else if(!0===this._isIdle&&!$h(e))return;e.type===Zu.FullSnapshot&&this._scheduleFullSnapshot();var i=function(e){if(e.type!==Zu.Plugin||"rrweb/console@1"!==e.data.plugin)return e;var t=e.data.payload;if(!(null==t?void 0:t.payload))return e;var i=t.payload.map(e=>"string"==typeof e&&e.length>1e3?e.substring(0,1e3)+"... [truncated]":e);return r({},e,{data:r({},e.data,{payload:r({},t,{payload:i})})})}(e);if(this._updateWindowAndSessionIds(i),!0!==this._isIdle||Wh(i)){var n={$snapshot_bytes:jh(i),$snapshot_data:i,$session_id:this._sessionId,$window_id:this._windowId};"disabled"!==this.status?this._captureSnapshotBuffered(n):this._clearBuffer()}}}_processQueuedEvents(){if(0!==this._queuedRRWebEvents.length){var e=[...this._queuedRRWebEvents];this._queuedRRWebEvents=[],e.forEach(e=>{Date.now()-e.enqueuedAt<=2e3&&this._tryRRWebMethod(e)})}}_updateWindowAndSessionIds(e){var t,r=$h(e);if(!r&&!this._isIdle){var i=e.timestamp-this._lastActivityTimestamp,n=this._config.sessionIdleThresholdMs||3e5;i>n&&(this._isIdle=!0,this._fullSnapshotTimer&&clearInterval(this._fullSnapshotTimer),this._tryAddCustomEvent("sessionIdle",{eventTimestamp:e.timestamp,lastActivityTimestamp:this._lastActivityTimestamp,threshold:n,bufferLength:this._buffer.data.length,bufferSize:this._buffer.size}),this._flushBuffer())}var s=!1;if(r&&(this._lastActivityTimestamp=e.timestamp,this._isIdle)){var o="unknown"===this._isIdle;this._isIdle=!1,o||(this._tryAddCustomEvent("sessionNoLongerIdle",{reason:"user activity",type:e.type}),s=!0)}if(!this._isIdle){var a=this._instance.getSessionId();this._sessionId&&a&&a!==this._sessionId?(this._forceFlushBuffer(),this._clearBuffer(),this._sessionId=a,this._windowId=(null===(t=this._instance.sessionManager)||void 0===t?void 0:t.getWindowId())||this._generateId(),this._buffer.sessionId=this._sessionId,this._buffer.windowId=this._windowId,this._scheduleFullSnapshot(),this._tryTakeFullSnapshot(),this._reportStarted("session_id_changed")):s&&(this._scheduleFullSnapshot(),this._tryTakeFullSnapshot())}}_clearBuffer(){return this._buffer={size:0,data:[],sessionId:this._sessionId,windowId:this._windowId},this._buffer}_flushBuffer(){return this._flushBufferTimer&&(clearTimeout(this._flushBufferTimer),this._flushBufferTimer=void 0),"paused"===this.status||"disabled"===this.status?(this._flushBufferTimer=setTimeout(()=>{this._flushBuffer()},2e3),this._buffer):(this._sendBufferContents(),this._clearBuffer())}_forceFlushBuffer(){this._flushBufferTimer&&(clearTimeout(this._flushBufferTimer),this._flushBufferTimer=void 0),this._sendBufferContents()}_sendBufferContents(){this._buffer.data.length>0&&zh(this._buffer).forEach(e=>{this._captureSnapshot({$snapshot_bytes:e.size,$snapshot_data:e.data,$session_id:e.sessionId,$window_id:e.windowId})})}_captureSnapshotBuffered(e){var t,r=2+((null===(t=this._buffer)||void 0===t?void 0:t.data.length)||0),i=e.$snapshot_bytes;!this._isIdle&&(this._buffer.size+i+r>943718.4||this._buffer.sessionId!==this._sessionId)&&(this._buffer=this._flushBuffer()),this._buffer.size+=i,this._buffer.data.push(e.$snapshot_data),this._flushBufferTimer||this._isIdle||(this._flushBufferTimer=setTimeout(()=>{this._flushBuffer()},2e3))}_captureSnapshot(e){var t=this._instance.getConfig(),r=t.token||"";if(r){if(!Eh()){var i=!1!==this._config.compressEvents,n={token:r,distinct_id:this._instance.getDistinctId()||this._instance.getAnonymousId()||"",$session_id:this._sessionId,$window_id:this._windowId,$snapshot_data:e.$snapshot_data,$snapshot_bytes:e.$snapshot_bytes,$lib:"web",$lib_version:this._instance.version||"unknown",timestamp:Date.now()};this._sendSnapshot(t,r,n,i)}}else uh().warn(Od,"missing token, cannot send snapshot")}_sendSnapshot(e,t,r,i){var n=JSON.stringify(r),s=r.$snapshot_data,o=Array.isArray(s)&&s.some(e=>2===(null==e?void 0:e.type));if(n.length>61440||o){var a=ph(e,this._endpoint);this._sendViaFetch(a,t,n,i)}else{var l=ph(e,this._endpoint,{includeTokenQuery:!0});this._sendViaBeacon(l,t,n,i)}}_sendViaFetch(e,t,r,i){if(i&&void 0!==ju)try{var n=kd(Ed(r));if(n.length>0){var s=new Blob([n],{type:"application/octet-stream"});if(s.size>0){var o=Td(e,"gzip-js");return void this._fetchWithRetry(o,t,s,"application/octet-stream")}}}catch(e){uh().warn(Od,"compression failed, sending uncompressed")}var a=new Blob([r],{type:"application/json"});this._fetchWithRetry(e,t,a,"application/json")}_sendViaBeacon(e,t,r,i){if(i&&void 0!==ju)try{var n=kd(Ed(r));if(n.length>0){var s=Ad(n);if(s.length>0&&s.length<=61440){var o=Td(e,"base64"),a=new Blob([s],{type:"text/plain"});if("undefined"!=typeof navigator&&navigator.sendBeacon&&navigator.sendBeacon(o,a))return;return void this._fetchWithRetry(o,"",a,"text/plain")}}}catch(e){uh().warn(Od,"compression failed, sending uncompressed")}var l=new Blob([r],{type:"application/json"});"undefined"!=typeof navigator&&navigator.sendBeacon&&navigator.sendBeacon(e,l)||this._fetchWithRetry(e,"",l,"application/json")}_fetchWithRetry(e,t,r,i,n){void 0===n&&(n=0);var s=r.size<6e4,o={"Content-Type":i};t&&(o[ch]=t),fetch(e,{method:"POST",body:r,headers:o,keepalive:s}).then(s=>{if(!s.ok)return s.status>=400&&s.status<500?(Mh(),void uh().warn(Od,"snapshot rejected by server ("+s.status+"), not retrying")):void this._scheduleRetry(e,t,r,i,n);Mh()}).catch(()=>{xh(Od),this._scheduleRetry(e,t,r,i,n)})}_scheduleRetry(e,t,r,i,n){if(n>=5)uh().error(Od,"failed to send snapshot after 5 retries, giving up");else if(!Eh()){var s=3e3*Math.pow(2,n),o=Math.min(s,3e4),a=(Math.random()-.5)*o,l=Math.ceil(o+a);uh().warn(Od,"snapshot send failed, retrying in "+Math.round(l/1e3)+"s (attempt "+(n+1)+"/5)"),setTimeout(()=>{this._fetchWithRetry(e,t,r,i,n+1)},l)}}_scheduleFullSnapshot(){if(this._fullSnapshotTimer&&clearInterval(this._fullSnapshotTimer),!0!==this._isIdle){var e=this._config.fullSnapshotIntervalMs||3e5;this._fullSnapshotTimer=setInterval(()=>{this._tryTakeFullSnapshot()},e)}}_tryRRWebMethod(e){try{return e.rrwebMethod(),!0}catch(t){return this._queuedRRWebEvents.length<10?this._queuedRRWebEvents.push({enqueuedAt:e.enqueuedAt||Date.now(),attempt:e.attempt+1,rrwebMethod:e.rrwebMethod}):uh().warn(Od,"could not emit queued rrweb event",t,e),!1}}_tryAddCustomEvent(e,t){return this._tryRRWebMethod(Ld(()=>Rd().addCustomEvent(e,t)))}_tryTakeFullSnapshot(){return this._tryRRWebMethod(Ld(()=>Rd().takeFullSnapshot()))}_getCanvasConfig(){var e,t,r,i=this._config.captureCanvas,n=null!==(e=null==i?void 0:i.recordCanvas)&&void 0!==e&&e,s=null!==(t=null==i?void 0:i.canvasFps)&&void 0!==t?t:4,o=null!==(r=null==i?void 0:i.canvasQuality)&&void 0!==r?r:.4;return{enabled:n,fps:Vh(s,0,12,"canvas recording fps",4),quality:Vh(o,0,1,"canvas recording quality",.4)}}_getMaskingConfig(){var e,t=this._config.masking;if(t)return{maskAllInputs:null===(e=t.maskAllInputs)||void 0===e||e,maskTextSelector:t.maskTextSelector,blockSelector:t.blockSelector}}_generateId(){return Math.random().toString(36).substring(2,15)}_reportStarted(e,t){uh().info(Od,e.replace(/_/g," "),t),"recording_initialized"!==e&&"session_id_changed"!==e&&this._tryAddCustomEvent(e,t)}}qu.__VTiltExtensions__=qu.__VTiltExtensions__||{},qu.__VTiltExtensions__.rrweb={record:xu,version:"v2"},qu.__VTiltExtensions__.rrwebPlugins={getRecordConsolePlugin:e=>({name:"rrweb/console@1",observer:Uu,options:e})},qu.__VTiltExtensions__.initSessionRecording=function(e,t){return new Pd(e,t)};var Nd,Dd=-1,Fd=function(e){addEventListener("pageshow",function(t){t.persisted&&(Dd=t.timeStamp,e(t))},!0)},Bd=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Ud=function(){var e=Bd();return e&&e.activationStart||0},jd=function(e,t){var r=Bd(),i="navigate";return Dd>=0?i="back-forward-cache":r&&(document.prerendering||Ud()>0?i="prerender":document.wasDiscarded?i="restore":r.type&&(i=r.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},zd=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var i=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})});return i.observe(Object.assign({type:e,buffered:!0},r||{})),i}}catch(e){}},Wd=function(e,t,r,i){var n,s;return function(o){t.value>=0&&(o||i)&&((s=t.value-(n||0))||void 0===n)&&(n=t.value,t.delta=s,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,r),e(t))}},$d=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},Vd=function(e){var t=function(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},Hd=function(e){var t=!1;return function(r){t||(e(r),t=!0)}},Gd=-1,qd=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Zd=function(e){"hidden"===document.visibilityState&&Gd>-1&&(Gd="visibilitychange"===e.type?e.timeStamp:0,Jd())},Yd=function(){addEventListener("visibilitychange",Zd,!0),addEventListener("prerenderingchange",Zd,!0)},Jd=function(){removeEventListener("visibilitychange",Zd,!0),removeEventListener("prerenderingchange",Zd,!0)},Kd=function(){return Gd<0&&(Gd=qd(),Yd(),Fd(function(){setTimeout(function(){Gd=qd(),Yd()},0)})),{get firstHiddenTime(){return Gd}}},Xd=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},Qd=[1800,3e3],ec=function(e,t){t=t||{},Xd(function(){var r,i=Kd(),n=jd("FCP"),s=zd("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(s.disconnect(),e.startTime<i.firstHiddenTime&&(n.value=Math.max(e.startTime-Ud(),0),n.entries.push(e),r(!0)))})});s&&(r=Wd(e,n,Qd,t.reportAllChanges),Fd(function(i){n=jd("FCP"),r=Wd(e,n,Qd,t.reportAllChanges),$d(function(){n.value=performance.now()-i.timeStamp,r(!0)})}))})},tc=[.1,.25],rc=0,ic=1/0,nc=0,sc=function(e){e.forEach(function(e){e.interactionId&&(ic=Math.min(ic,e.interactionId),nc=Math.max(nc,e.interactionId),rc=nc?(nc-ic)/7+1:0)})},oc=function(){return Nd?rc:performance.interactionCount||0},ac=function(){"interactionCount"in performance||Nd||(Nd=zd("event",sc,{type:"event",buffered:!0,durationThreshold:0}))},lc=[200,500],uc=0,hc=function(){return oc()-uc},dc=[],cc={},pc=function(e){var t=dc[dc.length-1],r=cc[e.interactionId];if(r||dc.length<10||e.duration>t.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var i={id:e.interactionId,latency:e.duration,entries:[e]};cc[i.id]=i,dc.push(i)}dc.sort(function(e,t){return t.latency-e.latency}),dc.splice(10).forEach(function(e){delete cc[e.id]})}},fc=[2500,4e3],vc={},gc=[800,1800],mc=function e(t){document.prerendering?Xd(function(){return e(t)}):"complete"!==document.readyState?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},yc={onLCP:function(e,t){t=t||{},Xd(function(){var r,i=Kd(),n=jd("LCP"),s=function(e){var t=e[e.length-1];t&&t.startTime<i.firstHiddenTime&&(n.value=Math.max(t.startTime-Ud(),0),n.entries=[t],r())},o=zd("largest-contentful-paint",s);if(o){r=Wd(e,n,fc,t.reportAllChanges);var a=Hd(function(){vc[n.id]||(s(o.takeRecords()),o.disconnect(),vc[n.id]=!0,r(!0))});["keydown","click"].forEach(function(e){addEventListener(e,function(){return setTimeout(a,0)},!0)}),Vd(a),Fd(function(i){n=jd("LCP"),r=Wd(e,n,fc,t.reportAllChanges),$d(function(){n.value=performance.now()-i.timeStamp,vc[n.id]=!0,r(!0)})})}})},onCLS:function(e,t){t=t||{},ec(Hd(function(){var r,i=jd("CLS",0),n=0,s=[],o=function(e){e.forEach(function(e){if(!e.hadRecentInput){var t=s[0],r=s[s.length-1];n&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(n+=e.value,s.push(e)):(n=e.value,s=[e])}}),n>i.value&&(i.value=n,i.entries=s,r())},a=zd("layout-shift",o);a&&(r=Wd(e,i,tc,t.reportAllChanges),Vd(function(){o(a.takeRecords()),r(!0)}),Fd(function(){n=0,i=jd("CLS",0),r=Wd(e,i,tc,t.reportAllChanges),$d(function(){return r()})}),setTimeout(r,0))}))},onFCP:ec,onINP:function(e,t){t=t||{},Xd(function(){var r;ac();var i,n=jd("INP"),s=function(e){e.forEach(function(e){e.interactionId&&pc(e),"first-input"===e.entryType&&!dc.some(function(t){return t.entries.some(function(t){return e.duration===t.duration&&e.startTime===t.startTime})})&&pc(e)});var t,r=(t=Math.min(dc.length-1,Math.floor(hc()/50)),dc[t]);r&&r.latency!==n.value&&(n.value=r.latency,n.entries=r.entries,i())},o=zd("event",s,{durationThreshold:null!==(r=t.durationThreshold)&&void 0!==r?r:40});i=Wd(e,n,lc,t.reportAllChanges),o&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),Vd(function(){s(o.takeRecords()),n.value<0&&hc()>0&&(n.value=0,n.entries=[]),i(!0)}),Fd(function(){dc=[],uc=oc(),n=jd("INP"),i=Wd(e,n,lc,t.reportAllChanges)}))})},onTTFB:function(e,t){t=t||{};var r=jd("TTFB"),i=Wd(e,r,gc,t.reportAllChanges);mc(function(){var n=Bd();if(n){var s=n.responseStart;if(s<=0||s>performance.now())return;r.value=Math.max(s-Ud(),0),r.entries=[n],i(!0),Fd(function(){r=jd("TTFB",0),(i=Wd(e,r,gc,t.reportAllChanges))(!0)})}})}};qu.__VTiltExtensions__=qu.__VTiltExtensions__||{},qu.__VTiltExtensions__.webVitalsCallbacks=yc;var _c="1.13.1",bc="__vt_session",wc="__vt_window_id",Sc="__vt_primary_window",Cc="__vt_user_state",Ic="__vt_device_id",kc="__vt_anonymous_id",xc="__vt_remote_config",Mc="__vt_distinct_id",Ec="__vt_user_properties",Ac="localStorage",Oc="localStorage+cookie",Rc="sessionStorage",Tc="memory",Lc="$initial_person_info",Pc="$pageview",Nc="$pageleave",Dc="$identify",Fc="$alias",Bc="$set",Uc="$performance_event",jc="$autocapture",zc="$scroll_depth",Wc="$snapshot",$c="$snapshot_items",Vc="$$client_ingestion_warning",Hc="$current_url",Gc="$pathname",qc="$prev_pageview_duration",Zc="$prev_pageview_pathname",Yc="$prev_pageview_url",Jc="$scroll_depth_pct",Kc="$scroll_depth_max_pct",Xc="$prev_pageview_scroll_depth_pct";function Qc(e,t){var i,n,s=t.bubble,o=null==e?void 0:e.bubble;if(s){var a=null===s.offset?void 0:void 0!==s.offset?r({},null===(i=null==e?void 0:e.bubble)||void 0===i?void 0:i.offset,s.offset):null===(n=null==e?void 0:e.bubble)||void 0===n?void 0:n.offset;o=r({},null==e?void 0:e.bubble,s,{offset:a})}return r({},e,t,{bubble:o})}class ep{constructor(e){void 0===e&&(e={}),this.config=this.parseConfigFromScript(e)}parseConfigFromScript(e){if(!(null==$u?void 0:$u.currentScript))return r({token:e.token||""},e);var t=$u.currentScript,i=r({token:""},e);i.api_host=t.getAttribute("data-api-host")||t.getAttribute("data-host")||e.api_host,i.script_host=t.getAttribute("data-script-host")||e.script_host,i.token=t.getAttribute("data-token")||e.token||"",i.domain=t.getAttribute("data-domain")||e.domain,i.storage=t.getAttribute("data-storage")||e.storage,i.stringifyPayload="false"!==t.getAttribute("data-stringify-payload");var n="true"===t.getAttribute("data-capture-performance");for(var s of(i.capture_performance=!!n||e.capture_performance,i.globalAttributes=r({},e.globalAttributes),Array.from(t.attributes)))s.name.startsWith("data-vt-")&&(i.globalAttributes[s.name.slice(8).replace(/-/g,"_")]=s.value);return i}getConfig(){return r({},this.config)}updateConfig(e){var t=function(e,t){return void 0===t.chat?t:r({},t,{chat:Qc(e.chat,t.chat)})}(this.config,e);this.config=r({},this.config,t)}}var tp=[kc,Ic,Mc,Cc],rp=31536e3,ip=["herokuapp.com","vercel.app","netlify.app"];function np(e){var t;if(!e||"undefined"==typeof document)return"";var r=null===(t=document.location)||void 0===t?void 0:t.hostname;if(!r)return"";var i=r.match(/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i);return i?"."+i[0]:""}class sp{constructor(e){var t,r,i;this.memoryStorage=new Map,this._localStorageSupported=null,this.method=e.method,this.cross_subdomain=null!==(t=e.cross_subdomain)&&void 0!==t?t:function(){var e;if("undefined"==typeof document)return!1;var t=null===(e=document.location)||void 0===e?void 0:e.hostname;if(!t)return!1;var r=t.split(".").slice(-2).join(".");return!ip.includes(r)}(),this.sameSite=null!==(r=e.sameSite)&&void 0!==r?r:"Lax",this.secure=null!==(i=e.secure)&&void 0!==i?i:"undefined"!=typeof location&&"https:"===location.protocol}isLocalStorageSupported(){if(null!==this._localStorageSupported)return this._localStorageSupported;if(void 0===ju||!ju.localStorage)return this._localStorageSupported=!1,!1;try{var e="__vt_ls_test__";ju.localStorage.setItem(e,"1");var t="1"===ju.localStorage.getItem(e);return ju.localStorage.removeItem(e),this._localStorageSupported=t,t||uh().warn("storage","localStorage unavailable, using cookies"),t}catch(e){return this._localStorageSupported=!1,uh().warn("storage","localStorage unavailable, using cookies"),!1}}isCriticalProperty(e){return tp.includes(e)}get(e){var t;try{switch(this.method){case Tc:return null!==(t=this.memoryStorage.get(e))&&void 0!==t?t:null;case Oc:return this.getLocalStoragePlusCookie(e);case Ac:return this.getLocalStorage(e);case Rc:return this.readFromSessionStorage(e);default:return this.getCookie(e)}}catch(t){return uh().warn("storage",'get error for "'+e+'":',t),null}}set(e,t,r){try{switch(this.method){case Tc:this.memoryStorage.set(e,t);break;case Oc:this.setLocalStoragePlusCookie(e,t,r);break;case Ac:this.setLocalStorage(e,t);break;case Rc:this.writeToSessionStorage(e,t);break;default:this.setCookie(e,t,null!=r?r:rp)}}catch(t){uh().warn("storage",'set error for "'+e+'":',t)}}remove(e){try{switch(this.method){case Tc:this.memoryStorage.delete(e);break;case Oc:this.removeLocalStoragePlusCookie(e);break;case Ac:this.removeLocalStorage(e);break;case Rc:this.removeFromSessionStorage(e);break;default:this.removeCookie(e)}}catch(t){uh().warn("storage",'remove error for "'+e+'":',t)}}getLocalStoragePlusCookie(e){if(this.isCriticalProperty(e)){var t=this.getCookie(e),r=this.getLocalStorage(e);if(null!==t){if(r!==t&&this.isLocalStorageSupported())try{null==ju||ju.localStorage.setItem(e,t)}catch(e){}return t}return null!==r?r:this.readFromSessionStorage(e)}return this.getLocalStorage(e)}setLocalStoragePlusCookie(e,t,r){this.setLocalStorage(e,t),this.isCriticalProperty(e)&&(this.setCookie(e,t,null!=r?r:rp),this.writeToSessionStorage(e,t))}removeLocalStoragePlusCookie(e){this.removeLocalStorage(e),this.isCriticalProperty(e)&&(this.removeCookie(e),this.removeFromSessionStorage(e))}getLocalStorage(e){var t;if(!this.isLocalStorageSupported())return null;try{return null!==(t=null==ju?void 0:ju.localStorage.getItem(e))&&void 0!==t?t:null}catch(e){return null}}setLocalStorage(e,t){if(this.isLocalStorageSupported())try{null==ju||ju.localStorage.setItem(e,t)}catch(e){uh().warn("storage","localStorage write error:",e)}}removeLocalStorage(e){if(this.isLocalStorageSupported())try{null==ju||ju.localStorage.removeItem(e)}catch(e){}}readFromSessionStorage(e){var t;try{return null!==(t=null==ju?void 0:ju.sessionStorage.getItem(e))&&void 0!==t?t:null}catch(e){return null}}writeToSessionStorage(e,t){try{null==ju||ju.sessionStorage.setItem(e,t)}catch(e){uh().warn("storage","sessionStorage write error:",e)}}removeFromSessionStorage(e){try{null==ju||ju.sessionStorage.removeItem(e)}catch(e){}}getCookie(e){if("undefined"==typeof document)return null;var t=e+"=";for(var r of document.cookie.split(";")){var i=r.trim();if(i.startsWith(t))try{return decodeURIComponent(i.slice(t.length))}catch(e){return i.slice(t.length)}}return null}setCookie(e,t,r){if("undefined"!=typeof document){var i=np(this.cross_subdomain),n=e+"="+encodeURIComponent(t)+"; Max-Age="+r+"; path=/; SameSite="+this.sameSite;this.secure&&(n+="; Secure"),i&&(n+="; domain="+i),document.cookie=n}}removeCookie(e){if("undefined"!=typeof document){var t=np(this.cross_subdomain);document.cookie=e+"=; Max-Age=0; path=/"+(t?"; domain="+t:""),document.cookie=e+"=; Max-Age=0; path=/"}}getWithExpiry(e){var t=this.get(e);if(!t)return null;try{var r=JSON.parse(t);return r.expiry&&Date.now()>r.expiry?(this.remove(e),null):r.value}catch(e){return null}}setWithExpiry(e,t,i){var n=r({value:t},i?{expiry:Date.now()+i}:{});this.set(e,JSON.stringify(n))}getJSON(e){var t=this.get(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return null}}setJSON(e,t,r){this.set(e,JSON.stringify(t),r)}canUseSessionStorage(){if(void 0===ju||!(null==ju?void 0:ju.sessionStorage))return!1;try{var e="__vt_ss_test__";return ju.sessionStorage.setItem(e,"1"),ju.sessionStorage.removeItem(e),!0}catch(e){return!1}}getSessionStorage(){var e;return this.canUseSessionStorage()&&null!==(e=null==ju?void 0:ju.sessionStorage)&&void 0!==e?e:null}setMethod(e){this.method=e}getMethod(){return this.method}}class op{constructor(e,t){void 0===e&&(e="cookie"),this._isNewSession=!1,this.storage=new sp({method:e,cross_subdomain:t,sameSite:"Lax"}),this._windowId=void 0,uh().debug("session","ctor")}hydrateFromStorage(){uh().debug("session","hydrate"),this._initializeWindowId()}getSessionId(){var e=this._getSessionIdRaw();return e||(e=Oh(16),this._storeSessionId(e),this._isNewSession=!0),e}setSessionId(){var e=this._getSessionIdRaw(),t=e||Oh(16);return e||(this._isNewSession=!0),this._storeSessionId(t),t}resetSessionId(){this._clearSessionId(),this._isNewSession=!0,this.setSessionId(),this._setWindowId(Oh(16))}consumeSessionStart(){return!!this._isNewSession&&(this._isNewSession=!1,!0)}_getSessionIdRaw(){return this.storage.get(bc)}_storeSessionId(e){this.storage.set(bc,e,1800)}_clearSessionId(){this.storage.remove(bc)}getWindowId(){if(this._windowId)return this._windowId;var e=this.storage.getSessionStorage();if(e){var t=e.getItem(wc);if(t)return this._windowId=t,t}var r=Oh(16);return this._setWindowId(r),r}_setWindowId(e){if(e!==this._windowId){this._windowId=e;var t=this.storage.getSessionStorage();t&&t.setItem(wc,e)}}_initializeWindowId(){var e=this.storage.getSessionStorage();if(e){var t=e.getItem(Sc),r=e.getItem(wc);r&&!t?this._windowId=r:(r&&e.removeItem(wc),this._setWindowId(Oh(16))),e.setItem(Sc,"true"),this._listenToUnload()}else this._windowId=Oh(16)}_listenToUnload(){var e=this.storage.getSessionStorage();ju&&e&&Lh(ju,"beforeunload",()=>{var e=this.storage.getSessionStorage();e&&e.removeItem(Sc)},{capture:!1})}updateStorageMethod(e,t){this.storage=new sp({method:e,cross_subdomain:t,sameSite:"Lax"})}}function ap(e){if(!$u)return null;var t=$u.createElement("a");return t.href=e,t}function lp(e){try{return decodeURIComponent(e).replace(/\+/g," ")}catch(t){return e.replace(/\+/g," ")}}function up(e){for(var t={},r=function(e){return((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"")}(e).split("&"),i=0;i<r.length;i++){var n=r[i];if(n){var s=n.indexOf("="),o=-1===s?n:n.slice(0,s);if(o){var a=lp(o),l=-1===s?"":n.slice(s+1);t[a]=lp(l)}}}return t}function hp(e,t){var r;return null!==(r=up(e)[t])&&void 0!==r?r:""}function dp(e,t,r){if(!e||!t||!t.length)return e;for(var i=e.split("#"),n=i[0]||"",s=i[1],o=n.split("?"),a=o[1],l=o[0],u=(a||"").split("&"),h=[],d=0;d<u.length;d++){var c=u[d].split("="),p=c[0],f=c.slice(1).join("=");-1!==t.indexOf(p)?h.push(p+"="+r):p&&h.push(p+(f?"="+f:""))}var v=h.join("&");return l+(v?"?"+v:"")+(s?"#"+s:"")}var cp="_fbp",pp="_fbc",fp=15552e3,vp=7776e3;function gp(){void 0!==$u&&(function(){if(mp(cp))return;var e=Date.now(),t=Math.floor(1e9+9e9*Math.random());yp(cp,"fb.1."+e+"."+t,fp)}(),function(){if(!(null==Vu?void 0:Vu.search))return;try{var e=new URL(Vu.href).searchParams.get("fbclid");if(!(null==e?void 0:e.trim()))return;var t="fb.1."+Date.now()+"."+e.trim();yp(pp,t,vp)}catch(e){}}())}function mp(e){if(void 0===$u||!(null==$u?void 0:$u.cookie))return null;var t=e+"=";for(var r of $u.cookie.split(";")){var i=r.trim();if(i.startsWith(t))try{return decodeURIComponent(i.slice(t.length))}catch(e){return i.slice(t.length)}}return null}function yp(e,t,r){if(void 0!==$u){var i=void 0!==Vu&&"https:"===Vu.protocol?"; Secure":"";$u.cookie=e+"="+encodeURIComponent(t)+"; Max-Age="+r+"; path=/; SameSite=Lax"+i}}var _p="Mobile",bp="iOS",wp="Android",Sp="Tablet",Cp=wp+" "+Sp,Ip="iPad",kp="Apple",xp=kp+" Watch",Mp="Safari",Ep="BlackBerry",Ap="Samsung",Op=Ap+"Browser",Rp=Ap+" Internet",Tp="Chrome",Lp=Tp+" OS",Pp=Tp+" "+bp,Np="Internet Explorer",Dp=Np+" "+_p,Fp="Opera",Bp=Fp+" Mini",Up="Edge",jp="Microsoft "+Up,zp="Firefox",Wp=zp+" "+bp,$p="Nintendo",Vp="PlayStation",Hp="Xbox",Gp=wp+" "+_p,qp=_p+" "+Mp,Zp="Windows",Yp=Zp+" Phone",Jp="Nokia",Kp="Ouya",Xp="Generic",Qp=Xp+" "+_p.toLowerCase(),ef=Xp+" "+Sp.toLowerCase(),tf="Konqueror",rf="(\\d+(\\.\\d+)?)",nf=new RegExp("Version/"+rf),sf=new RegExp(Hp,"i"),of=new RegExp(Vp+" \\w+","i"),af=new RegExp($p+" \\w+","i"),lf=new RegExp(Ep+"|PlayBook|BB10","i"),uf={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};function hf(e,t){return e.toLowerCase().includes(t.toLowerCase())}var df=(e,t)=>t&&hf(t,kp)||function(e){return hf(e,Mp)&&!hf(e,Tp)&&!hf(e,wp)}(e),cf=function(e,t){return t=t||"",hf(e," OPR/")&&hf(e,"Mini")?Bp:hf(e," OPR/")?Fp:lf.test(e)?Ep:hf(e,"IE"+_p)||hf(e,"WPDesktop")?Dp:hf(e,Op)?Rp:hf(e,Up)||hf(e,"Edg/")?jp:hf(e,"FBIOS")?"Facebook "+_p:hf(e,"UCWEB")||hf(e,"UCBrowser")?"UC Browser":hf(e,"CriOS")?Pp:hf(e,"CrMo")||hf(e,Tp)?Tp:hf(e,wp)&&hf(e,Mp)?Gp:hf(e,"FxiOS")?Wp:hf(e.toLowerCase(),tf.toLowerCase())?tf:df(e,t)?hf(e,_p)?qp:Mp:hf(e,zp)?zp:hf(e,"MSIE")||hf(e,"Trident/")?Np:hf(e,"Gecko")?zp:""},pf={[Dp]:[new RegExp("rv:"+rf)],[jp]:[new RegExp(Up+"?\\/"+rf)],[Tp]:[new RegExp("("+Tp+"|CrMo)\\/"+rf)],[Pp]:[new RegExp("CriOS\\/"+rf)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+rf)],[Mp]:[nf],[qp]:[nf],[Fp]:[new RegExp("(Opera|OPR)\\/"+rf)],[zp]:[new RegExp(zp+"\\/"+rf)],[Wp]:[new RegExp("FxiOS\\/"+rf)],[tf]:[new RegExp("Konqueror[:/]?"+rf,"i")],[Ep]:[new RegExp(Ep+" "+rf),nf],[Gp]:[new RegExp("android\\s"+rf,"i")],[Rp]:[new RegExp(Op+"\\/"+rf)],[Np]:[new RegExp("(rv:|MSIE )"+rf)],Mozilla:[new RegExp("rv:"+rf)]},ff=function(e,t){var r=cf(e,t),i=pf[r];if(void 0===i)return null;for(var n=0;n<i.length;n++){var s=i[n],o=e.match(s);if(o)return parseFloat(o[o.length-2])}return null},vf=[[new RegExp(Hp+"; "+Hp+" (.*?)[);]","i"),e=>[Hp,e&&e[1]||""]],[new RegExp($p,"i"),[$p,""]],[new RegExp(Vp,"i"),[Vp,""]],[lf,[Ep,""]],[new RegExp(Zp,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[Yp,""];if(new RegExp(_p).test(t)&&!/IEMobile\b/.test(t))return[Zp+" "+_p,""];var r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){var i=r[1],n=uf[i]||"";return/arm/i.test(t)&&(n="RT"),[Zp,n]}return[Zp,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[bp,t.join(".")]}return[bp,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=void 0===e[2]?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+wp+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+wp+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[wp,t.join(".")]}return[wp,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var r=[e[1],e[2],e[3]||"0"];t[1]=r.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[Lp,""]],[/Linux|debian/i,["Linux",""]]],gf=function(e){return af.test(e)?$p:of.test(e)?Vp:sf.test(e)?Hp:new RegExp(Kp,"i").test(e)?Kp:new RegExp("("+Yp+"|WPDesktop)","i").test(e)?Yp:/iPad/.test(e)?Ip:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?xp:lf.test(e)?Ep:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(Jp,"i").test(e)?Jp:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(_p).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?wp:Cp:wp:new RegExp("(pda|"+_p+")","i").test(e)?Qp:new RegExp(Sp,"i").test(e)&&!new RegExp(Sp+" pc","i").test(e)?ef:""},mf="https?://(.*)",yf=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],_f=Nh(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],yf),bf="<masked>";function wf(e,t){var r=_f.concat([]),i=Ph({},function(e){var t={};return Th(up(e),function(e,r){"string"==typeof r&&r.startsWith("utm_")&&e&&(t[r]=e)}),t}(e));return Th(r,function(t){if(t.startsWith("utm_")){if(!(t in i)){var r=hp(e,t);i[t]=r||null}}else{var n=hp(e,t);i[t]=n||null}}),i}function Sf(e){var t=function(e){return e?0===e.search(mf+"google.([^/?]*)")?"google":0===e.search(mf+"bing.com")?"bing":0===e.search(mf+"yahoo.com")?"yahoo":0===e.search(mf+"duckduckgo.com")?"duckduckgo":null:null}(e),r="yahoo"!==t?"q":"p",i={};if(!function(e){return null===e}(t)){i.$search_engine=t;var n=$u?hp($u.referrer,r):"";n.length&&(i.ph_keyword=n)}return i}function Cf(){if("undefined"!=typeof navigator)return navigator.language||navigator.userLanguage}function If(){return(null==$u?void 0:$u.referrer)||"$direct"}function kf(){var e;return(null==$u?void 0:$u.referrer)&&(null===(e=ap($u.referrer))||void 0===e?void 0:e.host)||"$direct"}function xf(e){var t=function(e){var t,{r:r,u:i}=e,n={$referrer:r,$referring_domain:null==r?void 0:"$direct"===r?"$direct":null===(t=ap(r))||void 0===t?void 0:t.host};if(i){n.$current_url=i;var s=ap(i);n.$host=null==s?void 0:s.host,n.$pathname=null==s?void 0:s.pathname,Ph(n,wf(i))}return r&&Ph(n,Sf(r)),n}(e),r={};return Th(t,function(e,t){var i;r["$initial_"+(i=String(t),i.startsWith("$")?i.substring(1):i)]=e}),r}function Mf(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}}function Ef(){try{return(new Date).getTimezoneOffset()}catch(e){return}}function Af(e,t){if(!Gu)return{};var r,i,n,s=e?Nh([],yf,t||[]):[],[o,a]=function(e){for(var t=0;t<vf.length;t++){var[r,i]=vf[t],n=r.exec(e);if(n){var s="function"==typeof i?i(n,e):i;if(s)return s}}return["",""]}(Gu),l=mp(cp)||void 0,u=mp(pp)||void 0;return Ph(Dh({$os:o,$os_version:a,$browser:cf(Gu,navigator.vendor),$device:gf(Gu),$device_type:(i=Gu,n=gf(i),n===Ip||n===Cp||"Kobo"===n||"Kindle Fire"===n||n===ef?Sp:n===$p||n===Hp||n===Vp||n===Kp?"Console":n===xp?"Wearable":n?_p:"Desktop"),$timezone:Mf(),$timezone_offset:Ef(),$fb_browser_id:l,$fb_click_id:u}),{$current_url:dp(null==Vu?void 0:Vu.href,s,bf),$host:null==Vu?void 0:Vu.host,$pathname:null==Vu?void 0:Vu.pathname,$raw_user_agent:Gu.length>1e3?Gu.substring(0,997)+"...":Gu,$browser_version:ff(Gu,navigator.vendor),$browser_language:Cf(),$browser_language_prefix:(r=Cf(),"string"==typeof r?r.split("-")[0]:void 0),$screen_height:null==ju?void 0:ju.screen.height,$screen_width:null==ju?void 0:ju.screen.width,$viewport_height:null==ju?void 0:ju.innerHeight,$viewport_width:null==ju?void 0:ju.innerWidth,$lib:"web",$lib_version:_c,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10)})}class Of{constructor(e,t){void 0===e&&(e="localStorage"),this._isFirstVisit=!1,this.storage=new sp({method:e,cross_subdomain:t,sameSite:"Lax"}),this.userIdentity=this.generateEphemeralIdentity(),uh().debug("user","ctor","ephemeral identity only")}hydrateFromStorage(){uh().debug("user","hydrate start"),this.userIdentity=this.loadUserIdentity();var e=this.userIdentity.anonymous_id,t=this.userIdentity.distinct_id;uh().debug("user","hydrate done","anonymous_id",e?e.slice(0,12)+"...":"n/a","distinct_id",t?t.slice(0,12)+"...":"null")}generateEphemeralIdentity(){return{distinct_id:null,anonymous_id:this.generateAnonymousId(),device_id:this.generateDeviceId(),properties:{},user_state:"anonymous"}}getUserIdentity(){return r({},this.userIdentity)}getDistinctId(){return this.userIdentity.distinct_id}getAnonymousId(){var e=this.userIdentity.anonymous_id;return e||(this.userIdentity.anonymous_id=this.generateAnonymousId(),this.storage.set(kc,this.userIdentity.anonymous_id,rp),uh().debug("user","getAnonymousId generated (was missing)",this.userIdentity.anonymous_id.slice(0,12)+"..."),this.userIdentity.anonymous_id)}getUserProperties(){return r({},this.userIdentity.properties)}getEffectiveId(){return this.userIdentity.distinct_id||this.getAnonymousId()}getDeviceId(){return this.userIdentity.device_id}getUserState(){return this.userIdentity.user_state}consumeFirstVisit(){return!!this._isFirstVisit&&(this._isFirstVisit=!1,!0)}applyUpdate(e){if(void 0!==e.distinct_id&&(this.userIdentity.distinct_id=e.distinct_id),void 0!==e.user_state&&(this.userIdentity.user_state=e.user_state),void 0!==e.device_id&&(this.userIdentity.device_id=e.device_id),e.properties_set&&(this.userIdentity.properties=r({},this.userIdentity.properties,e.properties_set)),e.properties_set_once)for(var t of Object.keys(e.properties_set_once))t in this.userIdentity.properties||(this.userIdentity.properties[t]=e.properties_set_once[t]);this.saveUserIdentity()}reset(e){this.userIdentity={distinct_id:null,anonymous_id:this.generateAnonymousId(),device_id:e?this.generateDeviceId():this.userIdentity.device_id,properties:{$last_vtilt_reset:(new Date).toISOString()},user_state:"anonymous"},this.saveUserIdentity()}set_initial_person_info(e,t){if(!this.getStoredUserProperties()[Lc]){var r=function(e,t){var r=e?Nh([],yf,t||[]):[],i=null==Vu?void 0:Vu.href.substring(0,1e3);return{r:If().substring(0,1e3),u:i?dp(i,r,bf):void 0}}(e,t);this.register_once({[Lc]:r},void 0)}}get_initial_props(){var e=this.getStoredUserProperties()[Lc];return e?xf(e):{}}update_referrer_info(){var e={$referrer:If(),$referring_domain:kf()};this.register_once(e,void 0)}loadUserIdentity(){var e=this.storage.get(kc),t=this.storage.get(Ic),r=this.storage.get(Mc),i=this.storage.get(Cc),n=this.getStoredUserProperties(),s=e||this.generateAnonymousId(),o=t||this.generateDeviceId(),a=r||null,l=i||"anonymous";e?uh().debug("user","hydrate","loaded from storage",e.slice(0,12)+"..."):(this._isFirstVisit=!0,uh().debug("user","hydrate","generated new anonymous_id"));var u=s||this.generateAnonymousId();return e||this.storage.set(kc,u,rp),t||this.storage.set(Ic,o,rp),i||this.storage.set(Cc,l,rp),{distinct_id:a,anonymous_id:u,device_id:o,properties:n,user_state:l}}saveUserIdentity(){this.storage.set(kc,this.userIdentity.anonymous_id,rp),this.storage.set(Ic,this.userIdentity.device_id,rp),this.storage.set(Cc,this.userIdentity.user_state,rp),this.userIdentity.distinct_id?this.storage.set(Mc,this.userIdentity.distinct_id,rp):this.storage.remove(Mc),this.setStoredUserProperties(this.userIdentity.properties)}getStoredUserProperties(){return this.storage.getJSON(Ec)||{}}setStoredUserProperties(e){this.storage.setJSON(Ec,e,rp)}register_once(e,t){var r=this.getStoredUserProperties(),i=!1;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(n in r||(r[n]=e[n],i=!0));if(t)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(s in r||(r[s]=t[s],i=!0));i&&this.setStoredUserProperties(r)}generateAnonymousId(){return"anon_"+Oh(16)}generateDeviceId(){return"device_"+Oh(16)}updateStorageMethod(e,t){this.storage=new sp({method:e,cross_subdomain:t,sameSite:"Lax"})}}var Rf=["LCP","CLS","FCP","INP"];class Tf{constructor(e,t){this._isStarted=!1,this._isLoading=!1,this._loadCallbacks=[],this._apiReady=!1,this._deferredCalls=[],this._instance=e,this._config=t}get isEnabled(){return!1!==this._config.enabled}get isStarted(){return this._isStarted}get isLoaded(){return!!this._loaded}_ensureLoaded(e){var t;if(this._loaded)e(this._loaded);else if(this._loadCallbacks.push(e),!this._isLoading){this._isLoading=!0;var r=null===(t=qu.__VTiltExtensions__)||void 0===t?void 0:t.loadExternalDependency;if(!r)return uh().error("feature",this.name,"loadExternalDependency not available"),this._isLoading=!1,void(this._loadCallbacks=[]);r(this._instance,this.scriptName,e=>{if(this._isLoading=!1,e)return uh().error("feature",this.name,"could not load "+this.scriptName+":",e),void(this._loadCallbacks=[]);this._loaded||(this._loaded=this._createLoaded());var t=this._loaded,r=this._loadCallbacks;for(var i of(this._loadCallbacks=[],r))try{i(t)}catch(e){uh().error("feature",this.name,"load callback error:",e)}})}}startIfEnabled(){this.isEnabled&&!this._isStarted&&(this._isStarted=!0,this._ensureLoaded(e=>this._onLoaded(e)))}_onLoaded(e){}stop(){this._isStarted=!1}updateConfig(e){this._config=r({},this._config,e)}_deferCall(e){this._apiReady?e():this._deferredCalls.push(e)}_markApiReady(){if(!this._apiReady){this._apiReady=!0;var e=this._deferredCalls;for(var t of(this._deferredCalls=[],e))try{t()}catch(e){uh().error("feature",this.name,"deferred call error:",e)}}}_resetDeferral(){this._apiReady=!1,this._deferredCalls=[]}}class Lf extends Tf{startIfEnabledOrStop(e){if(this.isEnabled){if(this._isStarted&&this._loaded)return;this._isStarted=!0,this._ensureLoaded(e=>this._onLoaded(e))}else this.stop()}}var Pf=9e5,Nf="web-vitals";class Df extends Tf{static extractConfig(e){var t=e.capture_performance;return"boolean"==typeof t?{web_vitals:t}:"object"==typeof t&&null!==t?t:{web_vitals:!1}}constructor(e,t){super(e,null!=t?t:Df.extractConfig(e.getConfig())),this.name="WebVitals",this.scriptName="web-vitals",this._buffer=this._createEmptyBuffer()}get isEnabled(){var e=null==Vu?void 0:Vu.protocol;return("http:"===e||"https:"===e)&&!0===this._config.web_vitals}startIfEnabled(){if(this.isEnabled&&!this._isStarted&&ju){var e=this._getWebVitalsCallbacks();e?(this._isStarted=!0,this._loaded=e,this._startCapturing(e)):(this._isStarted=!0,this._ensureLoaded(e=>this._onLoaded(e)))}}stop(){this._isStarted&&(this._flush(),this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=void 0),this._isStarted=!1)}onConfigUpdate(e){var t=Df.extractConfig(e),r=this.isEnabled;this._config=t,r||!this.isEnabled||this._isStarted?r&&!this.isEnabled&&this._isStarted&&this.stop():this.startIfEnabled()}_createLoaded(){var e=this._getWebVitalsCallbacks();if(!e)throw new Error("[vTilt:web-vitals] web-vitals loaded but callbacks not registered");return e}_onLoaded(e){this._startCapturing(e)}get allowedMetrics(){return this._config.web_vitals_allowed_metrics||Rf}get flushTimeoutMs(){return this._config.web_vitals_delayed_flush_ms||5e3}get maxAllowedValue(){var e=this._config.__web_vitals_max_value;return void 0===e?Pf:0===e?0:e<6e4?Pf:e}_createEmptyBuffer(){return{url:void 0,pathname:void 0,metrics:[],firstMetricTimestamp:void 0}}_getWebVitalsCallbacks(){var e;return null===(e=qu.__VTiltExtensions__)||void 0===e?void 0:e.webVitalsCallbacks}_startCapturing(e){var t=this.allowedMetrics,r=this._addToBuffer.bind(this);t.includes("LCP")&&e.onLCP&&e.onLCP(r),t.includes("CLS")&&e.onCLS&&e.onCLS(r,{reportAllChanges:!0}),t.includes("FCP")&&e.onFCP&&e.onFCP(r),t.includes("INP")&&e.onINP&&e.onINP(r),t.includes("TTFB")&&e.onTTFB&&e.onTTFB(r)}_getCurrentUrl(){var e;return null===(e=null==ju?void 0:ju.location)||void 0===e?void 0:e.href}_getCurrentPathname(){return null==Vu?void 0:Vu.pathname}_addToBuffer(e){var t,i,n;try{if(!ju||!$u||!Vu)return;if(!(null==e?void 0:e.name)||void 0===(null==e?void 0:e.value))return void uh().warn(Nf,"invalid metric received",e);if(this.maxAllowedValue>0&&e.value>=this.maxAllowedValue&&"CLS"!==e.name)return void uh().warn(Nf,"ignoring "+e.name+" with value >= "+this.maxAllowedValue+"ms");var s=this._getCurrentUrl(),o=this._getCurrentPathname();if(!s)return void uh().warn(Nf,"could not determine current URL");this._buffer.url&&this._buffer.url!==s&&this._flush(),this._buffer.url||(this._buffer.url=s,this._buffer.pathname=o),this._buffer.firstMetricTimestamp||(this._buffer.firstMetricTimestamp=Date.now());var a=this._cleanAttribution(e.attribution),l=null!==(n=null===(i=(t=this._instance).getSessionId)||void 0===i?void 0:i.call(t))&&void 0!==n?n:null,u=this._getWindowId(),h=r({},e,{attribution:a,timestamp:Date.now(),$current_url:s,$session_id:l,$window_id:u}),d=this._buffer.metrics.findIndex(t=>t.name===e.name);d>=0?this._buffer.metrics[d]=h:this._buffer.metrics.push(h),this._scheduleFlush(),this._buffer.metrics.length>=this.allowedMetrics.length&&this._flush()}catch(e){uh().error(Nf,"error adding metric to buffer:",e)}}_cleanAttribution(e){if(e){var t=r({},e);return"interactionTargetElement"in t&&delete t.interactionTargetElement,t}}_getWindowId(){var e;try{return(null===(e=this._instance.sessionManager)||void 0===e?void 0:e.getWindowId())||null}catch(e){return null}}_scheduleFlush(){this._flushTimer&&clearTimeout(this._flushTimer),this._flushTimer=setTimeout(()=>{this._flush()},this.flushTimeoutMs)}_flush(){if(this._flushTimer&&(clearTimeout(this._flushTimer),this._flushTimer=void 0),0!==this._buffer.metrics.length){try{var e={$pathname:this._buffer.pathname,$current_url:this._buffer.url};for(var t of this._buffer.metrics)e["$web_vitals_"+t.name+"_value"]=t.value,e["$web_vitals_"+t.name+"_event"]={name:t.name,value:t.value,delta:t.delta,rating:t.rating,id:t.id,navigationType:t.navigationType,attribution:t.attribution,$session_id:t.$session_id,$window_id:t.$window_id};this._instance.capture("$web_vitals",e)}catch(e){uh().error(Nf,"error flushing metrics:",e)}this._buffer=this._createEmptyBuffer()}}}function Ff(e,t,r){try{if(!(t in e))return()=>{};var i=e[t],n=r(i);return eh(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__vtilt_wrapped__:{enumerable:!1,value:!0}})),e[t]=n,()=>{e[t]=i}}catch(e){return()=>{}}}class Bf{constructor(e,t){var r;this.name="HistoryAutocapture",this._isStarted=!1,this._instance=e,this._config=t||Bf.extractConfig(e.getConfig()),this._lastPathname=(null===(r=null==ju?void 0:ju.location)||void 0===r?void 0:r.pathname)||""}static extractConfig(e){return{enabled:!1!==e.capture_pageview}}get isEnabled(){return!1!==this._config.enabled&&!1!==this._instance.getConfig().capture_pageview}get isStarted(){return this._isStarted}startIfEnabled(){this.isEnabled&&!this._isStarted&&this._start()}stop(){this._isStarted&&(this._popstateListener&&(this._popstateListener(),this._popstateListener=void 0),this._isStarted=!1)}onConfigUpdate(e){this._config=Bf.extractConfig(e),this.isEnabled&&!this._isStarted?this._start():!this.isEnabled&&this._isStarted&&this.stop()}_start(){ju&&Vu&&(this._lastPathname=Vu.pathname||"",this._patchHistoryMethods(),this._setupPopstateListener(),this._isStarted=!0,uh().info("history-autocapture","started"))}_patchHistoryMethods(){var e,t;if(null==ju?void 0:ju.history){var r=this;(null===(e=ju.history.pushState)||void 0===e?void 0:e.__vtilt_wrapped__)||Ff(ju.history,"pushState",e=>function(t,i,n){r._emitPageleaveIfPathWillChange(n),e.call(this,t,i,n),r._capturePageview("pushState")}),(null===(t=ju.history.replaceState)||void 0===t?void 0:t.__vtilt_wrapped__)||Ff(ju.history,"replaceState",e=>function(t,i,n){r._emitPageleaveIfPathWillChange(n),e.call(this,t,i,n),r._capturePageview("replaceState")})}}_emitPageleaveIfPathWillChange(e){var t;if(Vu){var r=Vu.pathname||"",i=null!==(t=function(e){if(!Vu)return null;if(null==e||""===e)return Vu.pathname||null;try{return new URL(String(e),Vu.href).pathname}catch(e){return null}}(e))&&void 0!==t?t:r;i!==r&&this._instance.tryCapturePageleave("spa_transition")}}_setupPopstateListener(){if(!this._popstateListener&&ju){var e=()=>{this._capturePageview("popstate")};Lh(ju,"popstate",e),this._popstateListener=()=>{null==ju||ju.removeEventListener("popstate",e)}}}_capturePageview(e){this.isEnabled&&this._isStarted&&dh(()=>{var t,r=null===(t=null==ju?void 0:ju.location)||void 0===t?void 0:t.pathname;if(r&&Vu&&$u)if(r!==this._lastPathname){uh().debug("history-autocapture",e,r),this._lastPathname=r;var i={navigation_type:e};this._instance.capture(Pc,i)}else this._lastPathname=r})}}var Uf=["a","button","form","input","select","textarea","label"],jf="$copy_autocapture",zf=['[id*="cookie" i]','[class*="cookie" i]','[id*="consent" i]','[class*="consent" i]','[id*="gdpr" i]','[class*="gdpr" i]','[id*="privacy-banner" i]','[class*="privacy-banner" i]','[id*="cookie-banner" i]','[class*="cookie-banner" i]','[id*="cookie-notice" i]','[class*="cookie-notice" i]',"#CybotCookiebotDialog",'[class^="CybotCookiebotDialog"]','[id^="onetrust"]','[class^="onetrust"]','[id^="cc-"]',".cc-banner",".cc-window",".cc-revoke",'[id^="cookieconsent"]','[class^="cookieconsent"]','[id^="gdpr-cookie"]','[id^="qc-cmp"]',"#termly-code-snippet-support",'[id^="iubenda"]','[id^="truste"]','[class^="truste"]',"#consent_blackbar",'[id^="didomi"]','[id^="usercentrics"]',"#uc-center-container",".klaro","#klaro","#cookiescript_injected",".cky-consent-container","#cky-consent","#cmplz-cookiebanner-container","#gdpr-cookie-message",'[class*="fs-cc"]','[class*="fc-cc"]',"[fs-cc]","[fs-cc-checkbox]",'[class*="cookie-preferences"]',"#cookie-preferences",'[role="dialog"][aria-label*="cookie" i]','[role="dialog"][aria-label*="consent" i]','[aria-describedby*="cookie" i]','[aria-label*="Cookie Preferences" i]'];function Wf(e){return e.replace(/^\s+|\s+$/g,"")}function $f(e,t){return e.indexOf(t)>-1}function Vf(e){return 1===(null==e?void 0:e.nodeType)}function Hf(e){return 3===(null==e?void 0:e.nodeType)}function Gf(e,t){var r;return(null===(r=null==e?void 0:e.tagName)||void 0===r?void 0:r.toLowerCase())===t}function qf(e){return 11===(null==e?void 0:e.nodeType)}function Zf(e){return e?Wf(e).split(/\s+/):[]}function Yf(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className&&"string"==typeof e.className.baseVal?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return Zf(t)}function Jf(e){return Xu(e)?null:Wf(e).split(/(\s+)/).filter(e=>uv(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Kf(e){var t,r="";if(dv(e)&&!cv(e)&&e.childNodes&&e.childNodes.length)for(var i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];Hf(n)&&n.textContent&&(r+=null!==(t=Jf(n.textContent))&&void 0!==t?t:"")}return Wf(r)}function Xf(e){var t,r="";if(e&&e.childNodes&&e.childNodes.length)for(var i=0;i<e.childNodes.length;i++){var n=e.childNodes[i];if(n&&"span"===(null===(t=n.tagName)||void 0===t?void 0:t.toLowerCase()))try{r=(r+" "+Kf(n)).trim(),n.childNodes&&n.childNodes.length&&(r=(r+" "+Xf(n)).trim())}catch(e){}}return r}function Qf(e){var t=Kf(e);return uv(t=(t+" "+Xf(e)).trim())?t:""}function ev(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do{t=t.previousSibling}while(t&&!Vf(t));return t}function tv(e){var t=e.parentNode;return!(!t||!Vf(t))&&t}function rv(e){var t=null==ju?void 0:ju.location.href;return!!(t&&e&&e.some(e=>t.match(e)))}var iv="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",nv=new RegExp("^(?:"+iv+")$"),sv=new RegExp(iv),ov="\\d{3}-?\\d{2}-?\\d{4}",av=new RegExp("^("+ov+")$"),lv=new RegExp("("+ov+")");function uv(e,t){if(void 0===t&&(t=!0),Xu(e))return!1;if(Ju(e)){if(e=Wf(e),(t?nv:sv).test((e||"").replace(/[- ]/g,"")))return!1;if((t?av:lv).test(e))return!1}return!0}function hv(e){return!!Ju(e)&&("_ngcontent"===e.substring(0,10)||"_nghost"===e.substring(0,7))}function dv(e){for(var t=e;t&&t.parentNode&&!Gf(t,"body");t=t.parentNode){var r=Yf(t);if($f(r,"vt-sensitive")||$f(r,"vt-no-capture"))return!1}if($f(Yf(e),"vt-include"))return!0;var i=e.type||"";if(Ju(i))switch(i.toLowerCase()){case"hidden":case"password":return!1}var n=e.name||e.id||"";if(Ju(n)){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function cv(e){return!!(Gf(e,"input")&&!["button","checkbox","submit","reset","radio"].includes(e.type)||Gf(e,"textarea")||"true"===e.getAttribute("contenteditable"))}function pv(e){if(!dv(e))return null;if(Gf(e,"input")){var t=e,r=(t.type||"text").toLowerCase();if("password"===r||"hidden"===r)return null;if("checkbox"===r||"radio"===r){var i={$el_value:t.checked?"true":"false"},n=function(e){var t=e.closest("label");if(t){var r=Wf(t.textContent||"");if(r&&uv(r))return Jf(r)||null}if(e.id)try{var i=null===document||void 0===document?void 0:document.querySelector('label[for="'+e.id+'"]');if(i){var n=Wf(i.textContent||"");if(n&&uv(n))return Jf(n)||null}}catch(e){}return null}(t);return n?i.$selected_text=n:t.value&&uv(t.value)&&(i.$selected_text=t.value),i}var s=t.value;if(s&&uv(s)){var o=Jf(s);if(o)return{$el_value:o}}return null}if(Gf(e,"select")){var a=e,l=a.selectedIndex;if(l>=0&&a.options[l]){var u=a.options[l],h={};u.value&&uv(u.value)&&(h.$el_value=u.value);var d=u.text;if(d&&uv(d)){var c=Jf(d);c&&(h.$selected_text=c)}if(h.$el_value||h.$selected_text)return h}return null}return Gf(e,"textarea"),null}function fv(e,t,r,i,n){if(void 0===r&&(r=void 0),!ju)return{capture:!1,reason:"no_window"};if(!e)return{capture:!1,reason:"no_element"};if(Gf(e,"html")||!Vf(e))return{capture:!1,reason:"html_element"};if((null==r?void 0:r.url_allowlist)&&!rv(r.url_allowlist))return{capture:!1,reason:"url_allowlist_miss"};if((null==r?void 0:r.url_ignorelist)&&rv(r.url_ignorelist))return{capture:!1,reason:"url_ignorelist_hit"};if(null==r?void 0:r.dom_event_allowlist){var s=r.dom_event_allowlist;if(s&&!s.some(e=>t.type===e))return{capture:!1,reason:"dom_event_not_allowed"}}for(var o=!1,a=[e],l=!0,u=e;u.parentNode&&!Gf(u,"body");)if(qf(u.parentNode))a.push(u.parentNode.host),u=u.parentNode.host;else{if(!(l=tv(u)))break;if(i||Uf.indexOf(l.tagName.toLowerCase())>-1)o=!0;else{var h=ju.getComputedStyle(l);h&&"pointer"===h.getPropertyValue("cursor")&&(o=!0)}a.push(l),u=l}if(!function(e,t){var r=null==t?void 0:t.element_allowlist;if(Ku(r))return!0;var i,n=function(e){if(r.some(t=>e.tagName.toLowerCase()===t))return{v:!0}};for(var s of e)if(i=n(s))return i.v;return!1}(a,r))return{capture:!1,reason:"element_allowlist_miss"};if(!function(e,t){var r=null==t?void 0:t.css_selector_allowlist;if(Ku(r))return!0;var i,n=function(e){if(r.some(t=>e.matches(t)))return{v:!0}};for(var s of e)if(i=n(s))return i.v;return!1}(a,r))return{capture:!1,reason:"css_selector_allowlist_miss"};if(function(e,t){var r=null==t?void 0:t.css_selector_ignorelist,i=void 0===r?zf:r;if(0===i.length)return!1;for(var n of e)for(var s of i)try{if(n.matches(s))return!0}catch(e){}return!1}(a,r))return{capture:!1,reason:"css_selector_ignorelist_hit"};var d=ju.getComputedStyle(e);if(d&&"pointer"===d.getPropertyValue("cursor")&&"click"===t.type)return{capture:!0};var c=e.tagName.toLowerCase();switch(c){case"html":return{capture:!1,reason:"tag_html"};case"form":return(n||["submit"]).indexOf(t.type)>=0?{capture:!0}:{capture:!1,reason:"form_event_not_allowed"};case"input":case"select":case"textarea":return(n||["change","click"]).indexOf(t.type)>=0?{capture:!0}:{capture:!1,reason:"input_event_not_allowed"};default:return o?(n||["click"]).indexOf(t.type)>=0?{capture:!0}:{capture:!1,reason:"dom_event_not_allowed"}:(n||["click"]).indexOf(t.type)>=0&&(Uf.indexOf(c)>-1||"true"===e.getAttribute("contenteditable"))?{capture:!0}:{capture:!1,reason:"tag_not_capturable"}}}function vv(e,t){return t.length>e?t.slice(0,e)+"...":t}function gv(e,t,r,i){var n=e.tagName.toLowerCase(),s={tag_name:n};Uf.indexOf(n)>-1&&!r&&(s.$el_text=vv(1024,"a"===n||"button"===n?Qf(e):Kf(e)));var o=Yf(e);o.length>0&&(s.classes=o.filter(e=>""!==e));for(var a=0;a<e.attributes.length;a++){var l=e.attributes[a];if((!cv(e)||-1!==["name","id","class","aria-label"].indexOf(l.name))&&(!(null==i?void 0:i.includes(l.name))&&!t&&uv(l.value)&&!hv(l.name))){var u=l.value;"class"===l.name&&(u=Zf(u).join(" ")),s["attr__"+l.name]=vv(1024,u)}}for(var h=1,d=1,c=e;c=ev(c);)h++,c.tagName===e.tagName&&d++;return s.nth_child=h,s.nth_of_type=d,s}function mv(e){if(!dv(e))return{};for(var t={},r=0;r<e.attributes.length;r++){var i=e.attributes[r];if(i.name&&0===i.name.indexOf("data-vt-capture-attribute")){var n=i.name.replace("data-vt-capture-attribute-",""),s=i.value;n&&s&&uv(s)&&(t[n]=s)}}return t}function yv(e){return e.replace(/"|\\"/g,'\\"')}function _v(e){var t=e.attr__class;return t?Qu(t)?t:Zf(t):void 0}function bv(e){return function(e){var t=e.map(e=>{var t,i,n="";if(e.tag_name&&(n+=e.tag_name),e.attr_class)for(var s of(e.attr_class.sort(),e.attr_class))n+="."+s.replace(/"/g,"");var o=r({},e.text?{text:e.text}:{},{"nth-child":null!==(t=e.nth_child)&&void 0!==t?t:0,"nth-of-type":null!==(i=e.nth_of_type)&&void 0!==i?i:0},e.href?{href:e.href}:{},e.attr_id?{attr_id:e.attr_id}:{},e.attributes),a={};return Object.entries(o).sort((e,t)=>{var[r]=e,[i]=t;return r.localeCompare(i)}).forEach(e=>{var[t,r]=e;return a[yv(t.toString())]=yv(String(r))}),(n+=":")+Object.entries(a).map(e=>{var[t,r]=e;return t+'="'+r+'"'}).join("")});return t.join(";")}(function(e){return e.map(e=>{var t,r,i={text:null===(t=e.$el_text)||void 0===t?void 0:t.slice(0,400),tag_name:e.tag_name,href:null===(r=e.attr__href)||void 0===r?void 0:r.slice(0,2048),attr_class:_v(e),attr_id:e.attr__id,nth_child:e.nth_child,nth_of_type:e.nth_of_type,attributes:{}};return Object.entries(e).filter(e=>{var[t]=e;return 0===t.indexOf("attr__")}).forEach(e=>{var[t,r]=e;return i.attributes[t]=r}),i})}(e))}var wv=[25,50,75,100];function Sv(e){var t;if(!e)return null;var r=e.milestones,i=!0===r||"object"==typeof r&&null!==r,n="object"==typeof r&&null!==r&&(null===(t=r.thresholds)||void 0===t?void 0:t.length)?[...r.thresholds].sort((e,t)=>e-t):[...wv],s=!0===e.pageleave;return i||s?{milestones:i,thresholds:n,pageleave:s,scroll_root_selector:e.scroll_root_selector}:null}class Cv{constructor(e){this._options=e,this._maxPctSeen=0,this._firedThresholds=new Set,this._scrollHandler=null,this._scrollTarget=null,this._rafId=null,this._pageviewUnsub=null}start(){this.stop(),this._scrollTarget=function(e){if(!ju)return null;if(e){var t=Array.isArray(e)?e:[e];for(var r of t){var i=null==$u?void 0:$u.querySelector(r);if(i instanceof Element)return i}}return ju}(this._options.scroll_root_selector),this._scrollTarget&&(this._scrollHandler=()=>this._scheduleScrollUpdate(),Lh(this._scrollTarget,"scroll",this._scrollHandler,{passive:!0}),this._onScroll(),this._pageviewUnsub=this._options.onPageview(()=>this.reset()))}stop(){this._pageviewUnsub&&(this._pageviewUnsub(),this._pageviewUnsub=null),null!=this._rafId&&ju&&(ju.cancelAnimationFrame(this._rafId),this._rafId=null),this._scrollHandler&&this._scrollTarget&&(this._scrollTarget.removeEventListener("scroll",this._scrollHandler,{passive:!0}),this._scrollHandler=null,this._scrollTarget=null)}reset(){this._maxPctSeen=0,this._firedThresholds.clear(),this._onScroll()}getMaxPct(){return this._maxPctSeen}_scheduleScrollUpdate(){ju&&null==this._rafId&&(this._rafId=ju.requestAnimationFrame(()=>{this._rafId=null,this._onScroll()}))}_onScroll(){if(this._scrollTarget){var e=function(e){var t,r,i,n,s,o;if(!e)return 0;if(e===ju){var a=null!==(t=ju.scrollY)&&void 0!==t?t:0,l=null!==(r=ju.innerHeight)&&void 0!==r?r:0,u=null==$u?void 0:$u.documentElement,h=null==$u?void 0:$u.body,d=Math.max(null!==(i=null==u?void 0:u.scrollHeight)&&void 0!==i?i:0,null!==(n=null==h?void 0:h.scrollHeight)&&void 0!==n?n:0,null!==(s=null==u?void 0:u.offsetHeight)&&void 0!==s?s:0,null!==(o=null==h?void 0:h.offsetHeight)&&void 0!==o?o:0)-l;return d<=0?100:Math.round(Math.min(100,a/d*100))}var c=e,p=c.scrollHeight-c.clientHeight;return p<=0?100:Math.round(Math.min(100,c.scrollTop/p*100))}(this._scrollTarget);if(e>this._maxPctSeen&&(this._maxPctSeen=e),this._options.milestones&&this._options.isUrlAllowed())for(var t of this._options.thresholds)this._maxPctSeen>=t&&!this._firedThresholds.has(t)&&(this._firedThresholds.add(t),this._options.capture(zc,{[Jc]:t,[Kc]:this._maxPctSeen}))}}}function Iv(e,t){return e.indexOf(t)>-1}class kv{constructor(){this.clicks=[],this.RAGE_CLICK_THRESHOLD_PX=30,this.RAGE_CLICK_TIMEOUT_MS=1e3,this.RAGE_CLICK_CLICK_COUNT=3}isRageClick(e,t,r){if(this.clicks=this.clicks.filter(e=>r-e.timestamp<this.RAGE_CLICK_TIMEOUT_MS),this.clicks.length>0){var i=this.clicks[this.clicks.length-1];Math.sqrt(Math.pow(e-i.x,2)+Math.pow(t-i.y,2))>this.RAGE_CLICK_THRESHOLD_PX&&(this.clicks=[])}return this.clicks.push({x:e,y:t,timestamp:r}),this.clicks.length>=this.RAGE_CLICK_CLICK_COUNT}}function xv(e,t){for(var r,i,n,s,{e:o,maskAllElementAttributes:a,maskAllText:l,elementAttributeIgnoreList:u,elementsChainAsString:h,captureElementValues:d}=t,c=[e],p=e;p.parentNode&&!Gf(p,"body");)qf(p.parentNode)?(c.push(p.parentNode.host),p=p.parentNode.host):(c.push(p.parentNode),p=p.parentNode);var f,v=[],g={},m=!1,y=!1;for(var _ of c){var b=dv(_);if("a"===_.tagName.toLowerCase()){var w=_.getAttribute("href");m=!!(b&&w&&uv(w))&&w}Iv(Yf(_),"vt-no-capture")&&(y=!0),v.push(gv(_,a,l,u));var S=mv(_);Object.assign(g,S)}if(y)return{props:{},explicitNoCapture:y};if(l||("a"===e.tagName.toLowerCase()||"button"===e.tagName.toLowerCase()?v[0].$el_text=Qf(e):v[0].$el_text=Kf(e)),"change"===o.type&&d){var C=pv(e);C&&(C.$el_value&&(v[0].$el_value=C.$el_value),C.$selected_text&&(v[0].$selected_text=C.$selected_text))}if(m){v[0].attr__href=m;var I=null===(r=ap(m))||void 0===r?void 0:r.host,k=null===(i=null==ju?void 0:ju.location)||void 0===i?void 0:i.host;I&&k&&I!==k&&(f=m)}var x=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Object.assign({},...t)}({$event_type:o.type,$ce_version:1},h?{}:{$elements:v},{$elements_chain:bv(v)},(null===(n=v[0])||void 0===n?void 0:n.$el_text)?{$el_text:null===(s=v[0])||void 0===s?void 0:s.$el_text}:{},f&&"click"===o.type?{$external_click_url:f}:{},g);return{props:x}}var Mv=["copy","cut"];class Ev{static extractConfig(e){return{enabled:!1!==e.autocapture}}constructor(e,t){this.name="Autocapture",this._initialized=!1,this._isDisabledServerSide=null,this._userOverride=null,this._elementSelectors=null,this._rageclicks=new kv,this._elementsChainAsString=!0,this._cachedConfig=null,this._cachedConfigSource=null,this._domHandler=null,this._copyHandler=null,this._copyHandlerAttached=!1,this._scrollDepthTracker=null,this._pageviewUnsubscribe=null,this._instance=e}get _config(){var e=this._instance.getConfig().autocapture;if(e===this._cachedConfigSource&&this._cachedConfig)return this._cachedConfig;this._cachedConfigSource=e;var t=function(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}(e)?e:{};return t.url_allowlist&&(t.url_allowlist=t.url_allowlist.map(e=>"string"==typeof e?new RegExp(e):e)),t.url_ignorelist&&(t.url_ignorelist=t.url_ignorelist.map(e=>"string"==typeof e?new RegExp(e):e)),this._cachedConfig=t,t}get isEnabled(){return this._evaluateEnabled().enabled}get isStarted(){return this._initialized}startIfEnabled(){var{enabled:e,reason:t}=this._evaluateEnabled();e?this._initialized?(this._syncCopyHandler(),this._syncScrollDepthHandler()):(this._addDomEventHandlers(),this._initialized=!0,uh().info("autocapture","started; listening for click/change/submit events")):this._initialized?(uh().info("autocapture","stopping; reason:",null!=t?t:"unknown"),this._removeDomEventHandlers(),this._initialized=!1):(uh().debug("autocapture","not started; reason:",null!=t?t:"unknown"),this._teardownScrollDepth())}stop(){this._initialized&&(this._removeDomEventHandlers(),this._initialized=!1,uh().info("autocapture","stopped (DOM listeners detached)")),this._teardownScrollDepth()}getMaxScrollDepthPctForPageleave(){var e=Sv(this._config.scroll_depth);return(null==e?void 0:e.pageleave)&&this._scrollDepthTracker?this._scrollDepthTracker.getMaxPct():null}onConfigUpdate(e){var t=e;"boolean"==typeof t.elementsChainAsString&&(this._elementsChainAsString=t.elementsChainAsString),void 0!==t.autocapture_opt_out&&(this._isDisabledServerSide=!!t.autocapture_opt_out),this.startIfEnabled()}updateConfig(e){void 0!==e.enabled&&(this._userOverride=e.enabled,e.enabled&&(this._isDisabledServerSide=!1),this.startIfEnabled())}getDiagnostics(){var e,t,r,{enabled:i,reason:n}=this._evaluateEnabled(),s=Sv(this._config.scroll_depth);return{isEnabled:i,isStarted:this._initialized,disabledReason:i?null:n,inputs:{configAutocapture:this._instance.getConfig().autocapture,isDisabledServerSide:null!==(e=this._isDisabledServerSide)&&void 0!==e&&e,userOverride:this._userOverride,elementsChainAsString:this._elementsChainAsString,captureCopiedText:!!this._config.capture_copied_text,scrollDepthMilestones:null!==(t=null==s?void 0:s.milestones)&&void 0!==t&&t,scrollDepthPageleave:null!==(r=null==s?void 0:s.pageleave)&&void 0!==r&&r,scrollDepthListenerAttached:null!==this._scrollDepthTracker}}}setElementSelectors(e){this._elementSelectors=e}getElementSelectors(e){var t,r=[];return null===(t=this._elementSelectors)||void 0===t||t.forEach(t=>{var i=null==$u?void 0:$u.querySelectorAll(t);null==i||i.forEach(i=>{e===i&&r.push(t)})}),r}_evaluateEnabled(){if(!1===this._userOverride)return{enabled:!1,reason:"user_stop_called"};if(this._isDisabledServerSide)return{enabled:!1,reason:"server_opt_out"};if(!0===this._userOverride)return{enabled:!0,reason:null};var e=this._instance.getConfig().autocapture;return!1===e?{enabled:!1,reason:"config_autocapture_false"}:null==e?{enabled:!1,reason:"config_autocapture_undefined"}:{enabled:!0,reason:null}}_addDomEventHandlers(){this._isBrowserSupported()?ju&&$u&&(this._domHandler=e=>{var t=e||(null==ju?void 0:ju.event);if(t)try{this._captureEvent(t)}catch(e){uh().error("autocapture","capture handler threw",e)}},Lh($u,"submit",this._domHandler,{capture:!0}),Lh($u,"change",this._domHandler,{capture:!0}),Lh($u,"click",this._domHandler,{capture:!0}),this._syncCopyHandler(),this._syncScrollDepthHandler()):uh().warn("autocapture","browser unsupported (no querySelectorAll)")}_removeDomEventHandlers(){$u&&(this._domHandler&&($u.removeEventListener("submit",this._domHandler,!0),$u.removeEventListener("change",this._domHandler,!0),$u.removeEventListener("click",this._domHandler,!0),this._domHandler=null),this._copyHandler&&this._copyHandlerAttached&&($u.removeEventListener("copy",this._copyHandler,!0),$u.removeEventListener("cut",this._copyHandler,!0),this._copyHandlerAttached=!1,this._copyHandler=null),this._teardownScrollDepth())}_syncScrollDepthHandler(){var e,t=Sv(this._config.scroll_depth),r=this.isEnabled&&null!==t&&null!==Sv(null==(e=this._config)?void 0:e.scroll_depth);r&&!this._scrollDepthTracker?(this._scrollDepthTracker=new Cv({milestones:t.milestones,pageleave:t.pageleave,thresholds:t.thresholds,scroll_root_selector:t.scroll_root_selector,capture:(e,t)=>this._instance.capture(e,t),isUrlAllowed:()=>{return e=this._config,!(!ju||(null==e?void 0:e.url_allowlist)&&!rv(e.url_allowlist)||(null==e?void 0:e.url_ignorelist)&&rv(e.url_ignorelist));var e},onPageview:e=>(this._pageviewUnsubscribe&&this._pageviewUnsubscribe(),this._pageviewUnsubscribe=this._instance.on(bh,t=>{(null==t?void 0:t.event)===Pc&&e()}),()=>{var e;null===(e=this._pageviewUnsubscribe)||void 0===e||e.call(this),this._pageviewUnsubscribe=null})}),this._scrollDepthTracker.start(),uh().info("autocapture","scroll depth tracking started",{milestones:t.milestones,pageleave:t.pageleave})):r||this._teardownScrollDepth()}_teardownScrollDepth(){this._scrollDepthTracker&&(this._scrollDepthTracker.stop(),this._scrollDepthTracker=null,uh().info("autocapture","scroll depth tracking stopped")),this._pageviewUnsubscribe&&(this._pageviewUnsubscribe(),this._pageviewUnsubscribe=null)}_syncCopyHandler(){if($u){var e=!!this._config.capture_copied_text;e&&!this._copyHandlerAttached?(this._copyHandler=e=>{var t=e||(null==ju?void 0:ju.event);if(t)try{this._captureEvent(t,jf)}catch(e){uh().error("autocapture","copy handler threw",e)}},Lh($u,"copy",this._copyHandler,{capture:!0}),Lh($u,"cut",this._copyHandler,{capture:!0}),this._copyHandlerAttached=!0):!e&&this._copyHandlerAttached&&this._copyHandler&&($u.removeEventListener("copy",this._copyHandler,!0),$u.removeEventListener("cut",this._copyHandler,!0),this._copyHandlerAttached=!1,this._copyHandler=null)}}_captureEvent(e,t){var r,i,n,s,o,a,l,u;if(void 0===t&&(t="$autocapture"),this.isEnabled)if(e.isTrusted){var h=function(e){var t;return Ku(e.target)?e.srcElement||null:(null===(t=e.target)||void 0===t?void 0:t.shadowRoot)?e.composedPath()[0]||null:e.target||null}(e);if(Hf(h)&&(h=h.parentNode||null),"$autocapture"===t&&"click"===e.type&&e instanceof MouseEvent)this._instance.getConfig().rageclick&&(null===(r=this._rageclicks)||void 0===r?void 0:r.isRageClick(e.clientX,e.clientY,(new Date).getTime()))&&(uh().info("autocapture","$rageclick detected"),this._captureEvent(e,"$rageclick"));var d=t===jf;if(h){var c=fv(h,e,this._config,d,d?[...Mv]:void 0);if(c.capture){var p=this._instance.getConfig(),{props:f,explicitNoCapture:v}=xv(h,{e:e,maskAllElementAttributes:null!==(s=p.mask_all_element_attributes)&&void 0!==s&&s,maskAllText:null!==(o=p.mask_all_text)&&void 0!==o&&o,elementAttributeIgnoreList:this._config.element_attribute_ignorelist,elementsChainAsString:this._elementsChainAsString,captureElementValues:null!==(a=this._config.capture_element_values)&&void 0!==a&&a});if(v)return uh().debug("autocapture","skip: vt-no-capture class on element chain",{tag:null===(l=h.tagName)||void 0===l?void 0:l.toLowerCase()}),!1;var g=this.getElementSelectors(h);if(g&&g.length>0&&(f.$element_selectors=g),t===jf){var m=Jf(null===(u=null==ju?void 0:ju.getSelection())||void 0===u?void 0:u.toString()),y=e.type||"clipboard";if(!m)return uh().debug("autocapture","skip copy: empty selection"),!1;f.$selected_content=m,f.$copy_type=y}return this._instance.capture(t,f),!0}uh().debug("autocapture","skip:",null!==(i=c.reason)&&void 0!==i?i:"unknown",{type:e.type,tag:null===(n=h.tagName)||void 0===n?void 0:n.toLowerCase()})}else uh().debug("autocapture","skip: no event target",{type:e.type})}else uh().debug("autocapture","skip: synthetic event (isTrusted=false)",{type:e.type})}_isBrowserSupported(){return eh(null==$u?void 0:$u.querySelectorAll)}}var Av="replay";class Ov extends Lf{constructor(e,t){super(e,t||Ov.extractConfig(e.getConfig())),this.name="SessionRecording",this.scriptName="recorder"}static extractConfig(e){var t,r,i,n=e.session_recording||{};return{enabled:null!==(t=n.enabled)&&void 0!==t&&t,sampleRate:n.sampleRate,minimumDurationMs:n.minimumDurationMs,sessionIdleThresholdMs:n.sessionIdleThresholdMs,fullSnapshotIntervalMs:n.fullSnapshotIntervalMs,captureConsole:null!==(r=n.captureConsole)&&void 0!==r&&r,captureNetwork:null!==(i=n.captureNetwork)&&void 0!==i&&i,captureCanvas:n.captureCanvas,blockClass:n.blockClass,blockSelector:n.blockSelector,skipDefaultInvisibleBlocking:n.skipDefaultInvisibleBlocking,ignoreClass:n.ignoreClass,maskTextClass:n.maskTextClass,maskTextSelector:n.maskTextSelector,maskAllInputs:n.maskAllInputs,maskInputOptions:n.maskInputOptions,masking:n.masking,recordHeaders:n.recordHeaders,recordBody:n.recordBody,compressEvents:n.compressEvents,__mutationThrottlerRefillRate:n.__mutationThrottlerRefillRate,__mutationThrottlerBucketSize:n.__mutationThrottlerBucketSize}}get isEnabled(){var e,t=this._instance.getConfig(),r=null!==(e=this._config.enabled)&&void 0!==e&&e,i=!t.disable_session_recording;return!!ju&&r&&i}get isStarted(){var e;return this._isStarted&&!!(null===(e=this._loaded)||void 0===e?void 0:e.isStarted)}startIfEnabled(){this.startIfEnabledOrStop("recording_initialized")}startIfEnabledOrStop(e){var t;if(!this.isEnabled||!(null===(t=this._loaded)||void 0===t?void 0:t.isStarted)){var r=void 0!==Object.assign&&void 0!==Array.from;this.isEnabled&&r?(this._isStarted=!0,this._ensureLoaded(t=>this._onLoaded(t,e)),uh().info(Av,"starting")):this.stop()}}stop(){dh(()=>{var e;null===(e=this._loaded)||void 0===e||e.stop(),this._isStarted=!1})}onConfigUpdate(e){var t;this._config=Ov.extractConfig(e),null===(t=this._loaded)||void 0===t||t.updateConfig(this._config),this.startIfEnabledOrStop("config_updated")}_createLoaded(){var e,t=null===(e=qu.__VTiltExtensions__)||void 0===e?void 0:e.initSessionRecording;if(!t)throw new Error("[vTilt:replay] initSessionRecording not available after script load");return t(this._instance,this._config)}_onLoaded(e,t){e.start(t)}get started(){return this.isStarted}get status(){var e;return(null===(e=this._loaded)||void 0===e?void 0:e.status)||"lazy_loading"}get sessionId(){var e;return(null===(e=this._loaded)||void 0===e?void 0:e.sessionId)||""}stopRecording(){this.stop()}log(e,t){var r;void 0===t&&(t="log"),(null===(r=this._loaded)||void 0===r?void 0:r.log)?this._loaded.log(e,t):uh().warn(Av,"log called before recorder was ready")}updateConfig(e){var t;this._config=r({},this._config,e),null===(t=this._loaded)||void 0===t||t.updateConfig(this._config)}}var Rv="vtilt-bubble-pos";function Tv(e){try{localStorage.setItem(Rv,JSON.stringify(e))}catch(e){}}function Lv(e,t,r){var i=e.getBoundingClientRect(),n=i.left-t,s=i.top-r,o=window.innerWidth-e.offsetWidth-n,a=-n,l=window.innerHeight-e.offsetHeight-s,u=-s;return{x:Math.min(Math.max(t,a),o),y:Math.min(Math.max(r,u),l)}}function Pv(e,t,r){e.style.transform="translate3d("+t+"px, "+r+"px, 0)"}function Nv(e,t){var r=e,i=0,n=0,s=0,o=0,a=0,l=0,u=!1,h=!1,d=function(){try{var e=localStorage.getItem(Rv);if(!e)return null;var t=JSON.parse(e);if("number"==typeof t.x&&"number"==typeof t.y)return t}catch(e){}return null}();if(d){i=d.x,n=d.y;var c=e.style.transition;e.style.transition="none",Pv(e,i,n);var p=Lv(e,i,n);i=p.x,n=p.y,Pv(e,i,n),e.offsetHeight,e.style.transition=c}r.style.cursor="grab",r.style.touchAction="none";var f=t=>{0===t.button&&(u=!0,h=!1,s=t.clientX,o=t.clientY,a=i,l=n,r.setPointerCapture(t.pointerId),r.style.cursor="grabbing",e.style.transition="none")},v=t=>{if(u){var r=t.clientX-s,d=t.clientY-o;if(!(!h&&Math.abs(r)<5&&Math.abs(d)<5)){h=!0;var c={x:a+r,y:l+d},p=Lv(e,c.x,c.y);i=p.x,n=p.y,Pv(e,i,n)}}},g=()=>{u&&(u=!1,r.style.cursor="grab",e.style.transition="",h&&Tv({x:i,y:n}))},m=e=>{h&&(e.stopPropagation(),e.preventDefault(),h=!1)},y=()=>{var t=i,r=n,s=Lv(e,i,n);i=s.x,n=s.y,Pv(e,i,n),t===i&&r===n||Tv({x:i,y:n})};return r.addEventListener("pointerdown",f),r.addEventListener("pointermove",v),r.addEventListener("pointerup",g),r.addEventListener("pointercancel",g),r.addEventListener("click",m,!0),window.addEventListener("resize",y),{destroy(){r.removeEventListener("pointerdown",f),r.removeEventListener("pointermove",v),r.removeEventListener("pointerup",g),r.removeEventListener("pointercancel",g),r.removeEventListener("click",m,!0),window.removeEventListener("resize",y)}}}var Dv={bottom:20,right:20,left:20};function Fv(e,t){return void 0!==e&&Number.isFinite(e)?Math.max(0,e):t}function Bv(e){return null===e?r({},Dv):{bottom:Fv(null==e?void 0:e.bottom,Dv.bottom),right:Fv(null==e?void 0:e.right,Dv.right),left:Fv(null==e?void 0:e.left,Dv.left)}}function Uv(e,t,r){e.style.bottom=r.bottom+"px","bottom-right"===t?(e.style.right=r.right+"px",e.style.left=""):(e.style.left=r.left+"px",e.style.right="")}var jv="chat";class zv extends Tf{constructor(e,t){super(e,t||zv.extractConfig(e.getConfig())),this.name="Chat",this.scriptName="chat",this._serverConfig=null,this._configFetched=!1,this._loadError=null,this._bubbleDragHandle=null,this._pendingMessages=[],this._pendingCallbacks=[],this._messageCallbacks=[],this._typingCallbacks=[],this._connectionCallbacks=[],this._bubbleExplicitShow=!1,this._unreadPollIntervalId=null,this._onVisibilityChange=()=>{if("visible"===document.visibilityState)return this._fetchUnreadForBubble(),void this._startUnreadPoll();this._stopUnreadPoll()}}static extractConfig(e){var t,r=e.chat||{};return{enabled:r.enabled,autoConfig:null===(t=r.autoConfig)||void 0===t||t,position:r.position,greeting:r.greeting,color:r.color,aiMode:r.aiMode,aiGreeting:r.aiGreeting,preload:r.preload,offlineMessage:r.offlineMessage,collectEmailOffline:r.collectEmailOffline,bubble:r.bubble}}get isEnabled(){var e;return!1!==this._config.enabled&&(!0===this._config.enabled||!this._instance.getConfig().disable_chat&&!0===(null===(e=this._serverConfig)||void 0===e?void 0:e.enabled))}startIfEnabled(){uh().debug(jv,"startIfEnabled"),this._startAsync().catch(e=>{uh().error(jv,"error starting:",e)})}stop(){this.destroy(),this._isStarted=!1}onConfigUpdate(e){var t,r;this._config=zv.extractConfig(e),this._isBubbleDraggable()||this._syncBubbleLayout(),this._loaded&&(null===(r=(t=this._loaded).updateConfig)||void 0===r||r.call(t,this.getMergedConfig()))}_createLoaded(){var e,t,r,i=null===(e=qu.__VTiltExtensions__)||void 0===e?void 0:e.initChat;if(!i)throw new Error("[vTilt:chat] initChat not available after script load");var n=this.getMergedConfig(),s=i(this._instance,n);this._bubbleExplicitShow&&s.show(),this._messageCallbacks.forEach(e=>s.onMessage(e)),this._typingCallbacks.forEach(e=>s.onTyping(e)),this._connectionCallbacks.forEach(e=>s.onConnectionChange(e)),null===(t=this._bubbleDragHandle)||void 0===t||t.destroy(),this._bubbleDragHandle=null;var o=null===(r=null==ju?void 0:ju.document)||void 0===r?void 0:r.getElementById("vtilt-chat-bubble");return o&&!o.closest("#vtilt-chat-container")&&o.remove(),s}_onLoaded(e){this._pendingCallbacks.forEach(e=>e()),this._pendingCallbacks=[],e.isOpen||(this._fetchUnreadForBubble(),this._startUnreadPoll()),uh().info(jv,"loaded and ready")}_startAsync(){var e=this;return t(function*(){var t,r;try{if(!1===e._config.enabled)return void uh().info(jv,"disabled by code config");if(e._instance.getConfig().disable_chat)return void uh().info(jv,"disabled by disable_chat config");if(!1!==e._config.autoConfig&&(yield e._fetchServerSettings()),!e.isEnabled)return void uh().info(jv,"not enabled (check dashboard settings)");uh().debug(jv,"startIfEnabled enabled"),e._isStarted=!0,!0===e._config.preload&&e._schedulePreload();var i=e.getMergedConfig();(null===(t=e._serverConfig)||void 0===t?void 0:t.enabled)&&!1!==(null===(r=i.bubble)||void 0===r?void 0:r.visible)&&e._showBubble(),uh().info(jv,"ready (lazy-load on demand)")}finally{e._markApiReady()}})()}get isOpen(){var e,t;return null!==(t=null===(e=this._loaded)||void 0===e?void 0:e.isOpen)&&void 0!==t&&t}get isConnected(){var e,t;return null!==(t=null===(e=this._loaded)||void 0===e?void 0:e.isConnected)&&void 0!==t&&t}get isLoading(){var e,t;return this._isLoading||null!==(t=null===(e=this._loaded)||void 0===e?void 0:e.isLoading)&&void 0!==t&&t}get unreadCount(){var e,t;return null!==(t=null===(e=this._loaded)||void 0===e?void 0:e.unreadCount)&&void 0!==t?t:0}get channel(){var e,t;return null!==(t=null===(e=this._loaded)||void 0===e?void 0:e.channel)&&void 0!==t?t:null}get channels(){var e,t;return null!==(t=null===(e=this._loaded)||void 0===e?void 0:e.channels)&&void 0!==t?t:[]}get currentView(){var e,t;return null!==(t=null===(e=this._loaded)||void 0===e?void 0:e.currentView)&&void 0!==t?t:"list"}open(){this._deferCall(()=>{this._stopUnreadPoll(),this._lazyLoadAndThen(()=>{var e;return null===(e=this._loaded)||void 0===e?void 0:e.open()})})}close(){this._deferCall(()=>{this._loaded?(this._loaded.close(),this._fetchUnreadForBubble(),this._startUnreadPoll()):this._lazyLoadAndThen(()=>{var e;null===(e=this._loaded)||void 0===e||e.close(),this._fetchUnreadForBubble(),this._startUnreadPoll()})})}toggle(){this._deferCall(()=>{this._loaded?this._loaded.toggle():this.open()})}show(){this._deferCall(()=>{this._bubbleExplicitShow=!0,this._loaded?this._loaded.show():this._isStarted&&this._showBubble()})}hide(){this._deferCall(()=>{var e;if(this._bubbleExplicitShow=!1,this._loaded)this._loaded.hide();else{var t=null===(e=null==ju?void 0:ju.document)||void 0===e?void 0:e.getElementById("vtilt-chat-bubble");t&&(t.style.display="none")}})}getChannels(){this._deferCall(()=>{this._lazyLoadAndThen(()=>{var e;return null===(e=this._loaded)||void 0===e?void 0:e.getChannels()})})}selectChannel(e){this._deferCall(()=>{this._lazyLoadAndThen(()=>{var t;return null===(t=this._loaded)||void 0===t?void 0:t.selectChannel(e)})})}createChannel(){this._deferCall(()=>{this._lazyLoadAndThen(()=>{var e;return null===(e=this._loaded)||void 0===e?void 0:e.createChannel()})})}goToChannelList(){this._deferCall(()=>{this._loaded?this._loaded.goToChannelList():this._lazyLoadAndThen(()=>{var e;return null===(e=this._loaded)||void 0===e?void 0:e.goToChannelList()})})}sendMessage(e,t){return this._loaded?this._loaded.sendMessage(e,t):new Promise((r,i)=>{this._deferCall(()=>{this._loaded?this._loaded.sendMessage(e,t).then(r).catch(i):(this._pendingMessages.push({content:e,options:t,resolve:r,reject:i}),this._lazyLoadAndThen(()=>{var e,t=this._pendingMessages;for(var r of(this._pendingMessages=[],t))null===(e=this._loaded)||void 0===e||e.sendMessage(r.content,r.options).then(r.resolve).catch(r.reject)}))})})}markAsRead(){this._deferCall(()=>{this._loaded?this._loaded.markAsRead():this._lazyLoadAndThen(()=>{var e;return null===(e=this._loaded)||void 0===e?void 0:e.markAsRead()})})}registerWidget(e){this._deferCall(()=>{var t,r;this._loaded?null===(r=(t=this._loaded).registerWidget)||void 0===r||r.call(t,e):this._lazyLoadAndThen(()=>{var t,r;null===(r=null===(t=this._loaded)||void 0===t?void 0:t.registerWidget)||void 0===r||r.call(t,e)})})}onMessage(e){return this._messageCallbacks.push(e),this._loaded?this._loaded.onMessage(e):()=>{var t=this._messageCallbacks.indexOf(e);t>-1&&this._messageCallbacks.splice(t,1)}}onTyping(e){return this._typingCallbacks.push(e),this._loaded?this._loaded.onTyping(e):()=>{var t=this._typingCallbacks.indexOf(e);t>-1&&this._typingCallbacks.splice(t,1)}}onConnectionChange(e){return this._connectionCallbacks.push(e),this._loaded?this._loaded.onConnectionChange(e):()=>{var t=this._connectionCallbacks.indexOf(e);t>-1&&this._connectionCallbacks.splice(t,1)}}_isBubbleDraggable(){var e;return!0===(null===(e=this.getMergedConfig().bubble)||void 0===e?void 0:e.draggable)}getMergedConfig(){var e,t,r,i,n,s,o,a,l,u,h,d,c,p,f,v,g,m,y,_,b,w,S,C,I,k=this._serverConfig,x=this._config;return{enabled:null!==(t=null!==(e=x.enabled)&&void 0!==e?e:null==k?void 0:k.enabled)&&void 0!==t&&t,autoConfig:null===(r=x.autoConfig)||void 0===r||r,position:null!==(n=null!==(i=x.position)&&void 0!==i?i:null==k?void 0:k.position)&&void 0!==n?n:"bottom-right",greeting:null!==(s=x.greeting)&&void 0!==s?s:null==k?void 0:k.greeting,color:null!==(a=null!==(o=x.color)&&void 0!==o?o:null==k?void 0:k.color)&&void 0!==a?a:"#6366f1",aiMode:null===(u=null!==(l=x.aiMode)&&void 0!==l?l:null==k?void 0:k.ai_enabled)||void 0===u||u,aiGreeting:null!==(h=x.aiGreeting)&&void 0!==h?h:null==k?void 0:k.ai_greeting,preload:null!==(d=x.preload)&&void 0!==d&&d,theme:null!==(c=x.theme)&&void 0!==c?c:{primaryColor:null!==(f=null!==(p=x.color)&&void 0!==p?p:null==k?void 0:k.color)&&void 0!==f?f:"#6366f1"},offlineMessage:null!==(v=x.offlineMessage)&&void 0!==v?v:null==k?void 0:k.offline_message,collectEmailOffline:null===(m=null!==(g=x.collectEmailOffline)&&void 0!==g?g:null==k?void 0:k.collect_email_offline)||void 0===m||m,bubble:{draggable:null!==(b=null!==(_=null===(y=x.bubble)||void 0===y?void 0:y.draggable)&&void 0!==_?_:null==k?void 0:k.bubble_draggable)&&void 0!==b&&b,visible:null===(C=null!==(S=null===(w=x.bubble)||void 0===w?void 0:w.visible)&&void 0!==S?S:null==k?void 0:k.bubble_visible)||void 0===C||C,offset:null===(I=x.bubble)||void 0===I?void 0:I.offset}}}_syncBubbleLayout(){var e,t,r=this.getMergedConfig(),i=null!==(e=r.position)&&void 0!==e?e:"bottom-right",n=Bv(null===(t=r.bubble)||void 0===t?void 0:t.offset),s=document.getElementById("vtilt-chat-bubble");s&&Uv(s,i,n)}destroy(){dh(()=>{var e,t,r;this._stopUnreadPoll(),document.removeEventListener("visibilitychange",this._onVisibilityChange),null===(e=this._loaded)||void 0===e||e.destroy(),this._loaded=void 0,this._bubbleExplicitShow=!1,this._pendingMessages=[],this._pendingCallbacks=[],this._messageCallbacks=[],this._typingCallbacks=[],this._connectionCallbacks=[],this._resetDeferral(),null===(t=this._bubbleDragHandle)||void 0===t||t.destroy(),this._bubbleDragHandle=null;var i=null===(r=null==ju?void 0:ju.document)||void 0===r?void 0:r.getElementById("vtilt-chat-bubble");i&&i.remove()})}_fetchServerSettings(){var e=this;return t(function*(){if(!e._configFetched){var t=e._instance.getConfig();if(!t.token)return uh().warn(jv,"cannot fetch settings: missing token"),void(e._configFetched=!0);try{var r=ph(t,"/api/chat/settings"),i=yield fetch(r,{headers:fh(t)});if(!i.ok)return uh().warn(jv,"failed to fetch settings: "+i.status),void(e._configFetched=!0);e._serverConfig=yield i.json(),e._configFetched=!0,uh().info(jv,"loaded settings from dashboard")}catch(t){uh().warn(jv,"error fetching settings:",t),e._configFetched=!0}}})()}_fetchUnreadForBubble(){var e=this;return t(function*(){var t,r,i,n,s,o,a=e._instance.getConfig(),l=a.token,u=null!==(i=null===(r=(t=e._instance).getDistinctId)||void 0===r?void 0:r.call(t))&&void 0!==i?i:"";if(uh().debug("chat","fetchUnread","distinctId",u?u.slice(0,12)+"...":"empty"),l&&u)try{var h=ph(a,"/api/chat/widget/unread"),d=h.includes("?")?"&":"?",c=""+h+d+"distinct_id="+encodeURIComponent(u),p=yield fetch(c,{headers:fh(a)});if(!p.ok)return;var f=yield p.json(),v=Number(null!==(n=f.unread_count)&&void 0!==n?n:0);null===(o=null===(s=e._loaded)||void 0===s?void 0:s.applyPolledUnreadCount)||void 0===o||o.call(s,v);var g=document.getElementById("vtilt-chat-bubble");if(!g)return;var m=g.querySelector(".vtilt-chat-bubble-badge");if(!m)return;v>0?(m.style.display="flex",m.textContent=v>99?"99+":String(v)):m.style.display="none"}catch(e){}else{var y=l?"missing distinctId":"missing token";uh().debug("chat","fetchUnread skip","reason",y)}})()}_showBubble(){var e,t,r,i;if(null==ju?void 0:ju.document){var n=document.getElementById("vtilt-chat-bubble");if(n)return n.style.display="flex",void this._syncBubbleLayout();var s=this.getMergedConfig(),o=null!==(e=s.position)&&void 0!==e?e:"bottom-right",a=Bv(null===(t=s.bubble)||void 0===t?void 0:t.offset),l=s.color||"#6366f1",u=document.createElement("div");u.id="vtilt-chat-bubble",u.setAttribute("style",("\n position: fixed;\n width: 60px;\n height: 60px;\n border-radius: 50%;\n background: "+l+";\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n transition: transform 0.2s, box-shadow 0.2s;\n z-index: 999999;\n ").trim()),Uv(u,o,a),u.innerHTML='\n <svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2">\n <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>\n </svg>\n <div class="vtilt-chat-bubble-badge" style="\n display: none;\n position: absolute;\n top: -4px;\n right: -4px;\n background: #E53935;\n color: white;\n font-size: 11px;\n font-weight: 700;\n min-width: 20px;\n height: 20px;\n border-radius: 10px;\n align-items: center;\n justify-content: center;\n padding: 0 6px;\n box-sizing: border-box;\n border: 2px solid white;\n ">0</div>\n ';var h=!0===(null===(r=s.bubble)||void 0===r?void 0:r.draggable);h||(u.addEventListener("mouseenter",()=>{u.style.transform="scale(1.05)",u.style.boxShadow="0 6px 16px rgba(0, 0, 0, 0.2)"}),u.addEventListener("mouseleave",()=>{u.style.transform="scale(1)",u.style.boxShadow="0 4px 12px rgba(0, 0, 0, 0.15)"})),u.addEventListener("click",()=>{this.open()}),document.body.appendChild(u),h&&(null===(i=this._bubbleDragHandle)||void 0===i||i.destroy(),this._bubbleDragHandle=Nv(u)),this._fetchUnreadForBubble(),this._startUnreadPoll(),document.addEventListener("visibilitychange",this._onVisibilityChange)}}_shouldPollUnread(){return"undefined"!=typeof document&&("visible"===document.visibilityState&&(!!document.getElementById("vtilt-chat-bubble")||!(!this._loaded||this._loaded.isOpen)))}_startUnreadPoll(){this._shouldPollUnread()&&null===this._unreadPollIntervalId&&(this._unreadPollIntervalId=setInterval(()=>{this._fetchUnreadForBubble()},3e4))}_stopUnreadPoll(){null!==this._unreadPollIntervalId&&(clearInterval(this._unreadPollIntervalId),this._unreadPollIntervalId=null)}_schedulePreload(){"undefined"!=typeof requestIdleCallback?requestIdleCallback(()=>this._ensureLoaded(()=>{}),{timeout:5e3}):setTimeout(()=>this._ensureLoaded(()=>{}),3e3)}_lazyLoadAndThen(e){this._loaded?e():(this._pendingCallbacks.push(e),this._ensureLoaded(e=>this._onLoaded(e)))}}function Wv(e,t){e("js",new Date);var{tagIds:i,configParams:n,sendPageView:s,debugMode:o,conversionLinker:a,linkerDomains:l}=t,u=r({},n||{});for(var h of(!1===s&&(u.send_page_view=!1),o&&(u.debug_mode=!0),!1===a&&(u.conversion_linker=!1),l&&l.length>0&&(u.linker={domains:l,decorate_forms:!0}),i))h&&e("config",h,u)}function $v(e,t){var r,i=(e.tagIds||[]).filter(e=>!!e);if(0===i.length)return null;var n,s,o,a=null!==(r=e.proxyMode)&&void 0!==r?r:"proxied";if("direct"===a)n=Hv,s=Hv,o="";else{var l=function(e){var t,r=void 0!==ju&&(null===(t=null==ju?void 0:ju.location)||void 0===t?void 0:t.origin)?ju.location.origin:"";if(!e)return r?{base:r,absoluteBase:r}:null;var i=e.replace(/\/+$/g,"");if(!i)return r?{base:r,absoluteBase:r}:null;try{var n=new URL(i),s=n.pathname.replace(/\/$/,""),o=""+n.origin+s;return{base:o,absoluteBase:o}}catch(e){}if(i.startsWith("/"))return{base:i,absoluteBase:r?""+r+i:i};return r?{base:r,absoluteBase:r}:null}(t);if(!l)return null;n=l.base,s=l.absoluteBase,o=Vv}var u={};if("direct"!==a){var h=function(e){if(!e)return"";var t=e.startsWith("/")?e:"/"+e;return t.replace(/\/$/,"")}(o);u.transport_url=""+s.replace(/\/$/,"")+h}return{origin:n,gatewayPath:o,primaryTagId:i.find(e=>e.startsWith("G-"))||i[0]||"",tagIds:i,configParams:u,sendPageView:!1!==e.capturePageview,debugMode:!!e.debugMode,conversionLinker:!1!==e.conversionLinker,linkerDomains:e.linkerDomains}}var Vv="/gt",Hv="https://www.googletagmanager.com";function Gv(e,t){var i=!0===e.advertising,n={ad_storage:i?"granted":"denied",ad_user_data:i?"granted":"denied",ad_personalization:i?"granted":"denied",analytics_storage:!0===e.analytics?"granted":"denied"};if(!t)return n;var s=r({},n);return Object.keys(n).forEach(r=>{var i=t[r];void 0!==i&&(s[r]=function(e,t){return"granted"===t?"granted":"denied"===t?"denied":"follow_advertising"===t?!0===e.advertising?"granted":"denied":"follow_analytics"===t&&!0===e.analytics?"granted":"denied"}(e,i))}),s}function qv(e){if(null==e)return null;var t=String(e).trim().toLowerCase();return t||null}function Zv(e,t){if(e&&t){var r=t.split("."),i=e;for(var n of r){if(null==i||"object"!=typeof i)return;i=i[n]}return i}}function Yv(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e&&""!==e.trim()){var t=Number(e);if(Number.isFinite(t))return t}}function Jv(e){if(null!=e)return"string"==typeof e?e:"number"==typeof e||"boolean"==typeof e?String(e):void 0}function Kv(e){var{mapping:t,payload:r}=e,i={send_to:t.send_to},n=t.value_param_path||"value",s=t.currency_param_path||"currency",o=Yv(Zv(r,n));void 0!==o&&(i.value=o);var a=Jv(Zv(r,s))||t.default_currency||void 0;if(a&&(i.currency=a),!1!==t.send_transaction_id){var l=Jv(Zv(r,t.transaction_id_param_path||"transaction_id"));l&&(i.transaction_id=l)}return{send_to:t.send_to,params:i}}var Xv=[{source:"$pageview",destination:"page_view",buildParams:e=>{var t,r={},i=Jv(e.$current_url);i&&(r.page_location=i);var n=Jv(e.$pathname);n&&(r.page_path=n);var s=null!==(t=Jv(e.title))&&void 0!==t?t:Jv(e.$title);s&&(r.page_title=s);var o=Jv(e.$referrer);return o&&(r.page_referrer=o),r}},{source:"$pageleave",destination:"user_engagement",buildParams:e=>{var t,r,i={},n=Yv(null!==(r=null!==(t=e.$dwell_time_ms)&&void 0!==t?t:e.engagement_time_msec)&&void 0!==r?r:e.$time_on_page_ms);return void 0!==n&&(i.engagement_time_msec=Math.round(n)),i}}];function Qv(e,t,r){var i=t.split(".").filter(Boolean);if(0!==i.length)if(1!==i.length){for(var n=e,s=0;s<i.length-1;s++){var o=i[s],a=i[s+1];if(null==n||"object"!=typeof n||Array.isArray(n))return;var l=n;if(/^\d+$/.test(a)){var u=Array.isArray(l[o])?l[o]:[];Array.isArray(l[o])||(l[o]=u);for(var h=parseInt(a,10);u.length<=h;)u.push({});if(s+1===i.length-1)return void(u[h]=r);var d=u[h];d&&"object"==typeof d&&!Array.isArray(d)||(d={},u[h]=d),n=d,s++}else{var c=l[o];c&&"object"==typeof c&&!Array.isArray(c)||(c={},l[o]=c),n=c}}var p=i[i.length-1];n&&"object"==typeof n&&!Array.isArray(n)&&(n[p]=r)}else e[i[0]]=r}var eg=new Set(["client_id","user_id","first_visit","session_start"]);function tg(e,t,r,i){if(!function(e,t){return!(t&&(Array.isArray(t.exclude)&&t.exclude.includes(e)||Array.isArray(t.include)&&t.include.length>0&&!t.include.includes(e)))}(t,i.eventFilter))return{fired:!1};var n=(i.eventMappings||[]).find(e=>(null==e?void 0:e.source)===t);if(n&&n.destination){var{name:s,params:o}=function(e,t){var r={},i=Array.isArray(e.param_mappings)?e.param_mappings:[];for(var n of i){var s=null==n?void 0:n.source,o=null==n?void 0:n.destination;if(s&&o){var a=Zv(t,s);void 0!==a&&(o.includes(".")?Qv(r,o,a):r[o]=a)}}return{name:e.destination,params:r}}(n,r);return e("event",s,o),{fired:!0,eventName:s,params:o,source:"mapping"}}if(!1===i.autoForward)return{fired:!1};var a=Xv.find(e=>e.source===t);if(a){var l=a.buildParams(r);return e("event",a.destination,l),{fired:!0,eventName:a.destination,params:l,source:"preset"}}if(t.startsWith("$"))return{fired:!1};var u=function(e){var t={};for(var[r,i]of Object.entries(e))r.startsWith("$")||eg.has(r)||void 0!==i&&(t[r]=i);return t}(r);return e("event",t,u),{fired:!0,eventName:t,params:u,source:"auto"}}function rg(){var e=null,t=[],r=[];return{call:function(){for(var i=arguments.length,n=new Array(i),s=0;s<i;s++)n[s]=arguments[s];if((e=>{r.push(e),r.length>50&&r.shift()})(n),e)try{e(...n)}catch(e){}else t.push(n)},flush(r){for(e=r;t.length;){var i=t.shift();try{r(...i)}catch(e){}}},getRecentCalls:()=>r.slice()}}function ig(e){return ng.apply(this,arguments)}function ng(){return ng=t(function*(e){try{var t="undefined"!=typeof crypto&&crypto.subtle?crypto.subtle:null;if(!t)return null;var r=(new TextEncoder).encode(e),i=yield t.digest("SHA-256",r),n=Array.from(new Uint8Array(i)).map(e=>e.toString(16).padStart(2,"0")).join("");return n}catch(e){return null}}),ng.apply(this,arguments)}function sg(){return(sg=t(function*(e){var t={},r=function(e){if(!e)return null;var t=String(e).trim().toLowerCase();if(!t)return null;if(!t.includes("@"))return null;var[r,i]=t.split("@");if(!r||!i)return null;if("gmail.com"===i||"googlemail.com"===i){var n=r.split("+")[0].replace(/\./g,"");return n?n+"@"+i:null}return r+"@"+i}(e.email),i=function(e){if(!e)return null;var t=String(e).trim();if(!t)return null;if(t.startsWith("+")){var r=t.slice(1).replace(/\D/g,"");return r?"+"+r:null}return null}(e.phone),n=qv(e.first_name),s=qv(e.last_name),o=qv(e.street),a=qv(e.city),l=qv(e.region),u=function(e){if(!e)return null;var t=String(e).trim().toUpperCase().replace(/\s+/g,"");return t||null}(e.postal_code),h=qv(e.country);if(r){var d=yield ig(r);d&&(t.sha256_email_address=d)}if(i){var c=yield ig(i);c&&(t.sha256_phone_number=c)}var p={};if(n){var f=yield ig(n);f&&(p.sha256_first_name=f)}if(s){var v=yield ig(s);v&&(p.sha256_last_name=v)}if(o){var g=yield ig(o);g&&(p.sha256_street=g)}return a&&(p.city=a),l&&(p.region=l),u&&(p.postal_code=u),h&&(p.country=h),Object.keys(p).length>0&&(t.address=p),0===Object.keys(t).length?null:t})).apply(this,arguments)}class og{constructor(e){void 0===e&&(e=Number.POSITIVE_INFINITY),this._maxItems=e,this._items=[]}get length(){return this._items.length}enqueue(e){return!(this._items.length>=this._maxItems)&&(this._items.push(e),!0)}takeAll(){if(0===this._items.length)return[];var e=this._items;return this._items=[],e}clear(){this._items=[]}}var ag="google-tag";class lg{constructor(e,t){this.name="GoogleTagGateway",this._isStarted=!1,this._scriptInjected=!1,this._scriptLoaded=!1,this._consentDefaultsPushed=!1,this._gtag=null,this._loaderOptions=null,this._unsubscribeCaptured=null,this._unsubscribeConsent=null,this._deliveryLog=[],this._maxDeliveryLog=100,this._pendingCaptures=new og(100),this._instance=e,this._config=t||lg.extractConfig(e.getConfig()),this._publicApi=rg(),this._subscribeCaptured()}static extractConfig(e){if(e.disable_google_tag)return{enabled:!1};var t=e.google_tag;return t?{enabled:(t.tagIds||[]).some(e=>!!e),remote:t}:{enabled:!1}}get isEnabled(){return!1!==this._config.enabled&&!!this._config.remote}get isStarted(){return this._isStarted}get gtag(){return this._publicApi.call}get deliveryLog(){return this._deliveryLog.slice()}startIfEnabled(){this._isStarted||this.isEnabled&&this._instance.getConfig().__remote_config_loaded&&this._start()}stop(){var e;this._isStarted&&(null===(e=this._unsubscribeConsent)||void 0===e||e.call(this),this._unsubscribeConsent=null,this._isStarted=!1)}onConfigUpdate(e){var t=lg.extractConfig(e),r=this.isEnabled;this._config=t;var i=!0===e.__remote_config_loaded;if(r&&!this.isEnabled)this.stop();else if(this._isStarted&&t.remote&&this._loaderOptions){var n=$v(t.remote,this._instance.getConfig().api_host);n&&(this._loaderOptions=n,Wv(this._gtag,n))}i&&!this.isEnabled&&this._pendingCaptures.clear(),i&&this.isEnabled&&!this._isStarted&&this.startIfEnabled()}setUserData(e){var r=this;return t(function*(){var t=r._config.remote;if(t&&t.enhancedConversions){var i=yield function(e){return sg.apply(this,arguments)}(e);i&&r._publicApi.call("set","user_data",i)}})()}getRecentPublicCalls(){return this._publicApi.getRecentCalls()}_start(){var e=this._config.remote;if(e){var t=$v(e,this._instance.getConfig().api_host);if(t){this._loaderOptions=t;var{gtag:r}=function(){var e,t,r=qu,i=null!==(e=(t=r).dataLayer)&&void 0!==e?e:t.dataLayer=[],n=r.gtag;if(n)return{gtag:n,dataLayer:i};var s=function(){i.push(arguments)};return r.gtag=s,{gtag:s,dataLayer:i}}();this._gtag=r,this._publicApi.flush(r),this._pushConsentDefaultsOnce(),Wv(r,t),this._scriptInjected||(this._scriptInjected=!0,function(e,t,r){var i=null==ju?void 0:ju.document;if(!i)return null;var{origin:n,gatewayPath:s,primaryTagId:o}=e;if(!n||!o)return null;var a=""+n.replace(/\/$/,"")+(s?s.startsWith("/")?s.replace(/\/$/,""):"/"+s.replace(/\/$/,""):"")+"/gtag/js?id="+encodeURIComponent(o)+"&l=dataLayer",l=i.querySelector('script[data-vtilt-gtag-loader="'+o+'"]');if(l)return l;var u=i.createElement("script");u.async=!0,u.src=a,u.setAttribute("data-vtilt-gtag-loader",o),u.onload=()=>null==t?void 0:t(),u.onerror=()=>{var e=new Error("[GoogleTagGateway] failed to load "+a);null==r||r(e)},(i.head||i.body||i.documentElement).appendChild(u)}(t,()=>{this._scriptLoaded=!0},e=>{uh().warn(ag,e.message)})),this._subscribeConsent(),this._isStarted=!0,this._drainPending()}else uh().warn(ag,"skipped — missing tag_ids or resolvable origin")}}_drainPending(){for(var e of this._pendingCaptures.takeAll())this._handleCaptured(e.event,e.payload)}_pushConsentDefaultsOnce(){var e;if(!this._consentDefaultsPushed&&this._gtag){var t=dh(()=>this._instance.consentManager.getConsent());!function(e,t,i){e("consent","default",r({},Gv(t,i),{wait_for_update:500}))}(this._gtag,t||{},null===(e=this._config.remote)||void 0===e?void 0:e.consentOverride),this._consentDefaultsPushed=!0}}_subscribeCaptured(){if(!this._unsubscribeCaptured){this._unsubscribeCaptured=this._instance._emitter.on(bh,e=>{var t=e;t&&"string"==typeof t.event&&this._handleCaptured(t.event,t.payload||{})})}}_handleCaptured(e,t){var r=this._instance.getConfig();if(!r.disable_google_tag)if(r.__remote_config_loaded){if(this.isEnabled&&(this._isStarted||this.startIfEnabled(),this._gtag&&this._config.remote&&this._isStarted)){var i=this._config.remote,n=i.tagIds||[],s=tg(this._gtag,e,t,i);if(s.fired&&s.eventName&&this._record({ts:Date.now(),tag_ids:n,event_name:e,send_to:"ga4:"+s.eventName,status:"fired",reason:s.source}),!1!==i.sendAdsConversions){var o=function(e,t,r,i){var n=(i.conversions||[]).filter(e=>e.event_name===t);if(0===n.length)return[];var s=[];for(var o of n){var a=Kv({mapping:o,payload:r});e("event","conversion",a.params),s.push(a)}return s}(this._gtag,e,t,i);for(var a of o)this._record({ts:Date.now(),tag_ids:n,event_name:e,send_to:a.send_to,status:"fired"})}}}else this._pendingCaptures.enqueue({event:e,payload:t})}_subscribeConsent(){if(!this._unsubscribeConsent){this._unsubscribeConsent=this._instance._emitter.on(_h,e=>{var t;if(this._gtag){var r,i,n,s=e;r=this._gtag,i=s.consent||{},n=null===(t=this._config.remote)||void 0===t?void 0:t.consentOverride,r("consent","update",Gv(i,n))}})}}_record(e){this._deliveryLog.push(e),this._deliveryLog.length>this._maxDeliveryLog&&this._deliveryLog.shift()}}var ug="vtd-overlay";class hg{constructor(e,t){this.name="VtdOverlay",this._isStarted=!1,this._destinationUrl=null,this._originalUrl=null,this._isLoading=!0,this._container=null,this._iframe=null,this._loadingEl=null,this._instance=e,this._config=t||hg.extractConfig(e.getConfig())}static extractConfig(e){return{enabled:!1!==e.vtd_overlay}}get isEnabled(){return!1!==this._config.enabled}get isStarted(){return this._isStarted}startIfEnabled(){}stop(){this._isStarted&&dh(()=>{this._destroyOverlay(),this._isStarted=!1})}onConfigUpdate(e){this._config=hg.extractConfig(e),!this.isEnabled&&this._isStarted&&this.stop()}setDestinationUrl(e){var t;if(this.isEnabled)if(null==e?void 0:e.trim()){var r=e;try{r=decodeURIComponent(e)}catch(t){r=e}if(this._isValidUrl(r)){var i=this._toEmbedUrl(r);this._originalUrl=r,this._destinationUrl=i,this._isLoading=!0,this._showOverlay(),this._isStarted=!0,this._instance.capture("$vtd_view",{$vtd_url:r,$vtd_embed_url:i!==r?i:void 0,$current_url:null===(t=null==ju?void 0:ju.location)||void 0===t?void 0:t.href})}else uh().warn(ug,"invalid URL: "+r)}else uh().warn(ug,"empty URL provided");else uh().warn(ug,"feature is disabled")}getDestinationUrl(){return this._destinationUrl}close(){this._instance.capture("$vtd_close",{$vtd_url:this._originalUrl}),this._container?(this._container.classList.add("vtilt-vtd-closing"),setTimeout(()=>{this._destroyOverlay(),this._isStarted=!1,this._destinationUrl=null,this._originalUrl=null},200)):(this._destroyOverlay(),this._isStarted=!1,this._destinationUrl=null,this._originalUrl=null)}_isValidUrl(e){try{var t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch(e){return!1}}_toEmbedUrl(e){try{var t=new URL(e),r=t.hostname.toLowerCase();if("youtube.com"===r||"www.youtube.com"===r||"m.youtube.com"===r){var i=t.searchParams.get("v");if(i){var n=t.searchParams.get("t"),s="https://www.youtube.com/embed/"+i+"?autoplay=1";return n&&(s+="&start="+n.replace("s","")),s}}if("youtu.be"===r){var o=t.pathname.slice(1);if(o){var a=t.searchParams.get("t"),l="https://www.youtube.com/embed/"+o+"?autoplay=1";return a&&(l+="&start="+a.replace("s","")),l}}if("vimeo.com"===r||"www.vimeo.com"===r){var u=t.pathname.match(/^\/(\d+)/);if(u)return"https://player.vimeo.com/video/"+u[1]+"?autoplay=1"}if("loom.com"===r||"www.loom.com"===r){var h=t.pathname.match(/^\/share\/([a-zA-Z0-9]+)/);if(h)return"https://www.loom.com/embed/"+h[1]+"?autoplay=1"}if(r.endsWith("wistia.com")){var d=t.pathname.match(/^\/medias\/([a-zA-Z0-9]+)/);if(d)return"https://fast.wistia.net/embed/iframe/"+d[1]+"?autoplay=1"}if("dailymotion.com"===r||"www.dailymotion.com"===r){var c=t.pathname.match(/^\/video\/([a-zA-Z0-9]+)/);if(c)return"https://www.dailymotion.com/embed/video/"+c[1]+"?autoplay=1"}if("open.spotify.com"===r){var p=t.pathname.match(/^\/(track|album|playlist|episode|show)\/([a-zA-Z0-9]+)/);if(p)return"https://open.spotify.com/embed/"+p[1]+"/"+p[2]}return"drive.google.com"===r&&t.pathname.includes("/view")?e.replace("/view","/preview"):e}catch(t){return e}}_getHostname(e){try{return new URL(e).hostname}catch(t){return e}}_getFaviconUrl(e){try{return"https://www.google.com/s2/favicons?domain="+new URL(e).hostname+"&sz=32"}catch(e){return""}}_showOverlay(){if($u&&this._destinationUrl){this._destroyOverlay(),this._container=$u.createElement("div"),this._container.id="vtilt-vtd-overlay",this._container.className="vtilt-vtd-opening",this._container.setAttribute("style",this._getBackdropStyles());var e=$u.createElement("div");e.className="vtilt-vtd-modal",e.setAttribute("style",this._getModalStyles());var t=$u.createElement("div");t.className="vtilt-vtd-header",t.setAttribute("style",this._getHeaderStyles()),t.innerHTML=this._getHeaderHTML(),e.appendChild(t);var r=$u.createElement("div");r.className="vtilt-vtd-iframe-wrapper",r.setAttribute("style",this._getIframeWrapperStyles()),this._loadingEl=$u.createElement("div"),this._loadingEl.className="vtilt-vtd-loading",this._loadingEl.setAttribute("style",this._getLoadingStyles()),this._loadingEl.innerHTML=this._getLoadingHTML(),r.appendChild(this._loadingEl),this._iframe=$u.createElement("iframe"),this._iframe.id="vtilt-vtd-iframe",this._iframe.className="vtilt-vtd-iframe",this._iframe.setAttribute("style",this._getIframeStyles()),this._iframe.setAttribute("frameborder","0"),this._iframe.setAttribute("allowfullscreen","true"),this._iframe.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share");var i=()=>{this._isLoading=!1,this._loadingEl&&(this._loadingEl.style.opacity="0",setTimeout(()=>{var e;(null===(e=this._loadingEl)||void 0===e?void 0:e.parentNode)&&(this._loadingEl.style.display="none")},300)),this._iframe&&(this._iframe.style.opacity="1")};this._iframe.onload=i,this._iframe.onerror=i,setTimeout(()=>{this._isLoading&&i()},5e3),r.appendChild(this._iframe),this._iframe.src=this._destinationUrl,e.appendChild(r),this._container.appendChild(e);var n=$u.createElement("style");n.id="vtilt-vtd-styles",n.textContent=this._getGlobalStyles(),$u.head.appendChild(n),$u.body.appendChild(this._container),this._attachEventListeners(),$u.body.style.overflow="hidden"}}_destroyOverlay(){var e;(null===(e=this._container)||void 0===e?void 0:e.parentNode)&&(this._container.parentNode.removeChild(this._container),this._container=null,this._iframe=null,this._loadingEl=null);var t=null==$u?void 0:$u.getElementById("vtilt-vtd-styles");(null==t?void 0:t.parentNode)&&t.parentNode.removeChild(t),(null==$u?void 0:$u.body)&&($u.body.style.overflow="")}_attachEventListeners(){var e,t,r,i=null===(e=this._container)||void 0===e?void 0:e.querySelector(".vtilt-vtd-close");null==i||i.addEventListener("click",()=>this.close());var n=null===(t=this._container)||void 0===t?void 0:t.querySelector(".vtilt-vtd-open");null==n||n.addEventListener("click",()=>{this._originalUrl&&(null==ju||ju.open(this._originalUrl,"_blank"))}),null===(r=this._container)||void 0===r||r.addEventListener("click",e=>{e.target===this._container&&this.close()});var s=e=>{"Escape"===e.key&&(this.close(),null==$u||$u.removeEventListener("keydown",s))};null==$u||$u.addEventListener("keydown",s)}_getBackdropStyles(){return'\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 2147483647;\n background: rgba(0, 0, 0, 0.85);\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n '}_getModalStyles(){return"\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: #0a0a0a;\n overflow: hidden;\n "}_getHeaderStyles(){return"\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 16px;\n height: 56px;\n background: linear-gradient(180deg, rgba(20, 20, 20, 1) 0%, rgba(15, 15, 15, 1) 100%);\n border-bottom: 1px solid rgba(255, 255, 255, 0.08);\n flex-shrink: 0;\n gap: 16px;\n "}_getHeaderHTML(){var e=this._originalUrl||this._destinationUrl,t=e?this._getHostname(e):"";return'\n <div style="display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;">\n <img \n src="'+(e?this._getFaviconUrl(e):"")+'" \n alt="" \n style="width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0;"\n onerror="this.style.display=\'none\'"\n />\n <div style="\n display: flex;\n flex-direction: column;\n min-width: 0;\n gap: 2px;\n ">\n <div style="\n color: rgba(255, 255, 255, 0.95);\n font-size: 14px;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.2;\n ">'+this._escapeHtml(t)+'</div>\n <div style="\n color: rgba(255, 255, 255, 0.45);\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.2;\n ">'+this._escapeHtml(this._truncateUrl(e||"",50))+'</div>\n </div>\n </div>\n <div style="display: flex; align-items: center; gap: 8px; flex-shrink: 0;">\n <button class="vtilt-vtd-open vtilt-vtd-btn" title="Open in new tab">\n <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\n <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path>\n <polyline points="15 3 21 3 21 9"></polyline>\n <line x1="10" y1="14" x2="21" y2="3"></line>\n </svg>\n <span class="vtilt-vtd-btn-text">Open</span>\n </button>\n <button class="vtilt-vtd-close vtilt-vtd-btn vtilt-vtd-btn-primary" title="Close (Esc)">\n <svg width="16" height="16" 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>\n <span class="vtilt-vtd-btn-text">Close</span>\n </button>\n </div>\n '}_getIframeWrapperStyles(){return"\n flex: 1;\n position: relative;\n background: #000;\n overflow: hidden;\n "}_getLoadingStyles(){return"\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: #0a0a0a;\n z-index: 1;\n transition: opacity 0.3s ease;\n "}_getLoadingHTML(){var e=this._originalUrl||this._destinationUrl,t=e?this._getHostname(e):"";return'\n <div class="vtilt-vtd-spinner"></div>\n <div style="\n margin-top: 20px;\n color: rgba(255, 255, 255, 0.7);\n font-size: 14px;\n font-weight: 500;\n ">Loading '+this._escapeHtml(t)+'...</div>\n <div style="\n margin-top: 8px;\n color: rgba(255, 255, 255, 0.35);\n font-size: 12px;\n ">Press <kbd style="\n display: inline-block;\n padding: 2px 6px;\n background: rgba(255, 255, 255, 0.1);\n border-radius: 4px;\n font-family: inherit;\n font-size: 11px;\n ">Esc</kbd> to close</div>\n '}_getIframeStyles(){return"\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n background: white;\n opacity: 0;\n transition: opacity 0.3s ease;\n "}_getGlobalStyles(){return"\n /* Animations */\n @keyframes vtilt-vtd-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n }\n \n @keyframes vtilt-vtd-fade-out {\n from { opacity: 1; }\n to { opacity: 0; }\n }\n \n @keyframes vtilt-vtd-scale-in {\n from { opacity: 0; transform: scale(0.96); }\n to { opacity: 1; transform: scale(1); }\n }\n \n @keyframes vtilt-vtd-spin {\n to { transform: rotate(360deg); }\n }\n \n /* Container animations */\n #vtilt-vtd-overlay.vtilt-vtd-opening {\n animation: vtilt-vtd-fade-in 0.2s ease-out forwards;\n }\n \n #vtilt-vtd-overlay.vtilt-vtd-opening .vtilt-vtd-modal {\n animation: vtilt-vtd-scale-in 0.25s ease-out forwards;\n }\n \n #vtilt-vtd-overlay.vtilt-vtd-closing {\n animation: vtilt-vtd-fade-out 0.2s ease-in forwards;\n }\n \n /* Loading spinner */\n .vtilt-vtd-spinner {\n width: 40px;\n height: 40px;\n border: 3px solid rgba(255, 255, 255, 0.1);\n border-top-color: rgba(255, 255, 255, 0.8);\n border-radius: 50%;\n animation: vtilt-vtd-spin 0.8s linear infinite;\n }\n \n /* Button base styles */\n .vtilt-vtd-btn {\n background: rgba(255, 255, 255, 0.08);\n border: 1px solid rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.9);\n padding: 8px 14px;\n border-radius: 8px;\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 6px;\n transition: all 0.15s ease;\n -webkit-tap-highlight-color: transparent;\n outline: none;\n }\n \n .vtilt-vtd-btn:hover {\n background: rgba(255, 255, 255, 0.14);\n border-color: rgba(255, 255, 255, 0.18);\n }\n \n .vtilt-vtd-btn:active {\n background: rgba(255, 255, 255, 0.18);\n transform: scale(0.98);\n }\n \n .vtilt-vtd-btn:focus-visible {\n box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);\n }\n \n /* Primary button variant */\n .vtilt-vtd-btn-primary {\n background: rgba(255, 255, 255, 0.95);\n border-color: transparent;\n color: #0a0a0a;\n }\n \n .vtilt-vtd-btn-primary:hover {\n background: rgba(255, 255, 255, 1);\n border-color: transparent;\n }\n \n .vtilt-vtd-btn-primary:active {\n background: rgba(255, 255, 255, 0.85);\n }\n \n /* Desktop responsive - modal with margin */\n @media (min-width: 768px) {\n #vtilt-vtd-overlay {\n padding: 32px;\n }\n \n .vtilt-vtd-modal {\n max-width: 1200px;\n max-height: 90vh;\n width: 100%;\n height: auto;\n min-height: 500px;\n border-radius: 16px;\n box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);\n }\n \n .vtilt-vtd-header {\n border-radius: 16px 16px 0 0;\n }\n \n .vtilt-vtd-iframe-wrapper {\n border-radius: 0 0 16px 16px;\n min-height: 400px;\n }\n }\n \n /* Large desktop - bigger modal */\n @media (min-width: 1400px) {\n #vtilt-vtd-overlay {\n padding: 48px;\n }\n \n .vtilt-vtd-modal {\n max-width: 1400px;\n max-height: 85vh;\n }\n }\n \n /* Tablet */\n @media (min-width: 768px) and (max-width: 1024px) {\n #vtilt-vtd-overlay {\n padding: 24px;\n }\n \n .vtilt-vtd-modal {\n max-width: 95%;\n max-height: 90vh;\n }\n }\n \n /* Mobile - fullscreen */\n @media (max-width: 767px) {\n #vtilt-vtd-overlay {\n padding: 0 !important;\n background: #0a0a0a !important;\n }\n \n .vtilt-vtd-modal {\n width: 100% !important;\n height: 100% !important;\n max-width: none !important;\n max-height: none !important;\n border-radius: 0 !important;\n }\n \n .vtilt-vtd-header {\n border-radius: 0 !important;\n padding: 0 12px !important;\n height: 52px !important;\n }\n \n .vtilt-vtd-btn {\n padding: 8px 10px !important;\n }\n \n .vtilt-vtd-btn-text {\n display: none !important;\n }\n \n .vtilt-vtd-iframe-wrapper {\n border-radius: 0 !important;\n }\n }\n \n /* Reduced motion */\n @media (prefers-reduced-motion: reduce) {\n #vtilt-vtd-overlay,\n #vtilt-vtd-overlay *,\n .vtilt-vtd-spinner {\n animation-duration: 0.01ms !important;\n transition-duration: 0.01ms !important;\n }\n }\n "}_truncateUrl(e,t){return e.length<=t?e:e.substring(0,t-3)+"..."}_escapeHtml(e){if(void 0===$u)return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");var t=$u.createElement("div");return t.textContent=e,t.innerHTML}}var dg,cg="text/plain",pg=61440;!function(e){e.GZipJS="gzip-js",e.Base64="base64",e.None="none"}(dg||(dg={}));var fg=function(e,t){void 0===t&&(t="binary");var{data:r,compression:i}=e;if(r){var n=(e=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString():t))(r),s=new Blob([n]).size;if(i===dg.GZipJS&&s>=1024)try{var o=kd(Ed(n),{mtime:0});if("text-base64"===t){var a=Ad(o);if(a.length>0&&a.length<.95*s)return{contentType:cg,body:a,estimatedSize:a.length,compressionApplied:dg.Base64}}else{var l=new Blob([o],{type:cg});if(l.size>0&&l.size<.95*s)return{contentType:cg,body:l,estimatedSize:l.size,compressionApplied:dg.GZipJS}}}catch(e){}return{contentType:"application/json",body:n,estimatedSize:s,compressionApplied:null}}};function vg(e,t){return t.compressionApplied?function(e,t){var r=e.includes("?")?"&":"?";return""+e+r+"compression="+t}(e.url,t.compressionApplied):e.url}function gg(e,t){var r={};return t&&(r["Content-Type"]=t),e.headers&&Object.assign(r,e.headers),e.projectToken&&(r[ch]=e.projectToken),r}var mg=[{name:"fetch",isAvailable:()=>"undefined"!=typeof fetch,method:e=>{var r=fg(e,"binary");if(r){var{contentType:i,body:n,estimatedSize:s}=r,o=vg(e,r),a=gg(e,i),l=new AbortController,u=e.timeout?setTimeout(()=>l.abort(),e.timeout):null;fetch(o,{method:e.method||"POST",headers:a,body:n,keepalive:s<pg,signal:l.signal}).then(function(){var r=t(function*(t){var r,i=yield t.text(),n={statusCode:t.status,text:i};if(200===t.status){Mh();try{n.json=JSON.parse(i)}catch(e){}}null===(r=e.callback)||void 0===r||r.call(e,n)});return function(e){return r.apply(this,arguments)}}()).catch(()=>{var t;xh("capture"),null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0})}).finally(()=>{u&&clearTimeout(u)})}}},{name:"XHR",isAvailable:()=>"undefined"!=typeof XMLHttpRequest,method:e=>{var t=fg(e,"binary");if(t){var{contentType:r,body:i}=t,n=vg(e,t),s=gg(e,r),o=new XMLHttpRequest;for(var[a,l]of(o.open(e.method||"POST",n,!0),Object.entries(s)))o.setRequestHeader(a,l);e.timeout&&(o.timeout=e.timeout),o.onreadystatechange=()=>{var t;if(4===o.readyState){var r={statusCode:o.status,text:o.responseText};if(200===o.status){Mh();try{r.json=JSON.parse(o.responseText)}catch(e){}}null===(t=e.callback)||void 0===t||t.call(e,r)}},o.onerror=()=>{var t;xh("capture"),null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0})},o.send(i)}}},{name:"sendBeacon",isAvailable:()=>"undefined"!=typeof navigator&&!!navigator.sendBeacon,method:e=>{var t=fg(e,"text-base64");if(t){var{contentType:i,body:n,estimatedSize:s}=t;if(0!==s){var o=vg(e,t),a=e.projectToken?function(e,t){if(!t||/[?&]token=/.test(e))return e;var r=e.includes("?")?"&":"?";return""+e+r+"token="+t}(o,e.projectToken):o;if(s<=pg)try{var l="string"==typeof n?new Blob([n],{type:i}):n;if("undefined"!=typeof navigator&&navigator.sendBeacon)if(navigator.sendBeacon(a,l))return}catch(e){}try{var u="string"==typeof n?new Blob([n],{type:i}):n,h=r({"Content-Type":i},e.headers||{});fetch(a,{method:e.method||"POST",headers:h,body:u,keepalive:s<pg}).catch(()=>{})}catch(e){}}}}}],yg=e=>{var t,r;if(Eh())null===(t=e.callback)||void 0===t||t.call(e,{statusCode:0});else{var i=e.transport||"fetch",n=mg.find(e=>e.name===i&&e.isAvailable())||mg.find(e=>e.isAvailable());if(!n)return uh().error("request","no available transport method"),void(null===(r=e.callback)||void 0===r||r.call(e,{statusCode:0}));n.method(e)}};class _g{constructor(e,t){var r,i,n,s;this._isPaused=!0,this._queue=[],this._flushTimeoutMs=(r=(null==t?void 0:t.flush_interval_ms)||3e3,i=250,n=5e3,s=3e3,"number"!=typeof r||isNaN(r)?s:Math.min(Math.max(r,i),n)),this._sendRequest=e}get length(){return this._queue.length}enqueue(e){this._queue.push(e),this._flushTimeout||this._setFlushTimeout()}unload(){if(this._clearFlushTimeout(),0!==this._queue.length){var e=this._formatQueue();for(var t in e){var i=e[t];this._sendRequest(r({},i,{transport:"sendBeacon"}))}}}enable(){this._isPaused=!1,this._setFlushTimeout()}pause(){this._isPaused=!0,this._clearFlushTimeout()}flush(){this._clearFlushTimeout(),this._flushNow(),this._setFlushTimeout()}_setFlushTimeout(){this._isPaused||(this._flushTimeout=setTimeout(()=>{this._clearFlushTimeout(),this._flushNow(),this._queue.length>0&&this._setFlushTimeout()},this._flushTimeoutMs))}_clearFlushTimeout(){this._flushTimeout&&(clearTimeout(this._flushTimeout),this._flushTimeout=void 0)}_flushNow(){if(0!==this._queue.length){var e=this._formatQueue(),t=Date.now();for(var r in e){var i=e[r];i.events.forEach(e=>{var r=new Date(e.timestamp).getTime();e.$offset=Math.abs(r-t)}),this._sendRequest(i)}}}_formatQueue(){var e={};return this._queue.forEach(t=>{var r=t.batchKey||t.url;e[r]||(e[r]={url:t.url,events:[],batchKey:t.batchKey}),e[r].events.push(t.event)}),this._queue=[],e}}class bg{constructor(e){this._isPolling=!1,this._pollIntervalMs=3e3,this._queue=[],this._areWeOnline=!0,this._sendRequest=e.sendRequest,this._sendBeacon=e.sendBeacon,ju&&void 0!==Wu&&"onLine"in Wu&&(this._areWeOnline=Wu.onLine,Lh(ju,"online",()=>{this._areWeOnline=!0,this._flush()}),Lh(ju,"offline",()=>{this._areWeOnline=!1}))}get length(){return this._queue.length}enqueue(e,t){if(void 0===t&&(t=0),t>=10)uh().error("retry","request failed after 10 retries, giving up");else if(!Eh()){var r=function(e){var t=3e3*Math.pow(2,e),r=t/2,i=Math.min(18e5,t),n=(Math.random()-.5)*(i-r);return Math.ceil(i+n)}(t),i=Date.now()+r;this._queue.push({retryAt:i,request:e,retriesPerformedSoFar:t+1});var n="enqueued failed request for retry in "+Math.round(r/1e3)+"s";this._areWeOnline||(n+=" (browser is offline)"),uh().warn("retry",n),this._isPolling||(this._isPolling=!0,this._poll())}}retriableRequest(e){var r=this;return t(function*(){try{var t=yield r._sendRequest(e);200!==t.statusCode&&(t.statusCode<400||t.statusCode>=500)&&r.enqueue(e,0)}catch(t){r.enqueue(e,0)}})()}_poll(){this._poller&&clearTimeout(this._poller),this._poller=setTimeout(()=>{this._areWeOnline&&this._queue.length>0&&this._flush(),this._queue.length>0?this._poll():this._isPolling=!1},this._pollIntervalMs)}_flush(){var e=this,r=Date.now(),i=[],n=[];this._queue.forEach(e=>{e.retryAt<r?n.push(e):i.push(e)}),this._queue=i,n.forEach(function(){var r=t(function*(t){var{request:r,retriesPerformedSoFar:i}=t;try{var n=yield e._sendRequest(r);200!==n.statusCode&&(n.statusCode<400||n.statusCode>=500)&&e.enqueue(r,i)}catch(t){e.enqueue(r,i)}});return function(e){return r.apply(this,arguments)}}())}unload(){this._poller&&(clearTimeout(this._poller),this._poller=void 0),this._queue.forEach(e=>{var{request:t}=e;try{this._sendBeacon(t)}catch(e){uh().error("retry","failed to send beacon on unload",e)}}),this._queue=[]}}var wg="vt_rate_limit";class Sg{constructor(e){var t,r;void 0===e&&(e={}),this.lastEventRateLimited=!1,this.eventsPerSecond=null!==(t=e.eventsPerSecond)&&void 0!==t?t:10,this.eventsBurstLimit=Math.max(null!==(r=e.eventsBurstLimit)&&void 0!==r?r:10*this.eventsPerSecond,this.eventsPerSecond),this.persistence=e.persistence,this.captureWarning=e.captureWarning,this.lastEventRateLimited=this.checkRateLimit(!0).isRateLimited}checkRateLimit(e){var t,r,i,n;void 0===e&&(e=!1);var s=Date.now(),o=null!==(r=null===(t=this.persistence)||void 0===t?void 0:t.get(wg))&&void 0!==r?r:{tokens:this.eventsBurstLimit,last:s},a=(s-o.last)/1e3;o.tokens+=a*this.eventsPerSecond,o.last=s,o.tokens>this.eventsBurstLimit&&(o.tokens=this.eventsBurstLimit);var l=o.tokens<1;return l||e||(o.tokens=Math.max(0,o.tokens-1)),!l||this.lastEventRateLimited||e||null===(i=this.captureWarning)||void 0===i||i.call(this,"vTilt client rate limited. Config: "+this.eventsPerSecond+" events/second, "+this.eventsBurstLimit+" burst limit."),this.lastEventRateLimited=l,null===(n=this.persistence)||void 0===n||n.set(wg,o),{isRateLimited:l,remainingTokens:o.tokens}}shouldAllowEvent(){return!this.checkRateLimit(!1).isRateLimited}getRemainingTokens(){return this.checkRateLimit(!0).remainingTokens}}class Cg{constructor(e){this._remoteConfig=null,this._initConfig=null,this._host=e}get config(){return this._remoteConfig}onApply(e){this._onApply=e}onLoad(e){this._onLoad=e}load(){var e,t=this._host.getConfig();if(t.token){if(this._initConfig||(this._initConfig=r({},t)),null===(e=t.bootstrap)||void 0===e?void 0:e.remoteConfig)return this._remoteConfig=t.bootstrap.remoteConfig,this._apply(this._remoteConfig),void this._fetch();var i=dh(()=>ju.__VTILT_BOOTSTRAP__);if(null==i?void 0:i.remoteConfig)return this._remoteConfig=i.remoteConfig,this._apply(this._remoteConfig),void this._fetch();dh(()=>{var e=localStorage.getItem(xc+"_"+t.token);e&&(this._remoteConfig=JSON.parse(e),this._apply(this._remoteConfig,!0))}),this._fetch()}}_fetch(){var e=this._host.getConfig();if(e.token)if(Eh())this._host.updateConfig({__remote_config_loaded:!0});else{var t=this._host.buildEndpointUrl("/api/d"),i=new AbortController,n=setTimeout(()=>i.abort(),3e3);(Hu||fetch)(t,{method:"GET",signal:i.signal,headers:r({Accept:"application/json"},fh(e))}).then(e=>e.json()).then(t=>{var r;clearTimeout(n),Mh(),this._remoteConfig=t,dh(()=>{localStorage.setItem(xc+"_"+e.token,JSON.stringify(t))}),this._apply(t),null===(r=this._onLoad)||void 0===r||r.call(this,t)}).catch(()=>{clearTimeout(n),xh("config"),this._host.updateConfig({__remote_config_loaded:!0})})}}_apply(e,t){var i,n,s,o;void 0===t&&(t=!1);var a=this._initConfig||this._host.getConfig(),l={};for(var[,u]of this._host.featureManager.getDescriptors())if(u.remoteConfig&&u.configKey){var h=e[u.remoteConfig.key];h&&void 0===a[u.configKey]&&(l[u.configKey]=u.remoteConfig.map(h))}if(e.analytics&&!t&&(void 0!==e.analytics.capturePageview&&void 0===a.capture_pageview&&(l.capture_pageview=e.analytics.capturePageview),void 0!==e.analytics.capturePageleave&&void 0===a.capture_pageleave&&(l.capture_pageleave=!!e.analytics.capturePageleave),void 0!==e.analytics.capturePerformance&&void 0===a.capture_performance&&(l.capture_performance=e.analytics.capturePerformance),void 0===a.autocapture)){var d=e.analytics.autocapture,c=e.analytics.scrollDepthMilestones,p=e.analytics.scrollDepthPageleave;void 0!==d&&(l.autocapture=d&&(c||p)?{scroll_depth:r({},c?{milestones:!0}:{},p?{pageleave:!0}:{})}:d)}t||(l.__remote_config_loaded=!0),void 0!==(null===(i=e.privacy)||void 0===i?void 0:i.respectDnt)&&void 0===a.respect_dnt&&(l.respect_dnt=e.privacy.respectDnt),void 0!==(null===(n=e.privacy)||void 0===n?void 0:n.requireConsent)&&void 0===a.require_consent&&(l.require_consent=e.privacy.requireConsent),void 0!==e.autocapture_opt_out&&(l.autocapture_opt_out=e.autocapture_opt_out),void 0!==e.elementsChainAsString&&(l.elementsChainAsString=e.elementsChainAsString),(null===(s=e.diagnostics)||void 0===s?void 0:s.defaultLogLevel)&&uh().setLevelFromRemote(e.diagnostics.defaultLogLevel),Object.keys(l).length>0&&this._host.updateConfig(l),null===(o=this._onApply)||void 0===o||o.call(this,e)}}var Ig=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"];function kg(e,t){if(void 0===t&&(t=[]),!e)return!1;var r=e.toLowerCase();return[...Ig,...t].some(e=>-1!==r.indexOf(e.toLowerCase()))}function xg(e,t){var r;if(void 0===t&&(t=[]),!e)return!1;var i=e.userAgent;if(i&&kg(i,t))return!0;try{var n=e.userAgentData;if(null===(r=null==n?void 0:n.brands)||void 0===r?void 0:r.some(e=>kg(null==e?void 0:e.brand,t)))return!0}catch(e){}return!!e.webdriver}var Mg=36e5;function Eg(){var e,t,r;return null!==(r=null===(t=null===(e=null==ju?void 0:ju.performance)||void 0===e?void 0:e.now)||void 0===t?void 0:t.call(e))&&void 0!==r?r:Date.now()}class Ag{constructor(){this._pageEnterPerf=Eg(),this._lastCapturePerf=null,this._bootPerf=Eg(),this._prevUrl="",this._prevPathname="",this._prevTitle="",this._leaveEmittedForPageKey=""}onAfterPageview(){var e=Eg();this._pageEnterPerf=e,this._lastCapturePerf=e,this._leaveEmittedForPageKey="",Vu&&(this._prevUrl=Vu.href||"",this._prevPathname=Vu.pathname||""),$u&&(this._prevTitle=$u.title||"")}peekEngagementSinceLastCaptureMs(){var e,t=Eg(),r=null!==(e=this._lastCapturePerf)&&void 0!==e?e:this._bootPerf,i=Math.round(t-r);return i<1&&(i=1),i>Mg&&(i=Mg),i}commitCaptureClock(){this._lastCapturePerf=Eg()}_pageKey(){return this._prevUrl+"\0"+this._prevPathname}clearLeaveDedupe(){this._leaveEmittedForPageKey=""}tryCapturePageleave(e,t,r,i){if(function(e){var t=e.capture_pageleave;return!1!==t&&(!0===t||!1!==e.capture_pageview)}(e)){var n=this._pageKey();if((this._prevUrl||this._prevPathname)&&n&&this._leaveEmittedForPageKey!==n){this._leaveEmittedForPageKey=n;var s=Eg(),o=Math.round(s-this._pageEnterPerf);o<1&&(o=1),o>Mg&&(o=Mg);var a={navigation_type:r,engagement_time_msec:o,[Hc]:this._prevUrl,[Gc]:this._prevPathname,[qc]:Math.round(o/1e3),[Zc]:this._prevPathname,[Yc]:this._prevUrl},l=this._prevUrl?function(e){try{return new URL(e).host}catch(e){return""}}(this._prevUrl):"";l&&(a.$host=l),this._prevTitle&&(a.title=this._prevTitle),i&&Object.assign(a,i),t(Nc,a,{skip_engagement:!0})}}}}var Og=[Dc,Fc,Bc,Nc,Wc,$c,Uc,Vc],Rg=new Set([Dc,Fc,Bc]),Tg=new Set([Nc,Vc,Wc,$c,Uc]);class Lg{constructor(e){this._set_once_properties_sent=!1,this._initial_pageview_captured=!1,this._visibility_state_listener=null,this._vt_person_id=null,this._pageLifecycle=new Ag,this._host=e}setVtPersonId(e){this._vt_person_id=e}capture(e,t,i){var n,s,o;this._host.sessionManager.setSessionId();var a=this._host.getConfig();if(a.opt_out_useragent_filter||!xg(Wu,null!==(n=a.custom_blocked_useragents)&&void 0!==n?n:[]))if((null==Wu?void 0:Wu.userAgent)&&function(e){return!(e&&"string"==typeof e&&e.length>500)}(Wu.userAgent))if((null==i?void 0:i.skip_client_rate_limiting)||Og.includes(e)||this._host.rateLimiter.shouldAllowEvent())if(!this._host.getConfig().require_consent||Rg.has(e)||(null===(s=this._host.consentManager)||void 0===s?void 0:s.hasConsent())){var l=this._host.buildUrl(),u=!0===(null==i?void 0:i.skip_engagement)||Tg.has(e),h=r({},t);u||"number"==typeof h.engagement_time_msec||(h=r({},h,{engagement_time_msec:this._pageLifecycle.peekEngagementSinceLastCaptureMs()}));var d=r({},this._buildEventPayload(e,h),a.globalAttributes),c=JSON.stringify(d);if(!(p=c)||"string"!=typeof p||p.length<2||p.length>Rh)uh().debug("capture","dropped",e,{reason:"payload_invalid_size",bytes:c.length,limitBytes:Rh,hint:e===jc?"Trim global / event properties; $elements is already off by default in compact mode.":"Trim event properties; payload exceeded the runaway-guard cap."});else{var p,f=e===Dc?this._host.userManager.getAnonymousId():null!==(o=this._host.userManager.getDistinctId())&&void 0!==o?o:this._host.userManager.getAnonymousId(),v={timestamp:(new Date).toISOString(),event:e,payload:d,distinct_id:f,anonymous_id:this._host.userManager.getAnonymousId()};this._host.bufferEvent(e,l,v),uh().debug("capture","enqueued",e,r({distinct_id:f,$current_url:d.$current_url,$session_id:d.$session_id,$debug:d.$debug},e===jc&&"object"==typeof d&&null!==d?{$event_type:d.$event_type}:{})),this._vt_person_id&&(this._vt_person_id=null),e===Pc?this._pageLifecycle.onAfterPageview():this._pageLifecycle.commitCaptureClock()}}else uh().debug("capture","dropped",e,{reason:"require_consent_and_no_consent"});else uh().debug("capture","dropped",e,{reason:"client_rate_limited",hint:"Token bucket (~10/s, burst ~100). $autocapture counts toward the same limit as custom events."});else uh().debug("capture","dropped",e,{reason:"invalid_or_missing_user_agent"});else uh().debug("capture","dropped",e,{reason:"bot"})}captureInternal(e,t){this.capture(e,t,{skip_client_rate_limiting:!0})}captureInitialPageview(){$u&&("visible"===$u.visibilityState?this._initial_pageview_captured||(this._initial_pageview_captured=!0,setTimeout(()=>{$u&&Vu&&!1!==this._host.getConfig().capture_pageview&&this.capture(Pc,{navigation_type:"initial_load"})},300),this._visibility_state_listener&&($u.removeEventListener("visibilitychange",this._visibility_state_listener),this._visibility_state_listener=null)):this._visibility_state_listener||(this._visibility_state_listener=()=>this.captureInitialPageview(),Lh($u,"visibilitychange",this._visibility_state_listener)))}tryCapturePageleave(e,t){this._pageLifecycle.tryCapturePageleave(this._host.getConfig(),(e,t,r)=>this.capture(e,t,r),e,t)}resetPageleaveDedupe(){this._pageLifecycle.clearLeaveDedupe()}_isDebugMode(){if(this._host.getConfig().debug)return!0;try{if(null==Vu?void 0:Vu.search)if("1"===new URLSearchParams(Vu.search).get("vtilt_debug"))return!0}catch(e){}return!1}_buildEventPayload(e,t){var i,n,s=this._host.getConfig(),o=s.mask_personal_data_properties,a=s.custom_personal_data_properties,l=Af(o,a),u=Dh(function(e,t,r){if(!$u)return{};var i=t?Nh([],yf,r||[]):[];return Ph({},wf(dp($u.URL,i,bf)))}(0,o,a)),h=this._host.userManager.getUserProperties(),d=this._host.userManager.get_initial_props(),c=this._host.sessionManager.getSessionId(),p=this._host.sessionManager.getWindowId(),f={};!this._set_once_properties_sent&&Object.keys(d).length>0&&Object.assign(f,d),t.$set_once&&Object.assign(f,t.$set_once);var v=r({},l,u,h,null!==(n=null===(i=this._host.consentManager)||void 0===i?void 0:i.getConsentProperties())&&void 0!==n?n:{},{$session_id:c,$window_id:p},this._vt_person_id?{$vt:this._vt_person_id}:{},Object.keys(f).length>0?{$set_once:f}:{},t.$set?{$set:t.$set}:{},t);!this._set_once_properties_sent&&Object.keys(d).length>0&&(this._set_once_properties_sent=!0),e===Pc&&$u&&(v.title=$u.title),this._isDebugMode()&&(v.$debug=!0);var g=this._host.sessionManager.consumeSessionStart(),m=this._host.userManager.consumeFirstVisit();return g&&(v.$session_start=!0),m&&(v.$first_visit=!0),v}}var Pg=["null","undefined","false","true","anonymous","anon","user","test","guest","visitor","unknown","none","demo","example","sample","placeholder"];function Ng(e){return!(!e||"string"!=typeof e)&&Pg.includes(e.toLowerCase().trim())}class Dg{constructor(e){this._lastIdentifyHash=null,this._lastSetPropertiesHash=null,this._host=e}identify(e,t,i){var n;if("number"==typeof e&&(e=String(e),uh().warn("identify","first argument should be a string, not a number")),e)if(Ng(e))uh().error("identify",'"'+e+'" appears to be a hardcoded string');else if("COOKIELESS_SENTINEL_VALUE"!==e){var s=JSON.stringify([e,t,i]);if(this._lastIdentifyHash!==s){var o=this._host.userManager,a=o.getDistinctId(),l=o.getAnonymousId(),u=o.getDeviceId();if(!("identified"===o.getUserState())&&l!==e||e!==a){this._host.capture(Dc,{distinct_id:e,$set:t||{},$set_once:i||{}});var h={user_state:"identified",distinct_id:e,properties_set:t,properties_set_once:i};if(!u){var d=a||l;h.device_id=d,h.properties_set=r({$had_persisted_distinct_id:!0,$device_id:d},h.properties_set||{})}o.applyUpdate(h),null===(n=this._host._emitter)||void 0===n||n.emit("user:identified",{distinctId:e})}else(t||i)&&this.setUserProperties(t,i);this._lastIdentifyHash=s}}else uh().error("identify","cannot use sentinel value as distinct_id");else uh().error("identify","unique user id is required")}setUserProperties(e,t){var r,i;if(e||t){var n=this._host.userManager,s=JSON.stringify([null!==(r=n.getDistinctId())&&void 0!==r?r:n.getAnonymousId(),e,t]);this._lastSetPropertiesHash!==s&&(n.applyUpdate({properties_set:e,properties_set_once:t}),this._host.capture(Bc,{$set:e||{},$set_once:t||{}}),null===(i=this._host._emitter)||void 0===i||i.emit("user:properties_set",{properties:e}),this._lastSetPropertiesHash=s)}}resetUser(e){var t;this._host.sessionManager.resetSessionId(),this._host.userManager.reset(e),this._lastIdentifyHash=null,this._lastSetPropertiesHash=null,null===(t=this._host._emitter)||void 0===t||t.emit("user:reset")}alias(e,t){var r;if(e&&!Ng(e)){var i=this._host.userManager,n=null!==(r=null!=t?t:i.getDistinctId())&&void 0!==r?r:i.getAnonymousId();n&&!Ng(n)?e!==n?this._host.capture(Fc,{$original_id:n,$alias_id:e}):this.identify(e):uh().warn("alias","invalid original distinct ID")}else uh().warn("alias","invalid alias")}getUserIdentity(){return this._host.userManager.getUserIdentity()}getDeviceId(){return this._host.userManager.getDeviceId()}getUserState(){return this._host.userManager.getUserState()}getDistinctId(){var e;return null!==(e=this._host.userManager.getDistinctId())&&void 0!==e?e:this._host.userManager.getAnonymousId()}getAnonymousId(){return this._host.userManager.getAnonymousId()}}var Fg="_vtilt_consent";class Bg{constructor(e){this._state={},this._hasBeenSet=!1,this._host=e,this._readFromCookie()}setConsent(e){var t;this._state=r({},this._state,e),this._hasBeenSet=!0,this._writeToCookie(),null===(t=this._host._emitter)||void 0===t||t.emit("consent:updated",{consent:this._state})}getConsent(){return r({},this._state)}hasConsent(){return this._hasBeenSet}setDefaultGranted(){this._hasBeenSet||(this._state={analytics:!0,marketing:!0,advertising:!0},this._hasBeenSet=!0)}getConsentProperties(){var e={};return void 0!==this._state.analytics&&(e.$consent_analytics=this._state.analytics),void 0!==this._state.marketing&&(e.$consent_marketing=this._state.marketing),void 0!==this._state.advertising&&(e.$consent_advertising=this._state.advertising),e}reset(){this._state={},this._hasBeenSet=!1,this._removeCookie()}_readFromCookie(){if(void 0!==$u&&(null==$u?void 0:$u.cookie)){var e=Fg+"=";for(var t of $u.cookie.split(";")){var r=t.trim();if(r.startsWith(e)){try{var i=decodeURIComponent(r.slice(15)),n=JSON.parse(i);n&&"object"==typeof n&&(this._state=n,this._hasBeenSet=!0)}catch(e){}return}}}}_writeToCookie(){if(void 0!==$u){var e=encodeURIComponent(JSON.stringify(this._state)),t="undefined"!=typeof location&&"https:"===location.protocol?"; Secure":"";$u.cookie=Fg+"="+e+"; Max-Age=31536000; path=/; SameSite=Lax"+t}}_removeCookie(){void 0!==$u&&($u.cookie=Fg+"=; Max-Age=0; path=/")}}class Ug{constructor(e){this._descriptors=new Map,this._instances=new Map,this._host=e}register(e){this._descriptors.set(e.name,e)}createInstances(){var e=this,t=this._host.getConfig(),r=function(r,i){return e._instances.has(r)||e._isHardDisabled(t,i)?0:void dh(()=>{var n=i.FeatureClass.extractConfig(t),s=new i.FeatureClass(e._host,n);e._instances.set(r,s)})};for(var[i,n]of this._descriptors)r(i,n)}initAll(){this.createInstances();var e=function(e){dh(()=>{e.isStarted||e.startIfEnabled()})};for(var[,t]of this._instances)e(t)}notifyAll(e){var t=function(t){t.onConfigUpdate&&dh(()=>t.onConfigUpdate(e))};for(var[,r]of this._instances)t(r)}get(e){return this._instances.get(e)}set(e,t){this._instances.set(e,t)}getDescriptors(){return this._descriptors}_isHardDisabled(e,t){if(t.disableKey&&!0===e[t.disableKey])return!0;if(t.configKey){var r=e[t.configKey];if(r&&"object"==typeof r&&!1===r.enabled)return!0}return!1}}class jg{constructor(e){this._queue=new og,this._ready=!1,this._configReady=!1,this._host=e,this._checkReady(),this._ready||(this._safetyTimer=setTimeout(()=>this.forceFlush(),5e3))}push(e){this._ready?this._process(e):this._queue.enqueue(e)}markConfigReady(){this._configReady||(this._configReady=!0,this._tryFlush())}forceFlush(){this._clearSafetyTimer(),this._flush(),this._ready=!0}_checkReady(){this._ready=this._configReady}_tryFlush(){this._checkReady(),this._ready&&(this._clearSafetyTimer(),this._flush())}_flush(){var e=this._queue.takeAll();for(var t of e)this._process(t);e.length>0&&this._host.requestQueue.flush()}_process(e){if(this._configReady){if(this._isDisabledByConfig(e.name))return}else this._tagConfigPending(e.event);this._host.sendRequest(e.url,e.event)}_isDisabledByConfig(e){var t=this._host.getConfig();switch(e){case Pc:return!1===t.capture_pageview;case Nc:return!1===t.capture_pageleave;case Uc:return!1===t.capture_performance;case jc:case zc:return!1===t.autocapture;default:return!1}}_tagConfigPending(e){"object"==typeof e.payload&&null!==e.payload&&(e.payload.$config_pending=!0)}_clearSafetyTimer(){void 0!==this._safetyTimer&&(clearTimeout(this._safetyTimer),this._safetyTimer=void 0)}}var zg="vt";class Wg{constructor(e){void 0===e&&(e={}),this.version=_c,this.__loaded=!1,this._has_warned_about_config=!1,this._booted=!1,this._pendingCalls=[],this._postBootInitDone=!1,uh().debug("ctor","start"),this._emitter=new vh,this.configManager=new ep(e);var t=this.configManager.getConfig();hh(t),this.sessionManager=new op(t.storage||"cookie",t.cross_subdomain_cookie),this.userManager=new Of(t.persistence||"localStorage+cookie",t.cross_subdomain_cookie),this.rateLimiter=new Sg({eventsPerSecond:10,eventsBurstLimit:100,captureWarning:e=>{this._captureManager.captureInternal(Vc,{$$client_ingestion_warning_message:e})}}),this.retryQueue=new bg({sendRequest:e=>this._send_http_request(e),sendBeacon:e=>this._send_beacon_request(e)}),this.requestQueue=new _g(e=>this._send_batched_request(e),{flush_interval_ms:3e3}),this.consentManager=new Bg(this),this._captureManager=new Lg(this),this._identityManager=new Dg(this),this._featureManager=new Ug(this),this._remoteConfigManager=new Cg(this),this._registerFeatures(),this._remoteConfigManager.onLoad(e=>{this._emitter.emit(yh,{config:e})}),this._installBootGate(),uh().debug("ctor","boot gate installed")}_registerFeatures(){this._featureManager.register({name:"HistoryAutocapture",configKey:"capture_pageview",FeatureClass:Bf}),this._featureManager.register({name:"Autocapture",configKey:"autocapture",FeatureClass:Ev}),this._featureManager.register({name:"WebVitals",configKey:"capture_performance",FeatureClass:Df}),this._featureManager.register({name:"SessionRecording",configKey:"session_recording",disableKey:"disable_session_recording",remoteConfig:{key:"sessionRecording",map:e=>({enabled:e.enabled,sampleRate:e.sampleRate,minimumDurationMs:e.minimumDurationMs,fullSnapshotIntervalMs:e.fullSnapshotIntervalMs,maskAllInputs:e.maskAllInputs,captureConsole:e.captureConsole,captureCanvas:e.captureCanvas})},FeatureClass:Ov}),this._featureManager.register({name:"Chat",configKey:"chat",disableKey:"disable_chat",remoteConfig:{key:"chat",map:e=>({enabled:e.enabled,position:e.widgetPosition,color:e.widgetColor})},FeatureClass:zv}),this._featureManager.register({name:"GoogleTagGateway",configKey:"google_tag",disableKey:"disable_google_tag",remoteConfig:{key:"googleTag",map:e=>e},FeatureClass:lg})}_installBootGate(){var e=this,t=function(t){var r=e[t];e[t]=function(){for(var i=arguments.length,n=new Array(i),s=0;s<i;s++)n[s]=arguments[s];if(e._booted)return r.apply(e,n);e._pendingCalls.push([t,...n])}};for(var r of Wg.BOOT_GATED_METHODS)t(r)}_boot(){if(!this._booted){for(var e of(this._booted=!0,uh().debug("boot","start"),Wg.BOOT_GATED_METHODS))delete this[e];uh().debug("boot","gate removed"),this.__loaded&&!this._postBootInitDone?(uh().debug("boot","running _runPostBootInit"),this._runPostBootInit()):uh().debug("boot","skipping _runPostBootInit","loaded?",this.__loaded,"postBootDone?",this._postBootInitDone),uh().debug("boot","flush pendingCalls",this._pendingCalls.length),this._execute_array(this._pendingCalls),this._pendingCalls=[]}}init(e,t,r){var i;if(r&&r!==zg){var n=null!==(i=Hg[r])&&void 0!==i?i:new Wg;return n._init(e,t,r),Hg[r]=n,Hg[zg][r]=n,n}return this._init(e,t,r)}_init(e,t,i){if(void 0===t&&(t={}),this.__loaded)return uh().warn("init","already initialized; re-initializing is a no-op"),this;this.configManager.updateConfig(r({},t,{token:e||t.token,name:i}));var n=this.configManager.getConfig();return hh(n),this.__loaded=!0,uh().debug("init","start","token present?",!!n.token,"name",null!=i?i:"vt"),this._featureManager.createInstances(),this._booted||void 0===$u||"interactive"!==$u.readyState&&"complete"!==$u.readyState||(uh().debug("init","self-boot?",$u.readyState),this._boot()),this._booted&&!this._postBootInitDone&&this._runPostBootInit(),uh().debug("init","postBootInitDone",this._postBootInitDone),this}_runPostBootInit(){if(!this._postBootInitDone){this._postBootInitDone=!0,uh().debug("postBoot","start");var e=this.configManager.getConfig();this.sessionManager=new op(e.storage||"cookie",e.cross_subdomain_cookie),this.sessionManager.hydrateFromStorage(),uh().debug("postBoot","sessionManager hydrated");var t=e.persistence||"localStorage+cookie";this.userManager.updateStorageMethod(t,e.cross_subdomain_cookie),this.userManager.hydrateFromStorage(),uh().debug("postBoot","userManager hydrated"),e.require_consent||this.consentManager.hasConsent()||this.consentManager.setDefaultGranted(),!0===this.consentManager.getConsent().advertising&&gp(),this._emitter.on("consent:updated",e=>{var t=e.consent;!0===t.advertising?gp():!1===t.advertising&&void 0!==$u&&($u.cookie=cp+"=; Max-Age=0; path=/",$u.cookie=pp+"=; Max-Age=0; path=/")}),this._read_vt_param_from_url(),this.userManager.set_initial_person_info(e.mask_personal_data_properties,e.custom_personal_data_properties),this._eventBuffer=new jg({sendRequest:(e,t)=>this.sendRequest(e,t),requestQueue:this.requestQueue,getConfig:()=>this.configManager.getConfig()}),this._featureManager.initAll(),uh().debug("postBoot","features inited"),this._remoteConfigManager.load(),this._setup_unload_handler(),this._start_queue_if_opted_in();var r=this.configManager.getConfig();!1!==r.capture_pageview&&this._captureManager.captureInitialPageview(),this._featureManager.notifyAll(r),this._emitter.emit(gh,{config:r}),uh().debug("postBoot","done"),uh().info("init","SDK ready")}}startAutocapture(){var e=this._featureManager.get("Autocapture");if(!e){var t=Ev.extractConfig(this.configManager.getConfig());e=new Ev(this,t),this._featureManager.set("Autocapture",e)}e.updateConfig({enabled:!0})}stopAutocapture(){var e=this._featureManager.get("Autocapture");e&&e.updateConfig({enabled:!1})}isAutocaptureActive(){var e,t;return null!==(t=null===(e=this._featureManager.get("Autocapture"))||void 0===e?void 0:e.isStarted)&&void 0!==t&&t}getAutocaptureDiagnostics(){var e,t;return null!==(t=null===(e=this._featureManager.get("Autocapture"))||void 0===e?void 0:e.getDiagnostics())&&void 0!==t?t:null}startSessionRecording(){var e=this._featureManager.get("SessionRecording");e||(e=new Ov(this),this._featureManager.set("SessionRecording",e)),e.updateConfig({enabled:!0}),e.startIfEnabledOrStop("recording_initialized"),this._emitter.emit(wh)}stopSessionRecording(){var e;null===(e=this._featureManager.get("SessionRecording"))||void 0===e||e.stop(),this._emitter.emit(Sh)}isRecordingActive(){var e;return"active"===(null===(e=this._featureManager.get("SessionRecording"))||void 0===e?void 0:e.status)}getSessionRecordingId(){var e;return(null===(e=this._featureManager.get("SessionRecording"))||void 0===e?void 0:e.sessionId)||null}openChat(){var e=this._featureManager.get("Chat");e?e.open():uh().warn("chat","openChat: feature not available")}closeChat(){var e=this._featureManager.get("Chat");e?e.close():uh().warn("chat","closeChat: feature not available")}toggleChat(){var e=this._featureManager.get("Chat");e?e.toggle():uh().warn("chat","toggleChat: feature not available")}showChat(){var e=this._featureManager.get("Chat");e?e.show():uh().warn("chat","showChat: feature not available")}hideChat(){var e=this._featureManager.get("Chat");e?e.hide():uh().warn("chat","hideChat: feature not available")}sendChatMessage(e,t){var r=this._featureManager.get("Chat");return r?r.sendMessage(e,t):(uh().warn("chat","sendChatMessage: feature not available"),Promise.resolve())}gtag(){for(var e=this._featureManager.get("GoogleTagGateway"),t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];e?e.gtag(...r):this._pendingCalls.push(["gtag",...r])}setGoogleUserData(e){var t=this._featureManager.get("GoogleTagGateway");return t?t.setUserData(e):Promise.resolve()}get featureManager(){return this._featureManager}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}off(e){this._emitter.off(e)}_is_bot(){var e,t=this.getConfig();return!t.opt_out_useragent_filter&&xg(Wu,null!==(e=t.custom_blocked_useragents)&&void 0!==e?e:[])}capture(e,t,r){this._captureManager.capture(e,t,r),this._emitter.emit(bh,{event:e,payload:t})}tryCapturePageleave(e){var t,r=null===(t=this._featureManager.get("Autocapture"))||void 0===t?void 0:t.getMaxScrollDepthPctForPageleave(),i=null!=r?{[Xc]:r}:void 0;this._captureManager.tryCapturePageleave(e,i)}identify(e,t,r){this._identityManager.identify(e,t,r)}setUserProperties(e,t){this._identityManager.setUserProperties(e,t)}resetUser(e){this._identityManager.resetUser(e)}alias(e,t){this._identityManager.alias(e,t)}setConsent(e){this.consentManager.setConsent(e)}getConsent(){return this.consentManager.getConsent()}getUserIdentity(){return this._identityManager.getUserIdentity()}getDeviceId(){return this._identityManager.getDeviceId()}getUserState(){return this._identityManager.getUserState()}getConfig(){return this.configManager.getConfig()}getRemoteConfig(){return this._remoteConfigManager.config}getSessionId(){return this.sessionManager.getSessionId()}getDistinctId(){return this._identityManager.getDistinctId()}getAnonymousId(){return this._identityManager.getAnonymousId()}toString(){var e,t=null!==(e=this.configManager.getConfig().name)&&void 0!==e?e:zg;return t!==zg&&(t="vt."+t),t}updateConfig(e){var t,r=this.configManager.getConfig();this.configManager.updateConfig(e);var i=this.configManager.getConfig();!r.__remote_config_loaded&&i.__remote_config_loaded&&(null===(t=this._eventBuffer)||void 0===t||t.markConfigReady()),this._featureManager.notifyAll(i),this._emitter.emit(mh,{config:i})}buildUrl(){return this.buildEndpointUrl("/api/e")}buildEndpointUrl(e){return ph(this.configManager.getConfig(),e)}sendRequest(e,t){this._is_configured()&&this.requestQueue.enqueue({url:e,event:t})}bufferEvent(e,t,r){e!==Wc&&e!==$c?this._eventBuffer.push({name:e,url:t,event:r}):this.sendRequest(t,r)}_is_configured(){return!!this.configManager.getConfig().token||(this._has_warned_about_config||(uh().warn("config","token is required for tracking"),this._has_warned_about_config=!0),!1)}_send_batched_request(e){"sendBeacon"!==e.transport?this.retryQueue.retriableRequest(e):this._send_beacon_request(e)}_send_http_request(e){return new Promise(t=>{var{url:r,events:i}=e,n=this.configManager.getConfig(),s=1===i.length?i[0]:{events:i},o=n.disable_compression?dg.None:dg.GZipJS;yg({url:r,data:s,method:"POST",transport:"XHR",compression:o,projectToken:n.token,callback:e=>t({statusCode:e.statusCode})})})}_send_beacon_request(e){var{url:t,events:r}=e,i=this.configManager.getConfig(),n=1===r.length?r[0]:{events:r},s=i.disable_compression?dg.None:dg.GZipJS;yg({url:t,data:n,method:"POST",transport:"sendBeacon",compression:s,projectToken:i.token})}_send_retriable_request(e){this.sendRequest(e.url,e.event)}_setup_unload_handler(){if(ju){var e=()=>{this._eventBuffer.forceFlush(),this.requestQueue.unload(),this.retryQueue.unload()};Lh(ju,"beforeunload",e),Lh(ju,"pagehide",()=>{this._captureManager.tryCapturePageleave("pagehide"),e()}),$u&&Lh($u,"visibilitychange",()=>{$u&&("hidden"===$u.visibilityState?this._captureManager.tryCapturePageleave("visibility_hidden"):"visible"===$u.visibilityState&&this._captureManager.resetPageleaveDedupe())})}}_start_queue_if_opted_in(){this.requestQueue.enable()}_read_vt_param_from_url(){dh(()=>{var e,t;if(void 0!==Vu&&Vu.search){var r=new URL(Vu.href),i=r.searchParams.get("vt"),n=r.searchParams.get("vtd");if((null==i?void 0:i.trim())&&(this._captureManager.setVtPersonId(i.trim()),r.searchParams.delete("vt")),(null==n?void 0:n.trim())&&(this._initVtdOverlay(n.trim()),r.searchParams.delete("vtd")),(null==i?void 0:i.trim())||(null==n?void 0:n.trim())){var s=r.pathname+(r.search||"")+r.hash;null===(t=null===(e=null==ju?void 0:ju.history)||void 0===e?void 0:e.replaceState)||void 0===t||t.call(e,{},"",s)}}})}_initVtdOverlay(e){this.vtdOverlay||(this.vtdOverlay=new hg(this),this.vtdOverlay.setDestinationUrl(e))}_execute_array(e){Qu(e)&&e.forEach(e=>{if(e&&Qu(e)&&e.length>0){var t=e[0],r=e.slice(1);"function"==typeof this[t]&&dh(()=>this[t](...r))}})}_dom_loaded(){this._start_queue_if_opted_in()}}Wg.BOOT_GATED_METHODS=["capture","identify","setUserProperties","resetUser","alias","setConsent","startAutocapture","stopAutocapture","startSessionRecording","stopSessionRecording","openChat","closeChat","toggleChat","showChat","hideChat","sendChatMessage"];var $g,Vg,Hg={};$g=Hg[zg]=new Wg,(Vg=qu.vt)&&Th(Vg._i,function(e){if(e&&Qu(e)){var t=$g.init(e[0],e[1],e[2]),r=Vg[e[2]||"vt"]||Vg;t&&t._execute_array(r)}}),qu.vt=$g,function(){function e(){if(!e.done){e.done=!0,uh().debug("dom","handler fired");var t=Object.keys(Hg);uh().debug("boot","instance count",t.length),Th(Hg,(e,t)=>{uh().debug("boot","instance",t),e._boot(),e._dom_loaded()})}}if($u&&"function"==typeof $u.addEventListener)return uh().debug("dom","readyState",$u.readyState),void("complete"===$u.readyState||"interactive"===$u.readyState?(uh().debug("dom","running handler sync"),e()):(uh().debug("dom","registered DOMContentLoaded listener"),Lh($u,"DOMContentLoaded",e,{capture:!1})));ju&&uh().error("dom","browser doesn't support document.addEventListener")}()}();
|
|
2
|
+
//# sourceMappingURL=array.full.no-external.js.map
|