posthog-js 1.422.0 → 1.422.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all-external-dependencies.js +1 -1
- package/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.es5.js.map +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.full.no-external.js.map +1 -1
- 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/conversations.js +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/customizations.js +1 -1
- package/dist/dead-clicks-autocapture.js +1 -1
- package/dist/default-extensions.js +1 -1
- package/dist/default-extensions.js.map +1 -1
- package/dist/exception-autocapture.js +1 -1
- package/dist/extension-bundles.js +1 -1
- package/dist/extension-bundles.js.map +1 -1
- package/dist/lazy-recorder.js +1 -1
- package/dist/lazy-recorder.js.map +1 -1
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.full.no-external.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/module.no-external.js.map +1 -1
- package/dist/module.slim.js +1 -1
- package/dist/module.slim.js.map +1 -1
- package/dist/module.slim.no-external.js +1 -1
- package/dist/module.slim.no-external.js.map +1 -1
- package/dist/posthog-recorder.js +1 -1
- package/dist/posthog-recorder.js.map +1 -1
- package/dist/product-tours.js +1 -1
- package/dist/rrweb.js +1 -1
- package/dist/src/extensions/replay/external/lazy-loaded-session-recorder.d.ts +2 -0
- package/dist/src/extensions/replay/external/mutation-throttler.d.ts +17 -0
- package/dist/surveys-preview.js +1 -1
- package/dist/surveys.js +1 -1
- package/lib/package.json +1 -1
- package/lib/src/extensions/replay/external/lazy-loaded-session-recorder.d.ts +2 -0
- package/lib/src/extensions/replay/external/lazy-loaded-session-recorder.js +19 -1
- package/lib/src/extensions/replay/external/lazy-loaded-session-recorder.js.map +1 -1
- package/lib/src/extensions/replay/external/mutation-throttler.d.ts +17 -0
- package/lib/src/extensions/replay/external/mutation-throttler.js +67 -3
- package/lib/src/extensions/replay/external/mutation-throttler.js.map +1 -1
- package/package.json +7 -7
package/dist/rrweb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function t(t,e,r,i,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void r(t)}a.done?e(h):Promise.resolve(h).then(i,n)}function e(e){return function(){var r=this,i=arguments;return new Promise((function(n,s){var o=e.apply(r,i);function a(e){t(o,n,s,a,h,"next",e)}function h(e){t(o,n,s,a,h,"throw",e)}a(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},r.apply(null,arguments)}function i(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;r[i]=t[i]}return r}var n,s=["inputId"],o=["inputId"],a=["type"],h=Object.defineProperty,u=(t,e,r)=>((t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),l=Object.defineProperty,f=(t,e,r)=>((t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),c=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(c||{});function v(t,e){return-1!==t.indexOf(e)}var d={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},p={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},m={};function y(t){if(m[t])return m[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in d?d[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in p?p[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return m[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(v(h=navigator.userAgent,"AppleWebKit")&&!v(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),m[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var g={};function w(t,e,r){var i,n=t+"."+String(r);if(g[n])return g[n].call(e);var s=y(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(g[n]=o,o.call(e)):e[r]}var b={};function S(t,e,r){var i=t+"."+String(r);if(b[i])return b[i].bind(e);var n=y(t)[r];return"function"!=typeof n?e[r]:(b[i]=n,n.bind(e))}var k={childNodes:t=>w("Node",t,"childNodes"),parentNode:t=>w("Node",t,"parentNode"),parentElement:t=>w("Node",t,"parentElement"),textContent:t=>w("Node",t,"textContent"),contains:(t,e)=>S("Node",t,"contains")(e),getRootNode:t=>S("Node",t,"getRootNode")(),host:t=>t&&"host"in t?w("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?w("Element",t,"shadowRoot"):null,querySelector:(t,e)=>S("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>S("Element",t,"querySelectorAll")(e),mutationObserver:()=>y("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}},C=()=>({durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0});function M(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(t){}return Date.now()}var x=0,A=0,E=6e4;function R(){x+=1}function I(){return x}function T(){return A}function O(t,e){return(e!==x||t>E)&&(A+=1,!0)}var _=0,D=0,N=0,L=C(),F=null,B=null,P=[],j=0,U=0,W={slowestBatchMs:0},H={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0},G=t=>t&&t>0?t:null;function z(t){(_+=1)>1||(L=C(),P=[],j=0,B=G(t),D=M(),N=x)}function V(){return 0===_?F||C():(_-=1)>0?L:(L.durationMs=M()-D,L.deferredStylesheetCount=j,H.deferredCount+=j,B=null,O(L.durationMs,N)?L:F=L)}function Y(){return F}var q=32;function Z(t,e,r){var i=t.length;if(r>=q)return i;for(var n=0;t.length>n;n++){var s=t[n];try{var o=s.cssRules;if(o&&o.length)i+=Z(o,e,r+1);else if(e&&s.styleSheet){var a=s.styleSheet;if(!e.has(a)){e.add(a);var h=a.rules||a.cssRules;h&&(i+=Z(h,e,r+1))}}}catch(t){}}return i}function J(t){if(0!==_){var e=Z(t,null,0);L.cssRuleCount+=e,U>0&&(L.nonDeferrableCssRuleCount+=e)}}function X(t){U+=1;try{return t()}finally{U-=1}}function K(t){_>0&&(L.stylesheetMs+=t)}function Q(t){if(0===_||null===B)return!1;var e=L.cssRuleCount-L.nonDeferrableCssRuleCount;return e>=B||e+function(t){try{var e=t&&(t.rules||t.cssRules);if(!e)return 0;var r=new WeakSet;return r.add(t),Z(e,r,0)}catch(t){return 0}}(t)>B}function tt(){H.failedCount+=1}function et(t){t>0&&(H.abandonedCount+=t)}function rt(){return r({},H)}function it(){return r({},W)}function nt(){_=0,D=0,N=0,x=0,A=0,L=C(),F=null,B=null,P=[],j=0,U=0,W={slowestBatchMs:0},H={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0}}function st(t){return t.nodeType===t.ELEMENT_NODE}function ot(t){var e=t&&"host"in t&&"mode"in t&&k.host(t)||null;return Boolean(e&&"shadowRoot"in e&&k.shadowRoot(e)===t)}function at(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}function ht(t){return"[object ShadowRoot]"==={}.toString.call(t)}function ut(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function lt(t){var e=t.cssText;if(3>e.split('"').length)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}var ft=0;function ct(t){var e=0===ft,r=e?M():0;ft+=1;try{var i=t.rules||t.cssRules;if(!i)return null;J(i);var n=t.href;return!n&&t.ownerNode&&(n=t.ownerNode.baseURI),ut(Array.from(i,(t=>vt(t,n))).join(""))}catch(t){return null}finally{ft-=1,e&&K(M()-r)}}function vt(t,e){var r;if(pt(t)){var i;try{i=ct(t.styleSheet)||lt(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return Dt(i,t.styleSheet.href)}catch(t){}return i}var n=t.cssText;return mt(t)&&t.selectorText.includes(":")&&(n=dt(n)),e?Dt(n,e):n}function dt(t){return t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function pt(t){return"styleSheet"in t}function mt(t){return"selectorText"in t}var yt=/^-?[A-Za-z_][\w-]*$/,gt=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function wt(t){var e=[],r=!1,i=null,n=new Map;function s(t){var n=e.pop();if("group"===n.kind){if(null===t){for(;e.length>0&&"group"===e[e.length-1].kind;)e.pop();return void s(null)}var a=e[e.length-1];return a.parts.push(t),void(a.index+=1)}if(!n.importRule)return r=!0,void(i=t);o(e[e.length-1],n.importRule,t)}function o(t,e,r){var i;try{var n;try{n=r||lt(e)}catch(t){n=e.cssText}try{n&&(null==(i=e.styleSheet)?void 0:i.href)&&(n=Dt(n,e.styleSheet.href))}catch(t){}n&&t.parts.push(n),t.index+=1}catch(t){s(null)}}function a(t){var r=t.rules[t.index];if("sheet"===t.kind&&pt(r)){var i=n.get(r);return null===i?(t.parts.push(r.cssText),void(t.index+=1)):i?void e.push({kind:"sheet",sheet:i.sheet,rules:i.rules,sheetHref:i.sheetHref,index:0,parts:[],importRule:r}):void o(t,r,null)}if(!function(t,r){try{var i=function(t){var e,r=t;if(!r.cssRules||0===r.cssRules.length)return null;if(r.media&&"string"==typeof r.media.mediaText)return"@media "+r.media.mediaText+" {";if(mt(t)){if("number"==typeof r.type&&1!==r.type)return null;var i=r.style?r.style.cssText:"";return t.selectorText+" {"+(i?" "+i:"")}if("containerName"in r)return"string"!=typeof r.containerQuery||r.containerName&&!yt.test(r.containerName)?null:"@container "+(r.containerName?r.containerName+" ":"")+r.containerQuery+" {";if("string"==typeof r.conditionText){var n="";try{n=(null==(e=t.constructor)?void 0:e.name)||""}catch(t){return null}return""===n||"Object"===n||"CSSSupportsRule"===n?"@supports "+r.conditionText+" {":null}return"string"==typeof r.name?"keyText"in r.cssRules[0]?yt.test(r.name)?"@keyframes "+r.name+" {":null:""===r.name?"@layer {":gt.test(r.name)?"@layer "+r.name+" {":null:null}(t);if(null===i)return!1;var n=r.sheetHref;return e.push({kind:"group",rules:Array.from(t.cssRules),sheetHref:n,index:0,parts:[],prelude:n?Dt(i,n):i,fixColons:"sheet"===r.kind&&mt(t)&&t.selectorText.includes(":")}),!0}catch(t){return!1}}(r,t)){var s=r.cssText;"sheet"===t.kind&&mt(r)&&r.selectorText.includes(":")&&(s=dt(s)),t.parts.push(t.sheetHref?Dt(s,t.sheetHref):s),t.index+=1}}return function(t){try{var r=t.rules||t.cssRules;if(!r)return!1;J(r);var i=t.href;!i&&t.ownerNode&&(i=t.ownerNode.baseURI);var s=Array.from(r);return e.push({kind:"sheet",sheet:t,rules:s,sheetHref:i,index:0,parts:[],importRule:null}),function(t,e){for(var r=[{sheet:e,rules:t,index:0}],i=function(){var t=r[r.length-1];if(t.index>=t.rules.length)return r.pop(),0;var e=t.rules[t.index];if(t.index+=1,!pt(e)||n.has(e))return 0;var i=null;try{i=e.styleSheet}catch(t){return n.set(e,null),0}if(!i||r.some((t=>t.sheet===i)))return 0;try{var s=i.rules||i.cssRules;if(!s)return 0;J(s);var o=i.href;!o&&i.ownerNode&&(o=i.ownerNode.baseURI);var a=Array.from(s);n.set(e,{sheet:i,rules:a,sheetHref:o}),r.push({sheet:i,rules:a,index:0})}catch(t){}};r.length>0;)i()}(s,t),!0}catch(t){return!1}}(t)||(r=!0),{advance(t){if(r)return!0;var n=M(),o=t>0?t:1;try{for(;!r&&o>0;){var h=e[e.length-1];if(h.rules.length>h.index){o-=1;try{a(h)}catch(t){s(null)}}else{var u=null;try{if("group"===h.kind){var l=h.prelude+h.parts.join("")+"}";u=h.fixColons?dt(l):l}else u=ut(h.parts.join(""))}catch(t){}s(u)}}}catch(t){r=!0,i=null}finally{K(M()-n)}return r},text:()=>r?i:null,remainingRules(){if(r)return 0;var t=0;for(var i of e)t+=i.rules.length-i.index;return t}}}class bt{constructor(){f(this,"idNodeMap",new Map),f(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),st(t)){var r=k.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function St(){return new bt}function kt(t){var e=t.element,r=t.maskInputOptions,i=t.tagName,n=t.type,s=t.maskInputFn,o=t.value||"",a=n&&Ct(n);return(r[i.toLowerCase()]||a&&r[a])&&(o=s?s(o,e):"*".repeat(o.length)),o}function Ct(t){return t.toLowerCase()}var Mt=new Set(["rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_mediastate","rr_open_mode"]);function xt(t){var e=t.element,r=t.name,i=t.value,n=t.maskAttributeFn,s=t.isGenerated;return i?t.maskAllElementAttributes?void 0!==s&&s&&Mt.has(Ct(r))?i:"*".repeat(i.length):n?n(r,i,e):i:i}var At="__rrweb_original__";function Et(t){try{var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Ct(e):null}catch(t){return null}}function Rt(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){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 It=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Tt=/^(?:[a-z+]+:)?\/\//i,Ot=/^www\..*/i,_t=/^(data:)([^,]*),(.*)/i;function Dt(t,e){return(t||"").replace(It,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(Tt.test(h)||Ot.test(h))return"url("+u+h+u+")";if(_t.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),f=h.split("/");for(var c of(l.pop(),f))"."!==c&&(".."===c?l.pop():l.push(c));return"url("+u+l.join("/")+u+")"}))}var Nt,Lt,Ft="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",Bt=4096,Pt=1e5,jt=10,Ut=new Map,Wt=1,Ht=new RegExp("[^a-z0-9-_:]"),Gt=-2;function zt(){return Wt++}var Vt=/^[^ \t\n\r\u000c]+/,$t=/^[, \t\n\r\u000c]+/,Yt=new WeakMap;function qt(t,e){return e&&""!==e.trim()?Zt(t,e):e}function Zt(t,e){var r=Yt.get(t);if(r||(r=t.createElement("a"),Yt.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function Jt(t,e){return(null==e?void 0:e.maxBase64ImageLength)?function(t,e){return e&&t.length>e?Ft:t}(t,e.maxBase64ImageLength):t}function Xt(t,e,r,i,n,s){var o;if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){if("link"===e&&n){var a=null==(o=n.sheet)?void 0:o.href;if(a)return a}var h=qt(t,i);if(h.startsWith("data:")){if("img"===e&&n){var u=h;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(u=function(t,e,r,i){if(Pt>e.length)return e;if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>Bt||t.naturalHeight>Bt)return e;var n=Ut.get(e);if(n&&n.type===r&&n.quality===i)return n.result;try{var s=document.createElement("canvas");s.width=t.naturalWidth,s.height=t.naturalHeight;var o=s.getContext("2d");if(!o)return e;o.drawImage(t,0,0);var a=s.toDataURL(r||"image/webp",null!=i?i:.4),h=e.length>a.length?a:e;if(Ut.size>=jt){var u=Ut.keys().next().value;void 0!==u&&Ut.delete(u)}return Ut.set(e,{type:r,quality:i,result:h}),h}catch(t){return e}}(n,h,s.type,s.quality)),Jt(u,s)}if("image"===e)return Jt(h,s)}return h}if("xlink:href"===r&&"#"!==i[0]){var l=qt(t,i);return"image"===e&&l.startsWith("data:")?Jt(l,s):l}return"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i($t),e.length>r;){var s=i(Vt);if(","===s.slice(-1))s=qt(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=qt(t,s);for(var a=!1;;){var h=e.charAt(r);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){r+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,r+=1}}}return n.join(", ")}(t,i):"style"===r?Dt(i,Zt(t)):"object"===e&&"data"===r?qt(t,i):i:qt(t,i)}function Kt(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function Qt(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&Qt(k.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&Qt(k.parentNode(t),e,r)}function te(t,e,r,i){var n;if(st(t)){if(!k.childNodes(n=t).length)return!1}else{if(null===k.parentElement(t))return!1;n=k.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(Qt(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}function ee(t,e,r){var i=t.removeEventListener;"function"==typeof i&&i.call(t,e,r)}var re=new Map;function ie(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function ne(t){return null==t?"":t.toLowerCase()}var se=50,oe=!1,ae=!1;function he(){return ae}function ue(){ae=!1,oe=!1}function le(t,e){var r=e.doc,i=e.mirror,n=e.blockClass,s=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,h=e.skipChild,u=void 0!==h&&h,l=e.inlineStylesheet,f=void 0===l||l,v=e.maskInputOptions,d=void 0===v?{}:v,p=e.maskTextFn,m=e.maskInputFn,y=e.maskAllElementAttributes,g=void 0!==y&&y,w=e.maskAttributeFn,b=e.slimDOMOptions,S=e.dataURLOptions,C=void 0===S?{}:S,M=e.inlineImages,x=void 0!==M&&M,A=e.recordCanvas,E=void 0!==A&&A,R=e.canvasMaskingConfigured,I=e.onSerialize,T=e.onIframeLoad,O=e.iframeLoadTimeout,D=void 0===O?5e3:O,N=e.onIframeListenerRegistered,F=e.onStylesheetLoad,B=e.stylesheetLoadTimeout,U=void 0===B?5e3:B,W=e.keepIframeSrcFn,H=void 0===W?()=>!1:W,G=e.newlyAddedElement,z=void 0!==G&&G,V=e.depth,Y=void 0===V?0:V,q=e.maxDepth,Z=void 0===q?se:q,J=e.needsMask,K=e.preserveWhiteSpace,tt=void 0===K||K;if(Y>=Z)return ae=!0,oe||(oe=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+Z+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;J||(J=te(t,o,a,void 0===J)),_>0&&(L.nodeCount+=1);var et,rt=function(t,e){var r=e.doc,i=e.blockClass,n=e.blockSelector,s=e.needsMask,o=e.inlineStylesheet,a=e.maskInputOptions,h=void 0===a?{}:a,u=e.maskTextFn,l=e.maskInputFn,f=e.maskAllElementAttributes,v=void 0!==f&&f,d=e.maskAttributeFn,p=e.dataURLOptions,m=void 0===p?{}:p,y=e.inlineImages,g=e.recordCanvas,w=e.canvasMaskingConfigured,b=e.keepIframeSrcFn,S=e.newlyAddedElement,C=void 0!==S&&S,M=function(t,e){if(e.hasNode(t)){var r=e.getId(t);return 1===r?void 0:r}}(r,e.mirror);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:c.Document,childNodes:[],compatMode:t.compatMode}:{type:c.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:c.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:M};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,s=e.doc,o=e.inlineStylesheet,a=e.maskInputOptions,h=void 0===a?{}:a,u=e.maskInputFn,l=e.maskAllElementAttributes,f=void 0!==l&&l,v=e.maskAttributeFn,d=e.dataURLOptions,p=void 0===d?{}:d,m=e.inlineImages,y=e.recordCanvas,g=e.canvasMaskingConfigured,w=e.keepIframeSrcFn,b=e.newlyAddedElement,S=void 0!==b&&b,C=e.rootId,M=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(r)return t.matches(r)}catch(t){}return!1}(t,e.blockClass,e.blockSelector),x=function(t){if(t instanceof HTMLFormElement)return"form";var e=Ct(t.tagName);return Ht.test(e)?"div":e}(t),A=new Set,E={},R=t.attributes.length,I=0;R>I;I++){var T=t.attributes[I];Kt(x,T.name)||(E[T.name]=Xt(s,x,Ct(T.name),T.value,t,p))}if("link"===x&&o&&!M){var O=t.sheet;if(!O){var D=function(t){return t.href}(t);D&&!(O=ie(s,D))&&D.includes(".css")&&(O=ie(s,window.location.origin+"/"+D.replace(window.location.href,"")))}var N=null;O&&(Q(O)?_>0&&(P.push(t),j+=1):N=ct(O)),N&&(delete E.rel,delete E.href,E._cssText=N)}if("style"===x&&t.sheet&&!(t.innerText||k.textContent(t)||"").trim().length){var L=X((()=>ct(t.sheet)));L&&(E._cssText=L)}if("input"===x||"textarea"===x||"select"===x){var F=t.value,B=t.checked;"radio"!==E.type&&"checkbox"!==E.type&&"submit"!==E.type&&"button"!==E.type&&F?E.value=kt({element:t,type:Et(t),tagName:x,value:F,maskInputOptions:h,maskInputFn:u}):B&&(E.checked=B)}if("option"===x&&(t.selected&&!h.select?E.selected=!0:delete E.selected),"dialog"===x&&t.open){try{E.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){E.rr_open_mode="modal",E.ph_rr_could_not_detect_modal=!0}A.add("rr_open_mode")}if("canvas"===x&&y&&!(null==g?void 0:g()))if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;t.width>r;r+=50)for(var i=0;t.height>i;i+=50){var n=e.getImageData;if(new Uint32Array((At in n?n[At]:n).call(e,r,i,Math.min(50,t.width-r),Math.min(50,t.height-i)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(E.rr_dataURL=t.toDataURL(p.type,p.quality));else if(!("__context"in t)){var U=t.toDataURL(p.type,p.quality),W=s.createElement("canvas");W.width=t.width,W.height=t.height,U!==W.toDataURL(p.type,p.quality)&&(E.rr_dataURL=U)}var H,G,z=!1;if("img"===x&&m){Nt||(Nt=s.createElement("canvas"),Lt=Nt.getContext("2d"));var V=t,Y=V.currentSrc||V.getAttribute("src")||"<unknown-src>",q=V.crossOrigin,Z=(e,r)=>z?xt({element:t,name:e,value:r,maskAllElementAttributes:f,maskAttributeFn:v}):r,J=()=>{ee(V,"load",J);try{Nt.width=V.naturalWidth,Nt.height=V.naturalHeight,Lt.drawImage(V,0,0);var t=Nt.toDataURL(p.type,p.quality);E.rr_dataURL=Z("rr_dataURL",t)}catch(t){if("anonymous"!==V.crossOrigin)return V.crossOrigin="anonymous",void(V.complete&&0!==V.naturalWidth?J():V.addEventListener("load",J));console.warn("Cannot inline img src="+Y+"! Error: "+t)}"anonymous"===V.crossOrigin&&(q?E.crossOrigin=Z("crossOrigin",q):V.removeAttribute("crossorigin"))};V.complete&&0!==V.naturalWidth?J():V.addEventListener("load",J)}if("audio"===x||"video"===x){var K=E;K.rr_mediaState=t.paused?"paused":"played",A.add("rr_mediaState"),K.rr_mediaCurrentTime=t.currentTime,K.rr_mediaPlaybackRate=t.playbackRate,K.rr_mediaMuted=t.muted,K.rr_mediaLoop=t.loop,K.rr_mediaVolume=t.volume}if(S||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop)),M){var tt=t.getBoundingClientRect(),et=tt.width,rt=tt.height,it=tt.left,nt=tt.top,st=null==(r=s.defaultView)?void 0:r.getComputedStyle(t);E={class:E.class,rr_width:et+"px",rr_height:rt+"px",rr_left:Math.floor(it+((null==(i=s.defaultView)?void 0:i.scrollX)||0))+"px",rr_top:Math.floor(nt+((null==(n=s.defaultView)?void 0:n.scrollY)||0))+"px"},A.add("rr_width"),A.add("rr_height"),A.add("rr_left"),A.add("rr_top"),st&&(E.rr_position=st.position||"static",A.add("rr_position"),st.transform&&"none"!==st.transform&&(E.rr_transform=st.transform,A.add("rr_transform")),st.display&&st.display.startsWith("inline")&&(E.rr_display=st.display,A.add("rr_display")))}if("iframe"!==x||w(E.src)||(t.contentDocument||(E.rr_src=E.src),delete E.src),f||v)for(var ot of Object.entries(E)){var at=ot[0],ht=ot[1];"string"!=typeof ht&&null!==ht||(E[at]=xt({element:t,name:at,value:ht,maskAllElementAttributes:f,maskAttributeFn:v,isGenerated:A.has(at)}))}z=!0;try{customElements.get(x)&&(H=!0)}catch(t){}return{type:c.Element,tagName:x,attributes:E,childNodes:[],isSVG:(G=t,Boolean("svg"===G.tagName||G.ownerSVGElement)||void 0),needBlock:M,rootId:C,isCustom:H}}(t,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:h,maskInputFn:l,maskAllElementAttributes:v,maskAttributeFn:d,dataURLOptions:m,inlineImages:y,recordCanvas:g,canvasMaskingConfigured:w,keepIframeSrcFn:b,newlyAddedElement:C,rootId:M});case t.TEXT_NODE:return function(t,e){var r,i=e.needsMask,n=e.maskTextFn,s=e.rootId,o=k.parentNode(t),a=o&&o.tagName,h=k.textContent(t),u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(u&&h){try{if(t.nextSibling||t.previousSibling);else if(Q(o.sheet));else if(null==(r=o.sheet)?void 0:r.cssRules){var f=ct(o.sheet);f&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(f)&&(h=f)}}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}h=Dt(h,Zt(e.doc))}return l&&(h="SCRIPT_PLACEHOLDER"),!u&&!l&&h&&i&&(h=n?n(h,k.parentElement(t)):h.replace(/[\S]/g,"*")),{type:c.Text,textContent:h||"",isStyle:u,rootId:s}}(t,{doc:r,needsMask:s,maskTextFn:u,rootId:M});case t.CDATA_SECTION_NODE:return{type:c.CDATA,textContent:"",rootId:M};case t.COMMENT_NODE:return{type:c.Comment,textContent:k.textContent(t)||"",rootId:M};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,keepIframeSrcFn:H,newlyAddedElement:z});if(!rt)return console.warn(t,"not serialized"),null;et=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===c.Comment)return!0;if(t.type===c.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Rt(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(ne(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ne(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(ne(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&ne(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(ne(t.attributes.property).match(/^(og|twitter|fb):/)||ne(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===ne(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(ne(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(ne(t.attributes.name))||ne(t.attributes.property).match(/^article:/)||ne(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(ne(t.attributes.name)))return!0}}return!1}(rt,b)&&(tt||rt.type!==c.Text||rt.isStyle||rt.textContent.replace(/^\s+|\s+$/gm,"").length)?zt():Gt;var it=Object.assign(rt,{id:et});if(i.add(t,it),et===Gt)return null;I&&I(t);var nt=!u;if(it.type===c.Element){nt=nt&&!it.needBlock,delete it.needBlock;var at=k.shadowRoot(t);at&&ht(at)&&(it.isShadowHost=!0)}if((it.type===c.Document||it.type===c.Element)&&nt){b.headWhitespace&&it.type===c.Element&&"head"===it.tagName&&(tt=!1);var ut={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:u,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y+1,maxDepth:Z};if(it.type===c.Element&&"textarea"===it.tagName&&void 0!==it.attributes.value);else for(var lt of Array.from(k.childNodes(t))){var ft=le(lt,ut);ft&&it.childNodes.push(ft)}var vt=null;if(st(t)&&(vt=k.shadowRoot(t)))for(var dt of Array.from(k.childNodes(vt))){var pt=le(dt,ut);pt&&(ht(vt)&&(pt.isShadow=!0),it.childNodes.push(pt))}}var mt=k.parentNode(t);if(mt&&ot(mt)&&ht(mt)&&(it.isShadow=!0),it.type===c.Element&&"iframe"===it.tagName){var yt=function(t,e,r){var i,n=()=>{},s=t.contentWindow;if(!s)return n;try{i=s.document.readyState}catch(t){return n}var o=()=>e();if("complete"!==i){var a=!1,h=null,u=()=>{a||(a=!0,null!==h&&(clearTimeout(h),h=null),ee(t,"load",l),t.addEventListener("load",o),e())},l=()=>u();return h=setTimeout(u,r),t.addEventListener("load",l),()=>{null!==h&&(clearTimeout(h),h=null),a?ee(t,"load",o):(a=!0,ee(t,"load",l))}}var f,c="about:blank";try{f=s.location.href}catch(t){return n}if(f!==c||t.src===c||""===t.src){var v=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(v),ee(t,"load",o)}}return t.addEventListener("load",o),()=>{ee(t,"load",o)}}(t,(()=>{var e=t.contentDocument;if(e&&T){var r=le(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y+1,maxDepth:Z});r&&T(t,r)}}),D);null==N||N(t,yt)}return it.type===c.Element&&"link"===it.tagName&&"stylesheet"===it.attributes.rel&&function(e,h,u){if(!re.has(e)){var l;try{l=e.sheet}catch(t){return}if(!l){var c=new AbortController,v=!1,y=()=>{if(!v){v=!0;try{(()=>{if(F){var e=le(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y,maxDepth:Z});e&&F(t,e)}})()}finally{re.delete(e),c.abort()}}},S=setTimeout(y,u);c.signal.addEventListener("abort",(()=>clearTimeout(S)),{once:!0}),e.addEventListener("load",y,{signal:c.signal,once:!0}),re.set(e,c)}}}(t,0,U),it}function fe(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:!1===t?{}:t}var ce=new RegExp(/(max|min)-device-(width|height)/.source,"g"),ve={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(ce)&&(t.params=t.params.replace(ce,"$1-$2"))}}}},de={postcssPlugin:"postcss-hover-classes",prepare(){var t=[];return{Rule(e){-1===t.indexOf(e)&&(t.push(e),e.selectors.forEach((function(t){if(t.includes(":hover")){var r=t.replace(new RegExp("(?<!\\\\):hover","g"),".\\:hover");r!==t&&(e.selector+=",\n"+r)}})))}}}};function pe(t){return t&&t.__esModule&&{}.hasOwnProperty.call(t,"default")?t.default:t}function me(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var ye,ge={exports:{}};function we(){if(ye)return ge.exports;ye=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return ge.exports=e(),ge.exports.createColors=e,ge.exports}var be,Se,ke,Ce,Me,xe,Ae=me(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Ee(){if(Se)return be;Se=1;var t=we(),e=Ae;class r extends Error{constructor(t,e,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!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var a=t.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),e&&(o=t=>e(t))}var f=i.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return be=r,r.default=r,be}function Re(){if(Ce)return ke;Ce=1;var t=/(<)(\/?style\b)/gi,e=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function i(r){return"string"!=typeof r?r:r.includes("<")?r.replace(t,"\\3c $2").replace(e,"\\3c $2"):r}var n={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(t,e){var i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=n?" ":"":""===s&&n&&!r.test(n[0])&&(s=" "),i+s+n}function o(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function a(t,e,r,n){var s=t.raw(r,"between","beforeOpen");t.builder(i(n+s)+"{",r,"start");var a=r.nodes&&r.nodes.length,h=()=>{var e=a?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(i(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(i(r.raws.ownSemicolon),r,"end")};a?(e.push(h),o(t,e,r)):h()}class h{constructor(t){this.builder=t}atrule(t,e){var r=s(this,t);t.nodes?this.block(t,r):this.builder(i(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,n=this.raw(t,"between","beforeOpen");this.builder(i(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(i(r)),this.builder("}",t,"end")}body(t){var e=h.prototype,r=["atrule","block","body","rule","stringify"].every((t=>this[t]===e[t])),n=[];for(o(this,n,t);n.length>0;){var u=n.pop();if("function"!=typeof u){var l=u.node,f=this.raw(l,"before");f&&this.builder(u.document?f:i(f)),r&&"rule"===l.type?a(this,n,l,this.rawValue(l,"selector")):r&&"atrule"===l.type&&l.nodes?a(this,n,l,s(this,l)):this.stringify(l,u.semicolon)}else u()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(i("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=r.important||" !important"),e&&(s+=";"),this.builder(i(s),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var s=t.parent;if("before"===r){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return n[r];var o=t.root(),a=o.rawCache||(o.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](o,t):o.walk((t=>{if(void 0!==(i=t.raws[e]))return!1})),void 0===i&&(i=n[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:i(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(i(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return ke=h,h.default=h,ke}function Ie(){if(xe)return Me;xe=1;var t=Re();function e(e,r){new t(r).stringify(e)}return Me=e,e.default=e,Me}var Te,Oe,_e,De,Ne,Le,Fe,Be,Pe,je,Ue,We,He,Ge,ze,Ve,$e,Ye,qe,Ze,Je,Xe,Ke,Qe,tr,er,rr,ir,nr,sr,or,ar,hr,ur,lr,fr,cr,vr,dr,pr,mr,yr,gr,wr,br,Sr,kr,Cr,Mr,xr,Ar,Er,Rr,Ir={};function Tr(){return Te||(Te=1,Ir.isClean=Symbol("isClean"),Ir.my=Symbol("my")),Ir}function Or(){if(_e)return Oe;_e=1;var t=Ee(),e=Re(),r=Ie(),i=Tr(),n=i.isClean,s=i.my;function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[n]=!1,this[s]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=function(t,e){for(var r=new t.constructor,i=[[t,r,void 0]];i.length>0;){var n=i.pop(),s=n[0],o=n[1],a=n[2];for(var h in s)if({}.hasOwnProperty.call(s,h)&&"proxyCache"!==h){var u=s[h],l=typeof u;if("parent"===h&&"object"===l)a&&(o[h]=a);else if("source"===h)o[h]=u;else if(Array.isArray(u)){var f=[];for(var c of(o[h]=f,u)){var v=new c.constructor;f.push(v),i.push([c,v,o])}}else{if("object"===l&&null!==u){var d=new u.constructor;i.push([u,d,void 0]),u=d}o[h]=u}}}return r}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var i=this.rangeBy(r),n=i.end,s=i.start;return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;for(var t=this;t=t.parent;)t[n]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r=null==e;e=e||new Map;for(var i=[],n=[[this,i,0]],s=0;n.length>s;s++){var o=n[s],h=o[0],u=o[1],l=o[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===a.prototype.toJSON?n.push([m,d,p]):d[p]=m.toJSON(null,e):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===a.prototype.toJSON?n.push([v,f,c]):f[c]=v.toJSON(null,e);else if("source"===c){if(null==v)continue;var y=e.get(v.input);null==y&&e.set(v.input,y=e.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=i[0];return r&&(g.inputs=[...e.keys()].map((t=>t.toJSON()))),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Oe=a,a.default=a,Oe}function _r(){if(Ne)return De;Ne=1;var t=Or();class e extends t{constructor(t){super(t),this.type="comment"}}return De=e,e.default=e,De}function Dr(){if(Fe)return Le;Fe=1;var t=Or();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return Le=e,e.default=e,Le}function Nr(){if(Pe)return Be;Pe=1;var t,e,r,i,n=_r(),s=Dr(),o=Or(),a=Tr(),h=a.isClean,u=a.my;class l extends o{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){for(var e=[this];e.length>0;){var r=e.pop();if(r===this||r.cleanRaws===l.prototype.cleanRaws){if(o.prototype.cleanRaws.call(r,t),r.nodes)for(var i of r.nodes)e.push(i)}else r.cleanRaws(t)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var a of r=r.slice(0))a.parent&&a.parent.removeChild(a,"ignore");else if("root"===r.type&&"document"!==this.type)for(var f of r=r.nodes.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var c=r.map((t=>(t[u]||l.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[h]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[h]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return c}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.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(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return l.registerParse=t=>{e=t},l.registerRule=t=>{i=t},l.registerAtRule=e=>{t=e},l.registerRoot=t=>{r=t},Be=l,l.default=l,l.rebuild=e=>{for(var o=[e];o.length>0;){var a=o.pop();if("atrule"===a.type?Object.setPrototypeOf(a,t.prototype):"rule"===a.type?Object.setPrototypeOf(a,i.prototype):"decl"===a.type?Object.setPrototypeOf(a,s.prototype):"comment"===a.type?Object.setPrototypeOf(a,n.prototype):"root"===a.type&&Object.setPrototypeOf(a,r.prototype),a[u]=!0,a.nodes)for(var h of a.nodes)o.push(h)}},Be}function Lr(){if(Ue)return je;Ue=1;var t=Nr();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return je=e,e.default=e,t.registerAtRule(e),je}function Fr(){if(He)return We;He=1;var t,e,i=Nr();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},We=n,n.default=n,We}function Br(){return ze?Ge:(ze=1,Ge={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})})}function Pr(){if($e)return Ve;$e=1;var t=Ae.existsSync,e=Ae.readFileSync,r=Ae.dirname,i=Ae.isAbsolute,n=Ae.join,s=Ae.relative,o=Ae.sep,a=Ae.SourceMapConsumer,h=Ae.SourceMapGenerator;class u{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new a(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(n,a,h){if(!h&&!this.unsafeMap){if(!/\.map$/i.test(n))return;if(!a)return;var u=s(r(a),n);if(".."===u||u.startsWith(".."+o)||i(u))return}if(this.root=r(n),t(n))return this.mapFile=n,e(n,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof a)return h.fromSourceMap(e).toString();if(e instanceof h)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var s=this.loadFile(i,t,!0);if(!s)throw new Error("Unable to load previous source map: "+i.toString());return s}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var o=this.annotation;t&&(o=n(r(t),o));var u=this.loadFile(o,t,!1);if(u)try{this.json=JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return u}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return Ve=u,u.default=u,Ve}function jr(){if(qe)return Ye;qe=1;var t=Br().nanoid,e=Ae.isAbsolute,i=Ae.resolve,n=Ae.SourceMapConsumer,s=Ae.SourceMapGenerator,o=Ae.fileURLToPath,a=Ae.pathToFileURL,h=Ee(),u=Pr(),l=Ae,f=Symbol("lineToIndexCache"),c=Boolean(n&&s),v=Boolean(i&&e);function d(t){if(t[f])return t[f];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[f]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!v||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),v&&c){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var f=e,c=r;if("number"==typeof f.offset){var v=this.fromOffset(u=f.offset);e=v.line,r=v.col}else u=this.fromLineAndColumn(e=f.line,r=f.column);if("number"==typeof c.offset){var d=this.fromOffset(o=c.offset);s=d.line,n=d.col}else s=c.line,n=c.column,o=this.fromLineAndColumn(c.line,c.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return d(this)[t-1]+e-1}fromOffset(t){var e=d(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r-1,line:t});if(!l.source)return!1;if("number"==typeof i){var f=u.originalPositionFor({column:n-1,line:i});f.source&&(s=f)}h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var v=u.sourceContentFor(l.source);return v&&(c.source=v),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return Ye=p,p.default=p,l&&l.registerInput&&l.registerInput(p),Ye}function Ur(){if(Je)return Ze;Je=1;var t,e,r=Nr();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},Ze=i,i.default=i,r.registerRoot(i),Ze}function Wr(){if(Ke)return Xe;Ke=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return Xe=t,t.default=t,Xe}function Hr(){if(tr)return Qe;tr=1;var t=Nr(),e=Wr();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return Qe=r,r.default=r,t.registerRule(r),Qe}function Gr(){if(nr)return ir;nr=1;var t=Ae.dirname,e=Ae.relative,r=Ae.resolve,i=Ae.sep,n=Ae.SourceMapConsumer,s=Ae.SourceMapGenerator,o=Ae.pathToFileURL,a=jr(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return ir=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,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 t;t=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 e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.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((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function zr(){if(or)return sr;or=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),f="(".charCodeAt(0),c=")".charCodeAt(0),v="{".charCodeAt(0),d="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return sr=function(C,M){void 0===M&&(M={});var x,A,E,R,I,T,O,_,D,N,L=C.css.valueOf(),F=M.ignoreErrors,B=L.length,P=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=B,nextToken(C){if(U.length)return U.pop();if(B>P){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(P)){case n:case s:case a:case h:case o:R=P;do{x=L.charCodeAt(R+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(P,R)],P=R-1;break;case u:case l:case v:case d:case y:case p:case c:var G=String.fromCharCode(x);T=[G,G,P];break;case f:if(N=j.length?j.pop()[1]:"",D=L.charCodeAt(P+1),"url"===N&&D!==t&&D!==e&&D!==s&&D!==n&&D!==a&&D!==o&&D!==h){R=P;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||M){R=P;break}H("bracket")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["brackets",L.slice(P,R+1),P,R],P=R}else P>W?(R=L.indexOf(")",P+1),A=L.slice(P,R+1),-1===R||S.test(A)?(W=-1===R?B:R,T=["(","(",P]):(T=["brackets",A,P,R],P=R)):T=["(","(",P];break;case t:case e:I=x===t?"'":'"',R=P;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||M){R=P+1;break}H("string")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["string",L.slice(P,R+1),P,R],P=R;break;case g:w.lastIndex=P+1,w.test(L),T=["at-word",L.slice(P,1+(R=0===w.lastIndex?L.length-1:w.lastIndex-2)),P,R],P=R;break;case r:for(R=P,E=!0;L.charCodeAt(R+1)===r;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(R+=1))){for(;k.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===s&&(R+=1)}T=["word",L.slice(P,R+1),P,R],P=R;break;default:x===i&&L.charCodeAt(P+1)===m?(0===(R=L.indexOf("*/",P+2)+1)&&(F||M?R=L.length:H("comment")),T=["comment",L.slice(P,R+1),P,R],P=R):(b.lastIndex=P+1,b.test(L),T=["word",L.slice(P,1+(R=0===b.lastIndex?L.length-1:b.lastIndex-2)),P,R],j.push(T),P=R)}return P++,T}},position:()=>P}}}function Vr(){if(hr)return ar;hr=1;var t=Lr(),e=_r(),r=Dr(),i=Ur(),n=Hr(),s=zr(),o={empty:!0,space:!0};function a(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}return ar=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(i.trim()){var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}else r.text="",r.raws.left=i,r.raws.right=""}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;i.raws.before+=a(t,0,s),i.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var h=t[s][0];if(":"===h||"space"===h||"comment"===h)break;s++}i.prop=a(t,o,s);for(var u,l=s;t.length>s&&(u=t[s],s++,":"!==u[0]);)"word"===u[0]&&/\w/.test(u[1])&&this.unknownWord([u]);i.raws.between=a(t,l,s),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(u=t[d])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(i.important=!0,i.raws.important=y,t=m)}if("space"!==u[0]&&"comment"!==u[0])break}var b=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));b&&(i.raws.between+=v.map((t=>t[1])).join(""),v=[]),this.raw(i,"value",v.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),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()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var f=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:f,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}function $r(){if(lr)return ur;lr=1;var t=Nr(),e=jr(),r=Vr();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return ur=i,i.default=i,t.registerParse(i),ur}function Yr(){if(cr)return fr;cr=1;var t=Nr(),e=Tr().my;class r{constructor(r,i){if(void 0===i&&(i={}),this.type="warning",this.text=r,i.node&&i.node.source){i.node[e]||t.rebuild(i.node);var n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in i)this[s]=i[s]}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}}return fr=r,r.default=r,fr}function qr(){if(dr)return vr;dr=1;var t=Yr();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return vr=e,e.default=e,vr}function Zr(){if(mr)return pr;mr=1;var t={};return pr=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Jr(){if(gr)return yr;gr=1;var t=Nr(),i=Fr(),n=Gr(),s=$r(),o=qr(),a=Ur(),h=Ie(),u=Tr(),l=u.isClean,f=u.my,c=Zr(),v={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=v[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,m,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,m,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",m,"DocumentExit"]:"root"===t.type?["Root",m,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function b(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var S={};class k{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"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof k||i instanceof o)a=b(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[f]&&t.rebuild(a)}else a=b(i);this.result=new o(e,a,n),this.helpers=r({},S,{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.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 t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!p[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(y(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[l];){i[l]=!0;for(var n=[w(i)];n.length>0;){var s=t.visitTick(n);if(y(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return y(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,(t=>{i+=t})),this.result.css=i,this.result}var s=new n(e,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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 t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(t,e)}toString(){return this.css}visitSync(t,e){for(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[l])return a[l]=!0,void t.push(w(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var f=u[e.eventIndex];if(e.eventIndex+=1,f===m)return void(r.nodes&&r.nodes.length&&(r[l]=!0,e.iterator=r.getIterator()));if(this.listeners[f])return void(e.visitors=this.listeners[f])}t.pop()}else t.pop()}walkSync(t){t[l]=!0;for(var e=[{eventIndex:0,events:g(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[l]){s[l]=!0,e.push({eventIndex:0,events:g(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,a===m)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}}return k.registerPostcss=t=>{S=t},yr=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),yr}function Xr(){if(Mr)return Cr;Mr=1;var t=Lr(),e=_r(),n=Nr(),o=Ee(),a=Dr(),h=Fr(),u=function(){if(rr)return er;rr=1;var t=Lr(),e=_r(),n=Dr(),o=jr(),a=Pr(),h=Ur(),u=Hr();function l(t,e){return t.inputs?t.inputs.map((t=>{var e=r({},t,{__proto__:o.prototype});return e.map&&(e.map=r({},e.map,{__proto__:a.prototype})),e})):e}function f(o,a,l){var f,c=r({},o);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId,p=i(v,s);c.source=p,null!=d&&(c.source.input=a[d])}if("root"===c.type)f=new h(c);else if("decl"===c.type)f=new n(c);else if("rule"===c.type)f=new u(c);else if("comment"===c.type)f=new e(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+o.type);f=new t(c)}if(l)for(var m of(f.nodes=l,l))m.parent=f;return f}function c(t,e){if(Array.isArray(t))return t.map((t=>c(t)));for(var r,i=[{childIndex:0,children:[],inputs:l(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:l(o,n.inputs),json:o})}else{i.pop();var a=f(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}return er=c,c.default=c,er}(),l=jr(),f=Jr(),c=Wr(),v=Or(),d=$r(),p=function(){if(kr)return Sr;kr=1;var t=Fr(),e=Jr(),r=function(){if(br)return wr;br=1;var t=Gr(),e=$r(),r=qr(),i=Ie(),n=Zr();class s{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 t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var o=i;this.result=new r(this._processor,void 0,this._opts),this.result.css=n;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new t(o,void 0,this._opts,n);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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(t,e)}toString(){return this._css}warnings(){return[]}}return wr=s,s.default=s,wr}(),i=Ur();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.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 e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return Sr=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),Sr}(),m=qr(),y=Ur(),g=Hr(),w=Ie(),b=Yr();function S(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return S.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new p).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return S([n(r)]).process(t,e)},n},S.stringify=w,S.parse=d,S.fromJSON=u,S.list=c,S.comment=t=>new e(t),S.atRule=e=>new t(e),S.decl=t=>new a(t),S.rule=t=>new g(t),S.root=t=>new y(t),S.document=t=>new h(t),S.CssSyntaxError=o,S.Declaration=a,S.Container=n,S.Processor=p,S.Document=h,S.Comment=e,S.Warning=b,S.AtRule=t,S.Result=m,S.Input=l,S.Rule=g,S.Root=y,S.Node=v,f.registerPostcss(S),Cr=S,S.default=S,Cr}var Kr=pe(function(){if(Rr)return Er;Rr=1;var t=Xr().Input,e=function(){if(Ar)return xr;Ar=1;var t=_r(),e=Vr(),r=zr();return xr=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();return Er=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}()),Qr=pe(Xr()),ti={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function ei(t,e){var r=null==e?void 0:e.stylesWithHoverClass.get(t);if(r)return r;var i=t;try{i=Qr([ve,de]).process(t,{parser:Kr}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,i),i}function ri(){return{stylesWithHoverClass:new Map}}var ii=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),ni=new Set,si=new Set;function oi(t,e){var r,i,n,s=e.doc,o=e.mirror,a=e.skipChild,h=void 0!==a&&a,u=e.hackCss,l=void 0===u||u,f=e.afterAppend,v=e.cache,d=null;if(o.has(t.id)){var p=o.getNode(t.id),m=o.getMeta(p);if(n=t,(i=m)&&n&&i.type===n.type&&(i.type===c.Document?i.compatMode===n.compatMode:i.type===c.DocumentType?i.name===n.name&&i.publicId===n.publicId&&i.systemId===n.systemId:i.type===c.Comment||i.type===c.Text||i.type===c.CDATA?i.textContent===n.textContent:i.type===c.Element&&i.tagName===n.tagName&&JSON.stringify(i.attributes)===JSON.stringify(n.attributes)&&i.isSVG===n.isSVG&&i.needBlock===n.needBlock))return o.getNode(t.id);d=p}var y=function(t,e){var r,i=e.doc,n=e.hackCss,s=e.cache;switch(t.type){case c.Document:return i.implementation.createDocument(null,"",null);case c.DocumentType:return i.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case c.Element:var o,a=function(t){var e=ti[t.tagName]?ti[t.tagName]:t.tagName;return"link"===e&&t.attributes._cssText&&(e="style"),e}(t);if(t.isSVG)o=i.createElementNS("http://www.w3.org/2000/svg",a);else{if(t.isCustom&&(null==(r=i.defaultView)?void 0:r.customElements)&&function(t){if("string"!=typeof t||0===t.length)return!1;if(ii.has(t))return!1;if(!t.includes("-"))return!1;var e=t.charCodeAt(0);return e>=97&&122>=e}(t.tagName)&&!i.defaultView.customElements.get(t.tagName))try{i.defaultView.customElements.define(t.tagName,class extends i.defaultView.HTMLElement{})}catch(e){ni.has(t.tagName)||(ni.add(t.tagName),console.warn("rrweb: failed to register custom element",t.tagName,e))}o=i.createElement(a)}var h={};for(var u in t.attributes)if({}.hasOwnProperty.call(t.attributes,u)){var l=t.attributes[u];if(("option"!==a||"selected"!==u||!1!==l)&&null!==l)if(!0===l&&(l=""),u.startsWith("rr_"))h[u]=l;else{var f="textarea"===a&&"value"===u,v="style"===a&&"_cssText"===u;if(v&&n&&"string"==typeof l&&(l=ei(l,s)),!f&&!v||"string"!=typeof l)try{if(t.isSVG&&"xlink:href"===u)o.setAttributeNS("http://www.w3.org/1999/xlink",u,l.toString());else if("onload"===u||"onclick"===u||"onmouse"===u.substring(0,7))o.setAttribute("_"+u,l.toString());else{if("meta"===a&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===u){o.setAttribute("csp-content",l.toString());continue}"link"===a&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===a&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Rt(t.attributes.href)||("img"===a&&t.attributes.srcset&&t.attributes.rr_dataURL?o.setAttribute("rrweb-original-srcset",t.attributes.srcset):o.setAttribute(u,l.toString()))}}catch(t){}else o.appendChild(i.createTextNode(l)),t.childNodes=[]}}var d=!("static"!==h.rr_position&&"relative"!==h.rr_position&&"sticky"!==h.rr_position||void 0!==h.rr_transform&&"none"!==h.rr_transform);if(d&&"string"==typeof h.rr_display){var p=h.rr_display;o.style.setProperty("display","inline"===p?"inline-block":p)}var m=function(){var e=h[y];if("canvas"===a&&"rr_dataURL"===y){var r=i.createElement("img");r.onload=()=>{var t=o.getContext("2d");t&&t.drawImage(r,0,0,r.width,r.height)},r.src=e.toString(),o.RRNodeType&&(o.rr_dataURL=e.toString())}else if("img"===a&&"rr_dataURL"===y){var n=o;n.currentSrc.startsWith("data:")||(n.setAttribute("rrweb-original-src",t.attributes.src),n.src=e.toString())}if("rr_width"===y)o.style.setProperty("width",e.toString());else if("rr_height"===y)o.style.setProperty("height",e.toString());else if("rr_left"===y)d||(o.style.setProperty("left",e.toString()),o.style.setProperty("position","absolute"));else if("rr_top"===y)d||(o.style.setProperty("top",e.toString()),o.style.setProperty("position","absolute"));else if("rr_mediaCurrentTime"===y&&"number"==typeof e)o.currentTime=e;else if("rr_mediaState"===y)switch(e){case"played":o.play().catch((t=>console.warn("media playback error",t)));break;case"paused":o.pause()}else"rr_mediaPlaybackRate"===y&&"number"==typeof e?o.playbackRate=e:"rr_mediaMuted"===y&&"boolean"==typeof e?o.muted=e:"rr_mediaLoop"===y&&"boolean"==typeof e?o.loop=e:"rr_mediaVolume"===y&&"number"==typeof e?o.volume=e:"rr_open_mode"===y&&o.setAttribute("rr_open_mode",e)};for(var y in h)m();if(t.isShadowHost)if(o.shadowRoot)for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);else at(o)||si.has(a)||(si.add(a),console.warn("rrweb: browser refused a shadow root on",a));return o;case c.Text:return function(t,e){var r=t.textContent;if(t.isStyle&&e.hackCss)try{r=ei(t.textContent,e.cache)}catch(t){}return e.doc.createTextNode(r)}(t,{cache:s,doc:i,hackCss:n});case c.CDATA:return""===t.textContent.trim()?null:i.createCDATASection(t.textContent);case c.Comment:return i.createComment(t.textContent);default:return null}}(t,{doc:s,hackCss:l,cache:v});if(!y)return null;if(null==(r=null==d?void 0:d.parentNode)||r.removeChild(d),t.rootId&&o.getNode(t.rootId)!==s&&o.replace(t.rootId,s),t.type===c.Document&&(s.close(),s.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==c.DocumentType&&s.write(t.childNodes[0].type===c.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">':'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'),y=s),o.add(y,t),(t.type===c.Document||t.type===c.Element)&&!h){var g=function(){if(w.isShadow&&t.isShadowHost&&st(y)&&!y.shadowRoot)return 0;var e=oi(w,{doc:s,mirror:o,skipChild:!1,hackCss:l,afterAppend:f,cache:v});if(!e)return console.warn("Failed to rebuild",w),0;if(w.isShadow&&st(y)&&y.shadowRoot)y.shadowRoot.appendChild(e);else if(t.type===c.Document&&w.type==c.Element){var r=e,i=null;r.childNodes.forEach((t=>{"BODY"===t.nodeName&&(i=t)})),i?(r.removeChild(i),y.appendChild(e),r.appendChild(i)):y.appendChild(e)}else if(t.type===c.Document&&w.type===c.DocumentType){var n=y.doctype;n&&y.removeChild(n),y.firstChild&&1===y.firstChild.nodeType?y.insertBefore(e,y.firstChild):y.appendChild(e)}else y.appendChild(e);f&&f(e,w.id)};for(var w of t.childNodes)g()}return y}var ai=Object.defineProperty,hi=(t,e,r)=>((t,e,r)=>e in t?ai(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),ui=Object.defineProperty,li=(t,e,r)=>((t,e,r)=>e in t?ui(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);function fi(t,e){return-1!==t.indexOf(e)}var ci={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},vi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},di={};function pi(t){if(di[t])return di[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in ci?ci[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in vi?vi[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return di[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(fi(h=navigator.userAgent,"AppleWebKit")&&!fi(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),di[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var mi={};function yi(t,e,r){var i,n=t+"."+String(r);if(mi[n])return mi[n].call(e);var s=pi(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(mi[n]=o,o.call(e)):e[r]}var gi={};function wi(t,e,r){var i=t+"."+String(r);if(gi[i])return gi[i].bind(e);var n=pi(t)[r];return"function"!=typeof n?e[r]:(gi[i]=n,n.bind(e))}var bi={childNodes:t=>yi("Node",t,"childNodes"),parentNode:t=>yi("Node",t,"parentNode"),parentElement:t=>yi("Node",t,"parentElement"),textContent:t=>yi("Node",t,"textContent"),contains:(t,e)=>wi("Node",t,"contains")(e),getRootNode:t=>wi("Node",t,"getRootNode")(),host:t=>t&&"host"in t?yi("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?yi("Element",t,"shadowRoot"):null,querySelector:(t,e)=>wi("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>wi("Element",t,"querySelectorAll")(e),mutationObserver:()=>pi("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}};function Si(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}var ki=class{constructor(){li(this,"idNodeMap",new Map),li(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),function(t){return t.nodeType===t.ELEMENT_NODE}(t)){var r=bi.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ci(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var Mi,xi={exports:{}};function Ai(){if(Mi)return xi.exports;Mi=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return xi.exports=e(),xi.exports.createColors=e,xi.exports}var Ei,Ri,Ii,Ti,Oi,_i,Di=Ci(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Ni(){if(Ri)return Ei;Ri=1;var t=Ai(),e=Di;class r extends Error{constructor(t,e,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!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var a=t.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),e&&(o=t=>e(t))}var f=i.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return Ei=r,r.default=r,Ei}function Li(){if(Ti)return Ii;Ti=1;var t=/(<)(\/?style\b)/gi,e=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function i(r){return"string"!=typeof r?r:r.includes("<")?r.replace(t,"\\3c $2").replace(e,"\\3c $2"):r}var n={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(t,e){var i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=n?" ":"":""===s&&n&&!r.test(n[0])&&(s=" "),i+s+n}function o(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function a(t,e,r,n){var s=t.raw(r,"between","beforeOpen");t.builder(i(n+s)+"{",r,"start");var a=r.nodes&&r.nodes.length,h=()=>{var e=a?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(i(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(i(r.raws.ownSemicolon),r,"end")};a?(e.push(h),o(t,e,r)):h()}class h{constructor(t){this.builder=t}atrule(t,e){var r=s(this,t);t.nodes?this.block(t,r):this.builder(i(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,n=this.raw(t,"between","beforeOpen");this.builder(i(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(i(r)),this.builder("}",t,"end")}body(t){var e=h.prototype,r=["atrule","block","body","rule","stringify"].every((t=>this[t]===e[t])),n=[];for(o(this,n,t);n.length>0;){var u=n.pop();if("function"!=typeof u){var l=u.node,f=this.raw(l,"before");f&&this.builder(u.document?f:i(f)),r&&"rule"===l.type?a(this,n,l,this.rawValue(l,"selector")):r&&"atrule"===l.type&&l.nodes?a(this,n,l,s(this,l)):this.stringify(l,u.semicolon)}else u()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(i("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=r.important||" !important"),e&&(s+=";"),this.builder(i(s),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var s=t.parent;if("before"===r){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return n[r];var o=t.root(),a=o.rawCache||(o.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](o,t):o.walk((t=>{if(void 0!==(i=t.raws[e]))return!1})),void 0===i&&(i=n[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:i(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(i(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return Ii=h,h.default=h,Ii}function Fi(){if(_i)return Oi;_i=1;var t=Li();function e(e,r){new t(r).stringify(e)}return Oi=e,e.default=e,Oi}var Bi,Pi,ji,Ui,Wi,Hi,Gi,zi,Vi,$i,Yi,qi,Zi,Ji,Xi,Ki,Qi,tn,en,rn,nn,sn,on,an,hn,un,ln,fn,cn,vn,dn,pn,mn,yn,gn,wn,bn,Sn,kn,Cn,Mn,xn,An,En,Rn,In,Tn,On,_n,Dn,Nn,Ln,Fn,Bn={};function Pn(){return Bi||(Bi=1,Bn.isClean=Symbol("isClean"),Bn.my=Symbol("my")),Bn}function jn(){if(ji)return Pi;ji=1;var t=Ni(),e=Li(),r=Fi(),i=Pn(),n=i.isClean,s=i.my;function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[n]=!1,this[s]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=function(t,e){for(var r=new t.constructor,i=[[t,r,void 0]];i.length>0;){var n=i.pop(),s=n[0],o=n[1],a=n[2];for(var h in s)if({}.hasOwnProperty.call(s,h)&&"proxyCache"!==h){var u=s[h],l=typeof u;if("parent"===h&&"object"===l)a&&(o[h]=a);else if("source"===h)o[h]=u;else if(Array.isArray(u)){var f=[];for(var c of(o[h]=f,u)){var v=new c.constructor;f.push(v),i.push([c,v,o])}}else{if("object"===l&&null!==u){var d=new u.constructor;i.push([u,d,void 0]),u=d}o[h]=u}}}return r}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var i=this.rangeBy(r),n=i.end,s=i.start;return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;for(var t=this;t=t.parent;)t[n]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r=null==e;e=e||new Map;for(var i=[],n=[[this,i,0]],s=0;n.length>s;s++){var o=n[s],h=o[0],u=o[1],l=o[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===a.prototype.toJSON?n.push([m,d,p]):d[p]=m.toJSON(null,e):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===a.prototype.toJSON?n.push([v,f,c]):f[c]=v.toJSON(null,e);else if("source"===c){if(null==v)continue;var y=e.get(v.input);null==y&&e.set(v.input,y=e.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=i[0];return r&&(g.inputs=[...e.keys()].map((t=>t.toJSON()))),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Pi=a,a.default=a,Pi}function Un(){if(Wi)return Ui;Wi=1;var t=jn();class e extends t{constructor(t){super(t),this.type="comment"}}return Ui=e,e.default=e,Ui}function Wn(){if(Gi)return Hi;Gi=1;var t=jn();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return Hi=e,e.default=e,Hi}function Hn(){if(Vi)return zi;Vi=1;var t,e,r,i,n=Un(),s=Wn(),o=jn(),a=Pn(),h=a.isClean,u=a.my;class l extends o{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){for(var e=[this];e.length>0;){var r=e.pop();if(r===this||r.cleanRaws===l.prototype.cleanRaws){if(o.prototype.cleanRaws.call(r,t),r.nodes)for(var i of r.nodes)e.push(i)}else r.cleanRaws(t)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var a of r=r.slice(0))a.parent&&a.parent.removeChild(a,"ignore");else if("root"===r.type&&"document"!==this.type)for(var f of r=r.nodes.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var c=r.map((t=>(t[u]||l.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[h]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[h]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return c}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.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(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return l.registerParse=t=>{e=t},l.registerRule=t=>{i=t},l.registerAtRule=e=>{t=e},l.registerRoot=t=>{r=t},zi=l,l.default=l,l.rebuild=e=>{for(var o=[e];o.length>0;){var a=o.pop();if("atrule"===a.type?Object.setPrototypeOf(a,t.prototype):"rule"===a.type?Object.setPrototypeOf(a,i.prototype):"decl"===a.type?Object.setPrototypeOf(a,s.prototype):"comment"===a.type?Object.setPrototypeOf(a,n.prototype):"root"===a.type&&Object.setPrototypeOf(a,r.prototype),a[u]=!0,a.nodes)for(var h of a.nodes)o.push(h)}},zi}function Gn(){if(Yi)return $i;Yi=1;var t=Hn();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return $i=e,e.default=e,t.registerAtRule(e),$i}function zn(){if(Zi)return qi;Zi=1;var t,e,i=Hn();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},qi=n,n.default=n,qi}function Vn(){return Xi?Ji:(Xi=1,Ji={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})})}function $n(){if(Qi)return Ki;Qi=1;var t=Di.existsSync,e=Di.readFileSync,r=Di.dirname,i=Di.isAbsolute,n=Di.join,s=Di.relative,o=Di.sep,a=Di.SourceMapConsumer,h=Di.SourceMapGenerator;class u{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new a(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(n,a,h){if(!h&&!this.unsafeMap){if(!/\.map$/i.test(n))return;if(!a)return;var u=s(r(a),n);if(".."===u||u.startsWith(".."+o)||i(u))return}if(this.root=r(n),t(n))return this.mapFile=n,e(n,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof a)return h.fromSourceMap(e).toString();if(e instanceof h)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var s=this.loadFile(i,t,!0);if(!s)throw new Error("Unable to load previous source map: "+i.toString());return s}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var o=this.annotation;t&&(o=n(r(t),o));var u=this.loadFile(o,t,!1);if(u)try{this.json=JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return u}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return Ki=u,u.default=u,Ki}function Yn(){if(en)return tn;en=1;var t=Vn().nanoid,e=Di.isAbsolute,i=Di.resolve,n=Di.SourceMapConsumer,s=Di.SourceMapGenerator,o=Di.fileURLToPath,a=Di.pathToFileURL,h=Ni(),u=$n(),l=Di,f=Symbol("lineToIndexCache"),c=Boolean(n&&s),v=Boolean(i&&e);function d(t){if(t[f])return t[f];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[f]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!v||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),v&&c){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var f=e,c=r;if("number"==typeof f.offset){var v=this.fromOffset(u=f.offset);e=v.line,r=v.col}else u=this.fromLineAndColumn(e=f.line,r=f.column);if("number"==typeof c.offset){var d=this.fromOffset(o=c.offset);s=d.line,n=d.col}else s=c.line,n=c.column,o=this.fromLineAndColumn(c.line,c.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return d(this)[t-1]+e-1}fromOffset(t){var e=d(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r-1,line:t});if(!l.source)return!1;if("number"==typeof i){var f=u.originalPositionFor({column:n-1,line:i});f.source&&(s=f)}h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var v=u.sourceContentFor(l.source);return v&&(c.source=v),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return tn=p,p.default=p,l&&l.registerInput&&l.registerInput(p),tn}function qn(){if(nn)return rn;nn=1;var t,e,r=Hn();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},rn=i,i.default=i,r.registerRoot(i),rn}function Zn(){if(on)return sn;on=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return sn=t,t.default=t,sn}function Jn(){if(hn)return an;hn=1;var t=Hn(),e=Zn();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return an=r,r.default=r,t.registerRule(r),an}function Xn(){if(cn)return fn;cn=1;var t=Di.dirname,e=Di.relative,r=Di.resolve,i=Di.sep,n=Di.SourceMapConsumer,s=Di.SourceMapGenerator,o=Di.pathToFileURL,a=Yn(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return fn=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,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 t;t=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 e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.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((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function Kn(){if(dn)return vn;dn=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),f="(".charCodeAt(0),c=")".charCodeAt(0),v="{".charCodeAt(0),d="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return vn=function(C,M){void 0===M&&(M={});var x,A,E,R,I,T,O,_,D,N,L=C.css.valueOf(),F=M.ignoreErrors,B=L.length,P=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=B,nextToken(C){if(U.length)return U.pop();if(B>P){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(P)){case n:case s:case a:case h:case o:R=P;do{x=L.charCodeAt(R+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(P,R)],P=R-1;break;case u:case l:case v:case d:case y:case p:case c:var G=String.fromCharCode(x);T=[G,G,P];break;case f:if(N=j.length?j.pop()[1]:"",D=L.charCodeAt(P+1),"url"===N&&D!==t&&D!==e&&D!==s&&D!==n&&D!==a&&D!==o&&D!==h){R=P;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||M){R=P;break}H("bracket")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["brackets",L.slice(P,R+1),P,R],P=R}else P>W?(R=L.indexOf(")",P+1),A=L.slice(P,R+1),-1===R||S.test(A)?(W=-1===R?B:R,T=["(","(",P]):(T=["brackets",A,P,R],P=R)):T=["(","(",P];break;case t:case e:I=x===t?"'":'"',R=P;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||M){R=P+1;break}H("string")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["string",L.slice(P,R+1),P,R],P=R;break;case g:w.lastIndex=P+1,w.test(L),T=["at-word",L.slice(P,1+(R=0===w.lastIndex?L.length-1:w.lastIndex-2)),P,R],P=R;break;case r:for(R=P,E=!0;L.charCodeAt(R+1)===r;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(R+=1))){for(;k.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===s&&(R+=1)}T=["word",L.slice(P,R+1),P,R],P=R;break;default:x===i&&L.charCodeAt(P+1)===m?(0===(R=L.indexOf("*/",P+2)+1)&&(F||M?R=L.length:H("comment")),T=["comment",L.slice(P,R+1),P,R],P=R):(b.lastIndex=P+1,b.test(L),T=["word",L.slice(P,1+(R=0===b.lastIndex?L.length-1:b.lastIndex-2)),P,R],j.push(T),P=R)}return P++,T}},position:()=>P}}}function Qn(){if(mn)return pn;mn=1;var t=Gn(),e=Un(),r=Wn(),i=qn(),n=Jn(),s=Kn(),o={empty:!0,space:!0};function a(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}return pn=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(i.trim()){var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}else r.text="",r.raws.left=i,r.raws.right=""}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;i.raws.before+=a(t,0,s),i.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var h=t[s][0];if(":"===h||"space"===h||"comment"===h)break;s++}i.prop=a(t,o,s);for(var u,l=s;t.length>s&&(u=t[s],s++,":"!==u[0]);)"word"===u[0]&&/\w/.test(u[1])&&this.unknownWord([u]);i.raws.between=a(t,l,s),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(u=t[d])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(i.important=!0,i.raws.important=y,t=m)}if("space"!==u[0]&&"comment"!==u[0])break}var b=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));b&&(i.raws.between+=v.map((t=>t[1])).join(""),v=[]),this.raw(i,"value",v.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),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()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var f=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:f,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}function ts(){if(gn)return yn;gn=1;var t=Hn(),e=Yn(),r=Qn();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return yn=i,i.default=i,t.registerParse(i),yn}function es(){if(bn)return wn;bn=1;var t=Hn(),e=Pn().my;class r{constructor(r,i){if(void 0===i&&(i={}),this.type="warning",this.text=r,i.node&&i.node.source){i.node[e]||t.rebuild(i.node);var n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in i)this[s]=i[s]}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}}return wn=r,r.default=r,wn}function rs(){if(kn)return Sn;kn=1;var t=es();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return Sn=e,e.default=e,Sn}function is(){if(Mn)return Cn;Mn=1;var t={};return Cn=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function ns(){if(An)return xn;An=1;var t=Hn(),i=zn(),n=Xn(),s=ts(),o=rs(),a=qn(),h=Fi(),u=Pn(),l=u.isClean,f=u.my,c=is(),v={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=v[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,m,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,m,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",m,"DocumentExit"]:"root"===t.type?["Root",m,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function b(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var S={};class k{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"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof k||i instanceof o)a=b(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[f]&&t.rebuild(a)}else a=b(i);this.result=new o(e,a,n),this.helpers=r({},S,{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.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 t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!p[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(y(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[l];){i[l]=!0;for(var n=[w(i)];n.length>0;){var s=t.visitTick(n);if(y(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return y(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,(t=>{i+=t})),this.result.css=i,this.result}var s=new n(e,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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 t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(t,e)}toString(){return this.css}visitSync(t,e){for(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[l])return a[l]=!0,void t.push(w(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var f=u[e.eventIndex];if(e.eventIndex+=1,f===m)return void(r.nodes&&r.nodes.length&&(r[l]=!0,e.iterator=r.getIterator()));if(this.listeners[f])return void(e.visitors=this.listeners[f])}t.pop()}else t.pop()}walkSync(t){t[l]=!0;for(var e=[{eventIndex:0,events:g(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[l]){s[l]=!0,e.push({eventIndex:0,events:g(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,a===m)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}}return k.registerPostcss=t=>{S=t},xn=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),xn}function ss(){if(_n)return On;_n=1;var t=Gn(),e=Un(),n=Hn(),s=Ni(),a=Wn(),h=zn(),u=function(){if(ln)return un;ln=1;var t=Gn(),e=Un(),n=Wn(),s=Yn(),a=$n(),h=qn(),u=Jn();function l(t,e){return t.inputs?t.inputs.map((t=>{var e=r({},t,{__proto__:s.prototype});return e.map&&(e.map=r({},e.map,{__proto__:a.prototype})),e})):e}function f(s,a,l){var f,c=r({},s);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId,p=i(v,o);c.source=p,null!=d&&(c.source.input=a[d])}if("root"===c.type)f=new h(c);else if("decl"===c.type)f=new n(c);else if("rule"===c.type)f=new u(c);else if("comment"===c.type)f=new e(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+s.type);f=new t(c)}if(l)for(var m of(f.nodes=l,l))m.parent=f;return f}function c(t,e){if(Array.isArray(t))return t.map((t=>c(t)));for(var r,i=[{childIndex:0,children:[],inputs:l(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:l(o,n.inputs),json:o})}else{i.pop();var a=f(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}return un=c,c.default=c,un}(),l=Yn(),f=ns(),c=Zn(),v=jn(),d=ts(),p=function(){if(Tn)return In;Tn=1;var t=zn(),e=ns(),r=function(){if(Rn)return En;Rn=1;var t=Xn(),e=ts(),r=rs(),i=Fi(),n=is();class s{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 t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var o=i;this.result=new r(this._processor,void 0,this._opts),this.result.css=n;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new t(o,void 0,this._opts,n);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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(t,e)}toString(){return this._css}warnings(){return[]}}return En=s,s.default=s,En}(),i=qn();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.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 e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return In=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),In}(),m=rs(),y=qn(),g=Jn(),w=Fi(),b=es();function S(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return S.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new p).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return S([n(r)]).process(t,e)},n},S.stringify=w,S.parse=d,S.fromJSON=u,S.list=c,S.comment=t=>new e(t),S.atRule=e=>new t(e),S.decl=t=>new a(t),S.rule=t=>new g(t),S.root=t=>new y(t),S.document=t=>new h(t),S.CssSyntaxError=s,S.Declaration=a,S.Container=n,S.Processor=p,S.Document=h,S.Comment=e,S.Warning=b,S.AtRule=t,S.Result=m,S.Input=l,S.Rule=g,S.Root=y,S.Node=v,f.registerPostcss(S),On=S,S.default=S,On}!function(){if(Fn)return Ln;Fn=1;var t=ss().Input,e=function(){if(Nn)return Dn;Nn=1;var t=Un(),e=Qn(),r=Kn();return Dn=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();Ln=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}(),ss();var os=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(os||{});function as(t){var e=[];for(var r in t){var i=t[r];if("string"==typeof i){var n=cs(r);e.push(n+": "+i+";")}}return e.join(" ")}var hs=/-([a-z])/g,us=/^--[a-zA-Z0-9-]+$/,ls=t=>us.test(t)?t:t.replace(hs,((t,e)=>e?e.toUpperCase():"")),fs=/\B([A-Z])/g,cs=t=>t.replace(fs,"-$1").toLowerCase();class vs{constructor(){hi(this,"parentElement",null),hi(this,"parentNode",null),hi(this,"ownerDocument"),hi(this,"firstChild",null),hi(this,"lastChild",null),hi(this,"previousSibling",null),hi(this,"nextSibling",null),hi(this,"ELEMENT_NODE",1),hi(this,"TEXT_NODE",3),hi(this,"nodeType"),hi(this,"nodeName"),hi(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof vs))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class ds extends vs{constructor(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];super(e),hi(this,"nodeType",9),hi(this,"nodeName","#document"),hi(this,"compatMode","CSS1Compat"),hi(this,"RRNodeType",os.Document),hi(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find((t=>t.RRNodeType===os.Element&&"HTML"===t.tagName))||null}get body(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===os.Element&&"BODY"===t.tagName)))||null}get head(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===os.Element&&"HEAD"===t.tagName)))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){var e=t.RRNodeType;if((e===os.Element||e===os.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===e)))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one "+(e===os.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var r=Cs(this,t);return r.parentElement=null,r}insertBefore(t,e){var r=t.RRNodeType;if((r===os.Element||r===os.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===r)))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one "+(r===os.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var i=Ms(this,t,e);return i.parentElement=null,i}removeChild(t){return xs(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){var e;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===t?e="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===t&&(e="-//W3C//DTD HTML 4.0 Transitional//EN"),e){var r=this.createDocumentType("html",e,"");this.open(),this.appendChild(r)}}createDocument(t,e,r){return new ds}createDocumentType(t,e,r){var i=new ps(t,e,r);return i.ownerDocument=this,i}createElement(t){var e=new ms(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){var e=new ws(t);return e.ownerDocument=this,e}createComment(t){var e=new bs(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new Ss(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}}class ps extends vs{constructor(t,e,r){super(),hi(this,"nodeType",10),hi(this,"RRNodeType",os.DocumentType),hi(this,"name"),hi(this,"publicId"),hi(this,"systemId"),hi(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}class ms extends vs{constructor(t){super(),hi(this,"nodeType",1),hi(this,"RRNodeType",os.Element),hi(this,"tagName"),hi(this,"attributes",{}),hi(this,"shadowRoot",null),hi(this,"scrollLeft"),hi(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){var t="";return this.childNodes.forEach((e=>t+=e.textContent)),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new ks(this.attributes.class,(t=>{this.attributes.class=t}))}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){var t,e,r=this.attributes.style?(t={},e=/:(.+)/,this.attributes.style.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(r){if(r){var i=r.split(e);i.length>1&&(t[ls(i[0].trim())]=i[1].trim())}})),t):{},i=/\B([A-Z])/g;return r.setProperty=(t,e,n)=>{if(!i.test(t)){var s=ls(t);e?r[s]=e:delete r[s],"important"===n&&(r[s]+=" !important"),this.attributes.style=as(r)}},r.removeProperty=t=>{if(i.test(t))return"";var e=ls(t),n=r[e]||"";return delete r[e],this.attributes.style=as(r),n},r}getAttribute(t){return void 0===this.attributes[t]?null:this.attributes[t]}setAttribute(t,e){this.attributes[t]=e}setAttributeNS(t,e,r){this.setAttribute(e,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Cs(this,t)}insertBefore(t,e){return Ms(this,t,e)}removeChild(t){return xs(this,t)}attachShadow(t){var e=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=e,e}dispatchEvent(t){return!0}toString(){var t="";for(var e in this.attributes)t+=e+'="'+this.attributes[e]+'" ';return this.tagName+" "+t}}class ys extends ms{constructor(){super(...arguments),hi(this,"currentTime"),hi(this,"volume"),hi(this,"paused"),hi(this,"muted"),hi(this,"playbackRate"),hi(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class gs extends ms{constructor(){super(...arguments),hi(this,"tagName","DIALOG"),hi(this,"nodeName","DIALOG")}get isModal(){return"modal"===this.getAttribute("rr_open_mode")}get open(){return null!==this.getAttribute("open")}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class ws extends vs{constructor(t){super(),hi(this,"nodeType",3),hi(this,"nodeName","#text"),hi(this,"RRNodeType",os.Text),hi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRText text="+JSON.stringify(this.data)}}class bs extends vs{constructor(t){super(),hi(this,"nodeType",8),hi(this,"nodeName","#comment"),hi(this,"RRNodeType",os.Comment),hi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRComment text="+JSON.stringify(this.data)}}class Ss extends vs{constructor(t){super(),hi(this,"nodeName","#cdata-section"),hi(this,"nodeType",4),hi(this,"RRNodeType",os.CDATA),hi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRCDATASection data="+JSON.stringify(this.data)}}class ks{constructor(t,e){var r=this;if(hi(this,"onChange"),hi(this,"classes",[]),hi(this,"add",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];for(var n of e){var s=String(n);0>r.classes.indexOf(s)&&r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))})),hi(this,"remove",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.classes=r.classes.filter((t=>-1===e.indexOf(t))),r.onChange&&r.onChange(r.classes.join(" "))})),t){var i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=e}}function Cs(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function Ms(t,e,r){if(!r)return Cs(t,e);if(r.parentNode!==t)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===r||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=r.previousSibling,r.previousSibling=e,e.nextSibling=r,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function xs(t,e){if(e.parentNode!==t)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var As=(t=>(t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t))(As||{}),Es={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Rs={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},Is=null;function Ts(t,e,r,i){void 0===i&&(i=e.mirror||e.ownerDocument.mirror),t=function(t,e,r,i){var n;if(r.afterAppend&&!Is&&(Is=new WeakSet,setTimeout((()=>{Is=null}),0)),!Ns(t,e)){var s=Ds(e,r.mirror,i);null==(n=t.parentNode)||n.replaceChild(s,t),t=s}switch(e.RRNodeType){case os.Document:if(!Ls(t,e,r.mirror,i)){var o=i.getMeta(e);o&&(r.mirror.removeNodeFromMap(t),t.close(),t.open(),r.mirror.add(t,o),null==Is||Is.add(t))}break;case os.Element:var a=t,h=e;switch(h.tagName){case"IFRAME":var u=t.contentDocument;if(!u)break;Ts(u,e.contentDocument,r,i)}h.shadowRoot&&(a.shadowRoot||Si(a))&&_s(a.shadowRoot,h.shadowRoot,r,i),function(t,e,r){var i=t.attributes,n=e.attributes;for(var s in n){var o=n[s],a=r.getMeta(e);if((null==a?void 0:a.isSVG)&&Es[s])t.setAttributeNS(Es[s],s,o);else if("CANVAS"===e.tagName&&"rr_dataURL"===s)Os(t,o);else{if("IFRAME"===e.tagName&&"srcdoc"===s)continue;try{t.getAttribute(s)!==o&&t.setAttribute(s,o)}catch(t){console.warn(t)}}}for(var h of Array.from(i)){var u=h.name;u in n||t.removeAttribute(u)}e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}(a,h,i)}return t}(t,e,r,i),_s(t,e,r,i),function(t,e,r){var i;switch(e.RRNodeType){case os.Document:var n=e.scrollData;n&&r.applyScroll(n,!0);break;case os.Element:var s=t,o=e;switch(o.scrollData&&r.applyScroll(o.scrollData,!0),o.inputData&&r.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":var a=t,h=o;void 0!==h.paused&&(h.paused?a.pause():a.play()),void 0!==h.muted&&(a.muted=h.muted),void 0!==h.volume&&(a.volume=h.volume),void 0!==h.currentTime&&(a.currentTime=h.currentTime),void 0!==h.playbackRate&&(a.playbackRate=h.playbackRate),void 0!==h.loop&&(a.loop=h.loop);break;case"CANVAS":var u=e;null!==u.rr_dataURL&&Os(s,u.rr_dataURL),u.canvasMutations.forEach((e=>r.applyCanvas(e.event,e.mutation,t)));break;case"STYLE":var l=s.sheet;l&&e.rules.forEach((t=>r.applyStyleSheetMutation(t,l)));break;case"DIALOG":var f=s,c=o,v=f.open,d=f.matches("dialog:modal"),p=c.open,m=c.isModal,y=d!==m,g=v!==p;if((y||v&&g)&&f.close(),p&&(g||y))try{m?f.showModal():f.show()}catch(t){console.warn(t)}}break;case os.Text:case os.Comment:case os.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}(null==Is?void 0:Is.has(t))&&(Is.delete(t),null==(i=r.afterAppend)||i.call(r,t,r.mirror.getId(t)))}(t,e,r)}function Os(t,e){var r=t.ownerDocument.createElement("img");r.onload=()=>{var e=t.getContext("2d");e&&e.drawImage(r,0,0,r.width,r.height)},r.src=e}function _s(t,e,r,i){var n=Array.from(t.childNodes),s=e.childNodes;if(0!==n.length||0!==s.length){for(var o=0,a=n.length-1,h=0,u=s.length-1,l=n[o],f=n[a],c=s[h],v=s[u],d=void 0,p=void 0;a>=o&&u>=h;)if(void 0===l)l=n[++o];else if(void 0===f)f=n[--a];else if(Ls(l,c,r.mirror,i))l=n[++o],c=s[++h];else if(Ls(f,v,r.mirror,i))f=n[--a],v=s[--u];else if(Ls(l,v,r.mirror,i)){try{t.insertBefore(l,f.nextSibling)}catch(t){console.warn(t)}l=n[++o],v=s[--u]}else if(Ls(f,c,r.mirror,i)){try{t.insertBefore(f,l)}catch(t){console.warn(t)}f=n[--a],c=s[++h]}else{if(!d){d={};for(var m=o;a>=m;m++){var y=n[m];y&&r.mirror.hasNode(y)&&(d[r.mirror.getId(y)]=m)}}var g=n[p=d[i.getId(c)]];if(void 0!==p&&g&&Ls(g,c,r.mirror,i)){try{t.insertBefore(g,l)}catch(t){console.warn(t)}n[p]=void 0}else{var w=Ds(c,r.mirror,i);"#document"===t.nodeName&&l&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(t.removeChild(l),r.mirror.removeNodeFromMap(l),l=n[++o]);try{t.insertBefore(w,l||null)}catch(t){console.warn(t)}}c=s[++h]}if(o>a){var b=s[u+1],S=null;for(b&&(S=r.mirror.getNode(i.getId(b)));u>=h;++h){var k=Ds(s[h],r.mirror,i);try{t.insertBefore(k,S)}catch(t){console.warn(t)}}}else if(h>u)for(;a>=o;o++){var C=n[o];if(C&&C.parentNode===t)try{t.removeChild(C),r.mirror.removeNodeFromMap(C)}catch(t){console.warn(t)}}for(var M=t.firstChild,x=e.firstChild;null!==M&&null!==x;)Ts(M,x,r,i),M=M.nextSibling,x=x.nextSibling}}function Ds(t,e,i){var n=i.getId(t),s=i.getMeta(t),o=null;if(n>-1&&(o=e.getNode(n)),null!==o&&Ns(o,t))return o;switch(t.RRNodeType){case os.Document:o=new Document;break;case os.DocumentType:o=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case os.Element:var a=t.tagName.toLowerCase();a=Rs[a]||a,o=s&&"isSVG"in s&&(null==s?void 0:s.isSVG)?document.createElementNS(Es.svg,a):document.createElement(t.tagName);break;case os.Text:o=document.createTextNode(t.data);break;case os.Comment:o=document.createComment(t.data);break;case os.CDATA:o=document.createCDATASection(t.data)}s&&e.add(o,r({},s));try{null==Is||Is.add(o)}catch(t){}return o}function Ns(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function Ls(t,e,r,i){var n=r.getId(t),s=i.getId(e);return-1!==n&&n===s&&Ns(t,e)}class Fs extends ds{constructor(t){super(),hi(this,"UNSERIALIZED_STARTING_ID",-2),hi(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),hi(this,"mirror",new qs),hi(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this.u--}createDocument(t,e,r){return new Fs}createDocumentType(t,e,r){var i=new Bs(t,e,r);return i.ownerDocument=this,i}createElement(t){var e,r=t.toUpperCase();switch(r){case"AUDIO":case"VIDEO":e=new js(r);break;case"IFRAME":e=new Gs(r,this.mirror);break;case"CANVAS":e=new Ws(r);break;case"STYLE":e=new Hs(r);break;case"DIALOG":e=new Us(r);break;default:e=new Ps(r)}return e.ownerDocument=this,e}createComment(t){var e=new Vs(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new $s(t);return e.ownerDocument=this,e}createTextNode(t){var e=new zs(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.u=this.UNSERIALIZED_STARTING_ID}}var Bs=ps;class Ps extends ms{constructor(){super(...arguments),hi(this,"inputData",null),hi(this,"scrollData",null)}}class js extends ys{}class Us extends gs{}class Ws extends Ps{constructor(){super(...arguments),hi(this,"rr_dataURL",null),hi(this,"canvasMutations",[])}getContext(){return null}}class Hs extends Ps{constructor(){super(...arguments),hi(this,"rules",[])}}class Gs extends Ps{constructor(t,e){super(t),hi(this,"contentDocument",new Fs),this.contentDocument.mirror=e}}var zs=ws,Vs=bs,$s=Ss;function Ys(t,e,i,n){var s,o;switch(t.nodeType){case As.DOCUMENT_NODE:n&&"IFRAME"===n.nodeName?s=n.contentDocument:(s=e).compatMode=t.compatMode;break;case As.DOCUMENT_TYPE_NODE:s=e.createDocumentType(t.name,t.publicId,t.systemId);break;case As.ELEMENT_NODE:var a=t,h=(o=a)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),u=s=e.createElement(h);for(var l of Array.from(a.attributes))u.attributes[l.name]=l.value;a.scrollLeft&&(u.scrollLeft=a.scrollLeft),a.scrollTop&&(u.scrollTop=a.scrollTop);break;case As.TEXT_NODE:s=e.createTextNode(t.textContent||"");break;case As.CDATA_SECTION_NODE:s=e.createCDATASection(t.data);break;case As.COMMENT_NODE:s=e.createComment(t.textContent||"");break;case As.DOCUMENT_FRAGMENT_NODE:var f=n;if(!Si(f))return null;s=f.shadowRoot;break;default:return null}var c=i.getMeta(t);return e instanceof Fs&&(c||(c=Zs(s,e.unserializedId),i.add(t,c)),e.mirror.add(s,r({},c))),s}class qs{constructor(){hi(this,"idNodeMap",new Map),hi(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Zs(t,e){switch(t.RRNodeType){case os.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case os.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case os.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case os.Text:case os.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case os.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function Js(t,e){return-1!==t.indexOf(e)}var Xs={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Ks={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Qs={};function to(t){if(Qs[t])return Qs[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in Xs?Xs[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in Ks?Ks[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return Qs[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(Js(h=navigator.userAgent,"AppleWebKit")&&!Js(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),Qs[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var eo={};function ro(t,e,r){var i,n=t+"."+String(r);if(eo[n])return eo[n].call(e);var s=to(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(eo[n]=o,o.call(e)):e[r]}var io={};function no(t,e,r){var i=t+"."+String(r);if(io[i])return io[i].bind(e);var n=to(t)[r];return"function"!=typeof n?e[r]:(io[i]=n,n.bind(e))}function so(){return to("MutationObserver").constructor}function oo(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}var ao={childNodes:t=>ro("Node",t,"childNodes"),parentNode:t=>ro("Node",t,"parentNode"),parentElement:t=>ro("Node",t,"parentElement"),textContent:t=>ro("Node",t,"textContent"),contains:(t,e)=>no("Node",t,"contains")(e),getRootNode:t=>no("Node",t,"getRootNode")(),host:t=>t&&"host"in t?ro("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?ro("Element",t,"shadowRoot"):null,querySelector:(t,e)=>no("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>no("Element",t,"querySelectorAll")(e),mutationObserver:so,patch:oo};function ho(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>uo(r,t,e,i)}function uo(t,e,r,i){lo((()=>{var n=t.removeEventListener;"function"==typeof n&&(void 0!==i?n.call(t,e,r,i):n.call(t,e,r))}))}function lo(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}var fo="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.",co={map:{},getId(){return console.error(fo),-1},getNode(){return console.error(fo),null},removeNodeFromMap(){console.error(fo)},has(){return console.error(fo),!1},reset(){console.error(fo)}};function vo(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;s>a;a++)o[a]=arguments[a];var h=Date.now();n||!1!==r.leading||(n=h);var u=e-(h-n),l=this;0>=u||u>e?(i&&(clearTimeout(i),i=null),n=h,t.apply(l,o)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(l,o)}),u))}}function po(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){if(setTimeout((()=>{try{r.set.call(this,t)}catch(t){}}),0),s&&s.set){if(s.get)try{s.get.call(this)}catch(t){return}s.set.call(this,t)}}}),()=>po(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(co=new Proxy(co,{get(t,e,r){return"map"===e&&console.error(fo),Reflect.get(t,e,r)}}));var mo=Date.now;function yo(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=ao.parentElement(s.body))?void 0:e.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(i=ao.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function go(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function wo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function bo(t){return t?t.nodeType===t.ELEMENT_NODE?t:ao.parentElement(t):null}function So(t,e,r,i){if(!t)return!1;var n=bo(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(Qt(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function ko(t,e){return-1!==e.getId(t)}function Co(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===Gt}function Mo(t,e){if(ot(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=ao.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||Mo(i,e))}function xo(t){return Boolean(t.changedTouches)}function Ao(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=[].forEach)}function Eo(t){var e={},r=(t,r)=>{var i={value:t,parent:r,children:[]};return e[t.node.id]=i,i},i=[];for(var n of t){var s=n.nextId,o=n.parentId;if(s&&s in e){var a=e[s];if(a.parent){var h=a.parent.children.indexOf(a);a.parent.children.splice(h,0,r(n,a.parent))}else{var u=i.indexOf(a);i.splice(u,0,r(n,null))}}else if(o in e){var l=e[o];l.children.push(r(n,l))}else i.push(r(n,null))}return i}function Ro(t,e){e(t.value);for(var r=t.children.length-1;r>=0;r--)Ro(t.children[r],e)}function Io(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function To(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Oo(t,e){var r,i,n=null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.frameElement;if(!n||n===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};var s=n.getBoundingClientRect(),o=Oo(n,e),a=s.height/n.clientHeight;return{x:s.x*o.relativeScale+o.x,y:s.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function _o(t){return!!t&&(t instanceof vs&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(ao.shadowRoot(t)))}function Do(t,e){var r=null==t?void 0:t[e[0]];return r?1===e.length?r:Do(r.cssRules,e.slice(1)):null}function No(t){var e=[...t],r=e.pop();return{positions:e,index:r}}function Lo(t){for(var e=new Set,r=[],i=t.length;i--;){var n=t[i];e.has(n.id)||(r.push(n),e.add(n.id))}return r}/[1-9][0-9]{12}/.test(Date.now().toString())||(mo=()=>(new Date).getTime());class Fo{constructor(){u(this,"id",1),u(this,"styleIDMap",new WeakMap),u(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Bo(t){var e,r=null;return"getRootNode"in t&&(null==(e=ao.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ao.host(ao.getRootNode(t))&&(r=ao.host(ao.getRootNode(t))),r}function Po(t){for(var e,r=t;e=Bo(r);)r=e;return r}function jo(t){var e=t.ownerDocument;if(!e)return!1;var r=Po(t);return ao.contains(e,r)}function Uo(t){var e=t.ownerDocument;return!!e&&(ao.contains(e,t)||jo(t))}var Wo=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Fo,get _mirror(){return co},callSafely:lo,closestElementOfNode:bo,getBaseDimension:Oo,getNestedRule:Do,getPositionsAndIndex:No,getRootShadowHost:Po,getShadowHost:Bo,getWindowHeight:go,getWindowScroll:yo,getWindowWidth:wo,hasShadowRoot:_o,hookSetter:po,inDom:Uo,isAncestorRemoved:Mo,isBlocked:So,isIgnored:Co,isSerialized:ko,isSerializedIframe:Io,isSerializedStylesheet:To,iterateResolveTree:Ro,legacy_isTouchEvent:xo,get nowTimestamp(){return mo},on:ho,polyfill:Ao,queueToResolveTrees:Eo,removeEventListenerSafely:uo,shadowHostInDom:jo,throttle:vo,uniqueTextMutations:Lo},Symbol.toStringTag,{value:"Module"})),Ho=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Ho||{}),Go="rrweb/fullscreen",zo=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(zo||{}),Vo=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Vo||{}),$o=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))($o||{}),Yo=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Yo||{}),qo=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(qo||{}),Zo=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t))(Zo||{}),Jo=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Jo||{});function Xo(t){return"__ln"in t}class Ko{constructor(){u(this,"length",0),u(this,"head",null),u(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;t>r;r++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Xo(t.previousSibling)){var r=t.previousSibling.__ln.next;e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r&&(r.previous=e)}else if(t.nextSibling&&Xo(t.nextSibling)&&t.nextSibling.__ln.previous){var i=t.nextSibling.__ln.previous;e.previous=i,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}var Qo,ta=(t,e)=>t+"@"+e;class ea{constructor(){u(this,"frozen",!1),u(this,"locked",!1),u(this,"texts",[]),u(this,"attributes",[]),u(this,"attributeMap",new WeakMap),u(this,"generatedAttributes",new WeakMap),u(this,"removes",[]),u(this,"mapRemoves",[]),u(this,"movedMap",{}),u(this,"addedSet",new Set),u(this,"movedSet",new Set),u(this,"droppedSet",new Set),u(this,"removesSubTreeCache",new Set),u(this,"mutationCb"),u(this,"blockClass"),u(this,"blockSelector"),u(this,"maskTextClass"),u(this,"maskTextSelector"),u(this,"inlineStylesheet"),u(this,"maskInputOptions"),u(this,"maskTextFn"),u(this,"maskInputFn"),u(this,"maskAllElementAttributes"),u(this,"maskAttributeFn"),u(this,"keepIframeSrcFn"),u(this,"recordCanvas"),u(this,"canvasMaskingConfigured"),u(this,"inlineImages"),u(this,"slimDOMOptions"),u(this,"dataURLOptions"),u(this,"doc"),u(this,"mirror"),u(this,"iframeManager"),u(this,"stylesheetManager"),u(this,"shadowDomManager"),u(this,"canvasManager"),u(this,"processedNodeManager"),u(this,"unattachedDoc"),u(this,"canvasManagerReleased",!1),u(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),u(this,"emit",(()=>{if(!this.frozen&&!this.locked){var t,e,r=M(),i=I();try{this.processBufferedMutations()}finally{t=M()-r,e=i,_>0||O(t,null!=e?e:x)||t>W.slowestBatchMs&&(W.slowestBatchMs=t)}}})),u(this,"processBufferedMutations",(()=>{for(var t=[],e=new Set,r=new Ko,i=t=>{for(var e=t,r=Gt;r===Gt;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=ao.parentNode(n);if(s&&Uo(n)&&"TEXTAREA"!==s.tagName){var o=ot(s)?this.mirror.getId(Bo(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=le(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,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,canvasMaskingConfigured:this.canvasMaskingConfigured,inlineImages:this.inlineImages,onSerialize:t=>{Io(t,this.mirror)&&this.iframeManager.addIframe(t),To(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),_o(t)&&!So(t,this.blockClass,this.blockSelector,!0)&&this.shadowDomManager.addShadowRoot(ao.shadowRoot(t),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onIframeListenerRegistered:(t,e)=>{this.iframeManager.registerLoadListenerDisposer(t,e)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});h&&(t.push({parentId:o,nextId:a,node:h}),e.add(h.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)ia(this.removesSubTreeCache,s)&&!this.movedSet.has(ao.parentNode(s))||n(s);for(var o of this.addedSet)na(this.droppedSet,o)||ia(this.removesSubTreeCache,o)?na(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var a=null;r.length;){var h=null;if(a){var u=this.mirror.getId(ao.parentNode(a.value)),l=i(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var f=r.tail;f;){var c=f;if(f=f.previous,c){var v=this.mirror.getId(ao.parentNode(c.value));if(-1===i(c.value))continue;if(-1!==v){h=c;break}var d=ao.parentNode(c.value);if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=ao.host(d);if(-1!==this.mirror.getId(p)){h=c;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}a=h.previous,r.removeNode(h.value),n(h.value)}var m={texts:this.texts.map((t=>{var e=t.node,r=ao.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{var e,r=t.attributes;if(!this.maskAllElementAttributes&&!this.maskAttributeFn&&"string"==typeof r.style){var i=JSON.stringify(t.styleDiff),n=JSON.stringify(t._unchangedStyles);r.style.length>i.length&&(i+n).split("var(").length===r.style.split("var(").length&&(r.style=t.styleDiff)}if(this.maskAllElementAttributes||this.maskAttributeFn)for(var s of Object.entries(r)){var o=s[0],a=s[1];"string"!=typeof a&&null!==a||(r[o]=xt({element:t.node,name:o,value:a,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,isGenerated:null==(e=this.generatedAttributes.get(t.node))?void 0:e.has(o)}))}return{id:this.mirror.getId(t.node),attributes:r}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(m.texts.length||m.attributes.length||m.removes.length||m.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.generatedAttributes=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))})),u(this,"bufferBelongsToIframe",(t=>this.doc===t.contentDocument)),u(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(this.attributes.push(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t,e));var r=Array.from(ao.childNodes(t),(t=>ao.textContent(t)||"")).join("");e.attributes.value=kt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:Et(t),value:r,maskInputFn:this.maskInputFn})})),u(this,"processMutation",(t=>{var e;if(!Co(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var r=ao.textContent(t.target);So(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue||this.texts.push({value:te(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,bo(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break;case"attributes":var i,n=t.target,s=t.attributeName,o=null!==(i=t.attributeNamespace)&&void 0!==i?i:null,a=function(t,e,r){if(!r)return e;var i=t.getAttributeNodeNS(r,e);if(i)return i.name;if("http://www.w3.org/1999/xlink"===r)return"xlink:"+e;if("http://www.w3.org/XML/1998/namespace"===r)return"xml:"+e;if("http://www.w3.org/2000/xmlns/"===r)return"xmlns"===e?e:"xmlns:"+e;var n=t.lookupPrefix(r);return n?n+":"+e:e}(n,s,o),h=o?n.getAttributeNS(o,s):t.target.getAttribute(s);if("value"===a){var u=n,l=Et(u);h=kt({element:u,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:l,value:h,maskInputFn:this.maskInputFn})}if(So(t.target,this.blockClass,this.blockSelector,!1)||h===t.oldValue)return;var f=this.attributeMap.get(t.target),c="IFRAME"===n.tagName&&"src"===a;if(c&&!this.keepIframeSrcFn(h)&&n.contentDocument)return;if(f||(this.attributes.push(f={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,f)),"type"===a&&"INPUT"===n.tagName&&"password"===(t.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Kt(n.tagName,a)){var v=Xt(this.doc,Ct(n.tagName),Ct(a),h,n,this.dataURLOptions);if(c&&!this.keepIframeSrcFn(h)&&(a="rr_src"),f.attributes[a]=v,null==(e=this.generatedAttributes.get(t.target))||e.delete(a),"style"===a){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var d=this.unattachedDoc.createElement("span"),p=n.style;for(var m of(t.oldValue&&(d.style.cssText=t.oldValue),Array.from(p))){var y=p.getPropertyValue(m),g=p.getPropertyPriority(m);y!==d.style.getPropertyValue(m)||g!==d.style.getPropertyPriority(m)?f.styleDiff[m]=""===g?y:[y,g]:f._unchangedStyles[m]=[y,g]}for(var w of Array.from(d.style))""===p.getPropertyValue(w)&&(f.styleDiff[w]=!1)}else if("open"===a&&"DIALOG"===n.tagName){f.attributes.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal";var b=this.generatedAttributes.get(t.target);b||this.generatedAttributes.set(t.target,b=new Set),b.add("rr_open_mode")}}break;case"childList":if(So(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{var r=this.mirror.getId(e),i=ot(t.target)?this.mirror.getId(ao.host(t.target)):this.mirror.getId(t.target);So(t.target,this.blockClass,this.blockSelector,!1)||Co(e,this.mirror,this.slimDOMOptions)||!ko(e,this.mirror)||(this.addedSet.has(e)?(ra(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||Mo(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[ta(r,i)]?ra(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!ot(t.target)||!ht(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),ao.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),u(this,"genAdds",((t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)){if(this.addedSet.has(t))return this.addedSet.delete(t),void this.addedSet.add(t);if(!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(Co(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[ta(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);So(t,this.blockClass,this.blockSelector,!1)||(ao.childNodes(t).forEach((t=>this.genAdds(t))),_o(t)&&ao.childNodes(ao.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}}))}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAllElementAttributes","maskAttributeFn","keepIframeSrcFn","recordCanvas","canvasMaskingConfigured","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((e=>{this[e]=t[e]})),this.canvasManager.acquire()}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.releaseCanvasManager()}releaseCanvasManager(){this.canvasManagerReleased||(this.canvasManagerReleased=!0,this.canvasManager.reset())}bufferDoc(){return this.doc}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function ra(t,e){for(var r=[e];r.length;){var i=r.pop();t.delete(i),ao.childNodes(i).forEach((t=>r.push(t)))}}function ia(t,e,r){return 0!==t.size&&function(t,e,r){var i=ao.parentNode(e);return!!i&&t.has(i)}(t,e)}function na(t,e){if(0===t.size)return!1;for(var r=ao.parentNode(e);r;){if(t.has(r))return!0;r=ao.parentNode(r)}return!1}var sa=function(t,e){return void 0===e&&(e="rrweb"),Qo?function(){try{return t(...arguments)}catch(t){if(Qo&&!0===Qo(t,e))return;throw t}}:t},oa=[];function aa(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function ha(t,e){var r,i=new ea;i.init(t);try{r=new(so())(sa(i.processMutations.bind(i)));var n={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return t.attributeFilter&&t.attributeFilter.length>0&&(n.attributeFilter=t.attributeFilter),r.observe(e,n),oa.push(i),{observer:r,buffer:i}}catch(t){try{null==r||r.disconnect(),i.destroy(),i.reset()}catch(t){}throw t}}function ua(t){var e=t.scrollCb,r=t.doc,i=t.mirror,n=t.blockClass,s=t.blockSelector,o=t.sampling,a=new Map,h=t=>{var o=aa(t);if(o&&!So(o,n,s,!0)){var h,u,l=i.getId(o);if(o===r&&r.defaultView){var f=yo(r.defaultView);h=f.left,u=f.top}else h=o.scrollLeft,u=o.scrollTop;var c=h+","+u;a.get(l)!==c&&(a.set(l,c),e({id:l,x:h,y:u}))}},u=[ho("scroll",sa(vo(sa((t=>h(t))),o.scroll||100)),r)];return"onscrollend"in r&&u.push(ho("scrollend",sa(h),r)),()=>u.forEach((t=>t()))}function la(t,e){for(var r=oa.length-1;r>=0;r--){var i=oa[r];if(i){var n=i.bufferBelongsToIframe(t);!n&&e&&e.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),oa.splice(r,1))}}}var fa=["INPUT","TEXTAREA","SELECT"],ca=new WeakMap;function va(t){return function t(e,r){if(ga("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ga("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ga("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ga("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var i=Array.from(e.parentRule.cssRules).indexOf(e);return r.unshift(i),t(e.parentRule,r)}if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);r.unshift(n)}return r}(t,[])}function da(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}var pa=5e3;function ma(t,e){var r,i,n,s,o=t.stylesheetManager;s=t.mirror.getId("#document"===e.nodeName?e:ao.host(e));var a="#document"===e.nodeName?null==(r=e.defaultView)?void 0:r.Document:null==(n=null==(i=e.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,h=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&h?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get(){var t;return null==(t=h.get)?void 0:t.call(this)},set(t){var e,r;try{r=null==(e=h.set)?void 0:e.call(this,t)}catch(t){if(t&&"object"==typeof t&&"NotAllowedError"===t.name)return;throw t}if(null!==s&&-1!==s)try{o.adoptStyleSheets(t,s)}catch(t){}return r}}),sa((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get:h.get,set:h.set})}))):()=>{}}function ya(t,e){void 0===e&&(e={});var i,n,s=t.doc.defaultView;if(!s)return()=>{};!function(t,e){var r=t.mutationCb,i=t.mousemoveCb,n=t.mouseInteractionCb,s=t.scrollCb,o=t.viewportResizeCb,a=t.inputCb,h=t.mediaInteractionCb,u=t.styleSheetRuleCb,l=t.styleDeclarationCb,f=t.canvasMutationCb,c=t.fontCb,v=t.selectionCb,d=t.customElementCb;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),f(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),c(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),v(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),d(...arguments)}}(t,e);var o,a,h,u,l,f,c,v,d,p,m,y,g=[],w=sa((()=>{if(n){n.destroy(),n.reset();var e=oa.indexOf(n);-1!==e&&oa.splice(e,1)}t.shadowDomManager.resetForDoc(t.doc),null==i||i.disconnect(),g.forEach((t=>t()))}));try{if(t.recordDOM){var b=ha(t,t.doc);i=b.observer,n=b.buffer}if(g.push(function(t){var e=t.mousemoveCb,r=t.sampling,i=t.doc,n=t.mirror;if(!1===r.mousemove)return()=>{};var s,o="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,h=[],u=vo(sa((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=sa(vo(sa((t=>{var e=aa(t),r=xo(t)?t.changedTouches[0]:t,i=r.clientX,o=r.clientY;s||(s=mo()),h.push({x:i,y:o,id:n.getId(e),timeOffset:mo()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?zo.Drag:t instanceof MouseEvent?zo.MouseMove:zo.TouchMove)})),o,{trailing:!1})),f=[ho("mousemove",l,i),ho("touchmove",l,i),ho("drag",l,i)];return sa((()=>{f.forEach((t=>t()))}))}(t)),g.push(function(t){var e=t.mouseInteractionCb,i=t.doc,n=t.mirror,s=t.blockClass,o=t.blockSelector,a=t.sampling;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(Vo).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=Ct(t),h=(t=>i=>{var a=aa(i);if(!So(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=$o.Mouse;break;case"touch":h=$o.Touch;break;case"pen":h=$o.Pen}h===$o.Touch&&(Vo[t]===Vo.MouseDown?u="TouchStart":Vo[t]===Vo.MouseUp&&(u="TouchEnd"))}else xo(i)&&(h=$o.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===$o.Touch||u.startsWith("Mouse")&&h===$o.Mouse)&&(h=null)):Vo[t]===Vo.Click&&(h=l,l=null);var f=xo(i)?i.changedTouches[0]:i;if(f){var c=n.getId(a),v=f.clientX,d=f.clientY;sa(e)(r({type:Vo[u],id:c,x:v,y:d},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(Vo[t]){case Vo.MouseDown:case Vo.MouseUp:a=a.replace("mouse","pointer");break;case Vo.TouchStart:case Vo.TouchEnd:return}u.push(ho(a,h,i))})),sa((()=>{u.forEach((t=>t()))}))}(t)),g.push(ua(t)),g.push((d=t.viewportResizeCb,p=s,m=-1,y=-1,ho("resize",sa(vo(sa((()=>{var t=go(),e=wo();m===t&&y===e||(d({width:Number(e),height:Number(t)}),m=t,y=e)})),200)),p))),g.push(function(t){var e=t.inputCb,i=t.doc,n=t.mirror,s=t.blockClass,o=t.blockSelector,a=t.ignoreClass,h=t.ignoreSelector,u=t.maskInputOptions,l=t.maskInputFn,f=t.userTriggeredOnInput;function c(t){var e=aa(t),r=t.isTrusted,n=i.defaultView;if(!e||!n||e instanceof n.HTMLElement){var c=e&&e.tagName;if(e&&"OPTION"===c&&(e=ao.parentElement(e)),e&&c&&fa.indexOf(c)>=0&&!So(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var d=e.value,p=!1,m=Et(e)||"";"radio"===m||"checkbox"===m?p=e.checked:(u[c.toLowerCase()]||u[m])&&(d=kt({element:e,maskInputOptions:u,tagName:c,type:m,value:d,maskInputFn:l})),v(e,f?{text:d,isChecked:p,userTriggered:r}:{text:d,isChecked:p});var y=e.name;"radio"===m&&y&&p&&i.querySelectorAll('input[type="radio"][name="'+y+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}}))}}}function v(t,i){var s=ca.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){ca.set(t,i);var o=n.getId(t);sa(e)(r({},i,{id:o}))}}var d=("last"===t.sampling.input?["change"]:["input","change"]).map((t=>ho(t,sa(c),i))),p=i.defaultView;if(!p)return()=>{d.forEach((t=>t()))};var m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value");return m&&m.set&&d.push(...[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]].map((t=>po(t[0],t[1],{set(){sa(c)({target:this,isTrusted:!1})}},!1,p)))),sa((()=>{d.forEach((t=>t()))}))}(t)),g.push(function(t){var e=t.mediaInteractionCb,r=t.blockClass,i=t.blockSelector,n=t.mirror,s=t.sampling,o=t.doc,a=sa((t=>vo(sa((s=>{var o=aa(s);if(o&&!So(o,r,i,!0)){var a=o.currentTime,h=o.volume,u=o.muted,l=o.playbackRate,f=o.loop;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:f})}})),s.media||500))),h=[ho("play",a(qo.Play),o),ho("pause",a(qo.Pause),o),ho("seeked",a(qo.Seeked),o),ho("volumechange",a(qo.VolumeChange),o),ho("ratechange",a(qo.RateChange),o)];return sa((()=>{h.forEach((t=>t()))}))}(t)),t.recordDOM){var S=function(t){var e=new Map,r=new Set,i=!0,n=t=>{if(i)try{t()}catch(t){}},s=t=>{var r,i=e.get(t);if(i){for(;null==(r=i[0])?void 0:r.ready;){var s=i.shift();(null==s?void 0:s.emit)&&n(s.emit)}0===i.length&&e.delete(t)}};return{queueMutation(t,r){if(t){var i=e.get(t);i?(i.push({emit:r,ready:!0}),s(t)):n(r)}else n(r)},queuePendingMutation(o,a,h){if(!i)return()=>{};var u=e.get(o);u||e.set(o,u=[]);var l={emit:a,ready:!1};u.push(l);var f,c=!1,v=!1,d=()=>{c||v||(c=!0,void 0!==f&&r.delete(f),l.ready=!0,l.emit=void 0,s(o))};try{f=t.setTimeout(d,pa),c||v?t.clearTimeout(f):r.add(f)}catch(t){d()}return e=>{!v&&i&&(v=!0,void 0!==f&&(t.clearTimeout(f),r.delete(f)),c?e&&n(h):(l.ready=!0,e||(l.emit=void 0),s(o)))}},reset(){i=!1,r.forEach((e=>t.clearTimeout(e))),r.clear(),e.clear()}}}(s);g.push(S.reset),g.push(function(t,e){var r=t.styleSheetRuleCb,i=t.mirror,n=t.stylesheetManager,s=e.win,o=e.mutationQueue;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var a=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=da(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,(()=>r({id:l,styleId:f,adds:[{rule:a,index:h}]}))),h}),"host")}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){return void 0===r&&(r=this.cssRules.length),s.CSSStyleSheet.prototype.insertRule.apply(this,[t+" { "+e+" }",r])};var h,u,l=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=da(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,(()=>r({id:l,styleId:f,removes:[{index:a}]}))),h}),"host")}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(h=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(h,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);try{var u=null==h?void 0:h.then;if(e.ownerNode||!h||"function"!=typeof u)return h;n.onCssomSheetMutation(e);var l=da(e,i,n.styleMirror),f=l.id,c=l.styleId;if(!(f&&-1!==f||c&&-1!==c))return h;var v=o.queuePendingMutation(e,(()=>r({id:f,styleId:c,replace:a})),(()=>{var t=ct(e);null!==t&&r({id:f,styleId:c,replace:t})}));try{u.call(h,(()=>v(!0)),(()=>v(!1)))}catch(t){v(!1)}}catch(t){}return h}),"host")})),s.CSSStyleSheet.prototype.replaceSync&&(u=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=da(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,(()=>r({id:l,styleId:f,replaceSync:a}))),h}),"host")}));var f={};wa("CSSGroupingRule")?f.CSSGroupingRule=s.CSSGroupingRule:(wa("CSSMediaRule")&&(f.CSSMediaRule=s.CSSMediaRule),wa("CSSConditionRule")&&(f.CSSConditionRule=s.CSSConditionRule),wa("CSSSupportsRule")&&(f.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(f).forEach((t=>{var e=t[0],s=t[1];c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e.parentStyleSheet);var u=da(e.parentStyleSheet,i,n.styleMirror),l=u.id,f=u.styleId;if(e.parentStyleSheet&&(l&&-1!==l||f&&-1!==f)){var c=[...va(e),h];o.queueMutation(e.parentStyleSheet,(()=>r({id:l,styleId:f,adds:[{rule:a,index:c}]})))}return h}),"host")}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e.parentStyleSheet);var u=da(e.parentStyleSheet,i,n.styleMirror),l=u.id,f=u.styleId;if(e.parentStyleSheet&&(l&&-1!==l||f&&-1!==f)){var c=[...va(e),a];o.queueMutation(e.parentStyleSheet,(()=>r({id:l,styleId:f,removes:[{index:c}]})))}return h}),"host")})})),sa((()=>{s.CSSStyleSheet.prototype.insertRule=a,s.CSSStyleSheet.prototype.deleteRule=l,h&&(s.CSSStyleSheet.prototype.replace=h),u&&(s.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach((t=>{var e=t[0],r=t[1];r.prototype.insertRule=c[e].insertRule,r.prototype.deleteRule=c[e].deleteRule}))}))}(t,{win:s,mutationQueue:S})),g.push(ma(t,t.doc)),g.push(function(t,e){var r=t.styleDeclarationCb,i=t.mirror,n=t.ignoreCSSAttributes,s=t.stylesheetManager,o=e.win,a=e.mutationQueue,h=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(h,{apply:sa(((t,e,o)=>{var h,u=o[0],l=o[1],f=o[2],c=t.apply(e,o);if(n.has(u))return c;var v=null==(h=e.parentRule)?void 0:h.parentStyleSheet;s.onCssomSheetMutation(v);var d=da(v,i,s.styleMirror),p=d.id,m=d.styleId;if(p&&-1!==p||m&&-1!==m){var y=va(e.parentRule);a.queueMutation(v,(()=>r({id:p,styleId:m,set:{property:u,value:l,priority:f},index:y})))}return c}),"host")});var u=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:sa(((t,e,o)=>{var h,u=o[0],l=t.apply(e,o);if(n.has(u))return l;var f=null==(h=e.parentRule)?void 0:h.parentStyleSheet;s.onCssomSheetMutation(f);var c=da(f,i,s.styleMirror),v=c.id,d=c.styleId;if(v&&-1!==v||d&&-1!==d){var p=va(e.parentRule);a.queueMutation(f,(()=>r({id:v,styleId:d,remove:{property:u},index:p})))}return l}),"host")}),sa((()=>{o.CSSStyleDeclaration.prototype.setProperty=h,o.CSSStyleDeclaration.prototype.removeProperty=u}))}(t,{win:s,mutationQueue:S})),t.collectFonts&&g.push(function(t){var e=t.fontCb,r=t.doc,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,o=i.FontFace;i.FontFace=function(t,e,r){var i=new o(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var a=oo(r.fonts,"add",(function(t){return function(r){return setTimeout(sa((()=>{var t=s.get(r);t&&(e(t),s.delete(r))})),0),t.apply(this,[r])}}));return n.push((()=>{i.FontFace=o})),n.push(a),sa((()=>{n.forEach((t=>t()))}))}(t))}for(var k of(g.push((a=(o=t).doc,h=o.mirror,u=o.blockClass,l=o.blockSelector,f=o.selectionCb,c=!0,(v=sa((()=>{var t=a.getSelection();if(!(!t||c&&(null==t?void 0:t.isCollapsed))){c=t.isCollapsed||!1;for(var e=[],r=t.rangeCount||0,i=0;r>i;i++){var n=t.getRangeAt(i),s=n.startContainer,o=n.startOffset,v=n.endContainer,d=n.endOffset;So(s,u,l,!0)||So(v,u,l,!0)||e.push({start:h.getId(s),startOffset:o,end:h.getId(v),endOffset:d})}f({ranges:e})}})))(),ho("selectionchange",v))),g.push(function(t){var e=t.customElementCb,r=t.doc.defaultView;return r&&r.customElements?oo(r.customElements,"define",(function(t){return function(r,i,n){try{e({define:{name:r}})}catch(t){console.warn("Custom element callback failed for "+r)}return t.apply(this,[r,i,n])}})):()=>{}}(t)),t.plugins))g.push(k.observer(k.callback,s,k.options))}catch(t){try{w()}catch(t){}throw t}return w}function ga(t){return void 0!==window[t]}function wa(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class ba{constructor(t){u(this,"iframeRemoteIdToLocalIdMap",new WeakMap),u(this,"iframeLocalIdToRemoteIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){if(0>e)return e;var n=r||this.getRemoteIdToLocalIdMap(t),s=i||this.getLocalIdToRemoteIdMap(t),o=n.get(e);return void 0===o&&(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getRemoteIdToLocalIdMap(t),i=this.getLocalIdToRemoteIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i;return"number"!=typeof e||0>e?e:null!==(i=(r||this.getLocalIdToRemoteIdMap(t)).get(e))&&void 0!==i?i:-1}getRemoteIds(t,e){var r=this.getLocalIdToRemoteIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeRemoteIdToLocalIdMap=new WeakMap,void(this.iframeLocalIdToRemoteIdMap=new WeakMap);this.iframeRemoteIdToLocalIdMap.delete(t),this.iframeLocalIdToRemoteIdMap.delete(t)}getRemoteIdToLocalIdMap(t){var e=this.iframeRemoteIdToLocalIdMap.get(t);return e||this.iframeRemoteIdToLocalIdMap.set(t,e=new Map),e}getLocalIdToRemoteIdMap(t){var e=this.iframeLocalIdToRemoteIdMap.get(t);return e||this.iframeLocalIdToRemoteIdMap.set(t,e=new Map),e}}class Sa{constructor(t){u(this,"iframes",new WeakMap),u(this,"crossOriginIframeMap",new WeakMap),u(this,"crossOriginIframeMirror",new ba(zt)),u(this,"crossOriginIframeStyleMirror"),u(this,"crossOriginIframeRootIdMap",new WeakMap),u(this,"mirror"),u(this,"mutationCb"),u(this,"wrappedEmit"),u(this,"loadListener"),u(this,"pageHideListener"),u(this,"stylesheetManager"),u(this,"recordCrossOriginIframes"),u(this,"messageHandler"),u(this,"nestedIframeListeners",new Map),u(this,"attachedWindows",new WeakMap),u(this,"attachedDocuments",new WeakMap),u(this,"attachedIframes",new Map),u(this,"loadListenerDisposers",new WeakMap),u(this,"iframeElementsById",new Map),u(this,"pageHideHandlers",new WeakMap),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ba(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}registerLoadListenerDisposer(t,e){var r=this.loadListenerDisposers.get(t);r||this.loadListenerDisposers.set(t,r=new Set),r.add(e);var i=this.mirror.getId(t);-1!==i&&this.iframeElementsById.set(i,t)}getIframeElementById(t){var e,r,i;return null!==(e=null!==(r=null==(i=this.attachedIframes.get(t))?void 0:i.element)&&void 0!==r?r:this.iframeElementsById.get(t))&&void 0!==e?e:null}forgetIframeId(t){this.attachedIframes.delete(t),this.iframeElementsById.delete(t)}disposeLoadListeners(t){var e=this.loadListenerDisposers.get(t);e&&(e.forEach((t=>lo(t))),this.loadListenerDisposers.delete(t))}removePageHideListener(t){var e=this.pageHideHandlers.get(t);e&&(e.forEach((t=>{uo(t.win,"pagehide",t.handler)})),this.pageHideHandlers.delete(t))}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);if(t.contentDocument){var n=this.attachedDocuments.get(t);n||this.attachedDocuments.set(t,n=new Set),n.add(t.contentDocument)}this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var s=t.contentWindow;if(this.recordCrossOriginIframes&&s&&!this.nestedIframeListeners.has(s)){var o=this.handleMessage.bind(this);lo((()=>{s.addEventListener("message",o),this.nestedIframeListeners.set(s,o);var e=this.attachedWindows.get(t);e||this.attachedWindows.set(t,e=new Set),e.add(s)}))}lo((()=>{var e=t.contentWindow;if(e){var r=this.pageHideHandlers.get(t);if(r)for(var i of r)if(i.win===e)return;var n=()=>{var e;null==(e=this.pageHideListener)||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument),t.contentWindow&&this.crossOriginIframeMap.delete(t.contentWindow)};e.addEventListener("pagehide",n),r||this.pageHideHandlers.set(t,r=new Set),r.add({win:e,handler:n})}})),null==(r=this.loadListener)||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var r;switch(e.type){case Ho.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:Ho.IncrementalSnapshot,data:{source:zo.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Ho.Meta:case Ho.Load:case Ho.DomContentLoaded:return!1;case Ho.Plugin:return e;case Ho.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Ho.IncrementalSnapshot:switch(e.data.source){case zo.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case zo.Drag:case zo.TouchMove:case zo.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case zo.ViewportResize:return!1;case zo.MediaInteraction:case zo.MouseInteraction:case zo.Scroll:case zo.CanvasMutation:case zo.Input:return this.replaceIds(e.data,t,["id"]),e;case zo.StyleSheetRule:case zo.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case zo.Font:return e;case zo.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case zo.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(r=e.data.styles)||r.forEach((e=>{this.replaceStyleIds(e,t,["styleId"])})),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(e[n]=Array.isArray(e[n])?t.getIds(r,e[n]):t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===Jo.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.iframeElementsById.get(t)||this.mirror.getNode(t);if(this.iframeElementsById.delete(t),r){var i=r.contentWindow,n=this.attachedWindows.get(r);n&&(n.forEach((t=>{var e=this.nestedIframeListeners.get(t);e&&(uo(t,"message",e),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)})),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)&&(uo(i,"message",this.nestedIframeListeners.get(i)),this.nestedIframeListeners.delete(i)),i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r),this.disposeLoadListeners(r),this.removePageHideListener(r);var s=this.attachedDocuments.get(r);s&&(s.forEach((t=>{lo((()=>this.mirror.removeNodeFromMap(t)))})),lo((()=>la(r,s))),this.attachedDocuments.delete(r))}e&&this.attachedIframes.delete(t)}cleanupDetachedIframes(){if(0!==this.attachedIframes.size){var t=[];this.attachedIframes.forEach(((e,r)=>{this.mirror.has(r)||t.push(r)})),t.forEach((t=>this.removeIframeById(t)))}}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var r=t.content;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)}))}destroy(){this.recordCrossOriginIframes&&uo(window,"message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{uo(e,"message",t)})),this.nestedIframeListeners.clear();var t=new Set;this.iframeElementsById.forEach((e=>t.add(e))),this.attachedIframes.forEach((e=>t.add(e.element))),t.forEach((t=>{this.disposeLoadListeners(t),this.removePageHideListener(t)})),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap,this.loadListenerDisposers=new WeakMap,this.pageHideHandlers=new WeakMap,this.attachedDocuments=new WeakMap,this.attachedWindows=new WeakMap,this.iframeElementsById=new Map}}class ka{constructor(t){u(this,"shadowDoms",new WeakSet),u(this,"mutationCb"),u(this,"scrollCb"),u(this,"bypassOptions"),u(this,"mirror"),u(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){var i,n;if(ht(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var s=null!==(i=null==(n=ao.host(t))?void 0:n.ownerDocument)&&void 0!==i?i:e,o=ha(r({},this.bypassOptions,{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),a=o.observer,h=o.buffer;this.restoreHandlers.push({doc:s,handler(){a.disconnect(),h.destroy(),h.releaseCanvasManager();var t=oa.indexOf(h);-1!==t&&oa.splice(t,1)}}),this.restoreHandlers.push({doc:s,handler:ua(r({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}),setTimeout((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(ao.host(t))),this.restoreHandlers.push({doc:s,handler:ma({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)})}),0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var r=this;this.restoreHandlers.push({doc:e,handler:oo(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=ao.shadowRoot(this);return s&&Uo(this)&&r.addShadowRoot(s,e),n}}))})}reset(){this.restoreHandlers.forEach((t=>{var e=t.handler;try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}resetForDoc(t){var e=[];for(var r of this.restoreHandlers)if(r.doc===t)try{r.handler()}catch(t){}else e.push(r);this.restoreHandlers=e}}var Ca="skip-frame";function Ma(t){if("object"!=typeof t||null===t)return!1;var e=t.y,r=t.width,i=t.height;return Number.isFinite(t.x)&&Number.isFinite(e)&&Number.isFinite(r)&&Number.isFinite(i)&&r>=0&&i>=0}for(var xa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Aa="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ea=0;64>Ea;Ea++)Aa[xa.charCodeAt(Ea)]=Ea;var Ra=function(t){var e,r,i,n,s,o=.75*t.length,a=t.length,h=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var u=new ArrayBuffer(o),l=new Uint8Array(u);for(e=0;a>e;e+=4)r=Aa[t.charCodeAt(e)],i=Aa[t.charCodeAt(e+1)],n=Aa[t.charCodeAt(e+2)],s=Aa[t.charCodeAt(e+3)],l[h++]=r<<2|i>>4,l[h++]=(15&i)<<4|n>>2,l[h++]=(3&n)<<6|63&s;return u},Ia=new Map,Ta=(t,e,r)=>{if(t&&(Da(t,e)||"object"==typeof t)){var i=function(t,e){var r=Ia.get(t);return r||Ia.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function Oa(t,e,r,i){return t instanceof Array?t.map((t=>Oa(t,e,r,i))):null===t?t:t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray?{rr_type:t.constructor.name,args:[Object.values(t)]}:t instanceof ArrayBuffer?{rr_type:t.constructor.name,base64:function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;i>e;e+=3)n+=xa[r[e]>>2],n+=xa[(3&r[e])<<4|r[e+1]>>4],n+=xa[(15&r[e+1])<<2|r[e+2]>>6],n+=xa[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t)}:t instanceof DataView?{rr_type:t.constructor.name,args:[Oa(t.buffer,e,r,i),t.byteOffset,t.byteLength]}:t instanceof HTMLImageElement?{rr_type:t.constructor.name,src:t.src}:t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[Oa(t.data,e,r,i),t.width,t.height]}:Da(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Ta(t,e,r)}:t}var _a=(t,e,r,i)=>t.map((t=>Oa(t,e,r,i))),Da=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"==typeof e[t]));return Boolean(r.find((r=>t instanceof e[r])))},Na=["webgl","webgl2"];function La(t){return"nodeType"in t}function Fa(t,e,i,n){var s=[];try{if(n){var o=function(t,e,i){var n=t.GPUCanvasContext;if((null==n?void 0:n.prototype)&&"function"==typeof n.prototype.configure)return oo(n.prototype,"configure",(function(n){return function(s){var o=function(t){var e=t.canvas;return e&&"object"==typeof e?e:null}(this);if(!o||La(o)&&So(o,e,i,!0))return n.call(this,s);La(o)&&!("__context"in o)&&(o.__context="webgpu");var a=function(t){var e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return n.call(this,null!==a&&s?r({},s,{usage:"number"==typeof s.usage?s.usage|a:a}):s)}}))}(t,e,i);o&&s.push(o)}var a=oo(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(r){for(var s=function(t){return"experimental-webgl"===t?"webgl":t}(r),o=arguments.length,a=new Array(o>1?o-1:0),h=1;o>h;h++)a[h-1]=arguments[h];if(!So(this,e,i,!0)&&("__context"in this||(this.__context=s),n&&Na.includes(s)))if(a[0]&&"object"==typeof a[0]){var u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[r,...a])}}));s.push(a)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((t=>t()))}}function Ba(t,e,r,i,n,s,o){var a=[],h=Object.getOwnPropertyNames(t),u=function(h){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))return 0;try{if("function"!=typeof t[h])return 0;var u=oo(t,h,(function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;a>l;l++)u[l]=arguments[l];var f=t.apply(this,u);if(Ta(f,s,this),this.canvas&&"tagName"in this.canvas&&!So(this.canvas,i,n,!0)){var c=_a(u,s,this,o);r(this.canvas,{type:e,property:h,args:c})}return f}}));a.push(u)}catch(s){var l=po(t,h,{set(t){this.canvas&&"tagName"in this.canvas&&!So(this.canvas,i,n,!0)&&r(this.canvas,{type:e,property:h,args:[t],setter:!0})}});a.push(l)}};for(var l of h)u(l);return a}var Pa,ja,Ua,Wa='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentFingerprintMap = /* @__PURE__ */ new Map();\n const lastSentAtMap = /* @__PURE__ */ new Map();\n const PROVIDER_KEYFRAME_INTERVAL_MS = 3e4;\n function hashPixels(data) {\n const view = new Uint32Array(\n data.buffer,\n data.byteOffset,\n data.byteLength >>> 2\n );\n let primaryHash = 2166136261;\n let secondaryHash = 2654435769;\n for (let i2 = 0; i2 < view.length; i2++) {\n primaryHash ^= view[i2];\n primaryHash = Math.imul(primaryHash, 16777619);\n secondaryHash ^= view[i2];\n secondaryHash = Math.imul(secondaryHash, 2246822507);\n }\n return `${(primaryHash >>> 0).toString(16)}:${(secondaryHash >>> 0).toString(16)}`;\n }\n function frameFingerprint(width, height, data) {\n return `${width}x${height}:${hashPixels(data)}`;\n }\n function transparentFingerprint(width, height) {\n const pixelCount = width * height;\n let hash = transparentFingerprintMap.get(pixelCount);\n if (hash === void 0) {\n hash = hashPixels(new Uint8ClampedArray(pixelCount * 4));\n transparentFingerprintMap.set(pixelCount, hash);\n }\n return `${width}x${height}:${hash}`;\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("resetFrameDedup" in e.data) {\n lastFingerprintMap.clear();\n return;\n }\n if ("OffscreenCanvas" in globalThis) {\n const {\n id,\n bitmap,\n width,\n height,\n displayWidth,\n displayHeight,\n dataURLOptions,\n maskRegions\n } = e.data;\n try {\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d", {\n willReadFrequently: true\n });\n }\n const ctx = reusableCtx;\n ctx.clearRect(0, 0, width, height);\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n if (maskRegions) {\n ctx.fillStyle = "black";\n for (const region of maskRegions) {\n ctx.fillRect(region.x, region.y, region.width, region.height);\n }\n }\n const fingerprint = frameFingerprint(\n width,\n height,\n ctx.getImageData(0, 0, width, height).data\n );\n const lastFingerprint = lastFingerprintMap.get(id) ?? transparentFingerprint(width, height);\n if (fingerprint === lastFingerprint) {\n const lastSentAt = lastSentAtMap.get(id);\n const keyframeDue = maskRegions !== void 0 && lastSentAt !== void 0 && Date.now() - lastSentAt >= PROVIDER_KEYFRAME_INTERVAL_MS;\n if (!keyframeDue) {\n return worker.postMessage({ id });\n }\n }\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n worker.postMessage({\n id,\n type: blob.type,\n base64: encode(arrayBuffer),\n // cpu intensive\n displayWidth,\n displayHeight\n });\n lastFingerprintMap.set(id, fingerprint);\n lastSentAtMap.set(id, Date.now());\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n',Ha="undefined"!=typeof self&&self.Blob&&new Blob([Wa],{type:"text/javascript;charset=utf-8"});function Ga(t){var e;try{if(!(e=Ha&&(self.URL||self.webkitURL).createObjectURL(Ha)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(e)})),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Wa),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class za{constructor(t){u(this,"pendingCanvasMutations",new Map),u(this,"rafStamps",{latestId:0,invokeId:null}),u(this,"mirror"),u(this,"mutationCb"),u(this,"resetObservers"),u(this,"frozen",!1),u(this,"locked",!1),u(this,"rafIdTimestamp",null),u(this,"rafIdFlush",null),u(this,"refCount",0),u(this,"torndown",!1),u(this,"resetFrameDedup",null),u(this,"processMutation",((t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)}));var e=t.sampling,r=void 0===e?"all":e,i=t.win,n=t.blockClass,s=t.blockSelector,o=t.recordCanvas,a=t.dataURLOptions,h=t.resolutionScale,l=t.canvasMasking;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&"all"===r&&this.initCanvasMutationObserver(i,n,s,a),o&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,n,s,{dataURLOptions:a,resolutionScale:h,canvasMasking:l})}onFullSnapshot(){var t;null==(t=this.resetFrameDedup)||t.call(this)}acquire(){this.refCount+=1}reset(){this.refCount>0&&(this.refCount-=1),this.refCount>0||this.teardown()}teardown(){this.torndown||(this.torndown=!0,this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,i,n,s){var o=this;if("OffscreenCanvas"in r){var a,h="number"==typeof s.resolutionScale&&Number.isFinite(s.resolutionScale)?Math.min(1,Math.max(.1,s.resolutionScale)):1,u=Fa(r,i,n,!0),l=new Map;try{a=new Ga}catch(t){return}var f=!1;a.onerror=()=>{var t;f=!0,cancelAnimationFrame(c),null==(t=a.terminate)||t.call(a),this.resetFrameDedup=null},this.resetFrameDedup=()=>{a.postMessage({resetFrameDedup:!0})},a.onmessage=t=>{var e=t.data.id;if(l.set(e,!1),"base64"in t.data){var r=t.data,i=r.displayWidth,n=r.displayHeight;this.mutationCb({id:e,type:Yo["2D"],commands:[{property:"clearRect",args:[0,0,i,n]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r.base64}],type:r.type}]},0,0,i,n]}],displayWidth:i,displayHeight:n})}};var c,v=1e3/t,d=0,p=t=>{var u,m;f||(d&&v>t-d||(d=t,(u=[],m=t=>{try{t.querySelectorAll("canvas").forEach((t=>{So(t,i,n,!0)||u.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&m(t.shadowRoot)}))}catch(t){}},m(r.document),u).forEach(function(){var t=e((function*(t){var e,r,i=o.mirror.getId(t);if(!l.get(i)&&0!==t.width&&0!==t.height){l.set(i,!0);try{if(["webgl","webgl2"].includes(t.__context)){var n=t.getContext(t.__context);if(null==(e=null==n?void 0:n.isContextLost)?void 0:e.call(n))return void l.set(i,!1);!1===(null==(r=null==n?void 0:n.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var u=t.clientWidth||t.width,f=t.clientHeight||t.height,c=Math.max(1,Math.round(u*h)),v=Math.max(1,Math.round(f*h)),d=function(t,e,r,i,n,s){if(t&&"function"==typeof t.regionsFn){var o;try{o=t.regionsFn(e)}catch(t){return Ca}if(void 0!==o){if(!Array.isArray(o)||!o.every(Ma))return Ca;var a=r/n,h=i/s;return o.filter((t=>t.width>0&&t.height>0)).map((t=>{var e=Math.floor(t.x*a),r=Math.floor(t.y*h);return{x:e,y:r,width:Math.ceil((t.x+t.width)*a)-e,height:Math.ceil((t.y+t.height)*h)-r}}))}}}(s.canvasMasking,t,c,v,u,f);if(d===Ca)return void l.set(i,!1);var p=yield createImageBitmap(t,1>h?{resizeWidth:c,resizeHeight:v,resizeQuality:"medium"}:{resizeWidth:c,resizeHeight:v});a.postMessage({id:i,bitmap:p,width:c,height:v,displayWidth:u,displayHeight:f,dataURLOptions:s.dataURLOptions,maskRegions:d},[p])}catch(t){l.set(i,!1)}}}));return function(e){return t.apply(this,arguments)}}())),c=requestAnimationFrame(p))};c=requestAnimationFrame(p),this.resetObservers=()=>{var t;u(),cancelAnimationFrame(c),null==(t=a.terminate)||t.call(a),this.resetFrameDedup=null}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Fa(t,e,r,!1),s=function(t,e,r,i,n){var s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[o])return 1;var a=oo(e.CanvasRenderingContext2D.prototype,o,(function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;a>u;u++)h[u]=arguments[u];return So(this.canvas,r,i,!0)||setTimeout((()=>{var r=_a(h,e,this,n);t(this.canvas,{type:Yo["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(n){var h=po(e.CanvasRenderingContext2D.prototype,o,{set(e){So(this.canvas,r,i,!0)||t(this.canvas,{type:Yo["2D"],property:o,args:[e],setter:!0})}});s.push(h)}};for(var h of o)a(h);return()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i),o=function(t,e,r,i,n){var s=[];return void 0!==e.WebGLRenderingContext&&s.push(...Ba(e.WebGLRenderingContext.prototype,Yo.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...Ba(e.WebGL2RenderingContext.prototype,Yo.WebGL2,t,r,i,e,n)),()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(t);if(r&&-1!==e){var n=r.map((t=>i(t,a)));this.mutationCb({id:e,type:r[0].type,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class Va{constructor(t){var e;u(this,"trackedLinkElements",new WeakSet),u(this,"pendingDeferredSheets",new Set),u(this,"mutationCb"),u(this,"adoptedStyleSheetCb"),u(this,"maskAllElementAttributes"),u(this,"maskAttributeFn"),u(this,"styleMirror",new Fo),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb,this.maskAllElementAttributes=null!==(e=t.maskAllElementAttributes)&&void 0!==e&&e,this.maskAttributeFn=t.maskAttributeFn}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}beginDeferredLinkInlining(t,e){if(-1===e||!t.isConnected)return null;var r=null,i=null;try{(i=t.sheet)&&(r=wt(i))}catch(t){}if(!r||!i)return tt(),null;var n=r,s=!1,o={sheet:i,invalidate(){s=!0}};this.pendingDeferredSheets.add(o);var a=!1;return{advance:r=>{if(a)return!0;var h,u,l=M(),f=I(),c=!0;try{if(s)return a=!0,tt(),!0;if(!n.advance(r))return c=!1,!1;a=!0;var v=n.text();if(!t.isConnected)return!0;var d=null;try{d=t.sheet}catch(t){}return d!==i?(tt(),!0):v?(this.emitCssTextMutation(t,e,v),!0):(tt(),!0)}finally{c&&this.pendingDeferredSheets.delete(o),O(h=M()-l,null!=(u=f)?u:x)||(H.totalMs+=h,h>H.slowestSliceMs&&(H.slowestSliceMs=h))}},remainingRules:()=>n.remainingRules(),discard:()=>{this.pendingDeferredSheets.delete(o)}}}onCssomSheetMutation(t){if(t&&0!==this.pendingDeferredSheets.size)for(var e of this.pendingDeferredSheets)e.sheet===t&&(this.pendingDeferredSheets.delete(e),e.invalidate())}inlineDeferredLinkElement(t,e){var r;null==(r=this.beginDeferredLinkInlining(t,e))||r.advance(1/0)}emitCssTextMutation(t,e,r){this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e,attributes:{_cssText:xt({element:t,name:"_cssText",value:r,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn})}}]})}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;if(r.styleMirror.has(t))e=r.styleMirror.getId(t);else{var s=r.styleMirror.add(t);e=s;var o=M();try{X((()=>{try{var e=t.rules||t.cssRules;e&&J(e)}catch(t){}n.push({styleId:s,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:vt(e,t.href),index:r})))})}))}finally{K(M()-o)}}i.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,this.pendingDeferredSheets.clear(),re.forEach((t=>t.abort())),re.clear()}trackStylesheetInLinkElement(t){}}class $a{constructor(){u(this,"nodeMap",new WeakMap),u(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).some((t=>t!==e))}add(t,e){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}var Ya=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var qa=document.createElement("iframe");document.body.appendChild(qa),Array.from=(null==(n=qa.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(qa)}}catch(t){console.debug("Unable to override Array.from",t)}var Za=St(),Ja=new Set([zo.Mutation,zo.MediaInteraction,zo.StyleSheetRule,zo.CanvasMutation,zo.Font,zo.Log,zo.StyleDeclaration,zo.AdoptedStyleSheet]);function Xa(t){var e=window;if("function"==typeof e.requestIdleCallback){var r=e.requestIdleCallback(t,{timeout:2e3});return{cancel(){var t;return null==(t=e.cancelIdleCallback)?void 0:t.call(e,r)}}}var i=setTimeout(t,250);return{cancel:()=>clearTimeout(i)}}function Ka(t){var e;void 0===t&&(t={});var i=t,n=i.emit,s=i.checkoutEveryNms,o=i.checkoutEveryNth,a=i.blockClass,h=void 0===a?"rr-block":a,u=i.blockSelector,l=void 0===u?null:u,f=i.ignoreClass,c=void 0===f?"rr-ignore":f,v=i.ignoreSelector,d=void 0===v?null:v,p=i.maskTextClass,m=void 0===p?"rr-mask":p,y=i.maskTextSelector,g=void 0===y?null:y,w=i.inlineStylesheet,b=void 0===w||w,S=i.inlineStylesheetBudgetRules,k=i.maskAllInputs,C=i.maskInputOptions,M=i.slimDOMOptions,x=i.maskInputFn,A=i.maskTextFn,E=i.maskAllElementAttributes,I=void 0!==E&&E,T=i.maskAttributeFn,O=i.hooks,_=i.packFn,D=i.sampling,N=void 0===D?{}:D,L=i.dataURLOptions,F=void 0===L?{}:L,B=i.canvasResolutionScale,j=i.canvasMasking,U=i.mousemoveWait,W=i.recordDOM,H=void 0===W||W,G=i.recordCanvas,Y=void 0!==G&&G,q=i.recordCrossOriginIframes,Z=void 0!==q&&q,J=i.recordAfter,X=void 0===J?"DOMContentLoaded"===t.recordAfter?t.recordAfter:"load":J,K=i.userTriggeredOnInput,Q=void 0!==K&&K,tt=i.collectFonts,rt=void 0!==tt&&tt,it=i.inlineImages,nt=void 0!==it&&it,st=i.plugins,ot=i.keepIframeSrcFn,at=void 0===ot?()=>!1:ot,ht=i.ignoreCSSAttributes,ut=void 0===ht?new Set([]):ht,lt=i.attributeFilter;Qo=i.errorHandler;var ft=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},F),ct=!Z||window.parent===window,vt=!1;if(!ct)try{window.parent.document&&(vt=!1)}catch(t){vt=!0}if(ct&&!n)throw new Error("emit function is required");if(!ct&&!vt)return()=>{};void 0!==U&&void 0===N.mousemove&&(N.mousemove=U),Za.reset();var dt,pt=!0===k?{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!==C?C:{password:!0},mt=fe(void 0!==M&&M);Ao();var yt,gt,wt=0,St=new Map,kt=t=>{for(var e of st||[])e.eventProcessor&&(t=e.eventProcessor(t));return _&&!vt&&(t=_(t)),t};Pa=(t,e)=>{var r,i=t;if(i.timestamp=mo(),!(null==(r=oa[0])?void 0:r.isFrozen())||i.type===Ho.FullSnapshot||i.type===Ho.IncrementalSnapshot&&Ja.has(i.data.source)||oa.forEach((t=>t.unfreeze())),ct)null==n||n(kt(i),e);else if(vt){var a={type:"rrweb",event:kt(i),origin:window.location.origin,isCheckout:e};window.parent.postMessage(a,"*")}if(i.type===Ho.FullSnapshot)dt=i,wt=0;else if(i.type===Ho.IncrementalSnapshot){if(i.data.source===zo.Mutation&&i.data.isAttachIframe)return;wt++,(o&&wt>=o||s&&i.timestamp-dt.timestamp>s)&&ja(!0)}};var Ct=t=>{if(t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null,i=new Set;if(t.adds.length>0)for(var n of t.adds){var s=Za.getNode(n.node.id);s&&"IFRAME"===s.nodeName&&i.add(s)}t.removes.forEach((t=>{var r=t.id;if(!e||!e.has(r)){var n=Et.getIframeElementById(r);n&&i.has(n)?Et.forgetIframeId(r):(null==yt||yt(r),Et.removeIframeById(r))}})),null==gt||gt(),Et.cleanupDetachedIframes()}Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.Mutation},t)})},Mt=t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.Scroll},t)}),xt=t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.CanvasMutation},t)}),At=new Va({mutationCb:Ct,adoptedStyleSheetCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.AdoptedStyleSheet},t)}),maskAllElementAttributes:I,maskAttributeFn:T}),Et=new Sa({mirror:Za,mutationCb:Ct,stylesheetManager:At,recordCrossOriginIframes:Z,wrappedEmit:Pa});for(var Rt of st||[])Rt.getMirror&&Rt.getMirror({nodeMirror:Za,crossOriginIframeMirror:Et.crossOriginIframeMirror,crossOriginIframeStyleMirror:Et.crossOriginIframeStyleMirror});var It=new $a,Tt=null==j?void 0:j.configured;Ua=new za({recordCanvas:Y,mutationCb:xt,win:window,blockClass:h,blockSelector:l,mirror:Za,sampling:N.canvas,dataURLOptions:ft,resolutionScale:B,canvasMasking:j});var Ot=new ka({mutationCb:Ct,scrollCb:Mt,bypassOptions:{blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskInputOptions:pt,dataURLOptions:ft,maskTextFn:A,maskInputFn:x,maskAllElementAttributes:I,maskAttributeFn:T,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,sampling:N,slimDOMOptions:mt,iframeManager:Et,stylesheetManager:At,canvasManager:Ua,keepIframeSrcFn:at,processedNodeManager:It,attributeFilter:lt},mirror:Za});ja=function(t){if(void 0===t&&(t=!1),H){z(S);try{Pa({type:Ho.Meta,data:{href:window.location.href,width:wo(),height:go()}},t),null==e||e.cancel(),e=void 0,At.reset(),Ot.init(),oa.forEach((t=>t.lock()));var r,i=null;try{i=function(t,e){var r=e||{},i=r.mirror,n=void 0===i?new bt:i,s=r.blockClass,o=void 0===s?"rr-block":s,a=r.blockSelector,h=void 0===a?null:a,u=r.maskTextClass,l=void 0===u?"rr-mask":u,f=r.maskTextSelector,c=void 0===f?null:f,v=r.inlineStylesheet,d=void 0===v||v,p=r.inlineImages,m=void 0!==p&&p,y=r.recordCanvas,g=void 0!==y&&y,w=r.canvasMaskingConfigured,b=r.maskAllInputs,S=void 0!==b&&b,k=r.maskTextFn,C=r.maskInputFn,M=r.maskAllElementAttributes,x=void 0!==M&&M,A=r.maskAttributeFn,E=r.slimDOM,R=r.dataURLOptions,I=r.preserveWhiteSpace,T=r.onSerialize,O=r.onIframeLoad,_=r.iframeLoadTimeout,D=r.onIframeListenerRegistered,N=r.onStylesheetLoad,L=r.stylesheetLoadTimeout,F=r.keepIframeSrcFn,B=void 0===F?()=>!1:F,P=r.maxDepth,j=r.inlineStylesheetBudgetRules,U=!0===S?{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===S?{password:!0}:S,W=fe(void 0!==E&&E);z(j);try{return le(t,{doc:t,mirror:n,blockClass:o,blockSelector:h,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:U,maskTextFn:k,maskInputFn:C,maskAllElementAttributes:x,maskAttributeFn:A,slimDOMOptions:W,dataURLOptions:R,inlineImages:m,recordCanvas:g,canvasMaskingConfigured:w,preserveWhiteSpace:I,onSerialize:T,onIframeLoad:O,iframeLoadTimeout:_,onIframeListenerRegistered:D,onStylesheetLoad:N,stylesheetLoadTimeout:L,keepIframeSrcFn:B,newlyAddedElement:!1,maxDepth:P})}finally{V()}}(document,{mirror:Za,blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskAllInputs:pt,inlineStylesheetBudgetRules:S,maskTextFn:A,maskInputFn:x,maskAllElementAttributes:I,maskAttributeFn:T,slimDOM:mt,dataURLOptions:ft,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,onSerialize(t){Io(t,Za)&&Et.addIframe(t),To(t,Za)&&At.trackLinkElement(t),_o(t)&&Ot.addShadowRoot(ao.shadowRoot(t),document)},onIframeLoad(t,e){Et.attachIframe(t,e),Ot.observeAttachShadow(t)},onIframeListenerRegistered(t,e){Et.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){At.attachLinkElement(t,e)},keepIframeSrcFn:at})}finally{s=P,P=[],r=s}if(!i)return console.warn("Failed to snapshot the document");if(Pa({type:Ho.FullSnapshot,data:{node:i,initialOffset:yo(window)}},t),oa.forEach((t=>t.unlock())),Ua.onFullSnapshot(),r.length){var n=function(t,e,r){var i=!1,n=null,s=0,o=null,a=()=>null!==o||t.length>s,h=()=>{var r=t[s];t[s]=null,s+=1,r&&lo((()=>{o=e.beginDeferredLinkInlining(r,Za.getId(r))}))},u=()=>{if(o){var t=o,e=!0;lo((()=>{e=t.advance(200)})),e&&(o=null)}},l=t=>{if(n=null,!i){var e=0;do{try{o||h(),u()}catch(t){null==o||o.discard(),o=null,et(1)}e+=1}while(!i&&a()&&(t?!t.didTimeout&&t.timeRemaining()>5:10>e));i||(a()?n=Xa(l):r())}};return n=Xa(l),{cancel(){i=!0,null==o||o.discard(),o=null,null==n||n.cancel(),n=null},flush(){if(!i){i=!0,null==n||n.cancel(),n=null;for(var e=0,l=0;a()&&50>e;){o||h();var f=o;if(f)if(Math.floor(f.remainingRules()/200)+1>50-e)f.discard(),o=null,l+=1;else{try{u()}catch(t){null==o||o.discard(),o=null,l+=1}e+=1}}if(a()||l>0){for(var c=l+(null!==o?1:0),v=s;t.length>v;v++)null!==t[v]&&(c+=1);et(c),null==o||o.discard(),o=null}r()}}}}(r,At,(()=>{e===n&&(e=void 0)}));e=n}Z&&Et.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&At.adoptStyleSheets(document.adoptedStyleSheets,Za.getId(document))}finally{V()}var s}};try{var _t=[];for(var Dt of(_t.push(ho("pagehide",(()=>{try{null==e||e.flush()}catch(t){}e=void 0}),window)),["visibilitychange","freeze","resume"]))_t.push(ho(Dt,R,document));yt=t=>{var e=St.get(t);e&&(e.forEach((t=>{lo(t);var e=_t.indexOf(t);-1!==e&&_t.splice(e,1)})),St.delete(t))},gt=()=>{for(var t of St){var e=t[0],r=Za.getNode(e);if(r)try{r.contentDocument&&r.contentDocument.defaultView||null==yt||yt(e)}catch(t){null==yt||yt(e)}else null==yt||yt(e)}};var Nt=t=>{var e;return sa(ya)({mutationCb:Ct,mousemoveCb:(t,e)=>Pa({type:Ho.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.MouseInteraction},t)}),scrollCb:Mt,viewportResizeCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.ViewportResize},t)}),inputCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.Input},t)}),mediaInteractionCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.MediaInteraction},t)}),styleSheetRuleCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.StyleSheetRule},t)}),styleDeclarationCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.StyleDeclaration},t)}),canvasMutationCb:xt,fontCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.Font},t)}),selectionCb(t){Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.Selection},t)})},customElementCb(t){Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.CustomElement},t)})},blockClass:h,ignoreClass:c,ignoreSelector:d,maskTextClass:m,maskTextSelector:g,maskInputOptions:pt,inlineStylesheet:b,sampling:N,recordDOM:H,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,userTriggeredOnInput:Q,collectFonts:rt,doc:t,maskInputFn:x,maskTextFn:A,maskAllElementAttributes:I,maskAttributeFn:T,keepIframeSrcFn:at,blockSelector:l,slimDOMOptions:mt,dataURLOptions:ft,mirror:Za,iframeManager:Et,stylesheetManager:At,shadowDomManager:Ot,processedNodeManager:It,canvasManager:Ua,ignoreCSSAttributes:ut,attributeFilter:lt,plugins:(null==(e=null==st?void 0:st.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>Pa({type:Ho.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},O)};Et.addLoadListener((t=>{try{var e=Za.getId(t),r=Nt(t.contentDocument);if("function"==typeof r&&(_t.push(r),-1!==e)){var i=St.get(e);i||St.set(e,i=new Set),i.add(r)}}catch(t){console.warn(t)}})),Et.addPageHideListener((t=>{var e=Za.getId(t);null==yt||yt(e),la(t)}));var Lt=-1,Ft=t=>Pa({type:Ho.Custom,data:{tag:Go,payload:t}}),Bt=()=>{var t,e,r,i,n=document,s=null!==(t=null!==(e=null!==(r=null!==(i=n.fullscreenElement)&&void 0!==i?i:n.webkitFullscreenElement)&&void 0!==r?r:n.mozFullScreenElement)&&void 0!==e?e:n.msFullscreenElement)&&void 0!==t?t:null,o=s?Za.getId(s):-1;o!==Lt&&(-1!==Lt&&Ft({id:Lt,enter:!1}),Lt=o,-1!==o&&Ft({id:o,enter:!0}))},Pt=()=>{ja();var t=Nt(document);"function"==typeof t&&_t.push(t),_t.push(ho("fullscreenchange",Bt)),_t.push(ho("webkitfullscreenchange",Bt)),_t.push(ho("mozfullscreenchange",Bt)),_t.push(ho("MSFullscreenChange",Bt)),Ya=!0};return["interactive","complete"].includes(document.readyState)?Pt():(_t.push(ho("DOMContentLoaded",(()=>{Pa({type:Ho.DomContentLoaded,data:{}}),"DOMContentLoaded"===X&&Pt()}))),_t.push(ho("load",(()=>{Pa({type:Ho.Load,data:{}}),"load"===X&&Pt()}),window))),()=>{try{null==e||e.flush()}catch(t){}e=void 0,_t.forEach((t=>lo(t))),It.destroy(),Et.removeLoadListener(),Et.destroy(),St.clear(),Ot.reset(),Za.reset(),Ya=!1,Qo=void 0}}catch(t){console.warn(t)}}function Qa(t){return{all:t=t||new Map,on(e,r){var i=t.get(e);i?i.push(r):t.set(e,[r])},off(e,r){var i=t.get(e);i&&(r?i.splice(i.indexOf(r)>>>0,1):t.set(e,[]))},emit(e,r){var i=t.get(e);i&&i.slice().map((function(t){t(r)})),(i=t.get("*"))&&i.slice().map((function(t){t(e,r)}))}}}Ka.addCustomEvent=(t,e)=>{if(!Ya)throw new Error("please add custom event after start recording");Pa({type:Ho.Custom,data:{tag:t,payload:e}})},Ka.freezePage=()=>{oa.forEach((t=>t.freeze()))},Ka.takeFullSnapshot=t=>{if(!Ya)throw new Error("please take full snapshot after start recording");ja(t)},Ka.mirror=Za;var th,eh,rh=Object.freeze(Object.defineProperty({__proto__:null,default:Qa},Symbol.toStringTag,{value:"Module"}));function ih(t,e){if(void 0===t&&(t=window),void 0===e&&(e=document),!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var r,i=t.HTMLElement||t.Element,n=468,s={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||h,scrollIntoView:i.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,a=(r=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?d.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):s.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(u(arguments[0])?s.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):d.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==u(arguments[0])){var t=arguments[0].left,e=arguments[0].top;d.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==u(arguments[0])){var r=function(t){for(;t!==e.body&&!1===c(t);)t=t.parentNode||t.host;return t}(this),i=r.getBoundingClientRect(),n=this.getBoundingClientRect();r!==e.body?(d.call(this,r,r.scrollLeft+n.left-i.left,r.scrollTop+n.top-i.top),"fixed"!==t.getComputedStyle(r).position&&t.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):t.scrollBy({left:n.left,top:n.top,behavior:"smooth"})}else s.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function h(t,e){this.scrollLeft=t,this.scrollTop=e}function u(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(t,e){return"Y"===e?t.scrollHeight>t.clientHeight+a:"X"===e?t.scrollWidth>t.clientWidth+a:void 0}function f(e,r){var i=t.getComputedStyle(e,null)["overflow"+r];return"auto"===i||"scroll"===i}function c(t){var e=l(t,"Y")&&f(t,"Y"),r=l(t,"X")&&f(t,"X");return e||r}function v(e){var r,i,s,a=(o()-e.startTime)/n;a=a>1?1:a,r=.5*(1-Math.cos(Math.PI*a)),e.method.call(e.scrollable,i=e.startX+(e.x-e.startX)*r,s=e.startY+(e.y-e.startY)*r),i===e.x&&s===e.y||t.requestAnimationFrame(v.bind(t,e))}function d(r,i,n){var a,u,l,f,c=o();r===e.body?(a=t,u=t.scrollX||t.pageXOffset,l=t.scrollY||t.pageYOffset,f=s.scroll):(a=r,u=r.scrollLeft,l=r.scrollTop,f=h),v({scrollable:a,method:f,startTime:c,startX:u,startY:l,x:i,y:n})}}class nh{constructor(t,e){void 0===t&&(t=[]),u(this,"timeOffset",0),u(this,"speed"),u(this,"actions"),u(this,"raf",null),u(this,"lastTimestamp"),this.actions=t,this.speed=e.speed}addAction(t){var e=!0===this.raf;if(this.actions.length&&this.actions[this.actions.length-1].delay>t.delay){var r=this.findActionIndex(t);this.actions.splice(r,0,t)}else this.actions.push(t);e&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){var t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){var e=this.actions[0];if(e.delay>this.timeOffset)break;this.actions.shift(),e.doAction()}this.raf=0>=this.actions.length||requestAnimationFrame(this.rafCheck.bind(this))}clear(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return null!==this.raf}findActionIndex(t){for(var e=0,r=this.actions.length-1;r>=e;){var i=Math.floor((e+r)/2);if(t.delay>this.actions[i].delay)e=i+1;else{if(t.delay>=this.actions[i].delay)return i+1;r=i-1}}return e}}function sh(t,e){if(t.type===Ho.IncrementalSnapshot&&t.data.source===zo.MouseMove&&t.data.positions&&t.data.positions.length){var r=t.timestamp+t.data.positions[0].timeOffset;return t.delay=r-e,r-e}return t.delay=t.timestamp-e,t.delay}function oh(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}(eh=th||(th={}))[eh.NotStarted=0]="NotStarted",eh[eh.Running=1]="Running",eh[eh.Stopped=2]="Stopped";var ah={type:"xstate.init"};function hh(t){return void 0===t?[]:[].concat(t)}function uh(t){return{type:"xstate.assign",assignment:t}}function lh(t,e){return"string"==typeof(t="string"==typeof t&&e&&e[t]?e[t]:t)?{type:t}:"function"==typeof t?{type:t.name,exec:t}:t}function fh(t){return function(e){return t===e}}function ch(t){return"string"==typeof t?{type:t}:t}function vh(t,e){return{value:t,context:e,actions:[],changed:!1,matches:fh(t)}}function dh(t,e,r){var i=e,n=!1;return[t.filter((function(t){if("xstate.assign"===t.type){n=!0;var e=Object.assign({},i);return"function"==typeof t.assignment?e=t.assignment(i,r):Object.keys(t.assignment).forEach((function(n){e[n]="function"==typeof t.assignment[n]?t.assignment[n](i,r):t.assignment[n]})),i=e,!1}return!0})),i,n]}function ph(t,e){void 0===e&&(e={});var r=oh(dh(hh(t.states[t.initial].entry).map((function(t){return lh(t,e.actions)})),t.context,ah),2),i={config:t,ie:e,initialState:{value:t.initial,actions:r[0],context:r[1],matches:fh(t.initial)},transition(e,r){var n,s,o="string"==typeof e?{value:e,context:t.context}:e,a=o.value,h=o.context,u=ch(r),l=t.states[a];if(l.on){var f=hh(l.on[u.type]);try{for(var c=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:()=>(t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t})}}(f),v=c.next();!v.done;v=c.next()){var d=v.value;if(void 0===d)return vh(a,h);var p="string"==typeof d?{target:d}:d,m=p.target,y=void 0===m?a:m,g=p.actions,w=void 0===g?[]:g,b=p.cond;if((void 0===b?function(){return!0}:b)(h,u)){var S=oh(dh([].concat(l.exit,w,t.states[y].entry).filter((function(t){return t})).map((function(t){return lh(t,i.ie.actions)})),h,u),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==a||k.length>0||S[2],matches:fh(y)}}}}catch(t){n={error:t}}finally{try{v&&!v.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}}return vh(a,h)}};return i}var mh=function(t,e){return t.actions.forEach((function(r){var i=r.exec;return i&&i(t.context,e)}))};function yh(t){var e=t.initialState,r=th.NotStarted,i=new Set,n={l:t,send(n){r===th.Running&&(e=t.transition(e,n),mh(e,ch(n)),i.forEach((function(t){return t(e)})))},subscribe:t=>(i.add(t),t(e),{unsubscribe:()=>i.delete(t)}),start(i){if(i){var s="object"==typeof i?i:{context:t.config.context,value:i};e={value:s.value,actions:[],context:s.context,matches:fh(s.value)}}return r=th.Running,mh(e,ah),n},stop:()=>(r=th.Stopped,i.clear(),n),get state(){return e},get status(){return r}};return n}function gh(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===Ho.Meta&&e>=i.timestamp)return t.slice(r)}return t}var wh=new Map;function bh(t,e){var r=wh.get(t);return r||wh.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}function Sh(t,r,i){return function(){var n=e((function*(e){if(e&&"object"==typeof e&&"rr_type"in e){if(i&&(i.isUnchanged=!1),"ImageBitmap"===e.rr_type&&"args"in e){var n=yield Sh(t,r,i)(e.args);return yield createImageBitmap.apply(null,n)}if("index"in e){if(i||null===r)return e;var s=e.index;return bh(r,e.rr_type)[s]}if("args"in e){var o=e.args;return new(0,window[e.rr_type])(...yield Promise.all(o.map(Sh(t,r,i))))}if("base64"in e)return Ra(e.base64);if("src"in e){var a=t.get(e.src);if(a)return a;var h=new Image;return h.src=e.src,t.set(e.src,h),h}if("data"in e&&"Blob"===e.rr_type){var u=yield Promise.all(e.data.map(Sh(t,r,i)));return new Blob(u,{type:e.type})}}else if(Array.isArray(e))return yield Promise.all(e.map(Sh(t,r,i)));return e}));return function(t){return n.apply(this,arguments)}}()}var kh=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ch(t){return Mh.apply(this,arguments)}function Mh(){return(Mh=e((function*(t){var e=t.mutation,r=t.target,i=t.type,n=t.imageMap,s=t.errorHandler;try{var o=function(t,e){try{return e===Yo.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch(t){return null}}(r,i);if(!o)return;if(e.setter)return void(o[e.property]=e.args[0]);var a=o[e.property],h=yield Promise.all(e.args.map(Sh(n,o)));!function(t,e){if(null==e?void 0:e.constructor){var r=e.constructor.name;if(kh.includes(r)){var i=bh(t,r);i.includes(e)||i.push(e)}}}(o,a.apply(o,h))}catch(t){s(e,t)}}))).apply(this,arguments)}function xh(){return xh=e((function*(t){var r=t.event,i=t.mutations,n=t.imageMap,s=t.errorHandler,o=t.target.getContext("2d");if(o){var a=i.map(function(){var t=e((function*(t){return Promise.all(t.args.map(Sh(n,o)))}));return function(e){return t.apply(this,arguments)}}());(yield Promise.all(a)).forEach(((t,e)=>{var a=i[e];try{if(a.setter)return void(o[a.property]=a.args[0]);var h=o[a.property];"drawImage"===a.property&&"string"==typeof a.args[0]?(n.get(r),h.apply(o,a.args)):h.apply(o,t)}catch(t){s(a,t)}}))}else s(i[0],new Error("Canvas context is null"))})),xh.apply(this,arguments)}function Ah(t){return Eh.apply(this,arguments)}function Eh(){return Eh=e((function*(t){var e=t.event,r=t.mutation,i=t.target,n=t.imageMap,s=t.canvasEventMap,o=t.errorHandler;try{var a=s.get(e)||r,h="commands"in a?a.commands:[a];if([Yo.WebGL,Yo.WebGL2].includes(r.type)){for(var u=0;h.length>u;u++){var l=h[u];yield Ch({mutation:l,type:r.type,target:i,imageMap:n,errorHandler:o})}return}yield function(t){return xh.apply(this,arguments)}({event:e,mutations:h,target:i,imageMap:n,errorHandler:o})}catch(t){o(r,t)}})),Eh.apply(this,arguments)}var Rh=["AUDIO","VIDEO"];class Ih{constructor(t){u(this,"mediaMap",new Map),u(this,"warn"),u(this,"service"),u(this,"speedService"),u(this,"emitter"),u(this,"getCurrentTime"),u(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(Zo.Start,this.start.bind(this)),this.emitter.on(Zo.SkipStart,this.start.bind(this)),this.emitter.on(Zo.Pause,this.pause.bind(this)),this.emitter.on(Zo.Finish,this.pause.bind(this)),this.speedService.subscribe((()=>{this.syncAllMediaElements()}))}syncAllMediaElements(t){void 0===t&&(t={pause:!1}),this.mediaMap.forEach(((e,r)=>{this.syncTargetWithState(r),t.pause&&r.pause()}))}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo(t){var e=t.target,r=t.mediaState;if(r.isPlaying){var i=(t.time-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in e&&e.duration;if(Number.isNaN(n))return void this.waitForMetadata(e);var s=r.currentTimeAtLastInteraction+i;e.loop&&!1!==n&&(s%=n),e.currentTime=s}else e.pause(),e.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(t){if(!this.metadataCallbackMap.has(t)&&"addEventListener"in t){var e=()=>{this.metadataCallbackMap.delete(t);var e=this.mediaMap.get(t);e&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e})};this.metadataCallbackMap.set(t,e),t.addEventListener("loadedmetadata",e,{once:!0})}}getMediaStateFromMutation(t){var e,r,i,n,s,o=t.target,a=t.timeOffset,h=t.mutation,u=this.mediaMap.get(o),l=h.type,f=h.playbackRate,c=h.currentTime,v=h.muted,d=h.volume,p=h.loop;return{isPlaying:l===qo.Play||l!==qo.Pause&&((null==u?void 0:u.isPlaying)||null!==o.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(e=null!=c?c:null==u?void 0:u.currentTimeAtLastInteraction)&&void 0!==e?e:0,lastInteractionTimeOffset:a,playbackRate:null!==(r=null!=f?f:null==u?void 0:u.playbackRate)&&void 0!==r?r:1,volume:null!==(i=null!=d?d:null==u?void 0:u.volume)&&void 0!==i?i:1,muted:null!==(n=null!=v?v:null==u?void 0:u.muted)&&void 0!==n?n:null===o.getAttribute("muted"),loop:null!==(s=null!=p?p:null==u?void 0:u.loop)&&void 0!==s?s:null===o.getAttribute("loop")}}syncTargetWithState(t){var e=this.mediaMap.get(t);if(e){var r=e.muted,i=e.loop,n=e.volume,s=e.isPlaying,o=this.service.state.matches("paused"),a=e.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e}),t.volume!==n&&(t.volume=n),t.muted=r,t.loop=i,t.playbackRate!==a&&(t.playbackRate=a),s&&!o?t.play():t.pause()}catch(t){this.warn("Failed to replay media interactions: "+(t.message||t))}}}addMediaElements(t,e,r){if(this.isSupportedMediaElement(t)){var i=t,n=r.getMeta(i);if(n&&"attributes"in n){var s,o=this.service.state.matches("paused"),a=n.attributes;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==i.getAttribute("autoplay"))&&o&&i.pause();var h=1;"number"==typeof a.rr_mediaPlaybackRate&&(h=a.rr_mediaPlaybackRate);var u;u="boolean"==typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==i.getAttribute("muted");var l;l="boolean"==typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==i.getAttribute("loop");var f=1;"number"==typeof a.rr_mediaVolume&&(f=a.rr_mediaVolume);var c=0;"number"==typeof a.rr_mediaCurrentTime&&(c=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:s,currentTimeAtLastInteraction:c,lastInteractionTimeOffset:e,playbackRate:h,volume:f,muted:u,loop:l}),this.syncTargetWithState(i)}}}mediaMutation(t){var e=t.target,r=t.timeOffset,i=t.mutation;Rh.includes(e.nodeName)&&(this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:i})),this.syncTargetWithState(e))}isSupportedMediaElement(t){return Rh.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Th(t,e){if(!("DIALOG"!==t.nodeName||t instanceof vs)){var r=t,i=r.open,n=i&&r.matches("dialog:modal"),s=r.getAttribute("rr_open_mode"),o="string"==typeof(null==e?void 0:e.attributes.open)||"string"==typeof r.getAttribute("open"),a="modal"===s;i&&!(n&&"non-modal"===s||!n&&a)||(r.isConnected?(i&&r.close(),o&&(a?r.showModal():r.show())):console.warn("dialog is not attached to the dom",r))}}var Oh=Qa||rh,_h="[replayer]",Dh={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Nh(t){return t.type==Ho.IncrementalSnapshot&&(t.data.source==zo.TouchMove||t.data.source==zo.MouseInteraction&&t.data.type==Vo.TouchStart)}class Lh{constructor(t,e){var i=this;if(u(this,"wrapper"),u(this,"iframe"),u(this,"service"),u(this,"speedService"),u(this,"config"),u(this,"usingVirtualDom",!1),u(this,"virtualDom",new Fs),u(this,"mouse"),u(this,"mouseTail",null),u(this,"tailPositions",[]),u(this,"emitter",Oh()),u(this,"nextUserInteractionEvent"),u(this,"legacy_missingNodeRetryMap",{}),u(this,"cache",ri()),u(this,"imageMap",new Map),u(this,"canvasEventMap",new Map),u(this,"mirror",St()),u(this,"styleMirror",new Fo),u(this,"pendingAdoptedStyleSheets",new Map),u(this,"adoptedStyleSheetTokens",new Map),u(this,"mediaManager"),u(this,"firstFullSnapshot",null),u(this,"newDocumentQueue",[]),u(this,"mousePos",null),u(this,"touchActive",null),u(this,"lastMouseDownEvent",null),u(this,"lastHoveredRootNode"),u(this,"lastSelectionData",null),u(this,"lastScrollMap",new Map),u(this,"constructedStyleMutations",[]),u(this,"adoptedStyleSheets",[]),u(this,"emitterHandlers",[]),u(this,"serviceSubscription"),u(this,"speedServiceSubscription"),u(this,"timeouts",new Set),u(this,"applyGeneration",0),u(this,"seekRebuildInFlight",!1),u(this,"styleSheetLoadListeners",new Map),u(this,"handleResize",(t=>{for(var e of(this.iframe.style.display="inherit",[this.mouseTail,this.iframe]))e&&(e.setAttribute("width",String(t.width)),e.setAttribute("height",String(t.height)))})),u(this,"shouldCastInSyncMode",(t=>{switch(t.type){case Ho.DomContentLoaded:case Ho.Load:return!1;case Ho.Custom:return t.data.tag===Go;default:return!0}})),u(this,"applyEvents",((t,e)=>{var r,i=++this.applyGeneration;this.seekRebuildInFlight=!0,this.discardStaleFlushBuffers(),function(t){var e,r=t.events,i=t.castEvent,n=t.yieldBudgetMs,s=t.schedule,o=t.isCancelled,a=t.onComplete,h=null!==(e=t.now)&&void 0!==e?e:()=>performance.now(),u=0,l=t=>{if(t||!o()){var e=(()=>{for(var t=n>0?h()+n:1/0;r.length>u;){if(i(r[u]),u++,o())return!1;if(h()>=t)break}return u>=r.length})();o()||(e?a(t):s((()=>l(!1))))}};l(!0)}({events:t.filter(this.shouldCastInSyncMode),castEvent:t=>this.getCastFn(t,!0)(),yieldBudgetMs:null!==(r=this.config.seekYieldBudgetMs)&&void 0!==r?r:0,schedule:t=>{this.addTimeout(t,0)},isCancelled:()=>i!==this.applyGeneration,onComplete:t=>{this.seekRebuildInFlight=!1,this.emitter.emit(Zo.Flush),t||this.service.state.matches("playing")?e():this.service.state.matches("paused")&&(this.timer.clear(),this.timer.timeOffset=0)}})})),u(this,"getCastFn",(function(t,e){var n;switch(void 0===e&&(e=!1),t.type){case Ho.DomContentLoaded:case Ho.Load:break;case Ho.Custom:n=()=>{e||i.emitter.emit(Zo.CustomEvent,t),t.data.tag===Go&&i.applyFullscreen(t.data.payload)};break;case Ho.Meta:n=()=>i.emitter.emit(Zo.Resize,{width:t.data.width,height:t.data.height});break;case Ho.FullSnapshot:n=()=>{var n;if(i.clearFullscreen(),i.firstFullSnapshot){if(i.firstFullSnapshot===t)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.mediaManager.reset(),i.styleMirror.reset(),i.pendingAdoptedStyleSheets.clear(),i.adoptedStyleSheetTokens.clear(),i.rebuildFullSnapshot(t,e),null==(n=i.iframe.contentWindow)||n.scrollTo(r({},t.data.initialOffset,{behavior:"instant"}))};break;case Ho.IncrementalSnapshot:n=()=>{if(i.applyIncremental(t,e),!e&&(t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){for(var r of i.service.state.context.events)if(r.timestamp>t.timestamp&&i.isUserInteraction(r)){r.delay-t.delay>i.config.inactivePeriodThreshold*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=r);break}if(i.nextUserInteractionEvent){var n={speed:Math.min(Math.round((i.nextUserInteractionEvent.delay-t.delay)/5e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:n}),i.emitter.emit(Zo.SkipStart,n)}}}}return()=>{for(var r of(n&&n(),i.config.plugins||[]))r.handler&&r.handler(t,e,{replayer:i});i.service.send({type:"CAST_EVENT",payload:{event:t}});var s=i.service.state.context.events.length-1;if(!i.config.liveMode&&t===i.service.state.context.events[s]){var o=i.applyGeneration,a=()=>{o===i.applyGeneration&&(i.seekRebuildInFlight?i.addTimeout(a,50):i.service.state.context.events.length-1>s||(i.backToNormal(),i.service.send("END"),i.emitter.emit(Zo.Finish)))},h=50;t.type===Ho.IncrementalSnapshot&&t.data.source===zo.MouseMove&&t.data.positions.length&&(h+=Math.max(0,-t.data.positions[0].timeOffset)),setTimeout(a,h)}i.emitter.emit(Zo.EventCast,t)}})),!(null==e?void 0:e.liveMode)&&2>t.length)throw new Error("Replayer need at least 2 events.");var n={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Dh,useVirtualDom:!0,seekYieldBudgetMs:0,logger:console};for(var s of(this.config=Object.assign({},n,e),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEvents=this.applyEvents.bind(this),this.addEmitterHandler(Zo.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))s.getMirror&&s.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(Zo.Flush,(()=>{if(this.usingVirtualDom){var t={mirror:this.mirror,applyCanvas:(t,e,r)=>{Ah({event:t,mutation:e,target:r,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(t,e)=>{t.source===zo.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===zo.StyleDeclaration&&this.applyStyleDeclaration(t,e)},afterAppend:(t,e)=>{for(var r of this.config.plugins||[])r.onBuild&&r.onBuild(t,{id:e,replayer:this})}};if(this.iframe.contentDocument)try{Ts(this.iframe.contentDocument,this.virtualDom,t,this.virtualDom.mirror)}catch(t){this.warn(t)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(var e in this.legacy_missingNodeRetryMap)try{var r=this.legacy_missingNodeRetryMap[e],i=Ds(r.node,this.mirror,this.virtualDom.mirror);Ts(i,r.node,t,this.virtualDom.mirror),r.node=i}catch(t){this.warn(t)}this.constructedStyleMutations.forEach((t=>{this.applyStyleSheetMutation(t)})),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach((t=>{this.applyAdoptedStyleSheet(t)})),this.adoptedStyleSheets=[],this.pendingAdoptedStyleSheets.forEach(((t,e)=>{this.applyAdoptedStyleSheet({source:zo.AdoptedStyleSheet,id:e,styleIds:t})}))}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){var n=this.lastMouseDownEvent;n[0].dispatchEvent(n[1])}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null),this.lastScrollMap.size&&(this.lastScrollMap.forEach((t=>{this.applyScroll(t,!0)})),this.lastScrollMap.clear())})),this.addEmitterHandler(Zo.PlayBack,(()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.lastScrollMap.clear()}));var o,a,h,l,f,c=new nh([],{speed:this.config.speed});this.service=(o={events:t.map((t=>e&&e.unpackFn?e.unpackFn(t):t)).sort(((t,e)=>t.timestamp-e.timestamp)),timer:c,timeOffset:0,baselineTime:0,lastPlayedEvent:null},h=(a={getCastFn:this.getCastFn,applyEvents:this.applyEvents,emitter:this.emitter}).getCastFn,l=a.applyEvents,f=a.emitter,yh(ph({id:"player",context:o,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},RESET_LAST_PLAYED:{target:"playing",actions:["resetLastPlayedEvent"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},RESET_LAST_PLAYED:{target:"paused",actions:["resetLastPlayedEvent"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:uh({lastPlayedEvent:(t,e)=>"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}),recordTimeOffset:uh(((t,e)=>{var i=t.timeOffset;return"payload"in e&&"timeOffset"in e.payload&&(i=e.payload.timeOffset),r({},t,{timeOffset:i,baselineTime:t.events[0].timestamp+i})})),play(t){var e,r=t.timer,i=t.events,n=t.baselineTime,s=t.lastPlayedEvent;for(var o of(r.clear(),r.timeOffset=0,i))sh(o,n);var a=gh(i,n),u=a.some((t=>t.type===Ho.FullSnapshot&&t.timestamp===n)),c=null==s?void 0:s.timestamp;(null==s?void 0:s.type)===Ho.IncrementalSnapshot&&s.data.source===zo.MouseMove&&(c=s.timestamp+(null==(e=s.data.positions[0])?void 0:e.timeOffset)),(c||0)>n&&f.emit(Zo.PlayBack);var v=new Array;for(var d of a)(!c||c>=n||d.timestamp>c&&d!==s)&&(n>d.timestamp||u&&d.timestamp===n&&(d.type===Ho.Meta||d.type===Ho.FullSnapshot))&&v.push(d);l(v,(()=>{var e=function(){if(n>i.timestamp||u&&i.timestamp===n&&(i.type===Ho.Meta||i.type===Ho.FullSnapshot))return 0;if(c&&n>c&&i===s)return 0;var t=h(i,!1);r.addAction({doAction(){t()},delay:i.delay})};for(var i of gh(t.events,n))e();r.start()}))},pause(t){t.timer.clear()},resetLastPlayedEvent:uh((t=>r({},t,{lastPlayedEvent:null}))),startLive:uh({baselineTime:(t,e)=>(t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now())}),addEvent:uh(((t,e)=>{var i=t.baselineTime,n=t.timer,s=t.events;if("ADD_EVENT"===e.type){var o=e.payload.event;sh(o,i);var a=s.length-1;if(s[a]&&s[a].timestamp>o.timestamp){for(var u=-1,l=0;a>=l;){var f=Math.floor((l+a)/2);s[f].timestamp>o.timestamp?a=f-1:l=f+1}-1===u&&(u=l),s.splice(u,0,o)}else s.push(o);if(i>o.timestamp)e.payload.applyPastEventSynchronously&&h(o,!0)();else if(n.isActive()){var c=h(o,!1);n.addAction({doAction(){c()},delay:o.delay})}}return r({},t,{events:s})}))}}))),this.service.start(),this.serviceSubscription=this.service.subscribe((t=>{this.emitter.emit(Zo.StateChange,{player:t})})),this.speedService=function(t){return yh(ph({id:"speed",context:t,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed(t,e){"payload"in e&&t.timer.setSpeed(e.payload.speed)},recordSpeed:uh({normalSpeed(t){return t.timer.speed}}),restoreSpeed(t){t.timer.setSpeed(t.normalSpeed)}}}))}({normalSpeed:-1,timer:c}),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe((t=>{this.emitter.emit(Zo.StateChange,{speed:t})})),this.mediaManager=new Ih({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var v=this.service.state.context.events.find((t=>t.type===Ho.Meta)),d=this.service.state.context.events.find((t=>t.type===Ho.FullSnapshot));if(v){var p=v.data,m=p.width,y=p.height;this.addTimeout((()=>{this.emitter.emit(Zo.Resize,{width:m,height:y})}),0)}d&&this.addTimeout((()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=d,this.rebuildFullSnapshot(d),null==(t=this.iframe.contentWindow)||t.scrollTo(r({},d.data.initialOffset,{behavior:"instant"})))}),1),this.service.state.context.events.find(Nh)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,e){return this.emitter.on(t,e),this}off(t,e){return this.emitter.off(t,e),this}addEmitterHandler(t,e){this.emitter.on(t,e),this.emitterHandlers.push({event:t,handler:e})}addTimeout(t,e){var r=setTimeout((()=>{this.timeouts.delete(r),t()}),e);return this.timeouts.add(r),r}setConfig(t){Object.keys(t).forEach((e=>{this.config[e]=t[e]})),this.config.skipInactive||this.backToNormal(),void 0!==t.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),void 0!==t.mouseTail&&(!1===t.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){var t=this.service.state.context.events[0],e=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:e.timestamp,totalTime:e.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){var t=this.service.state.context;return t.baselineTime-t.events[0].timestamp}getMirror(){return this.mirror}play(t){var e,r;void 0===t&&(t=0),this.seekRebuildInFlight&&this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.remove("rrweb-paused"),this.emitter.emit(Zo.Start)}pause(t){var e,r;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.add("rrweb-paused"),this.emitter.emit(Zo.Pause)}resume(t){void 0===t&&(t=0),this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(Zo.Resume)}destroy(){var t,e;this.wrapper&&this.wrapper.parentNode&&(this.pause(),this.emitterHandlers.forEach((t=>{this.emitter.off(t.event,t.handler)})),this.emitterHandlers=[],null==(t=this.serviceSubscription)||t.unsubscribe(),null==(e=this.speedServiceSubscription)||e.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.service.stop(),this.speedService.stop(),this.timeouts.forEach((t=>clearTimeout(t))),this.timeouts.clear(),this.styleSheetLoadListeners.forEach(((t,e)=>{e.removeEventListener("load",t)})),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Zo.Destroy))}startLive(t){this.applyGeneration++,this.seekRebuildInFlight&&(this.seekRebuildInFlight=!1,this.emitter.emit(Zo.Flush),this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("playing")&&this.service.send({type:"PAUSE"})),this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){var e=this.config.unpackFn?this.config.unpackFn(t):t;Nh(e)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((()=>this.service.send({type:"ADD_EVENT",payload:{event:e,applyPastEventSynchronously:this.config.liveMode}})))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=ri()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(ih(this.iframe.contentWindow,this.iframe.contentDocument),Ao(this.iframe.contentWindow))}applyFullscreen(t){var e=t;if(e&&"number"==typeof e.id&&"boolean"==typeof e.enter){var r=this.mirror.getNode(e.id);if(r&&r.nodeType===Node.ELEMENT_NODE){var i=r;e.enter?i.setAttribute("rr_fullscreen",""):i.removeAttribute("rr_fullscreen")}}}clearFullscreen(){var t;null==(t=this.iframe.contentDocument)||t.querySelectorAll("[rr_fullscreen]").forEach((t=>t.removeAttribute("rr_fullscreen")))}discardStaleFlushBuffers(){this.lastScrollMap.clear(),this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[]}rebuildFullSnapshot(t,e){var r=this;if(void 0===e&&(e=!1),!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var i=[],n=new Set,s=(e,r)=>{for(var s of("DIALOG"===e.nodeName&&n.add(e),this.collectIframeAndAttachDocument(i,e),this.mediaManager.isSupportedMediaElement(e)&&this.mediaManager.addMediaElements(e,t.timestamp-this.service.state.context.events[0].timestamp,this.mirror),this.config.plugins||[]))s.onBuild&&s.onBuild(e,{id:r,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),function(t,e){var r=e.doc,i=e.onVisit,n=e.hackCss,s=void 0===n||n,o=e.afterAppend,a=e.cache,h=e.mirror,u=void 0===h?new bt:h,l=oi(t,{doc:r,mirror:u,skipChild:!1,hackCss:s,afterAppend:o,cache:a});(function(t,e){for(var r of t.getIds())t.has(r)&&e(t.getNode(r))})(u,(t=>{i&&i(t),function(t,e){var r=e.getMeta(t);if((null==r?void 0:r.type)===c.Element){var i=t;for(var n in r.attributes)if({}.hasOwnProperty.call(r.attributes,n)&&n.startsWith("rr_")){var s=r.attributes[n];"rr_scrollLeft"===n&&(i.scrollLeft=s),"rr_scrollTop"===n&&(i.scrollTop=s)}}}(t,u)}))}(t.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(this.iframe.contentDocument,t.data.node.id);var o=function(){var t=a.mutationInQueue;r.attachDocumentToIframe(t,a.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var a of i)o();var h=this.iframe.contentDocument;this.insertStyleRules(h.documentElement,h.head),n.forEach((t=>Th(t))),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Zo.FullsnapshotRebuilded,t),e||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,e){var r,i,n=(i=this.config.blockClass,["."+i+" { background: currentColor }","noscript { display: none !important; }","[rr_fullscreen] { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; max-width: none !important; max-height: none !important; z-index: 2147483647 !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&n.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var s=this.virtualDom.createElement("style");this.virtualDom.mirror.add(s,Zs(s,this.virtualDom.unserializedId)),t.insertBefore(s,e),s.rules.push({source:zo.StyleSheetRule,adds:n.map(((t,e)=>({rule:t,index:e})))})}else{var o=document.createElement("style");t.insertBefore(o,e);for(var a=0;n.length>a;a++)null==(r=o.sheet)||r.insertRule(n[a],a)}}attachDocumentToIframe(t,e){var r=this,i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],s=new Set,o=(t,r)=>{"DIALOG"===t.nodeName&&s.add(t),this.collectIframeAndAttachDocument(n,t);var o=i.getMeta(t);if((null==o?void 0:o.type)===Jo.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){var a=e.contentDocument;this.insertStyleRules(a.documentElement,a.head)}if(!this.usingVirtualDom)for(var h of this.config.plugins||[])h.onBuild&&h.onBuild(t,{id:r,replayer:this})};oi(t.node,{doc:e.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(e.contentDocument,t.node.id);var a=function(){var t=h.mutationInQueue;r.attachDocumentToIframe(t,h.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var h of n)a();s.forEach((t=>Th(t)))}collectIframeAndAttachDocument(t,e){if(Io(e,this.mirror)){var r=this.newDocumentQueue.find((t=>t.parentId===this.mirror.getId(e)));r&&t.push({mutationInQueue:r,builtNode:e})}}waitForStylesheetLoad(){var t,e=null==(t=this.iframe.contentDocument)?void 0:t.head;if(e){var r,i=new Set,n=this.service.state,s=()=>{n=this.service.state};this.emitter.on(Zo.Start,s),this.emitter.on(Zo.Pause,s);var o=()=>{this.emitter.off(Zo.Start,s),this.emitter.off(Zo.Pause,s)};e.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.sheet||(i.add(t),t.addEventListener("load",(()=>{i.delete(t),0===i.size&&-1!==r&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Zo.LoadStylesheetEnd),r&&clearTimeout(r),o())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Zo.LoadStylesheetStart),r=setTimeout((()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,o()}),this.config.loadTimeout))}}preloadAllImages(){var t=this;return e((function*(){var e=[],r=function*(r){r.type===Ho.IncrementalSnapshot&&r.data.source===zo.CanvasMutation&&(e.push(t.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach((e=>{t.preloadImages(e,r)})))};for(var i of t.service.state.context.events)yield*r(i);return Promise.all(e)}))()}preloadImages(t,e){if("drawImage"===t.property&&"string"==typeof t.args[0]&&!this.imageMap.has(e)){var r=document.createElement("canvas"),i=r.getContext("2d"),n=null==i?void 0:i.createImageData(r.width,r.height);null==i||i.putImageData(n,0,0)}}deserializeAndPreloadCanvasEvents(t,i){var n=this;return e((function*(){if(!n.canvasEventMap.has(i)){var s={isUnchanged:!0};if("commands"in t){var o=yield Promise.all(t.commands.map(function(){var t=e((function*(t){var e=yield Promise.all(t.args.map(Sh(n.imageMap,null,s)));return r({},t,{args:e})}));return function(e){return t.apply(this,arguments)}}()));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{commands:o}))}else{var a=yield Promise.all(t.args.map(Sh(n.imageMap,null,s)));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{args:a}))}}}))()}applyIncremental(t,e){var r,i,n,s=t.data;switch(s.source){case zo.Mutation:try{this.applyMutation(s,e)}catch(t){this.warn("Exception in mutation "+(t.message||t),s)}break;case zo.Drag:case zo.TouchMove:case zo.MouseMove:if(e){var o=s.positions[s.positions.length-1];this.mousePos={x:o.x,y:o.y,id:o.id,debugData:s}}else s.positions.forEach((r=>{this.timer.addAction({doAction:()=>{this.moveAndHover(r.x,r.y,r.id,e,s)},delay:r.timeOffset+t.timestamp-this.service.state.context.baselineTime})})),this.timer.addAction({doAction(){},delay:t.delay-(null==(r=s.positions[0])?void 0:r.timeOffset)});break;case zo.MouseInteraction:if(-1===s.id)break;var a=new Event(Ct(Vo[s.type])),h=this.mirror.getNode(s.id);if(!h)return this.debugNodeNotFound(s,s.id);this.emitter.emit(Zo.MouseInteraction,{type:s.type,target:h});var u=this.config.triggerFocus;switch(s.type){case Vo.Blur:"blur"in h&&h.blur();break;case Vo.Focus:u&&h.focus&&h.focus({preventScroll:!0});break;case Vo.Click:case Vo.TouchStart:case Vo.TouchEnd:case Vo.MouseDown:case Vo.MouseUp:e?(s.type===Vo.TouchStart?this.touchActive=!0:s.type===Vo.TouchEnd&&(this.touchActive=!1),s.type===Vo.MouseDown?this.lastMouseDownEvent=[h,a]:s.type===Vo.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:s.x||0,y:s.y||0,id:s.id,debugData:s}):(s.type===Vo.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x||0,s.y||0,s.id,e,s),s.type===Vo.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):s.type===Vo.TouchStart?this.mouse.classList.add("touch-active"):s.type===Vo.TouchEnd?this.mouse.classList.remove("touch-active"):h.dispatchEvent(a));break;case Vo.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:h.dispatchEvent(a)}break;case zo.Scroll:if(-1===s.id)break;if(e&&this.lastScrollMap.set(s.id,s),this.usingVirtualDom){var l=this.virtualDom.mirror.getNode(s.id);if(!l)return this.debugNodeNotFound(s,s.id);l.scrollData=s;break}this.applyScroll(s,e);break;case zo.ViewportResize:this.emitter.emit(Zo.Resize,{width:s.width,height:s.height});break;case zo.Input:if(-1===s.id)break;if(this.usingVirtualDom){var f=this.virtualDom.mirror.getNode(s.id);if(!f)return this.debugNodeNotFound(s,s.id);f.inputData=s;break}this.applyInput(s);break;case zo.MediaInteraction:var c=this.usingVirtualDom?this.virtualDom.mirror.getNode(s.id):this.mirror.getNode(s.id);if(!c)return this.debugNodeNotFound(s,s.id);this.mediaManager.mediaMutation({target:c,timeOffset:t.timestamp-this.service.state.context.events[0].timestamp,mutation:s});break;case zo.StyleSheetRule:case zo.StyleDeclaration:this.usingVirtualDom?s.styleId?this.constructedStyleMutations.push(s):s.id&&(null==(i=this.virtualDom.mirror.getNode(s.id))||i.rules.push(s)):this.applyStyleSheetMutation(s);break;case zo.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var v=this.virtualDom.mirror.getNode(s.id);if(!v)return this.debugNodeNotFound(s,s.id);v.canvasMutations.push({event:t,mutation:s})}else{var d=this.mirror.getNode(s.id);if(!d)return this.debugNodeNotFound(s,s.id);Ah({event:t,mutation:s,target:d,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case zo.Font:try{var p=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);null==(n=this.iframe.contentDocument)||n.fonts.add(p)}catch(t){this.warn(t)}break;case zo.Selection:if(e){this.lastSelectionData=s;break}this.applySelection(s);break;case zo.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(s):this.applyAdoptedStyleSheet(s)}}applyMutation(t,e){var i,n,s,o=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&e&&(this.usingVirtualDom=!0,i=this.iframe.contentDocument,s=this.virtualDom,void 0===(n=this.mirror)&&(n=new ki),void 0===s&&(s=new Fs),function t(e,r){var i=Ys(e,s,n,r);if(null!==i)if("IFRAME"!==(null==r?void 0:r.nodeName)&&e.nodeType!==As.DOCUMENT_FRAGMENT_NODE&&(null==r||r.appendChild(i),i.parentNode=r,i.parentElement=r),"IFRAME"===e.nodeName){var o=e.contentDocument;o&&t(o,i)}else e.nodeType!==As.DOCUMENT_NODE&&e.nodeType!==As.ELEMENT_NODE&&e.nodeType!==As.DOCUMENT_FRAGMENT_NODE||(e.nodeType===As.ELEMENT_NODE&&e.shadowRoot&&t(e.shadowRoot,i),e.childNodes.forEach((e=>t(e,i))))}(i,null),Object.keys(this.legacy_missingNodeRetryMap).length))for(var a in this.legacy_missingNodeRetryMap)try{var h=this.legacy_missingNodeRetryMap[a],u=Ys(h.node,this.virtualDom,this.mirror);u&&(h.node=u)}catch(t){this.warn(t)}var l=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.filter((e=>!!l.getNode(e.id)||(this.warnNodeNotFound(t,e.id),!1))).forEach((e=>{var r,i=l.getNode(e.id);if(i){var n=l.getNode(e.parentId);if(!n)return this.warnNodeNotFound(t,e.parentId);if(e.isShadow&&_o(n)&&(n=n.shadowRoot),l.removeNodeFromMap(i),n)try{n.removeChild(i),this.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===n.nodeName&&(null==(r=n.rules)?void 0:r.length)>0&&(n.rules=[])}catch(e){if(!(e instanceof DOMException))throw e;this.warn("parent could not remove child in mutation",n,i,t)}}}));var f=r({},this.legacy_missingNodeRetryMap),c=[],v=e=>{var r,i;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");var n=l.getNode(e.parentId);if(!n)return e.node.type===Jo.Document?this.newDocumentQueue.push(e):t.adds.some((t=>t.node.id===e.parentId))?c.push(e):void 0;if(e.node.isShadow){if(_o(n))n=n.shadowRoot;else{if(!at(n))return this.warn("Parent does not support shadow root, skipping mutation",e);n=n.shadowRoot}var s=this.pendingAdoptedStyleSheets.get(e.parentId);s&&!this.usingVirtualDom&&this.applyAdoptedStyleSheet({source:zo.AdoptedStyleSheet,id:e.parentId,styleIds:s})}var o=null,a=null;if(e.previousId&&(o=l.getNode(e.previousId)),e.nextId&&(a=l.getNode(e.nextId)),!e.node.rootId||l.getNode(e.node.rootId)){var h=e.node.rootId?l.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Io(n,l))this.attachDocumentToIframe(e,n);else{var u=(t,e)=>{if(!this.usingVirtualDom)for(var r of(Th(t),this.config.plugins||[]))r.onBuild&&r.onBuild(t,{id:e,replayer:this})},v=oi(e.node,{doc:h,mirror:l,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:u});if(-1!==e.previousId&&-1!==e.nextId){var d=l.getMeta(n);if(d&&d.type===Jo.Element&&e.node.type===Jo.Text){var p=Array.isArray(n.childNodes)?n.childNodes:Array.from(n.childNodes);if("textarea"===d.tagName)for(var m of p)m.nodeType===n.TEXT_NODE&&n.removeChild(m);else if("style"===d.tagName&&1===p.length)for(var y of p)y.nodeType!==n.TEXT_NODE||l.hasNode(y)||(v.textContent=y.textContent,n.removeChild(y))}else if((null==d?void 0:d.type)===Jo.Document){var g=n;e.node.type===Jo.DocumentType&&(null==(r=g.childNodes[0])?void 0:r.nodeType)===Node.DOCUMENT_TYPE_NODE&&g.removeChild(g.childNodes[0]),"HTML"===v.nodeName&&g.documentElement&&g.removeChild(g.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?n.insertBefore(v,o.nextSibling):a&&a.parentNode?n.contains(a)?n.insertBefore(v,a):n.insertBefore(v,null):n.appendChild(v),u(v,e.node.id),this.usingVirtualDom&&"#text"===v.nodeName&&"STYLE"===n.nodeName&&(null==(i=n.rules)?void 0:i.length)>0&&(n.rules=[]),Io(v,this.mirror)){var w=this.mirror.getId(v),b=this.newDocumentQueue.find((t=>t.parentId===w));b&&(this.attachDocumentToIframe(b,v),this.newDocumentQueue=this.newDocumentQueue.filter((t=>t!==b)))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(f,n,v,e)}else f[e.node.id]={node:v,mutation:e}}}};t.adds.forEach((t=>{v(t)}));for(var d=performance.now();c.length;){var p=Eo(c);if(c.length=0,performance.now()-d>150){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}for(var m of p)l.getNode(m.value.parentId)?Ro(m,(t=>{v(t)})):this.debug("Drop resolve tree since there is no parent for the root node.",m)}Object.keys(f).length&&Object.assign(this.legacy_missingNodeRetryMap,f),Lo(t.texts).forEach((e=>{var r,i=l.getNode(e.id);if(!i){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}if(i.textContent=e.value,this.usingVirtualDom){var n=i.parentNode;(null==(r=null==n?void 0:n.rules)?void 0:r.length)>0&&(n.rules=[])}})),t.attributes.forEach((e=>{var i,n,s=l.getNode(e.id);if(!s){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}var a=function(){if("string"==typeof h){var t=e.attributes[h];if(null===t)s.removeAttribute(h),"open"===h&&function(t,e){if(!("DIALOG"!==t.nodeName||t instanceof vs)){var r=t;r.isConnected?null===e.attributes.open&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode")):console.warn("dialog is not attached to the dom",r)}}(s,e);else if("string"==typeof t)try{if("_cssText"===h&&("LINK"===s.nodeName||"STYLE"===s.nodeName))try{var a=l.getMeta(s),u=s.nextSibling,f=s.parentNode,c=oi(r({},a,{attributes:r({},a.attributes,e.attributes)}),{doc:s.ownerDocument,mirror:l,skipChild:!0,hackCss:!0,cache:o.cache});if(Object.assign(a.attributes,e.attributes),c&&f)return s.parentNode===f&&f.removeChild(s),f.insertBefore(c,u),l.replace(e.id,c),1}catch(t){}if("value"===h&&"TEXTAREA"===s.nodeName){var v=s;v.childNodes.forEach((t=>v.removeChild(t)));var d=null==(i=s.ownerDocument)?void 0:i.createTextNode(t);d&&v.appendChild(d)}else"xlink:href"===h&&(null==(n=l.getMeta(s))?void 0:n.isSVG)?s.setAttributeNS("http://www.w3.org/1999/xlink",h,t):s.setAttribute(h,t);"rr_open_mode"===h&&"DIALOG"===s.nodeName&&Th(s,e)}catch(t){o.warn("An error occurred may due to the checkout feature.",t)}else if("style"===h){var p=t,m=s;for(var y in p)if(!1===p[y])m.style.removeProperty(y);else if(p[y]instanceof Array){var g=p[y];m.style.setProperty(y,g[0],g[1])}else m.style.setProperty(y,p[y])}}};for(var h in e.attributes)if(a())break}))}applyScroll(t,e){var r,i,n=this.mirror.getNode(t.id);if(!n)return this.debugNodeNotFound(t,t.id);var s=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)null==(r=this.iframe.contentWindow)||r.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else if((null==s?void 0:s.type)===Jo.Document)null==(i=n.defaultView)||i.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else try{n.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}catch(t){}}applyInput(t){var e=this.mirror.getNode(t.id);if(!e)return this.debugNodeNotFound(t,t.id);try{e.checked=t.isChecked,e.value=t.text}catch(t){}}applySelection(t){try{var e=new Set,r=t.ranges.map((t=>{var r=t.startOffset,i=t.end,n=t.endOffset,s=this.mirror.getNode(t.start),o=this.mirror.getNode(i);if(s&&o){var a=new Range;a.setStart(s,r),a.setEnd(o,n);var h=s.ownerDocument,u=null==h?void 0:h.getSelection();return u&&e.add(u),{range:a,selection:u}}}));e.forEach((t=>t.removeAllRanges())),r.forEach((t=>{var e;return t&&(null==(e=t.selection)?void 0:e.addRange(t.range))}))}catch(t){}}applyStyleSheetMutation(t){var e,r=null;t.styleId?r=this.styleMirror.getStyle(t.styleId):t.id&&(r=(null==(e=this.mirror.getNode(t.id))?void 0:e.sheet)||null),r&&(t.source===zo.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===zo.StyleDeclaration&&this.applyStyleDeclaration(t,r))}applyStyleSheetRule(t,e){var r,i,n,s;if(null==(r=t.adds)||r.forEach((t=>{var r=t.rule,i=t.index;try{if(Array.isArray(i)){var n=No(i),s=n.index,o=Do(e.cssRules,n.positions);null==o||o.insertRule(r,s)}else{var a=void 0===i?void 0:Math.min(i,e.cssRules.length);null==e||e.insertRule(r,a)}}catch(t){}})),null==(i=t.removes)||i.forEach((t=>{var r=t.index;try{if(Array.isArray(r)){var i=No(r),n=i.index,s=Do(e.cssRules,i.positions);null==s||s.deleteRule(n||0)}else null==e||e.deleteRule(r)}catch(t){}})),"string"==typeof t.replace)try{null==(n=e.replace)||n.call(e,t.replace)}catch(t){}if("string"==typeof t.replaceSync)try{null==(s=e.replaceSync)||s.call(e,t.replaceSync)}catch(t){}}applyStyleDeclaration(t,e){var r,i;if(t.set){var n=Do(e.rules,t.index);null==(r=null==n?void 0:n.style)||r.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){var s=Do(e.rules,t.index);null==(i=null==s?void 0:s.style)||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var e,r=this.mirror.getNode(t.id);if(r){var i={};this.adoptedStyleSheetTokens.set(t.id,i),null==(e=t.styles)||e.forEach((t=>{var e,i=null,n=null;if(n="#document"===r.nodeName?r.defaultView:(null==(e=r.ownerDocument)?void 0:e.defaultView)||null)try{i=new n.CSSStyleSheet,this.styleMirror.add(i,t.styleId),this.applyStyleSheetRule({source:zo.StyleSheetRule,adds:t.rules},i)}catch(t){}}));var n=0,s=(e,r)=>{if(this.adoptedStyleSheetTokens.get(t.id)===i){var o=r.map((t=>this.styleMirror.getStyle(t))).filter((t=>null!==t)),a=!1;try{_o(e)?(e.shadowRoot.adoptedStyleSheets=o,a=!0):"#document"===e.nodeName&&(e.adoptedStyleSheets=o,a=!0)}catch(t){}a?this.pendingAdoptedStyleSheets.delete(t.id):this.pendingAdoptedStyleSheets.set(t.id,r),a&&o.length===r.length||n>=10||(this.addTimeout((()=>s(e,r)),0+100*n),n++)}};s(r,t.styleIds)}}legacy_resolveMissingNode(t,e,r,i){var n=i.previousId,s=i.nextId,o=n&&t[n],a=s&&t[s];if(o){var h=o.node,u=o.mutation;e.insertBefore(h,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,e,h,u)}if(a){var l=a.node,f=a.mutation;e.insertBefore(l,r.nextSibling),delete t[f.node.id],delete this.legacy_missingNodeRetryMap[f.node.id],(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(t,e,l,f)}}moveAndHover(t,e,r,i,n){var s=this.mirror.getNode(r);if(!s)return this.debugNodeNotFound(n,r);var o=Oo(s,this.iframe),a=t*o.absoluteScale+o.x,h=e*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=h+"px",i||this.drawMouseTail({x:a,y:h}),this.hoverElements(s)}drawMouseTail(t){if(this.mouseTail){var e=!0===this.config.mouseTail?Dh:Object.assign({},Dh,this.config.mouseTail),r=e.lineCap,i=e.lineWidth,n=e.strokeStyle,s=e.duration,o=()=>{if(this.mouseTail){var t=this.mouseTail.getContext("2d");t&&this.tailPositions.length&&(t.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),t.beginPath(),t.lineWidth=i,t.lineCap=r,t.strokeStyle=n,t.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach((e=>t.lineTo(e.x,e.y))),t.stroke())}};this.tailPositions.push(t),o(),setTimeout((()=>{this.tailPositions=this.tailPositions.filter((e=>e!==t)),o()}),s/this.speedService.state.context.timer.speed)}}hoverElements(t){var e;null==(e=this.lastHoveredRootNode||this.iframe.contentDocument)||e.querySelectorAll(".\\:hover").forEach((t=>{t.classList.remove(":hover")}));var r=t.getRootNode();this.lastHoveredRootNode=r.nodeType===Node.DOCUMENT_NODE||r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r:void 0;for(var i=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;i;)i.classList.add(":hover"),i=i.parentElement}isUserInteraction(t){return t.type===Ho.IncrementalSnapshot&&t.data.source>zo.Mutation&&zo.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Zo.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,e){this.warn("Node with id '"+e+"' not found. ",t)}warnCanvasMutationFailed(t,e){this.warn("Has error on canvas update",e,"canvas mutation:",t)}debugNodeNotFound(t,e){this.debug("Node with id '"+e+"' not found. ",t)}warn(){if(this.config.showWarning){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.warn(_h,...e)}}debug(){if(this.config.showDebug){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.log(_h,...e)}}}var Fh=Ka.addCustomEvent,Bh=Ka.freezePage,Ph=Ka.takeFullSnapshot;export{Ho as EventType,zo as IncrementalSource,Vo as MouseInteractions,Lh as Replayer,Zo as ReplayerEvents,Fh as addCustomEvent,Ah as canvasMutation,Bh as freezePage,rt as getDeferredStylesheetStats,T as getDiscardedDurationSamples,Y as getLastSnapshotCost,it as getMutationCost,co as mirror,Ka as record,ue as resetMaxDepthState,nt as resetSnapshotCostState,Ph as takeFullSnapshot,Wo as utils,he as wasMaxDepthReached};
|
|
1
|
+
function t(t,e,r,i,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void r(t)}a.done?e(h):Promise.resolve(h).then(i,n)}function e(e){return function(){var r=this,i=arguments;return new Promise((function(n,s){var o=e.apply(r,i);function a(e){t(o,n,s,a,h,"next",e)}function h(e){t(o,n,s,a,h,"throw",e)}a(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},r.apply(null,arguments)}function i(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;r[i]=t[i]}return r}var n,s=["inputId"],o=["inputId"],a=["type"],h=Object.defineProperty,u=(t,e,r)=>((t,e,r)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),l=Object.defineProperty,f=(t,e,r)=>((t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),c=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(c||{});function v(t,e){return-1!==t.indexOf(e)}var d={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},p={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},m={};function y(t){if(m[t])return m[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in d?d[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in p?p[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return m[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(v(h=navigator.userAgent,"AppleWebKit")&&!v(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),m[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var g={};function w(t,e,r){var i,n=t+"."+String(r);if(g[n])return g[n].call(e);var s=y(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(g[n]=o,o.call(e)):e[r]}var b={};function S(t,e,r){var i=t+"."+String(r);if(b[i])return b[i].bind(e);var n=y(t)[r];return"function"!=typeof n?e[r]:(b[i]=n,n.bind(e))}var k={childNodes:t=>w("Node",t,"childNodes"),parentNode:t=>w("Node",t,"parentNode"),parentElement:t=>w("Node",t,"parentElement"),textContent:t=>w("Node",t,"textContent"),contains:(t,e)=>S("Node",t,"contains")(e),getRootNode:t=>S("Node",t,"getRootNode")(),host:t=>t&&"host"in t?w("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?w("Element",t,"shadowRoot"):null,querySelector:(t,e)=>S("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>S("Element",t,"querySelectorAll")(e),mutationObserver:()=>y("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}},C=()=>({durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0});function M(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(t){}return Date.now()}var x=0,A=0,E=6e4;function R(){x+=1}function I(){return x}function T(){return A}function O(t,e){return(e!==x||t>E)&&(A+=1,!0)}var _=0,D=0,N=0,L=C(),F=null,B=null,P=[],j=0,U=0,W={slowestBatchMs:0},H={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0},G=t=>t&&t>0?t:null;function z(t){(_+=1)>1||(L=C(),P=[],j=0,B=G(t),D=M(),N=x)}function V(){return 0===_?F||C():(_-=1)>0?L:(L.durationMs=M()-D,L.deferredStylesheetCount=j,H.deferredCount+=j,B=null,O(L.durationMs,N)?L:F=L)}function Y(){return F}var q=32;function Z(t,e,r){var i=t.length;if(r>=q)return i;for(var n=0;t.length>n;n++){var s=t[n];try{var o=s.cssRules;if(o&&o.length)i+=Z(o,e,r+1);else if(e&&s.styleSheet){var a=s.styleSheet;if(!e.has(a)){e.add(a);var h=a.rules||a.cssRules;h&&(i+=Z(h,e,r+1))}}}catch(t){}}return i}function J(t){if(0!==_){var e=Z(t,null,0);L.cssRuleCount+=e,U>0&&(L.nonDeferrableCssRuleCount+=e)}}function X(t){U+=1;try{return t()}finally{U-=1}}function K(t){_>0&&(L.stylesheetMs+=t)}function Q(t){if(0===_||null===B)return!1;var e=L.cssRuleCount-L.nonDeferrableCssRuleCount;return e>=B||e+function(t){try{var e=t&&(t.rules||t.cssRules);if(!e)return 0;var r=new WeakSet;return r.add(t),Z(e,r,0)}catch(t){return 0}}(t)>B}function tt(){H.failedCount+=1}function et(t){t>0&&(H.abandonedCount+=t)}function rt(){return r({},H)}function it(){return r({},W)}function nt(){_=0,D=0,N=0,x=0,A=0,L=C(),F=null,B=null,P=[],j=0,U=0,W={slowestBatchMs:0},H={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0}}function st(t){return t.nodeType===t.ELEMENT_NODE}function ot(t){var e=t&&"host"in t&&"mode"in t&&k.host(t)||null;return Boolean(e&&"shadowRoot"in e&&k.shadowRoot(e)===t)}function at(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}function ht(t){return"[object ShadowRoot]"==={}.toString.call(t)}function ut(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function lt(t){var e=t.cssText;if(3>e.split('"').length)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}var ft=0;function ct(t){var e=0===ft,r=e?M():0;ft+=1;try{var i=t.rules||t.cssRules;if(!i)return null;J(i);var n=t.href;return!n&&t.ownerNode&&(n=t.ownerNode.baseURI),ut(Array.from(i,(t=>vt(t,n))).join(""))}catch(t){return null}finally{ft-=1,e&&K(M()-r)}}function vt(t,e){var r;if(pt(t)){var i;try{i=ct(t.styleSheet)||lt(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return Dt(i,t.styleSheet.href)}catch(t){}return i}var n=t.cssText;return mt(t)&&t.selectorText.includes(":")&&(n=dt(n)),e?Dt(n,e):n}function dt(t){return t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function pt(t){return"styleSheet"in t}function mt(t){return"selectorText"in t}var yt=/^-?[A-Za-z_][\w-]*$/,gt=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function wt(t){var e=[],r=!1,i=null,n=new Map;function s(t){var n=e.pop();if("group"===n.kind){if(null===t){for(;e.length>0&&"group"===e[e.length-1].kind;)e.pop();return void s(null)}var a=e[e.length-1];return a.parts.push(t),void(a.index+=1)}if(!n.importRule)return r=!0,void(i=t);o(e[e.length-1],n.importRule,t)}function o(t,e,r){var i;try{var n;try{n=r||lt(e)}catch(t){n=e.cssText}try{n&&(null==(i=e.styleSheet)?void 0:i.href)&&(n=Dt(n,e.styleSheet.href))}catch(t){}n&&t.parts.push(n),t.index+=1}catch(t){s(null)}}function a(t){var r=t.rules[t.index];if("sheet"===t.kind&&pt(r)){var i=n.get(r);return null===i?(t.parts.push(r.cssText),void(t.index+=1)):i?void e.push({kind:"sheet",sheet:i.sheet,rules:i.rules,sheetHref:i.sheetHref,index:0,parts:[],importRule:r}):void o(t,r,null)}if(!function(t,r){try{var i=function(t){var e,r=t;if(!r.cssRules||0===r.cssRules.length)return null;if(r.media&&"string"==typeof r.media.mediaText)return"@media "+r.media.mediaText+" {";if(mt(t)){if("number"==typeof r.type&&1!==r.type)return null;var i=r.style?r.style.cssText:"";return t.selectorText+" {"+(i?" "+i:"")}if("containerName"in r)return"string"!=typeof r.containerQuery||r.containerName&&!yt.test(r.containerName)?null:"@container "+(r.containerName?r.containerName+" ":"")+r.containerQuery+" {";if("string"==typeof r.conditionText){var n="";try{n=(null==(e=t.constructor)?void 0:e.name)||""}catch(t){return null}return""===n||"Object"===n||"CSSSupportsRule"===n?"@supports "+r.conditionText+" {":null}return"string"==typeof r.name?"keyText"in r.cssRules[0]?yt.test(r.name)?"@keyframes "+r.name+" {":null:""===r.name?"@layer {":gt.test(r.name)?"@layer "+r.name+" {":null:null}(t);if(null===i)return!1;var n=r.sheetHref;return e.push({kind:"group",rules:Array.from(t.cssRules),sheetHref:n,index:0,parts:[],prelude:n?Dt(i,n):i,fixColons:"sheet"===r.kind&&mt(t)&&t.selectorText.includes(":")}),!0}catch(t){return!1}}(r,t)){var s=r.cssText;"sheet"===t.kind&&mt(r)&&r.selectorText.includes(":")&&(s=dt(s)),t.parts.push(t.sheetHref?Dt(s,t.sheetHref):s),t.index+=1}}return function(t){try{var r=t.rules||t.cssRules;if(!r)return!1;J(r);var i=t.href;!i&&t.ownerNode&&(i=t.ownerNode.baseURI);var s=Array.from(r);return e.push({kind:"sheet",sheet:t,rules:s,sheetHref:i,index:0,parts:[],importRule:null}),function(t,e){for(var r=[{sheet:e,rules:t,index:0}],i=function(){var t=r[r.length-1];if(t.index>=t.rules.length)return r.pop(),0;var e=t.rules[t.index];if(t.index+=1,!pt(e)||n.has(e))return 0;var i=null;try{i=e.styleSheet}catch(t){return n.set(e,null),0}if(!i||r.some((t=>t.sheet===i)))return 0;try{var s=i.rules||i.cssRules;if(!s)return 0;J(s);var o=i.href;!o&&i.ownerNode&&(o=i.ownerNode.baseURI);var a=Array.from(s);n.set(e,{sheet:i,rules:a,sheetHref:o}),r.push({sheet:i,rules:a,index:0})}catch(t){}};r.length>0;)i()}(s,t),!0}catch(t){return!1}}(t)||(r=!0),{advance(t){if(r)return!0;var n=M(),o=t>0?t:1;try{for(;!r&&o>0;){var h=e[e.length-1];if(h.rules.length>h.index){o-=1;try{a(h)}catch(t){s(null)}}else{var u=null;try{if("group"===h.kind){var l=h.prelude+h.parts.join("")+"}";u=h.fixColons?dt(l):l}else u=ut(h.parts.join(""))}catch(t){}s(u)}}}catch(t){r=!0,i=null}finally{K(M()-n)}return r},text:()=>r?i:null,remainingRules(){if(r)return 0;var t=0;for(var i of e)t+=i.rules.length-i.index;return t}}}class bt{constructor(){f(this,"idNodeMap",new Map),f(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),st(t)){var r=k.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function St(){return new bt}function kt(t){var e=t.element,r=t.maskInputOptions,i=t.tagName,n=t.type,s=t.maskInputFn,o=t.value||"",a=n&&Ct(n);return(r[i.toLowerCase()]||a&&r[a])&&(o=s?s(o,e):"*".repeat(o.length)),o}function Ct(t){return t.toLowerCase()}var Mt=new Set(["rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_mediastate","rr_open_mode"]);function xt(t){var e=t.element,r=t.name,i=t.value,n=t.maskAttributeFn,s=t.isGenerated;return i?t.maskAllElementAttributes?void 0!==s&&s&&Mt.has(Ct(r))?i:"*".repeat(i.length):n?n(r,i,e):i:i}var At="__rrweb_original__";function Et(t){try{var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?Ct(e):null}catch(t){return null}}function Rt(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){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 It=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Tt=/^(?:[a-z+]+:)?\/\//i,Ot=/^www\..*/i,_t=/^(data:)([^,]*),(.*)/i;function Dt(t,e){return(t||"").replace(It,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(Tt.test(h)||Ot.test(h))return"url("+u+h+u+")";if(_t.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),f=h.split("/");for(var c of(l.pop(),f))"."!==c&&(".."===c?l.pop():l.push(c));return"url("+u+l.join("/")+u+")"}))}var Nt,Lt,Ft="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",Bt=4096,Pt=1e5,jt=10,Ut=new Map,Wt=1,Ht=new RegExp("[^a-z0-9-_:]"),Gt=-2;function zt(){return Wt++}var Vt=/^[^ \t\n\r\u000c]+/,$t=/^[, \t\n\r\u000c]+/,Yt=new WeakMap;function qt(t,e){return e&&""!==e.trim()?Zt(t,e):e}function Zt(t,e){var r=Yt.get(t);if(r||(r=t.createElement("a"),Yt.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function Jt(t,e){return(null==e?void 0:e.maxBase64ImageLength)?function(t,e){return e&&t.length>e?Ft:t}(t,e.maxBase64ImageLength):t}function Xt(t,e,r,i,n,s){var o;if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){if("link"===e&&n){var a=null==(o=n.sheet)?void 0:o.href;if(a)return a}var h=qt(t,i);if(h.startsWith("data:")){if("img"===e&&n){var u=h;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(u=function(t,e,r,i){if(Pt>e.length)return e;if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>Bt||t.naturalHeight>Bt)return e;var n=Ut.get(e);if(n&&n.type===r&&n.quality===i)return n.result;try{var s=document.createElement("canvas");s.width=t.naturalWidth,s.height=t.naturalHeight;var o=s.getContext("2d");if(!o)return e;o.drawImage(t,0,0);var a=s.toDataURL(r||"image/webp",null!=i?i:.4),h=e.length>a.length?a:e;if(Ut.size>=jt){var u=Ut.keys().next().value;void 0!==u&&Ut.delete(u)}return Ut.set(e,{type:r,quality:i,result:h}),h}catch(t){return e}}(n,h,s.type,s.quality)),Jt(u,s)}if("image"===e)return Jt(h,s)}return h}if("xlink:href"===r&&"#"!==i[0]){var l=qt(t,i);return"image"===e&&l.startsWith("data:")?Jt(l,s):l}return"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i($t),e.length>r;){var s=i(Vt);if(","===s.slice(-1))s=qt(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=qt(t,s);for(var a=!1;;){var h=e.charAt(r);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){r+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,r+=1}}}return n.join(", ")}(t,i):"style"===r?Dt(i,Zt(t)):"object"===e&&"data"===r?qt(t,i):i:qt(t,i)}function Kt(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function Qt(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&Qt(k.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&Qt(k.parentNode(t),e,r)}function te(t,e,r,i){var n;if(st(t)){if(!k.childNodes(n=t).length)return!1}else{if(null===k.parentElement(t))return!1;n=k.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(Qt(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}function ee(t,e,r){var i=t.removeEventListener;"function"==typeof i&&i.call(t,e,r)}var re=new Map;function ie(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function ne(t){return null==t?"":t.toLowerCase()}var se=50,oe=!1,ae=!1;function he(){return ae}function ue(){ae=!1,oe=!1}function le(t,e){var r=e.doc,i=e.mirror,n=e.blockClass,s=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,h=e.skipChild,u=void 0!==h&&h,l=e.inlineStylesheet,f=void 0===l||l,v=e.maskInputOptions,d=void 0===v?{}:v,p=e.maskTextFn,m=e.maskInputFn,y=e.maskAllElementAttributes,g=void 0!==y&&y,w=e.maskAttributeFn,b=e.slimDOMOptions,S=e.dataURLOptions,C=void 0===S?{}:S,M=e.inlineImages,x=void 0!==M&&M,A=e.recordCanvas,E=void 0!==A&&A,R=e.canvasMaskingConfigured,I=e.onSerialize,T=e.onIframeLoad,O=e.iframeLoadTimeout,D=void 0===O?5e3:O,N=e.onIframeListenerRegistered,F=e.onStylesheetLoad,B=e.stylesheetLoadTimeout,U=void 0===B?5e3:B,W=e.keepIframeSrcFn,H=void 0===W?()=>!1:W,G=e.newlyAddedElement,z=void 0!==G&&G,V=e.depth,Y=void 0===V?0:V,q=e.maxDepth,Z=void 0===q?se:q,J=e.needsMask,K=e.preserveWhiteSpace,tt=void 0===K||K;if(Y>=Z)return ae=!0,oe||(oe=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+Z+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;J||(J=te(t,o,a,void 0===J)),_>0&&(L.nodeCount+=1);var et,rt=function(t,e){var r=e.doc,i=e.blockClass,n=e.blockSelector,s=e.needsMask,o=e.inlineStylesheet,a=e.maskInputOptions,h=void 0===a?{}:a,u=e.maskTextFn,l=e.maskInputFn,f=e.maskAllElementAttributes,v=void 0!==f&&f,d=e.maskAttributeFn,p=e.dataURLOptions,m=void 0===p?{}:p,y=e.inlineImages,g=e.recordCanvas,w=e.canvasMaskingConfigured,b=e.keepIframeSrcFn,S=e.newlyAddedElement,C=void 0!==S&&S,M=function(t,e){if(e.hasNode(t)){var r=e.getId(t);return 1===r?void 0:r}}(r,e.mirror);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:c.Document,childNodes:[],compatMode:t.compatMode}:{type:c.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:c.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:M};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,s=e.doc,o=e.inlineStylesheet,a=e.maskInputOptions,h=void 0===a?{}:a,u=e.maskInputFn,l=e.maskAllElementAttributes,f=void 0!==l&&l,v=e.maskAttributeFn,d=e.dataURLOptions,p=void 0===d?{}:d,m=e.inlineImages,y=e.recordCanvas,g=e.canvasMaskingConfigured,w=e.keepIframeSrcFn,b=e.newlyAddedElement,S=void 0!==b&&b,C=e.rootId,M=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(r)return t.matches(r)}catch(t){}return!1}(t,e.blockClass,e.blockSelector),x=function(t){if(t instanceof HTMLFormElement)return"form";var e=Ct(t.tagName);return Ht.test(e)?"div":e}(t),A=new Set,E={},R=t.attributes.length,I=0;R>I;I++){var T=t.attributes[I];Kt(x,T.name)||(E[T.name]=Xt(s,x,Ct(T.name),T.value,t,p))}if("link"===x&&o&&!M){var O=t.sheet;if(!O){var D=function(t){return t.href}(t);D&&!(O=ie(s,D))&&D.includes(".css")&&(O=ie(s,window.location.origin+"/"+D.replace(window.location.href,"")))}var N=null;O&&(Q(O)?_>0&&(P.push(t),j+=1):N=ct(O)),N&&(delete E.rel,delete E.href,E._cssText=N)}if("style"===x&&t.sheet&&!(t.innerText||k.textContent(t)||"").trim().length){var L=X((()=>ct(t.sheet)));L&&(E._cssText=L)}if("input"===x||"textarea"===x||"select"===x){var F=t.value,B=t.checked;"radio"!==E.type&&"checkbox"!==E.type&&"submit"!==E.type&&"button"!==E.type&&F?E.value=kt({element:t,type:Et(t),tagName:x,value:F,maskInputOptions:h,maskInputFn:u}):B&&(E.checked=B)}if("option"===x&&(t.selected&&!h.select?E.selected=!0:delete E.selected),"dialog"===x&&t.open){try{E.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){E.rr_open_mode="modal",E.ph_rr_could_not_detect_modal=!0}A.add("rr_open_mode")}if("canvas"===x&&y&&!(null==g?void 0:g()))if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;t.width>r;r+=50)for(var i=0;t.height>i;i+=50){var n=e.getImageData;if(new Uint32Array((At in n?n[At]:n).call(e,r,i,Math.min(50,t.width-r),Math.min(50,t.height-i)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(E.rr_dataURL=t.toDataURL(p.type,p.quality));else if(!("__context"in t)){var U=t.toDataURL(p.type,p.quality),W=s.createElement("canvas");W.width=t.width,W.height=t.height,U!==W.toDataURL(p.type,p.quality)&&(E.rr_dataURL=U)}var H,G,z=!1;if("img"===x&&m){Nt||(Nt=s.createElement("canvas"),Lt=Nt.getContext("2d"));var V=t,Y=V.currentSrc||V.getAttribute("src")||"<unknown-src>",q=V.crossOrigin,Z=(e,r)=>z?xt({element:t,name:e,value:r,maskAllElementAttributes:f,maskAttributeFn:v}):r,J=()=>{ee(V,"load",J);try{Nt.width=V.naturalWidth,Nt.height=V.naturalHeight,Lt.drawImage(V,0,0);var t=Nt.toDataURL(p.type,p.quality);E.rr_dataURL=Z("rr_dataURL",t)}catch(t){if("anonymous"!==V.crossOrigin)return V.crossOrigin="anonymous",void(V.complete&&0!==V.naturalWidth?J():V.addEventListener("load",J));console.warn("Cannot inline img src="+Y+"! Error: "+t)}"anonymous"===V.crossOrigin&&(q?E.crossOrigin=Z("crossOrigin",q):V.removeAttribute("crossorigin"))};V.complete&&0!==V.naturalWidth?J():V.addEventListener("load",J)}if("audio"===x||"video"===x){var K=E;K.rr_mediaState=t.paused?"paused":"played",A.add("rr_mediaState"),K.rr_mediaCurrentTime=t.currentTime,K.rr_mediaPlaybackRate=t.playbackRate,K.rr_mediaMuted=t.muted,K.rr_mediaLoop=t.loop,K.rr_mediaVolume=t.volume}if(S||(t.scrollLeft&&(E.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(E.rr_scrollTop=t.scrollTop)),M){var tt=t.getBoundingClientRect(),et=tt.width,rt=tt.height,it=tt.left,nt=tt.top,st=null==(r=s.defaultView)?void 0:r.getComputedStyle(t);E={class:E.class,rr_width:et+"px",rr_height:rt+"px",rr_left:Math.floor(it+((null==(i=s.defaultView)?void 0:i.scrollX)||0))+"px",rr_top:Math.floor(nt+((null==(n=s.defaultView)?void 0:n.scrollY)||0))+"px"},A.add("rr_width"),A.add("rr_height"),A.add("rr_left"),A.add("rr_top"),st&&(E.rr_position=st.position||"static",A.add("rr_position"),st.transform&&"none"!==st.transform&&(E.rr_transform=st.transform,A.add("rr_transform")),st.display&&st.display.startsWith("inline")&&(E.rr_display=st.display,A.add("rr_display")))}if("iframe"!==x||w(E.src)||(t.contentDocument||(E.rr_src=E.src),delete E.src),f||v)for(var ot of Object.entries(E)){var at=ot[0],ht=ot[1];"string"!=typeof ht&&null!==ht||(E[at]=xt({element:t,name:at,value:ht,maskAllElementAttributes:f,maskAttributeFn:v,isGenerated:A.has(at)}))}z=!0;try{customElements.get(x)&&(H=!0)}catch(t){}return{type:c.Element,tagName:x,attributes:E,childNodes:[],isSVG:(G=t,Boolean("svg"===G.tagName||G.ownerSVGElement)||void 0),needBlock:M,rootId:C,isCustom:H}}(t,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:h,maskInputFn:l,maskAllElementAttributes:v,maskAttributeFn:d,dataURLOptions:m,inlineImages:y,recordCanvas:g,canvasMaskingConfigured:w,keepIframeSrcFn:b,newlyAddedElement:C,rootId:M});case t.TEXT_NODE:return function(t,e){var r,i=e.needsMask,n=e.maskTextFn,s=e.rootId,o=k.parentNode(t),a=o&&o.tagName,h=k.textContent(t),u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(u&&h){try{if(t.nextSibling||t.previousSibling);else if(Q(o.sheet));else if(null==(r=o.sheet)?void 0:r.cssRules){var f=ct(o.sheet);f&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(f)&&(h=f)}}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}h=Dt(h,Zt(e.doc))}return l&&(h="SCRIPT_PLACEHOLDER"),!u&&!l&&h&&i&&(h=n?n(h,k.parentElement(t)):h.replace(/[\S]/g,"*")),{type:c.Text,textContent:h||"",isStyle:u,rootId:s}}(t,{doc:r,needsMask:s,maskTextFn:u,rootId:M});case t.CDATA_SECTION_NODE:return{type:c.CDATA,textContent:"",rootId:M};case t.COMMENT_NODE:return{type:c.Comment,textContent:k.textContent(t)||"",rootId:M};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,keepIframeSrcFn:H,newlyAddedElement:z});if(!rt)return console.warn(t,"not serialized"),null;et=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===c.Comment)return!0;if(t.type===c.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Rt(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(ne(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===ne(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(ne(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&ne(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(ne(t.attributes.property).match(/^(og|twitter|fb):/)||ne(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===ne(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(ne(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(ne(t.attributes.name))||ne(t.attributes.property).match(/^article:/)||ne(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(ne(t.attributes.name)))return!0}}return!1}(rt,b)&&(tt||rt.type!==c.Text||rt.isStyle||rt.textContent.replace(/^\s+|\s+$/gm,"").length)?zt():Gt;var it=Object.assign(rt,{id:et});if(i.add(t,it),et===Gt)return null;I&&I(t);var nt=!u;if(it.type===c.Element){nt=nt&&!it.needBlock,delete it.needBlock;var at=k.shadowRoot(t);at&&ht(at)&&(it.isShadowHost=!0)}if((it.type===c.Document||it.type===c.Element)&&nt){b.headWhitespace&&it.type===c.Element&&"head"===it.tagName&&(tt=!1);var ut={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:u,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y+1,maxDepth:Z};if(it.type===c.Element&&"textarea"===it.tagName&&void 0!==it.attributes.value);else for(var lt of Array.from(k.childNodes(t))){var ft=le(lt,ut);ft&&it.childNodes.push(ft)}var vt=null;if(st(t)&&(vt=k.shadowRoot(t)))for(var dt of Array.from(k.childNodes(vt))){var pt=le(dt,ut);pt&&(ht(vt)&&(pt.isShadow=!0),it.childNodes.push(pt))}}var mt=k.parentNode(t);if(mt&&ot(mt)&&ht(mt)&&(it.isShadow=!0),it.type===c.Element&&"iframe"===it.tagName){var yt=function(t,e,r){var i,n=()=>{},s=t.contentWindow;if(!s)return n;try{i=s.document.readyState}catch(t){return n}var o=()=>e();if("complete"!==i){var a=!1,h=null,u=()=>{a||(a=!0,null!==h&&(clearTimeout(h),h=null),ee(t,"load",l),t.addEventListener("load",o),e())},l=()=>u();return h=setTimeout(u,r),t.addEventListener("load",l),()=>{null!==h&&(clearTimeout(h),h=null),a?ee(t,"load",o):(a=!0,ee(t,"load",l))}}var f,c="about:blank";try{f=s.location.href}catch(t){return n}if(f!==c||t.src===c||""===t.src){var v=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(v),ee(t,"load",o)}}return t.addEventListener("load",o),()=>{ee(t,"load",o)}}(t,(()=>{var e=t.contentDocument;if(e&&T){var r=le(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y+1,maxDepth:Z});r&&T(t,r)}}),D);null==N||N(t,yt)}return it.type===c.Element&&"link"===it.tagName&&"stylesheet"===it.attributes.rel&&function(e,h,u){if(!re.has(e)){var l;try{l=e.sheet}catch(t){return}if(!l){var c=new AbortController,v=!1,y=()=>{if(!v){v=!0;try{(()=>{if(F){var e=le(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:J,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:b,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:R,preserveWhiteSpace:tt,onSerialize:I,onIframeLoad:T,iframeLoadTimeout:D,onStylesheetLoad:F,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Y,maxDepth:Z});e&&F(t,e)}})()}finally{re.delete(e),c.abort()}}},S=setTimeout(y,u);c.signal.addEventListener("abort",(()=>clearTimeout(S)),{once:!0}),e.addEventListener("load",y,{signal:c.signal,once:!0}),re.set(e,c)}}}(t,0,U),it}function fe(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:!1===t?{}:t}var ce=new RegExp(/(max|min)-device-(width|height)/.source,"g"),ve={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(ce)&&(t.params=t.params.replace(ce,"$1-$2"))}}}},de={postcssPlugin:"postcss-hover-classes",prepare(){var t=[];return{Rule(e){-1===t.indexOf(e)&&(t.push(e),e.selectors.forEach((function(t){if(t.includes(":hover")){var r=t.replace(new RegExp("(?<!\\\\):hover","g"),".\\:hover");r!==t&&(e.selector+=",\n"+r)}})))}}}};function pe(t){return t&&t.__esModule&&{}.hasOwnProperty.call(t,"default")?t.default:t}function me(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var ye,ge={exports:{}};function we(){if(ye)return ge.exports;ye=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return ge.exports=e(),ge.exports.createColors=e,ge.exports}var be,Se,ke,Ce,Me,xe,Ae=me(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Ee(){if(Se)return be;Se=1;var t=we(),e=Ae;class r extends Error{constructor(t,e,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!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var a=t.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),e&&(o=t=>e(t))}var f=i.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return be=r,r.default=r,be}function Re(){if(Ce)return ke;Ce=1;var t=/(<)(\/?style\b)/gi,e=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function i(r){return"string"!=typeof r?r:r.includes("<")?r.replace(t,"\\3c $2").replace(e,"\\3c $2"):r}var n={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(t,e){var i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=n?" ":"":""===s&&n&&!r.test(n[0])&&(s=" "),i+s+n}function o(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function a(t,e,r,n){var s=t.raw(r,"between","beforeOpen");t.builder(i(n+s)+"{",r,"start");var a=r.nodes&&r.nodes.length,h=()=>{var e=a?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(i(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(i(r.raws.ownSemicolon),r,"end")};a?(e.push(h),o(t,e,r)):h()}class h{constructor(t){this.builder=t}atrule(t,e){var r=s(this,t);t.nodes?this.block(t,r):this.builder(i(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,n=this.raw(t,"between","beforeOpen");this.builder(i(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(i(r)),this.builder("}",t,"end")}body(t){var e=h.prototype,r=["atrule","block","body","rule","stringify"].every((t=>this[t]===e[t])),n=[];for(o(this,n,t);n.length>0;){var u=n.pop();if("function"!=typeof u){var l=u.node,f=this.raw(l,"before");f&&this.builder(u.document?f:i(f)),r&&"rule"===l.type?a(this,n,l,this.rawValue(l,"selector")):r&&"atrule"===l.type&&l.nodes?a(this,n,l,s(this,l)):this.stringify(l,u.semicolon)}else u()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(i("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=r.important||" !important"),e&&(s+=";"),this.builder(i(s),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var s=t.parent;if("before"===r){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return n[r];var o=t.root(),a=o.rawCache||(o.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](o,t):o.walk((t=>{if(void 0!==(i=t.raws[e]))return!1})),void 0===i&&(i=n[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:i(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(i(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return ke=h,h.default=h,ke}function Ie(){if(xe)return Me;xe=1;var t=Re();function e(e,r){new t(r).stringify(e)}return Me=e,e.default=e,Me}var Te,Oe,_e,De,Ne,Le,Fe,Be,Pe,je,Ue,We,He,Ge,ze,Ve,$e,Ye,qe,Ze,Je,Xe,Ke,Qe,tr,er,rr,ir,nr,sr,or,ar,hr,ur,lr,fr,cr,vr,dr,pr,mr,yr,gr,wr,br,Sr,kr,Cr,Mr,xr,Ar,Er,Rr,Ir={};function Tr(){return Te||(Te=1,Ir.isClean=Symbol("isClean"),Ir.my=Symbol("my")),Ir}function Or(){if(_e)return Oe;_e=1;var t=Ee(),e=Re(),r=Ie(),i=Tr(),n=i.isClean,s=i.my;function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[n]=!1,this[s]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=function(t,e){for(var r=new t.constructor,i=[[t,r,void 0]];i.length>0;){var n=i.pop(),s=n[0],o=n[1],a=n[2];for(var h in s)if({}.hasOwnProperty.call(s,h)&&"proxyCache"!==h){var u=s[h],l=typeof u;if("parent"===h&&"object"===l)a&&(o[h]=a);else if("source"===h)o[h]=u;else if(Array.isArray(u)){var f=[];for(var c of(o[h]=f,u)){var v=new c.constructor;f.push(v),i.push([c,v,o])}}else{if("object"===l&&null!==u){var d=new u.constructor;i.push([u,d,void 0]),u=d}o[h]=u}}}return r}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var i=this.rangeBy(r),n=i.end,s=i.start;return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;for(var t=this;t=t.parent;)t[n]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r=null==e;e=e||new Map;for(var i=[],n=[[this,i,0]],s=0;n.length>s;s++){var o=n[s],h=o[0],u=o[1],l=o[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===a.prototype.toJSON?n.push([m,d,p]):d[p]=m.toJSON(null,e):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===a.prototype.toJSON?n.push([v,f,c]):f[c]=v.toJSON(null,e);else if("source"===c){if(null==v)continue;var y=e.get(v.input);null==y&&e.set(v.input,y=e.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=i[0];return r&&(g.inputs=[...e.keys()].map((t=>t.toJSON()))),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Oe=a,a.default=a,Oe}function _r(){if(Ne)return De;Ne=1;var t=Or();class e extends t{constructor(t){super(t),this.type="comment"}}return De=e,e.default=e,De}function Dr(){if(Fe)return Le;Fe=1;var t=Or();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return Le=e,e.default=e,Le}function Nr(){if(Pe)return Be;Pe=1;var t,e,r,i,n=_r(),s=Dr(),o=Or(),a=Tr(),h=a.isClean,u=a.my;class l extends o{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){for(var e=[this];e.length>0;){var r=e.pop();if(r===this||r.cleanRaws===l.prototype.cleanRaws){if(o.prototype.cleanRaws.call(r,t),r.nodes)for(var i of r.nodes)e.push(i)}else r.cleanRaws(t)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var a of r=r.slice(0))a.parent&&a.parent.removeChild(a,"ignore");else if("root"===r.type&&"document"!==this.type)for(var f of r=r.nodes.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var c=r.map((t=>(t[u]||l.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[h]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[h]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return c}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.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(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return l.registerParse=t=>{e=t},l.registerRule=t=>{i=t},l.registerAtRule=e=>{t=e},l.registerRoot=t=>{r=t},Be=l,l.default=l,l.rebuild=e=>{for(var o=[e];o.length>0;){var a=o.pop();if("atrule"===a.type?Object.setPrototypeOf(a,t.prototype):"rule"===a.type?Object.setPrototypeOf(a,i.prototype):"decl"===a.type?Object.setPrototypeOf(a,s.prototype):"comment"===a.type?Object.setPrototypeOf(a,n.prototype):"root"===a.type&&Object.setPrototypeOf(a,r.prototype),a[u]=!0,a.nodes)for(var h of a.nodes)o.push(h)}},Be}function Lr(){if(Ue)return je;Ue=1;var t=Nr();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return je=e,e.default=e,t.registerAtRule(e),je}function Fr(){if(He)return We;He=1;var t,e,i=Nr();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},We=n,n.default=n,We}function Br(){return ze?Ge:(ze=1,Ge={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})})}function Pr(){if($e)return Ve;$e=1;var t=Ae.existsSync,e=Ae.readFileSync,r=Ae.dirname,i=Ae.isAbsolute,n=Ae.join,s=Ae.relative,o=Ae.sep,a=Ae.SourceMapConsumer,h=Ae.SourceMapGenerator;class u{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new a(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(n,a,h){if(!h&&!this.unsafeMap){if(!/\.map$/i.test(n))return;if(!a)return;var u=s(r(a),n);if(".."===u||u.startsWith(".."+o)||i(u))return}if(this.root=r(n),t(n))return this.mapFile=n,e(n,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof a)return h.fromSourceMap(e).toString();if(e instanceof h)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var s=this.loadFile(i,t,!0);if(!s)throw new Error("Unable to load previous source map: "+i.toString());return s}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var o=this.annotation;t&&(o=n(r(t),o));var u=this.loadFile(o,t,!1);if(u)try{this.json=JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return u}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return Ve=u,u.default=u,Ve}function jr(){if(qe)return Ye;qe=1;var t=Br().nanoid,e=Ae.isAbsolute,i=Ae.resolve,n=Ae.SourceMapConsumer,s=Ae.SourceMapGenerator,o=Ae.fileURLToPath,a=Ae.pathToFileURL,h=Ee(),u=Pr(),l=Ae,f=Symbol("lineToIndexCache"),c=Boolean(n&&s),v=Boolean(i&&e);function d(t){if(t[f])return t[f];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[f]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!v||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),v&&c){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var f=e,c=r;if("number"==typeof f.offset){var v=this.fromOffset(u=f.offset);e=v.line,r=v.col}else u=this.fromLineAndColumn(e=f.line,r=f.column);if("number"==typeof c.offset){var d=this.fromOffset(o=c.offset);s=d.line,n=d.col}else s=c.line,n=c.column,o=this.fromLineAndColumn(c.line,c.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return d(this)[t-1]+e-1}fromOffset(t){var e=d(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r-1,line:t});if(!l.source)return!1;if("number"==typeof i){var f=u.originalPositionFor({column:n-1,line:i});f.source&&(s=f)}h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var v=u.sourceContentFor(l.source);return v&&(c.source=v),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return Ye=p,p.default=p,l&&l.registerInput&&l.registerInput(p),Ye}function Ur(){if(Je)return Ze;Je=1;var t,e,r=Nr();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},Ze=i,i.default=i,r.registerRoot(i),Ze}function Wr(){if(Ke)return Xe;Ke=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return Xe=t,t.default=t,Xe}function Hr(){if(tr)return Qe;tr=1;var t=Nr(),e=Wr();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return Qe=r,r.default=r,t.registerRule(r),Qe}function Gr(){if(nr)return ir;nr=1;var t=Ae.dirname,e=Ae.relative,r=Ae.resolve,i=Ae.sep,n=Ae.SourceMapConsumer,s=Ae.SourceMapGenerator,o=Ae.pathToFileURL,a=jr(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return ir=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,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 t;t=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 e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.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((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function zr(){if(or)return sr;or=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),f="(".charCodeAt(0),c=")".charCodeAt(0),v="{".charCodeAt(0),d="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return sr=function(C,M){void 0===M&&(M={});var x,A,E,R,I,T,O,_,D,N,L=C.css.valueOf(),F=M.ignoreErrors,B=L.length,P=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=B,nextToken(C){if(U.length)return U.pop();if(B>P){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(P)){case n:case s:case a:case h:case o:R=P;do{x=L.charCodeAt(R+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(P,R)],P=R-1;break;case u:case l:case v:case d:case y:case p:case c:var G=String.fromCharCode(x);T=[G,G,P];break;case f:if(N=j.length?j.pop()[1]:"",D=L.charCodeAt(P+1),"url"===N&&D!==t&&D!==e&&D!==s&&D!==n&&D!==a&&D!==o&&D!==h){R=P;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||M){R=P;break}H("bracket")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["brackets",L.slice(P,R+1),P,R],P=R}else P>W?(R=L.indexOf(")",P+1),A=L.slice(P,R+1),-1===R||S.test(A)?(W=-1===R?B:R,T=["(","(",P]):(T=["brackets",A,P,R],P=R)):T=["(","(",P];break;case t:case e:I=x===t?"'":'"',R=P;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||M){R=P+1;break}H("string")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["string",L.slice(P,R+1),P,R],P=R;break;case g:w.lastIndex=P+1,w.test(L),T=["at-word",L.slice(P,1+(R=0===w.lastIndex?L.length-1:w.lastIndex-2)),P,R],P=R;break;case r:for(R=P,E=!0;L.charCodeAt(R+1)===r;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(R+=1))){for(;k.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===s&&(R+=1)}T=["word",L.slice(P,R+1),P,R],P=R;break;default:x===i&&L.charCodeAt(P+1)===m?(0===(R=L.indexOf("*/",P+2)+1)&&(F||M?R=L.length:H("comment")),T=["comment",L.slice(P,R+1),P,R],P=R):(b.lastIndex=P+1,b.test(L),T=["word",L.slice(P,1+(R=0===b.lastIndex?L.length-1:b.lastIndex-2)),P,R],j.push(T),P=R)}return P++,T}},position:()=>P}}}function Vr(){if(hr)return ar;hr=1;var t=Lr(),e=_r(),r=Dr(),i=Ur(),n=Hr(),s=zr(),o={empty:!0,space:!0};function a(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}return ar=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(i.trim()){var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}else r.text="",r.raws.left=i,r.raws.right=""}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;i.raws.before+=a(t,0,s),i.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var h=t[s][0];if(":"===h||"space"===h||"comment"===h)break;s++}i.prop=a(t,o,s);for(var u,l=s;t.length>s&&(u=t[s],s++,":"!==u[0]);)"word"===u[0]&&/\w/.test(u[1])&&this.unknownWord([u]);i.raws.between=a(t,l,s),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(u=t[d])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(i.important=!0,i.raws.important=y,t=m)}if("space"!==u[0]&&"comment"!==u[0])break}var b=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));b&&(i.raws.between+=v.map((t=>t[1])).join(""),v=[]),this.raw(i,"value",v.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),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()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var f=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:f,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}function $r(){if(lr)return ur;lr=1;var t=Nr(),e=jr(),r=Vr();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return ur=i,i.default=i,t.registerParse(i),ur}function Yr(){if(cr)return fr;cr=1;var t=Nr(),e=Tr().my;class r{constructor(r,i){if(void 0===i&&(i={}),this.type="warning",this.text=r,i.node&&i.node.source){i.node[e]||t.rebuild(i.node);var n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in i)this[s]=i[s]}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}}return fr=r,r.default=r,fr}function qr(){if(dr)return vr;dr=1;var t=Yr();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return vr=e,e.default=e,vr}function Zr(){if(mr)return pr;mr=1;var t={};return pr=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Jr(){if(gr)return yr;gr=1;var t=Nr(),i=Fr(),n=Gr(),s=$r(),o=qr(),a=Ur(),h=Ie(),u=Tr(),l=u.isClean,f=u.my,c=Zr(),v={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=v[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,m,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,m,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",m,"DocumentExit"]:"root"===t.type?["Root",m,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function b(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var S={};class k{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"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof k||i instanceof o)a=b(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[f]&&t.rebuild(a)}else a=b(i);this.result=new o(e,a,n),this.helpers=r({},S,{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.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 t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!p[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(y(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[l];){i[l]=!0;for(var n=[w(i)];n.length>0;){var s=t.visitTick(n);if(y(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return y(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,(t=>{i+=t})),this.result.css=i,this.result}var s=new n(e,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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 t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(t,e)}toString(){return this.css}visitSync(t,e){for(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[l])return a[l]=!0,void t.push(w(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var f=u[e.eventIndex];if(e.eventIndex+=1,f===m)return void(r.nodes&&r.nodes.length&&(r[l]=!0,e.iterator=r.getIterator()));if(this.listeners[f])return void(e.visitors=this.listeners[f])}t.pop()}else t.pop()}walkSync(t){t[l]=!0;for(var e=[{eventIndex:0,events:g(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[l]){s[l]=!0,e.push({eventIndex:0,events:g(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,a===m)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}}return k.registerPostcss=t=>{S=t},yr=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),yr}function Xr(){if(Mr)return Cr;Mr=1;var t=Lr(),e=_r(),n=Nr(),o=Ee(),a=Dr(),h=Fr(),u=function(){if(rr)return er;rr=1;var t=Lr(),e=_r(),n=Dr(),o=jr(),a=Pr(),h=Ur(),u=Hr();function l(t,e){return t.inputs?t.inputs.map((t=>{var e=r({},t,{__proto__:o.prototype});return e.map&&(e.map=r({},e.map,{__proto__:a.prototype})),e})):e}function f(o,a,l){var f,c=r({},o);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId,p=i(v,s);c.source=p,null!=d&&(c.source.input=a[d])}if("root"===c.type)f=new h(c);else if("decl"===c.type)f=new n(c);else if("rule"===c.type)f=new u(c);else if("comment"===c.type)f=new e(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+o.type);f=new t(c)}if(l)for(var m of(f.nodes=l,l))m.parent=f;return f}function c(t,e){if(Array.isArray(t))return t.map((t=>c(t)));for(var r,i=[{childIndex:0,children:[],inputs:l(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:l(o,n.inputs),json:o})}else{i.pop();var a=f(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}return er=c,c.default=c,er}(),l=jr(),f=Jr(),c=Wr(),v=Or(),d=$r(),p=function(){if(kr)return Sr;kr=1;var t=Fr(),e=Jr(),r=function(){if(br)return wr;br=1;var t=Gr(),e=$r(),r=qr(),i=Ie(),n=Zr();class s{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 t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var o=i;this.result=new r(this._processor,void 0,this._opts),this.result.css=n;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new t(o,void 0,this._opts,n);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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(t,e)}toString(){return this._css}warnings(){return[]}}return wr=s,s.default=s,wr}(),i=Ur();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.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 e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return Sr=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),Sr}(),m=qr(),y=Ur(),g=Hr(),w=Ie(),b=Yr();function S(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return S.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new p).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return S([n(r)]).process(t,e)},n},S.stringify=w,S.parse=d,S.fromJSON=u,S.list=c,S.comment=t=>new e(t),S.atRule=e=>new t(e),S.decl=t=>new a(t),S.rule=t=>new g(t),S.root=t=>new y(t),S.document=t=>new h(t),S.CssSyntaxError=o,S.Declaration=a,S.Container=n,S.Processor=p,S.Document=h,S.Comment=e,S.Warning=b,S.AtRule=t,S.Result=m,S.Input=l,S.Rule=g,S.Root=y,S.Node=v,f.registerPostcss(S),Cr=S,S.default=S,Cr}var Kr=pe(function(){if(Rr)return Er;Rr=1;var t=Xr().Input,e=function(){if(Ar)return xr;Ar=1;var t=_r(),e=Vr(),r=zr();return xr=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();return Er=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}()),Qr=pe(Xr()),ti={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function ei(t,e){var r=null==e?void 0:e.stylesWithHoverClass.get(t);if(r)return r;var i=t;try{i=Qr([ve,de]).process(t,{parser:Kr}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,i),i}function ri(){return{stylesWithHoverClass:new Map}}var ii=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),ni=new Set,si=new Set;function oi(t,e){var r,i,n,s=e.doc,o=e.mirror,a=e.skipChild,h=void 0!==a&&a,u=e.hackCss,l=void 0===u||u,f=e.afterAppend,v=e.cache,d=null;if(o.has(t.id)){var p=o.getNode(t.id),m=o.getMeta(p);if(n=t,(i=m)&&n&&i.type===n.type&&(i.type===c.Document?i.compatMode===n.compatMode:i.type===c.DocumentType?i.name===n.name&&i.publicId===n.publicId&&i.systemId===n.systemId:i.type===c.Comment||i.type===c.Text||i.type===c.CDATA?i.textContent===n.textContent:i.type===c.Element&&i.tagName===n.tagName&&JSON.stringify(i.attributes)===JSON.stringify(n.attributes)&&i.isSVG===n.isSVG&&i.needBlock===n.needBlock))return o.getNode(t.id);d=p}var y=function(t,e){var r,i=e.doc,n=e.hackCss,s=e.cache;switch(t.type){case c.Document:return i.implementation.createDocument(null,"",null);case c.DocumentType:return i.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case c.Element:var o,a=function(t){var e=ti[t.tagName]?ti[t.tagName]:t.tagName;return"link"===e&&t.attributes._cssText&&(e="style"),e}(t);if(t.isSVG)o=i.createElementNS("http://www.w3.org/2000/svg",a);else{if(t.isCustom&&(null==(r=i.defaultView)?void 0:r.customElements)&&function(t){if("string"!=typeof t||0===t.length)return!1;if(ii.has(t))return!1;if(!t.includes("-"))return!1;var e=t.charCodeAt(0);return e>=97&&122>=e}(t.tagName)&&!i.defaultView.customElements.get(t.tagName))try{i.defaultView.customElements.define(t.tagName,class extends i.defaultView.HTMLElement{})}catch(e){ni.has(t.tagName)||(ni.add(t.tagName),console.warn("rrweb: failed to register custom element",t.tagName,e))}o=i.createElement(a)}var h={};for(var u in t.attributes)if({}.hasOwnProperty.call(t.attributes,u)){var l=t.attributes[u];if(("option"!==a||"selected"!==u||!1!==l)&&null!==l)if(!0===l&&(l=""),u.startsWith("rr_"))h[u]=l;else{var f="textarea"===a&&"value"===u,v="style"===a&&"_cssText"===u;if(v&&n&&"string"==typeof l&&(l=ei(l,s)),!f&&!v||"string"!=typeof l)try{if(t.isSVG&&"xlink:href"===u)o.setAttributeNS("http://www.w3.org/1999/xlink",u,l.toString());else if("onload"===u||"onclick"===u||"onmouse"===u.substring(0,7))o.setAttribute("_"+u,l.toString());else{if("meta"===a&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===u){o.setAttribute("csp-content",l.toString());continue}"link"===a&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===a&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Rt(t.attributes.href)||("img"===a&&t.attributes.srcset&&t.attributes.rr_dataURL?o.setAttribute("rrweb-original-srcset",t.attributes.srcset):o.setAttribute(u,l.toString()))}}catch(t){}else o.appendChild(i.createTextNode(l)),t.childNodes=[]}}var d=!("static"!==h.rr_position&&"relative"!==h.rr_position&&"sticky"!==h.rr_position||void 0!==h.rr_transform&&"none"!==h.rr_transform);if(d&&"string"==typeof h.rr_display){var p=h.rr_display;o.style.setProperty("display","inline"===p?"inline-block":p)}var m=function(){var e=h[y];if("canvas"===a&&"rr_dataURL"===y){var r=i.createElement("img");r.onload=()=>{var t=o.getContext("2d");t&&t.drawImage(r,0,0,r.width,r.height)},r.src=e.toString(),o.RRNodeType&&(o.rr_dataURL=e.toString())}else if("img"===a&&"rr_dataURL"===y){var n=o;n.currentSrc.startsWith("data:")||(n.setAttribute("rrweb-original-src",t.attributes.src),n.src=e.toString())}if("rr_width"===y)o.style.setProperty("width",e.toString());else if("rr_height"===y)o.style.setProperty("height",e.toString());else if("rr_left"===y)d||(o.style.setProperty("left",e.toString()),o.style.setProperty("position","absolute"));else if("rr_top"===y)d||(o.style.setProperty("top",e.toString()),o.style.setProperty("position","absolute"));else if("rr_mediaCurrentTime"===y&&"number"==typeof e)o.currentTime=e;else if("rr_mediaState"===y)switch(e){case"played":o.play().catch((t=>console.warn("media playback error",t)));break;case"paused":o.pause()}else"rr_mediaPlaybackRate"===y&&"number"==typeof e?o.playbackRate=e:"rr_mediaMuted"===y&&"boolean"==typeof e?o.muted=e:"rr_mediaLoop"===y&&"boolean"==typeof e?o.loop=e:"rr_mediaVolume"===y&&"number"==typeof e?o.volume=e:"rr_open_mode"===y&&o.setAttribute("rr_open_mode",e)};for(var y in h)m();if(t.isShadowHost)if(o.shadowRoot)for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);else at(o)||si.has(a)||(si.add(a),console.warn("rrweb: browser refused a shadow root on",a));return o;case c.Text:return function(t,e){var r=t.textContent;if(t.isStyle&&e.hackCss)try{r=ei(t.textContent,e.cache)}catch(t){}return e.doc.createTextNode(r)}(t,{cache:s,doc:i,hackCss:n});case c.CDATA:return""===t.textContent.trim()?null:i.createCDATASection(t.textContent);case c.Comment:return i.createComment(t.textContent);default:return null}}(t,{doc:s,hackCss:l,cache:v});if(!y)return null;if(null==(r=null==d?void 0:d.parentNode)||r.removeChild(d),t.rootId&&o.getNode(t.rootId)!==s&&o.replace(t.rootId,s),t.type===c.Document&&(s.close(),s.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==c.DocumentType&&s.write(t.childNodes[0].type===c.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">':'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'),y=s),o.add(y,t),(t.type===c.Document||t.type===c.Element)&&!h){var g=function(){if(w.isShadow&&t.isShadowHost&&st(y)&&!y.shadowRoot)return 0;var e=oi(w,{doc:s,mirror:o,skipChild:!1,hackCss:l,afterAppend:f,cache:v});if(!e)return console.warn("Failed to rebuild",w),0;if(w.isShadow&&st(y)&&y.shadowRoot)y.shadowRoot.appendChild(e);else if(t.type===c.Document&&w.type==c.Element){var r=e,i=null;r.childNodes.forEach((t=>{"BODY"===t.nodeName&&(i=t)})),i?(r.removeChild(i),y.appendChild(e),r.appendChild(i)):y.appendChild(e)}else if(t.type===c.Document&&w.type===c.DocumentType){var n=y.doctype;n&&y.removeChild(n),y.firstChild&&1===y.firstChild.nodeType?y.insertBefore(e,y.firstChild):y.appendChild(e)}else y.appendChild(e);f&&f(e,w.id)};for(var w of t.childNodes)g()}return y}var ai=Object.defineProperty,hi=(t,e,r)=>((t,e,r)=>e in t?ai(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),ui=Object.defineProperty,li=(t,e,r)=>((t,e,r)=>e in t?ui(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);function fi(t,e){return-1!==t.indexOf(e)}var ci={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},vi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},di={};function pi(t){if(di[t])return di[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in ci?ci[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in vi?vi[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return di[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(fi(h=navigator.userAgent,"AppleWebKit")&&!fi(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),di[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var mi={};function yi(t,e,r){var i,n=t+"."+String(r);if(mi[n])return mi[n].call(e);var s=pi(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(mi[n]=o,o.call(e)):e[r]}var gi={};function wi(t,e,r){var i=t+"."+String(r);if(gi[i])return gi[i].bind(e);var n=pi(t)[r];return"function"!=typeof n?e[r]:(gi[i]=n,n.bind(e))}var bi={childNodes:t=>yi("Node",t,"childNodes"),parentNode:t=>yi("Node",t,"parentNode"),parentElement:t=>yi("Node",t,"parentElement"),textContent:t=>yi("Node",t,"textContent"),contains:(t,e)=>wi("Node",t,"contains")(e),getRootNode:t=>wi("Node",t,"getRootNode")(),host:t=>t&&"host"in t?yi("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?yi("Element",t,"shadowRoot"):null,querySelector:(t,e)=>wi("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>wi("Element",t,"querySelectorAll")(e),mutationObserver:()=>pi("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}};function Si(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}var ki=class{constructor(){li(this,"idNodeMap",new Map),li(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),function(t){return t.nodeType===t.ELEMENT_NODE}(t)){var r=bi.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ci(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var Mi,xi={exports:{}};function Ai(){if(Mi)return xi.exports;Mi=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return xi.exports=e(),xi.exports.createColors=e,xi.exports}var Ei,Ri,Ii,Ti,Oi,_i,Di=Ci(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Ni(){if(Ri)return Ei;Ri=1;var t=Ai(),e=Di;class r extends Error{constructor(t,e,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!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var a=t.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),e&&(o=t=>e(t))}var f=i.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return Ei=r,r.default=r,Ei}function Li(){if(Ti)return Ii;Ti=1;var t=/(<)(\/?style\b)/gi,e=/(<)(!--)/g,r=/[\t\n\f\r "#'()/;[\\\]{}]/;function i(r){return"string"!=typeof r?r:r.includes("<")?r.replace(t,"\\3c $2").replace(e,"\\3c $2"):r}var n={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function s(t,e){var i="@"+e.name,n=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=n?" ":"":""===s&&n&&!r.test(n[0])&&(s=" "),i+s+n}function o(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function a(t,e,r,n){var s=t.raw(r,"between","beforeOpen");t.builder(i(n+s)+"{",r,"start");var a=r.nodes&&r.nodes.length,h=()=>{var e=a?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(i(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(i(r.raws.ownSemicolon),r,"end")};a?(e.push(h),o(t,e,r)):h()}class h{constructor(t){this.builder=t}atrule(t,e){var r=s(this,t);t.nodes?this.block(t,r):this.builder(i(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,n=this.raw(t,"between","beforeOpen");this.builder(i(e+n)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(i(r)),this.builder("}",t,"end")}body(t){var e=h.prototype,r=["atrule","block","body","rule","stringify"].every((t=>this[t]===e[t])),n=[];for(o(this,n,t);n.length>0;){var u=n.pop();if("function"!=typeof u){var l=u.node,f=this.raw(l,"before");f&&this.builder(u.document?f:i(f)),r&&"rule"===l.type?a(this,n,l,this.rawValue(l,"selector")):r&&"atrule"===l.type&&l.nodes?a(this,n,l,s(this,l)):this.stringify(l,u.semicolon)}else u()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(i("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,n=this.raw(t,"between","colon"),s=t.prop+n+this.rawValue(t,"value");t.important&&(s+=r.important||" !important"),e&&(s+=";"),this.builder(i(s),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var s=t.parent;if("before"===r){if(!s||"root"===s.type&&s.first===t)return"";if(s&&"document"===s.type)return""}if(!s)return n[r];var o=t.root(),a=o.rawCache||(o.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](o,t):o.walk((t=>{if(void 0!==(i=t.raws[e]))return!1})),void 0===i&&(i=n[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:i(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(i(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return Ii=h,h.default=h,Ii}function Fi(){if(_i)return Oi;_i=1;var t=Li();function e(e,r){new t(r).stringify(e)}return Oi=e,e.default=e,Oi}var Bi,Pi,ji,Ui,Wi,Hi,Gi,zi,Vi,$i,Yi,qi,Zi,Ji,Xi,Ki,Qi,tn,en,rn,nn,sn,on,an,hn,un,ln,fn,cn,vn,dn,pn,mn,yn,gn,wn,bn,Sn,kn,Cn,Mn,xn,An,En,Rn,In,Tn,On,_n,Dn,Nn,Ln,Fn,Bn={};function Pn(){return Bi||(Bi=1,Bn.isClean=Symbol("isClean"),Bn.my=Symbol("my")),Bn}function jn(){if(ji)return Pi;ji=1;var t=Ni(),e=Li(),r=Fi(),i=Pn(),n=i.isClean,s=i.my;function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[n]=!1,this[s]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=function(t,e){for(var r=new t.constructor,i=[[t,r,void 0]];i.length>0;){var n=i.pop(),s=n[0],o=n[1],a=n[2];for(var h in s)if({}.hasOwnProperty.call(s,h)&&"proxyCache"!==h){var u=s[h],l=typeof u;if("parent"===h&&"object"===l)a&&(o[h]=a);else if("source"===h)o[h]=u;else if(Array.isArray(u)){var f=[];for(var c of(o[h]=f,u)){var v=new c.constructor;f.push(v),i.push([c,v,o])}}else{if("object"===l&&null!==u){var d=new u.constructor;i.push([u,d,void 0]),u=d}o[h]=u}}}return r}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var i=this.rangeBy(r),n=i.end,s=i.start;return this.source.input.error(e,{column:s.column,line:s.line},{column:n.column,line:n.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;for(var t=this;t=t.parent;)t[n]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r=null==e;e=e||new Map;for(var i=[],n=[[this,i,0]],s=0;n.length>s;s++){var o=n[s],h=o[0],u=o[1],l=o[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===a.prototype.toJSON?n.push([m,d,p]):d[p]=m.toJSON(null,e):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===a.prototype.toJSON?n.push([v,f,c]):f[c]=v.toJSON(null,e);else if("source"===c){if(null==v)continue;var y=e.get(v.input);null==y&&e.set(v.input,y=e.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=i[0];return r&&(g.inputs=[...e.keys()].map((t=>t.toJSON()))),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return Pi=a,a.default=a,Pi}function Un(){if(Wi)return Ui;Wi=1;var t=jn();class e extends t{constructor(t){super(t),this.type="comment"}}return Ui=e,e.default=e,Ui}function Wn(){if(Gi)return Hi;Gi=1;var t=jn();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return Hi=e,e.default=e,Hi}function Hn(){if(Vi)return zi;Vi=1;var t,e,r,i,n=Un(),s=Wn(),o=jn(),a=Pn(),h=a.isClean,u=a.my;class l extends o{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){for(var e=[this];e.length>0;){var r=e.pop();if(r===this||r.cleanRaws===l.prototype.cleanRaws){if(o.prototype.cleanRaws.call(r,t),r.nodes)for(var i of r.nodes)e.push(i)}else r.cleanRaws(t)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var a of r=r.slice(0))a.parent&&a.parent.removeChild(a,"ignore");else if("root"===r.type&&"document"!==this.type)for(var f of r=r.nodes.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var c=r.map((t=>(t[u]||l.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[h]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[h]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return c}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.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(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return l.registerParse=t=>{e=t},l.registerRule=t=>{i=t},l.registerAtRule=e=>{t=e},l.registerRoot=t=>{r=t},zi=l,l.default=l,l.rebuild=e=>{for(var o=[e];o.length>0;){var a=o.pop();if("atrule"===a.type?Object.setPrototypeOf(a,t.prototype):"rule"===a.type?Object.setPrototypeOf(a,i.prototype):"decl"===a.type?Object.setPrototypeOf(a,s.prototype):"comment"===a.type?Object.setPrototypeOf(a,n.prototype):"root"===a.type&&Object.setPrototypeOf(a,r.prototype),a[u]=!0,a.nodes)for(var h of a.nodes)o.push(h)}},zi}function Gn(){if(Yi)return $i;Yi=1;var t=Hn();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return $i=e,e.default=e,t.registerAtRule(e),$i}function zn(){if(Zi)return qi;Zi=1;var t,e,i=Hn();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},qi=n,n.default=n,qi}function Vn(){return Xi?Ji:(Xi=1,Ji={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})})}function $n(){if(Qi)return Ki;Qi=1;var t=Di.existsSync,e=Di.readFileSync,r=Di.dirname,i=Di.isAbsolute,n=Di.join,s=Di.relative,o=Di.sep,a=Di.SourceMapConsumer,h=Di.SourceMapGenerator;class u{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new a(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(n,a,h){if(!h&&!this.unsafeMap){if(!/\.map$/i.test(n))return;if(!a)return;var u=s(r(a),n);if(".."===u||u.startsWith(".."+o)||i(u))return}if(this.root=r(n),t(n))return this.mapFile=n,e(n,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof a)return h.fromSourceMap(e).toString();if(e instanceof h)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var i=e(t);if(i){var s=this.loadFile(i,t,!0);if(!s)throw new Error("Unable to load previous source map: "+i.toString());return s}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var o=this.annotation;t&&(o=n(r(t),o));var u=this.loadFile(o,t,!1);if(u)try{this.json=JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return u}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return Ki=u,u.default=u,Ki}function Yn(){if(en)return tn;en=1;var t=Vn().nanoid,e=Di.isAbsolute,i=Di.resolve,n=Di.SourceMapConsumer,s=Di.SourceMapGenerator,o=Di.fileURLToPath,a=Di.pathToFileURL,h=Ni(),u=$n(),l=Di,f=Symbol("lineToIndexCache"),c=Boolean(n&&s),v=Boolean(i&&e);function d(t){if(t[f])return t[f];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[f]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!v||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),v&&c){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+t(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var f=e,c=r;if("number"==typeof f.offset){var v=this.fromOffset(u=f.offset);e=v.line,r=v.col}else u=this.fromLineAndColumn(e=f.line,r=f.column);if("number"==typeof c.offset){var d=this.fromOffset(o=c.offset);s=d.line,n=d.col}else s=c.line,n=c.column,o=this.fromLineAndColumn(c.line,c.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return d(this)[t-1]+e-1}fromOffset(t){var e=d(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r-1,line:t});if(!l.source)return!1;if("number"==typeof i){var f=u.originalPositionFor({column:n-1,line:i});f.source&&(s=f)}h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var v=u.sourceContentFor(l.source);return v&&(c.source=v),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return tn=p,p.default=p,l&&l.registerInput&&l.registerInput(p),tn}function qn(){if(nn)return rn;nn=1;var t,e,r=Hn();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},rn=i,i.default=i,r.registerRoot(i),rn}function Zn(){if(on)return sn;on=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return sn=t,t.default=t,sn}function Jn(){if(hn)return an;hn=1;var t=Hn(),e=Zn();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return an=r,r.default=r,t.registerRule(r),an}function Xn(){if(cn)return fn;cn=1;var t=Di.dirname,e=Di.relative,r=Di.resolve,i=Di.sep,n=Di.SourceMapConsumer,s=Di.SourceMapGenerator,o=Di.pathToFileURL,a=Yn(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return fn=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,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 t;t=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 e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.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((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}function Kn(){if(dn)return vn;dn=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),f="(".charCodeAt(0),c=")".charCodeAt(0),v="{".charCodeAt(0),d="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),y=":".charCodeAt(0),g="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return vn=function(C,M){void 0===M&&(M={});var x,A,E,R,I,T,O,_,D,N,L=C.css.valueOf(),F=M.ignoreErrors,B=L.length,P=0,j=[],U=[],W=-1;function H(t){throw C.error("Unclosed "+t,P)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&P>=B,nextToken(C){if(U.length)return U.pop();if(B>P){var M=!!C&&C.ignoreUnclosed;switch(x=L.charCodeAt(P)){case n:case s:case a:case h:case o:R=P;do{x=L.charCodeAt(R+=1)}while(x===s||x===n||x===a||x===h||x===o);T=["space",L.slice(P,R)],P=R-1;break;case u:case l:case v:case d:case y:case p:case c:var G=String.fromCharCode(x);T=[G,G,P];break;case f:if(N=j.length?j.pop()[1]:"",D=L.charCodeAt(P+1),"url"===N&&D!==t&&D!==e&&D!==s&&D!==n&&D!==a&&D!==o&&D!==h){R=P;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||M){R=P;break}H("bracket")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["brackets",L.slice(P,R+1),P,R],P=R}else P>W?(R=L.indexOf(")",P+1),A=L.slice(P,R+1),-1===R||S.test(A)?(W=-1===R?B:R,T=["(","(",P]):(T=["brackets",A,P,R],P=R)):T=["(","(",P];break;case t:case e:I=x===t?"'":'"',R=P;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||M){R=P+1;break}H("string")}for(_=R;L.charCodeAt(_-1)===r;)_-=1,O=!O}while(O);T=["string",L.slice(P,R+1),P,R],P=R;break;case g:w.lastIndex=P+1,w.test(L),T=["at-word",L.slice(P,1+(R=0===w.lastIndex?L.length-1:w.lastIndex-2)),P,R],P=R;break;case r:for(R=P,E=!0;L.charCodeAt(R+1)===r;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==i&&x!==s&&x!==n&&x!==a&&x!==h&&x!==o&&k.test(L.charAt(R+=1))){for(;k.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===s&&(R+=1)}T=["word",L.slice(P,R+1),P,R],P=R;break;default:x===i&&L.charCodeAt(P+1)===m?(0===(R=L.indexOf("*/",P+2)+1)&&(F||M?R=L.length:H("comment")),T=["comment",L.slice(P,R+1),P,R],P=R):(b.lastIndex=P+1,b.test(L),T=["word",L.slice(P,1+(R=0===b.lastIndex?L.length-1:b.lastIndex-2)),P,R],j.push(T),P=R)}return P++,T}},position:()=>P}}}function Qn(){if(mn)return pn;mn=1;var t=Gn(),e=Un(),r=Wn(),i=qn(),n=Jn(),s=Kn(),o={empty:!0,space:!0};function a(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}return pn=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(i.trim()){var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}else r.text="",r.raws.left=i,r.raws.right=""}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n=t[t.length-1];";"===n[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;i.raws.before+=a(t,0,s),i.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var h=t[s][0];if(":"===h||"space"===h||"comment"===h)break;s++}i.prop=a(t,o,s);for(var u,l=s;t.length>s&&(u=t[s],s++,":"!==u[0]);)"word"===u[0]&&/\w/.test(u[1])&&this.unknownWord([u]);i.raws.between=a(t,l,s),"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(u=t[d])[1].toLowerCase()){i.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(i.raws.important=p);break}if("important"===u[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(i.important=!0,i.raws.important=y,t=m)}if("space"!==u[0]&&"comment"!==u[0])break}var b=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));b&&(i.raws.between+=v.map((t=>t[1])).join(""),v=[]),this.raw(i,"value",v.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),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()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var f=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:f,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}function ts(){if(gn)return yn;gn=1;var t=Hn(),e=Yn(),r=Qn();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return yn=i,i.default=i,t.registerParse(i),yn}function es(){if(bn)return wn;bn=1;var t=Hn(),e=Pn().my;class r{constructor(r,i){if(void 0===i&&(i={}),this.type="warning",this.text=r,i.node&&i.node.source){i.node[e]||t.rebuild(i.node);var n=i.node.rangeBy(i);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in i)this[s]=i[s]}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}}return wn=r,r.default=r,wn}function rs(){if(kn)return Sn;kn=1;var t=es();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return Sn=e,e.default=e,Sn}function is(){if(Mn)return Cn;Mn=1;var t={};return Cn=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function ns(){if(An)return xn;An=1;var t=Hn(),i=zn(),n=Xn(),s=ts(),o=rs(),a=qn(),h=Fi(),u=Pn(),l=u.isClean,f=u.my,c=is(),v={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},p={Once:!0,postcssPlugin:!0,prepare:!0},m=0;function y(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=v[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,m,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,m,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",m,"DocumentExit"]:"root"===t.type?["Root",m,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function b(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var S={};class k{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"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof k||i instanceof o)a=b(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[f]&&t.rebuild(a)}else a=b(i);this.result=new o(e,a,n),this.helpers=r({},S,{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.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 t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!p[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(y(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[l];){i[l]=!0;for(var n=[w(i)];n.length>0;){var s=t.visitTick(n);if(y(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return y(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,(t=>{i+=t})),this.result.css=i,this.result}var s=new n(e,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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 t of this.plugins)if(y(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[l];)e[l]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("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(t,e)}toString(){return this.css}visitSync(t,e){for(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(y(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[l])return a[l]=!0,void t.push(w(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var f=u[e.eventIndex];if(e.eventIndex+=1,f===m)return void(r.nodes&&r.nodes.length&&(r[l]=!0,e.iterator=r.getIterator()));if(this.listeners[f])return void(e.visitors=this.listeners[f])}t.pop()}else t.pop()}walkSync(t){t[l]=!0;for(var e=[{eventIndex:0,events:g(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[l]){s[l]=!0,e.push({eventIndex:0,events:g(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,a===m)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}}return k.registerPostcss=t=>{S=t},xn=k,k.default=k,a.registerLazyResult(k),i.registerLazyResult(k),xn}function ss(){if(_n)return On;_n=1;var t=Gn(),e=Un(),n=Hn(),s=Ni(),a=Wn(),h=zn(),u=function(){if(ln)return un;ln=1;var t=Gn(),e=Un(),n=Wn(),s=Yn(),a=$n(),h=qn(),u=Jn();function l(t,e){return t.inputs?t.inputs.map((t=>{var e=r({},t,{__proto__:s.prototype});return e.map&&(e.map=r({},e.map,{__proto__:a.prototype})),e})):e}function f(s,a,l){var f,c=r({},s);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId,p=i(v,o);c.source=p,null!=d&&(c.source.input=a[d])}if("root"===c.type)f=new h(c);else if("decl"===c.type)f=new n(c);else if("rule"===c.type)f=new u(c);else if("comment"===c.type)f=new e(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+s.type);f=new t(c)}if(l)for(var m of(f.nodes=l,l))m.parent=f;return f}function c(t,e){if(Array.isArray(t))return t.map((t=>c(t)));for(var r,i=[{childIndex:0,children:[],inputs:l(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:l(o,n.inputs),json:o})}else{i.pop();var a=f(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}return un=c,c.default=c,un}(),l=Yn(),f=ns(),c=Zn(),v=jn(),d=ts(),p=function(){if(Tn)return In;Tn=1;var t=zn(),e=ns(),r=function(){if(Rn)return En;Rn=1;var t=Xn(),e=ts(),r=rs(),i=Fi(),n=is();class s{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 t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var o=i;this.result=new r(this._processor,void 0,this._opts),this.result.css=n;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new t(o,void 0,this._opts,n);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("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(t,e)}toString(){return this._css}warnings(){return[]}}return En=s,s.default=s,En}(),i=qn();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.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 e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return In=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),In}(),m=rs(),y=qn(),g=Jn(),w=Fi(),b=es();function S(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new p(e)}return S.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new p).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return S([n(r)]).process(t,e)},n},S.stringify=w,S.parse=d,S.fromJSON=u,S.list=c,S.comment=t=>new e(t),S.atRule=e=>new t(e),S.decl=t=>new a(t),S.rule=t=>new g(t),S.root=t=>new y(t),S.document=t=>new h(t),S.CssSyntaxError=s,S.Declaration=a,S.Container=n,S.Processor=p,S.Document=h,S.Comment=e,S.Warning=b,S.AtRule=t,S.Result=m,S.Input=l,S.Rule=g,S.Root=y,S.Node=v,f.registerPostcss(S),On=S,S.default=S,On}!function(){if(Fn)return Ln;Fn=1;var t=ss().Input,e=function(){if(Nn)return Dn;Nn=1;var t=Un(),e=Qn(),r=Kn();return Dn=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();Ln=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}(),ss();var os=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(os||{});function as(t){var e=[];for(var r in t){var i=t[r];if("string"==typeof i){var n=cs(r);e.push(n+": "+i+";")}}return e.join(" ")}var hs=/-([a-z])/g,us=/^--[a-zA-Z0-9-]+$/,ls=t=>us.test(t)?t:t.replace(hs,((t,e)=>e?e.toUpperCase():"")),fs=/\B([A-Z])/g,cs=t=>t.replace(fs,"-$1").toLowerCase();class vs{constructor(){hi(this,"parentElement",null),hi(this,"parentNode",null),hi(this,"ownerDocument"),hi(this,"firstChild",null),hi(this,"lastChild",null),hi(this,"previousSibling",null),hi(this,"nextSibling",null),hi(this,"ELEMENT_NODE",1),hi(this,"TEXT_NODE",3),hi(this,"nodeType"),hi(this,"nodeName"),hi(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof vs))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class ds extends vs{constructor(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];super(e),hi(this,"nodeType",9),hi(this,"nodeName","#document"),hi(this,"compatMode","CSS1Compat"),hi(this,"RRNodeType",os.Document),hi(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find((t=>t.RRNodeType===os.Element&&"HTML"===t.tagName))||null}get body(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===os.Element&&"BODY"===t.tagName)))||null}get head(){var t;return(null==(t=this.documentElement)?void 0:t.childNodes.find((t=>t.RRNodeType===os.Element&&"HEAD"===t.tagName)))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){var e=t.RRNodeType;if((e===os.Element||e===os.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===e)))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one "+(e===os.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var r=Cs(this,t);return r.parentElement=null,r}insertBefore(t,e){var r=t.RRNodeType;if((r===os.Element||r===os.DocumentType)&&this.childNodes.some((t=>t.RRNodeType===r)))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one "+(r===os.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var i=Ms(this,t,e);return i.parentElement=null,i}removeChild(t){return xs(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){var e;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===t?e="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===t&&(e="-//W3C//DTD HTML 4.0 Transitional//EN"),e){var r=this.createDocumentType("html",e,"");this.open(),this.appendChild(r)}}createDocument(t,e,r){return new ds}createDocumentType(t,e,r){var i=new ps(t,e,r);return i.ownerDocument=this,i}createElement(t){var e=new ms(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){var e=new ws(t);return e.ownerDocument=this,e}createComment(t){var e=new bs(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new Ss(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}}class ps extends vs{constructor(t,e,r){super(),hi(this,"nodeType",10),hi(this,"RRNodeType",os.DocumentType),hi(this,"name"),hi(this,"publicId"),hi(this,"systemId"),hi(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}class ms extends vs{constructor(t){super(),hi(this,"nodeType",1),hi(this,"RRNodeType",os.Element),hi(this,"tagName"),hi(this,"attributes",{}),hi(this,"shadowRoot",null),hi(this,"scrollLeft"),hi(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){var t="";return this.childNodes.forEach((e=>t+=e.textContent)),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new ks(this.attributes.class,(t=>{this.attributes.class=t}))}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){var t,e,r=this.attributes.style?(t={},e=/:(.+)/,this.attributes.style.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(r){if(r){var i=r.split(e);i.length>1&&(t[ls(i[0].trim())]=i[1].trim())}})),t):{},i=/\B([A-Z])/g;return r.setProperty=(t,e,n)=>{if(!i.test(t)){var s=ls(t);e?r[s]=e:delete r[s],"important"===n&&(r[s]+=" !important"),this.attributes.style=as(r)}},r.removeProperty=t=>{if(i.test(t))return"";var e=ls(t),n=r[e]||"";return delete r[e],this.attributes.style=as(r),n},r}getAttribute(t){return void 0===this.attributes[t]?null:this.attributes[t]}setAttribute(t,e){this.attributes[t]=e}setAttributeNS(t,e,r){this.setAttribute(e,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Cs(this,t)}insertBefore(t,e){return Ms(this,t,e)}removeChild(t){return xs(this,t)}attachShadow(t){var e=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=e,e}dispatchEvent(t){return!0}toString(){var t="";for(var e in this.attributes)t+=e+'="'+this.attributes[e]+'" ';return this.tagName+" "+t}}class ys extends ms{constructor(){super(...arguments),hi(this,"currentTime"),hi(this,"volume"),hi(this,"paused"),hi(this,"muted"),hi(this,"playbackRate"),hi(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class gs extends ms{constructor(){super(...arguments),hi(this,"tagName","DIALOG"),hi(this,"nodeName","DIALOG")}get isModal(){return"modal"===this.getAttribute("rr_open_mode")}get open(){return null!==this.getAttribute("open")}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class ws extends vs{constructor(t){super(),hi(this,"nodeType",3),hi(this,"nodeName","#text"),hi(this,"RRNodeType",os.Text),hi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRText text="+JSON.stringify(this.data)}}class bs extends vs{constructor(t){super(),hi(this,"nodeType",8),hi(this,"nodeName","#comment"),hi(this,"RRNodeType",os.Comment),hi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRComment text="+JSON.stringify(this.data)}}class Ss extends vs{constructor(t){super(),hi(this,"nodeName","#cdata-section"),hi(this,"nodeType",4),hi(this,"RRNodeType",os.CDATA),hi(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRCDATASection data="+JSON.stringify(this.data)}}class ks{constructor(t,e){var r=this;if(hi(this,"onChange"),hi(this,"classes",[]),hi(this,"add",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];for(var n of e){var s=String(n);0>r.classes.indexOf(s)&&r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))})),hi(this,"remove",(function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.classes=r.classes.filter((t=>-1===e.indexOf(t))),r.onChange&&r.onChange(r.classes.join(" "))})),t){var i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=e}}function Cs(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function Ms(t,e,r){if(!r)return Cs(t,e);if(r.parentNode!==t)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===r||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=r.previousSibling,r.previousSibling=e,e.nextSibling=r,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function xs(t,e){if(e.parentNode!==t)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var As=(t=>(t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t))(As||{}),Es={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Rs={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},Is=null;function Ts(t,e,r,i){void 0===i&&(i=e.mirror||e.ownerDocument.mirror),t=function(t,e,r,i){var n;if(r.afterAppend&&!Is&&(Is=new WeakSet,setTimeout((()=>{Is=null}),0)),!Ns(t,e)){var s=Ds(e,r.mirror,i);null==(n=t.parentNode)||n.replaceChild(s,t),t=s}switch(e.RRNodeType){case os.Document:if(!Ls(t,e,r.mirror,i)){var o=i.getMeta(e);o&&(r.mirror.removeNodeFromMap(t),t.close(),t.open(),r.mirror.add(t,o),null==Is||Is.add(t))}break;case os.Element:var a=t,h=e;switch(h.tagName){case"IFRAME":var u=t.contentDocument;if(!u)break;Ts(u,e.contentDocument,r,i)}h.shadowRoot&&(a.shadowRoot||Si(a))&&_s(a.shadowRoot,h.shadowRoot,r,i),function(t,e,r){var i=t.attributes,n=e.attributes;for(var s in n){var o=n[s],a=r.getMeta(e);if((null==a?void 0:a.isSVG)&&Es[s])t.setAttributeNS(Es[s],s,o);else if("CANVAS"===e.tagName&&"rr_dataURL"===s)Os(t,o);else{if("IFRAME"===e.tagName&&"srcdoc"===s)continue;try{t.getAttribute(s)!==o&&t.setAttribute(s,o)}catch(t){console.warn(t)}}}for(var h of Array.from(i)){var u=h.name;u in n||t.removeAttribute(u)}e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}(a,h,i)}return t}(t,e,r,i),_s(t,e,r,i),function(t,e,r){var i;switch(e.RRNodeType){case os.Document:var n=e.scrollData;n&&r.applyScroll(n,!0);break;case os.Element:var s=t,o=e;switch(o.scrollData&&r.applyScroll(o.scrollData,!0),o.inputData&&r.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":var a=t,h=o;void 0!==h.paused&&(h.paused?a.pause():a.play()),void 0!==h.muted&&(a.muted=h.muted),void 0!==h.volume&&(a.volume=h.volume),void 0!==h.currentTime&&(a.currentTime=h.currentTime),void 0!==h.playbackRate&&(a.playbackRate=h.playbackRate),void 0!==h.loop&&(a.loop=h.loop);break;case"CANVAS":var u=e;null!==u.rr_dataURL&&Os(s,u.rr_dataURL),u.canvasMutations.forEach((e=>r.applyCanvas(e.event,e.mutation,t)));break;case"STYLE":var l=s.sheet;l&&e.rules.forEach((t=>r.applyStyleSheetMutation(t,l)));break;case"DIALOG":var f=s,c=o,v=f.open,d=f.matches("dialog:modal"),p=c.open,m=c.isModal,y=d!==m,g=v!==p;if((y||v&&g)&&f.close(),p&&(g||y))try{m?f.showModal():f.show()}catch(t){console.warn(t)}}break;case os.Text:case os.Comment:case os.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}(null==Is?void 0:Is.has(t))&&(Is.delete(t),null==(i=r.afterAppend)||i.call(r,t,r.mirror.getId(t)))}(t,e,r)}function Os(t,e){var r=t.ownerDocument.createElement("img");r.onload=()=>{var e=t.getContext("2d");e&&e.drawImage(r,0,0,r.width,r.height)},r.src=e}function _s(t,e,r,i){var n=Array.from(t.childNodes),s=e.childNodes;if(0!==n.length||0!==s.length){for(var o=0,a=n.length-1,h=0,u=s.length-1,l=n[o],f=n[a],c=s[h],v=s[u],d=void 0,p=void 0;a>=o&&u>=h;)if(void 0===l)l=n[++o];else if(void 0===f)f=n[--a];else if(Ls(l,c,r.mirror,i))l=n[++o],c=s[++h];else if(Ls(f,v,r.mirror,i))f=n[--a],v=s[--u];else if(Ls(l,v,r.mirror,i)){try{t.insertBefore(l,f.nextSibling)}catch(t){console.warn(t)}l=n[++o],v=s[--u]}else if(Ls(f,c,r.mirror,i)){try{t.insertBefore(f,l)}catch(t){console.warn(t)}f=n[--a],c=s[++h]}else{if(!d){d={};for(var m=o;a>=m;m++){var y=n[m];y&&r.mirror.hasNode(y)&&(d[r.mirror.getId(y)]=m)}}var g=n[p=d[i.getId(c)]];if(void 0!==p&&g&&Ls(g,c,r.mirror,i)){try{t.insertBefore(g,l)}catch(t){console.warn(t)}n[p]=void 0}else{var w=Ds(c,r.mirror,i);"#document"===t.nodeName&&l&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(t.removeChild(l),r.mirror.removeNodeFromMap(l),l=n[++o]);try{t.insertBefore(w,l||null)}catch(t){console.warn(t)}}c=s[++h]}if(o>a){var b=s[u+1],S=null;for(b&&(S=r.mirror.getNode(i.getId(b)));u>=h;++h){var k=Ds(s[h],r.mirror,i);try{t.insertBefore(k,S)}catch(t){console.warn(t)}}}else if(h>u)for(;a>=o;o++){var C=n[o];if(C&&C.parentNode===t)try{t.removeChild(C),r.mirror.removeNodeFromMap(C)}catch(t){console.warn(t)}}for(var M=t.firstChild,x=e.firstChild;null!==M&&null!==x;)Ts(M,x,r,i),M=M.nextSibling,x=x.nextSibling}}function Ds(t,e,i){var n=i.getId(t),s=i.getMeta(t),o=null;if(n>-1&&(o=e.getNode(n)),null!==o&&Ns(o,t))return o;switch(t.RRNodeType){case os.Document:o=new Document;break;case os.DocumentType:o=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case os.Element:var a=t.tagName.toLowerCase();a=Rs[a]||a,o=s&&"isSVG"in s&&(null==s?void 0:s.isSVG)?document.createElementNS(Es.svg,a):document.createElement(t.tagName);break;case os.Text:o=document.createTextNode(t.data);break;case os.Comment:o=document.createComment(t.data);break;case os.CDATA:o=document.createCDATASection(t.data)}s&&e.add(o,r({},s));try{null==Is||Is.add(o)}catch(t){}return o}function Ns(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function Ls(t,e,r,i){var n=r.getId(t),s=i.getId(e);return-1!==n&&n===s&&Ns(t,e)}class Fs extends ds{constructor(t){super(),hi(this,"UNSERIALIZED_STARTING_ID",-2),hi(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),hi(this,"mirror",new qs),hi(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this.u--}createDocument(t,e,r){return new Fs}createDocumentType(t,e,r){var i=new Bs(t,e,r);return i.ownerDocument=this,i}createElement(t){var e,r=t.toUpperCase();switch(r){case"AUDIO":case"VIDEO":e=new js(r);break;case"IFRAME":e=new Gs(r,this.mirror);break;case"CANVAS":e=new Ws(r);break;case"STYLE":e=new Hs(r);break;case"DIALOG":e=new Us(r);break;default:e=new Ps(r)}return e.ownerDocument=this,e}createComment(t){var e=new Vs(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new $s(t);return e.ownerDocument=this,e}createTextNode(t){var e=new zs(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.u=this.UNSERIALIZED_STARTING_ID}}var Bs=ps;class Ps extends ms{constructor(){super(...arguments),hi(this,"inputData",null),hi(this,"scrollData",null)}}class js extends ys{}class Us extends gs{}class Ws extends Ps{constructor(){super(...arguments),hi(this,"rr_dataURL",null),hi(this,"canvasMutations",[])}getContext(){return null}}class Hs extends Ps{constructor(){super(...arguments),hi(this,"rules",[])}}class Gs extends Ps{constructor(t,e){super(t),hi(this,"contentDocument",new Fs),this.contentDocument.mirror=e}}var zs=ws,Vs=bs,$s=Ss;function Ys(t,e,i,n){var s,o;switch(t.nodeType){case As.DOCUMENT_NODE:n&&"IFRAME"===n.nodeName?s=n.contentDocument:(s=e).compatMode=t.compatMode;break;case As.DOCUMENT_TYPE_NODE:s=e.createDocumentType(t.name,t.publicId,t.systemId);break;case As.ELEMENT_NODE:var a=t,h=(o=a)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),u=s=e.createElement(h);for(var l of Array.from(a.attributes))u.attributes[l.name]=l.value;a.scrollLeft&&(u.scrollLeft=a.scrollLeft),a.scrollTop&&(u.scrollTop=a.scrollTop);break;case As.TEXT_NODE:s=e.createTextNode(t.textContent||"");break;case As.CDATA_SECTION_NODE:s=e.createCDATASection(t.data);break;case As.COMMENT_NODE:s=e.createComment(t.textContent||"");break;case As.DOCUMENT_FRAGMENT_NODE:var f=n;if(!Si(f))return null;s=f.shadowRoot;break;default:return null}var c=i.getMeta(t);return e instanceof Fs&&(c||(c=Zs(s,e.unserializedId),i.add(t,c)),e.mirror.add(s,r({},c))),s}class qs{constructor(){hi(this,"idNodeMap",new Map),hi(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t)))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Zs(t,e){switch(t.RRNodeType){case os.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case os.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case os.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case os.Text:case os.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case os.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function Js(t,e){return-1!==t.indexOf(e)}var Xs={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Ks={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Qs={};function to(t){if(Qs[t])return Qs[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in Xs?Xs[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in Ks?Ks[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return Qs[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(Js(h=navigator.userAgent,"AppleWebKit")&&!Js(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),Qs[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var eo={};function ro(t,e,r){var i,n=t+"."+String(r);if(eo[n])return eo[n].call(e);var s=to(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(eo[n]=o,o.call(e)):e[r]}var io={};function no(t,e,r){var i=t+"."+String(r);if(io[i])return io[i].bind(e);var n=to(t)[r];return"function"!=typeof n?e[r]:(io[i]=n,n.bind(e))}function so(){return to("MutationObserver").constructor}function oo(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r((function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)}));return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}var ao={childNodes:t=>ro("Node",t,"childNodes"),parentNode:t=>ro("Node",t,"parentNode"),parentElement:t=>ro("Node",t,"parentElement"),textContent:t=>ro("Node",t,"textContent"),contains:(t,e)=>no("Node",t,"contains")(e),getRootNode:t=>no("Node",t,"getRootNode")(),host:t=>t&&"host"in t?ro("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?ro("Element",t,"shadowRoot"):null,querySelector:(t,e)=>no("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>no("Element",t,"querySelectorAll")(e),mutationObserver:so,patch:oo};function ho(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>uo(r,t,e,i)}function uo(t,e,r,i){lo((()=>{var n=t.removeEventListener;"function"==typeof n&&(void 0!==i?n.call(t,e,r,i):n.call(t,e,r))}))}function lo(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}var fo="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.",co={map:{},getId(){return console.error(fo),-1},getNode(){return console.error(fo),null},removeNodeFromMap(){console.error(fo)},has(){return console.error(fo),!1},reset(){console.error(fo)}};function vo(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;s>a;a++)o[a]=arguments[a];var h=Date.now();n||!1!==r.leading||(n=h);var u=e-(h-n),l=this;0>=u||u>e?(i&&(clearTimeout(i),i=null),n=h,t.apply(l,o)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(l,o)}),u))}}function po(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){if(setTimeout((()=>{try{r.set.call(this,t)}catch(t){}}),0),s&&s.set){if(s.get)try{s.get.call(this)}catch(t){return}s.set.call(this,t)}}}),()=>po(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(co=new Proxy(co,{get(t,e,r){return"map"===e&&console.error(fo),Reflect.get(t,e,r)}}));var mo=Date.now;function yo(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=ao.parentElement(s.body))?void 0:e.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(i=ao.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function go(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function wo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function bo(t){return t?t.nodeType===t.ELEMENT_NODE?t:ao.parentElement(t):null}function So(t,e,r,i){if(!t)return!1;var n=bo(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(Qt(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function ko(t,e){return-1!==e.getId(t)}function Co(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===Gt}function Mo(t,e){if(ot(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=ao.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||Mo(i,e))}function xo(t){return Boolean(t.changedTouches)}function Ao(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=[].forEach)}function Eo(t){var e={},r=(t,r)=>{var i={value:t,parent:r,children:[]};return e[t.node.id]=i,i},i=[];for(var n of t){var s=n.nextId,o=n.parentId;if(s&&s in e){var a=e[s];if(a.parent){var h=a.parent.children.indexOf(a);a.parent.children.splice(h,0,r(n,a.parent))}else{var u=i.indexOf(a);i.splice(u,0,r(n,null))}}else if(o in e){var l=e[o];l.children.push(r(n,l))}else i.push(r(n,null))}return i}function Ro(t,e){e(t.value);for(var r=t.children.length-1;r>=0;r--)Ro(t.children[r],e)}function Io(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function To(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Oo(t,e){var r,i,n=null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.frameElement;if(!n||n===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};var s=n.getBoundingClientRect(),o=Oo(n,e),a=s.height/n.clientHeight;return{x:s.x*o.relativeScale+o.x,y:s.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function _o(t){return!!t&&(t instanceof vs&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(ao.shadowRoot(t)))}function Do(t,e){var r=null==t?void 0:t[e[0]];return r?1===e.length?r:Do(r.cssRules,e.slice(1)):null}function No(t){var e=[...t],r=e.pop();return{positions:e,index:r}}function Lo(t){for(var e=new Set,r=[],i=t.length;i--;){var n=t[i];e.has(n.id)||(r.push(n),e.add(n.id))}return r}/[1-9][0-9]{12}/.test(Date.now().toString())||(mo=()=>(new Date).getTime());class Fo{constructor(){u(this,"id",1),u(this,"styleIDMap",new WeakMap),u(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Bo(t){var e,r=null;return"getRootNode"in t&&(null==(e=ao.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ao.host(ao.getRootNode(t))&&(r=ao.host(ao.getRootNode(t))),r}function Po(t){for(var e,r=t;e=Bo(r);)r=e;return r}function jo(t){var e=t.ownerDocument;if(!e)return!1;var r=Po(t);return ao.contains(e,r)}function Uo(t){var e=t.ownerDocument;return!!e&&(ao.contains(e,t)||jo(t))}var Wo=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Fo,get _mirror(){return co},callSafely:lo,closestElementOfNode:bo,getBaseDimension:Oo,getNestedRule:Do,getPositionsAndIndex:No,getRootShadowHost:Po,getShadowHost:Bo,getWindowHeight:go,getWindowScroll:yo,getWindowWidth:wo,hasShadowRoot:_o,hookSetter:po,inDom:Uo,isAncestorRemoved:Mo,isBlocked:So,isIgnored:Co,isSerialized:ko,isSerializedIframe:Io,isSerializedStylesheet:To,iterateResolveTree:Ro,legacy_isTouchEvent:xo,get nowTimestamp(){return mo},on:ho,polyfill:Ao,queueToResolveTrees:Eo,removeEventListenerSafely:uo,shadowHostInDom:jo,throttle:vo,uniqueTextMutations:Lo},Symbol.toStringTag,{value:"Module"})),Ho=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(Ho||{}),Go="rrweb/fullscreen",zo=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(zo||{}),Vo=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Vo||{}),$o=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))($o||{}),Yo=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Yo||{}),qo=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(qo||{}),Zo=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t))(Zo||{}),Jo=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Jo||{});function Xo(t){return"__ln"in t}class Ko{constructor(){u(this,"length",0),u(this,"head",null),u(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;t>r;r++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Xo(t.previousSibling)){var r=t.previousSibling.__ln.next;e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r&&(r.previous=e)}else if(t.nextSibling&&Xo(t.nextSibling)&&t.nextSibling.__ln.previous){var i=t.nextSibling.__ln.previous;e.previous=i,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}var Qo,ta=(t,e)=>t+"@"+e;class ea{constructor(){u(this,"frozen",!1),u(this,"locked",!1),u(this,"texts",[]),u(this,"attributes",[]),u(this,"attributeMap",new WeakMap),u(this,"generatedAttributes",new WeakMap),u(this,"removes",[]),u(this,"mapRemoves",[]),u(this,"movedMap",{}),u(this,"addedSet",new Set),u(this,"movedSet",new Set),u(this,"droppedSet",new Set),u(this,"removesSubTreeCache",new Set),u(this,"mutationCb"),u(this,"blockClass"),u(this,"blockSelector"),u(this,"maskTextClass"),u(this,"maskTextSelector"),u(this,"inlineStylesheet"),u(this,"maskInputOptions"),u(this,"maskTextFn"),u(this,"maskInputFn"),u(this,"maskAllElementAttributes"),u(this,"maskAttributeFn"),u(this,"keepIframeSrcFn"),u(this,"recordCanvas"),u(this,"canvasMaskingConfigured"),u(this,"inlineImages"),u(this,"slimDOMOptions"),u(this,"dataURLOptions"),u(this,"doc"),u(this,"mirror"),u(this,"iframeManager"),u(this,"stylesheetManager"),u(this,"shadowDomManager"),u(this,"canvasManager"),u(this,"processedNodeManager"),u(this,"unattachedDoc"),u(this,"canvasManagerReleased",!1),u(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),u(this,"emit",(()=>{if(!this.frozen&&!this.locked){var t,e,r=M(),i=I();try{this.processBufferedMutations()}finally{t=M()-r,e=i,_>0||O(t,null!=e?e:x)||t>W.slowestBatchMs&&(W.slowestBatchMs=t)}}})),u(this,"processBufferedMutations",(()=>{for(var t=[],e=new Set,r=new Ko,i=t=>{for(var e=t,r=Gt;r===Gt;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=ao.parentNode(n);if(s&&Uo(n)&&"TEXTAREA"!==s.tagName){var o=ot(s)?this.mirror.getId(Bo(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=le(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,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,canvasMaskingConfigured:this.canvasMaskingConfigured,inlineImages:this.inlineImages,onSerialize:t=>{Io(t,this.mirror)&&this.iframeManager.addIframe(t),To(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),_o(t)&&!So(t,this.blockClass,this.blockSelector,!0)&&this.shadowDomManager.addShadowRoot(ao.shadowRoot(t),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onIframeListenerRegistered:(t,e)=>{this.iframeManager.registerLoadListenerDisposer(t,e)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});h&&(t.push({parentId:o,nextId:a,node:h}),e.add(h.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)ia(this.removesSubTreeCache,s)&&!this.movedSet.has(ao.parentNode(s))||n(s);for(var o of this.addedSet)na(this.droppedSet,o)||ia(this.removesSubTreeCache,o)?na(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var a=null;r.length;){var h=null;if(a){var u=this.mirror.getId(ao.parentNode(a.value)),l=i(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var f=r.tail;f;){var c=f;if(f=f.previous,c){var v=this.mirror.getId(ao.parentNode(c.value));if(-1===i(c.value))continue;if(-1!==v){h=c;break}var d=ao.parentNode(c.value);if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=ao.host(d);if(-1!==this.mirror.getId(p)){h=c;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}a=h.previous,r.removeNode(h.value),n(h.value)}var m={texts:this.texts.map((t=>{var e=t.node,r=ao.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{var e,r=t.attributes;if(!this.maskAllElementAttributes&&!this.maskAttributeFn&&"string"==typeof r.style){var i=JSON.stringify(t.styleDiff),n=JSON.stringify(t._unchangedStyles);r.style.length>i.length&&(i+n).split("var(").length===r.style.split("var(").length&&(r.style=t.styleDiff)}if(this.maskAllElementAttributes||this.maskAttributeFn)for(var s of Object.entries(r)){var o=s[0],a=s[1];"string"!=typeof a&&null!==a||(r[o]=xt({element:t.node,name:o,value:a,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,isGenerated:null==(e=this.generatedAttributes.get(t.node))?void 0:e.has(o)}))}return{id:this.mirror.getId(t.node),attributes:r}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(m.texts.length||m.attributes.length||m.removes.length||m.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.generatedAttributes=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))})),u(this,"bufferBelongsToIframe",(t=>this.doc===t.contentDocument)),u(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(this.attributes.push(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t,e));var r=Array.from(ao.childNodes(t),(t=>ao.textContent(t)||"")).join("");e.attributes.value=kt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:Et(t),value:r,maskInputFn:this.maskInputFn})})),u(this,"processMutation",(t=>{var e;if(!Co(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var r=ao.textContent(t.target);So(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue||this.texts.push({value:te(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,bo(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break;case"attributes":var i,n=t.target,s=t.attributeName,o=null!==(i=t.attributeNamespace)&&void 0!==i?i:null,a=function(t,e,r){if(!r)return e;var i=t.getAttributeNodeNS(r,e);if(i)return i.name;if("http://www.w3.org/1999/xlink"===r)return"xlink:"+e;if("http://www.w3.org/XML/1998/namespace"===r)return"xml:"+e;if("http://www.w3.org/2000/xmlns/"===r)return"xmlns"===e?e:"xmlns:"+e;var n=t.lookupPrefix(r);return n?n+":"+e:e}(n,s,o),h=o?n.getAttributeNS(o,s):t.target.getAttribute(s);if("value"===a){var u=n,l=Et(u);h=kt({element:u,maskInputOptions:this.maskInputOptions,tagName:n.tagName,type:l,value:h,maskInputFn:this.maskInputFn})}if(So(t.target,this.blockClass,this.blockSelector,!1)||h===t.oldValue)return;var f=this.attributeMap.get(t.target),c="IFRAME"===n.tagName&&"src"===a;if(c&&!this.keepIframeSrcFn(h)&&n.contentDocument)return;if(f||(this.attributes.push(f={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,f)),"type"===a&&"INPUT"===n.tagName&&"password"===(t.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!Kt(n.tagName,a)){var v=Xt(this.doc,Ct(n.tagName),Ct(a),h,n,this.dataURLOptions);if(c&&!this.keepIframeSrcFn(h)&&(a="rr_src"),f.attributes[a]=v,null==(e=this.generatedAttributes.get(t.target))||e.delete(a),"style"===a){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var d=this.unattachedDoc.createElement("span"),p=n.style;for(var m of(t.oldValue&&(d.style.cssText=t.oldValue),Array.from(p))){var y=p.getPropertyValue(m),g=p.getPropertyPriority(m);y!==d.style.getPropertyValue(m)||g!==d.style.getPropertyPriority(m)?f.styleDiff[m]=""===g?y:[y,g]:f._unchangedStyles[m]=[y,g]}for(var w of Array.from(d.style))""===p.getPropertyValue(w)&&(f.styleDiff[w]=!1)}else if("open"===a&&"DIALOG"===n.tagName){f.attributes.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal";var b=this.generatedAttributes.get(t.target);b||this.generatedAttributes.set(t.target,b=new Set),b.add("rr_open_mode")}}break;case"childList":if(So(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{var r=this.mirror.getId(e),i=ot(t.target)?this.mirror.getId(ao.host(t.target)):this.mirror.getId(t.target);So(t.target,this.blockClass,this.blockSelector,!1)||Co(e,this.mirror,this.slimDOMOptions)||!ko(e,this.mirror)||(this.addedSet.has(e)?(ra(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||Mo(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[ta(r,i)]?ra(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!ot(t.target)||!ht(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),ao.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),u(this,"genAdds",((t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)){if(this.addedSet.has(t))return this.addedSet.delete(t),void this.addedSet.add(t);if(!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(Co(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[ta(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);So(t,this.blockClass,this.blockSelector,!1)||(ao.childNodes(t).forEach((t=>this.genAdds(t))),_o(t)&&ao.childNodes(ao.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}}))}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAllElementAttributes","maskAttributeFn","keepIframeSrcFn","recordCanvas","canvasMaskingConfigured","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((e=>{this[e]=t[e]})),this.canvasManager.acquire()}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.releaseCanvasManager()}releaseCanvasManager(){this.canvasManagerReleased||(this.canvasManagerReleased=!0,this.canvasManager.reset())}bufferDoc(){return this.doc}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function ra(t,e){for(var r=[e];r.length;){var i=r.pop();t.delete(i),ao.childNodes(i).forEach((t=>r.push(t)))}}function ia(t,e,r){return 0!==t.size&&function(t,e,r){var i=ao.parentNode(e);return!!i&&t.has(i)}(t,e)}function na(t,e){if(0===t.size)return!1;for(var r=ao.parentNode(e);r;){if(t.has(r))return!0;r=ao.parentNode(r)}return!1}var sa=function(t,e){return void 0===e&&(e="rrweb"),Qo?function(){try{return t(...arguments)}catch(t){if(Qo&&!0===Qo(t,e))return;throw t}}:t},oa=[];function aa(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function ha(t,e){var r,i=new ea;i.init(t);try{r=new(so())(sa(i.processMutations.bind(i)));var n={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return t.attributeFilter&&t.attributeFilter.length>0&&(n.attributeFilter=t.attributeFilter),r.observe(e,n),oa.push(i),{observer:r,buffer:i}}catch(t){try{null==r||r.disconnect(),i.destroy(),i.reset()}catch(t){}throw t}}function ua(t){var e=t.scrollCb,r=t.doc,i=t.mirror,n=t.blockClass,s=t.blockSelector,o=t.sampling,a=new Map,h=t=>{var o=aa(t);if(o&&!So(o,n,s,!0)){var h,u,l=i.getId(o);if(o===r&&r.defaultView){var f=yo(r.defaultView);h=f.left,u=f.top}else h=o.scrollLeft,u=o.scrollTop;var c=h+","+u;a.get(l)!==c&&(a.set(l,c),e({id:l,x:h,y:u}))}},u=[ho("scroll",sa(vo(sa((t=>h(t))),o.scroll||100)),r)];return"onscrollend"in r&&u.push(ho("scrollend",sa(h),r)),()=>u.forEach((t=>t()))}function la(t,e){for(var r=oa.length-1;r>=0;r--){var i=oa[r];if(i){var n=i.bufferBelongsToIframe(t);!n&&e&&e.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),oa.splice(r,1))}}}var fa=["INPUT","TEXTAREA","SELECT"],ca=new WeakMap;function va(t){return function t(e,r){if(ga("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ga("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ga("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ga("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var i=Array.from(e.parentRule.cssRules).indexOf(e);return r.unshift(i),t(e.parentRule,r)}if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);r.unshift(n)}return r}(t,[])}function da(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}var pa=5e3;function ma(t,e){var r,i,n,s,o=t.stylesheetManager;s=t.mirror.getId("#document"===e.nodeName?e:ao.host(e));var a="#document"===e.nodeName?null==(r=e.defaultView)?void 0:r.Document:null==(n=null==(i=e.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,h=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&a&&h?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get(){var t;return null==(t=h.get)?void 0:t.call(this)},set(t){var e,r;try{r=null==(e=h.set)?void 0:e.call(this,t)}catch(t){if(t&&"object"==typeof t&&"NotAllowedError"===t.name)return;throw t}if(null!==s&&-1!==s)try{o.adoptStyleSheets(t,s)}catch(t){}return r}}),sa((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:h.configurable,enumerable:h.enumerable,get:h.get,set:h.set})}))):()=>{}}function ya(t,e){void 0===e&&(e={});var i,n,s=t.doc.defaultView;if(!s)return()=>{};!function(t,e){var r=t.mutationCb,i=t.mousemoveCb,n=t.mouseInteractionCb,s=t.scrollCb,o=t.viewportResizeCb,a=t.inputCb,h=t.mediaInteractionCb,u=t.styleSheetRuleCb,l=t.styleDeclarationCb,f=t.canvasMutationCb,c=t.fontCb,v=t.selectionCb,d=t.customElementCb;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),f(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),c(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),v(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),d(...arguments)}}(t,e);var o,a,h,u,l,f,c,v,d,p,m,y,g=[],w=sa((()=>{if(n){n.destroy(),n.reset();var e=oa.indexOf(n);-1!==e&&oa.splice(e,1)}t.shadowDomManager.resetForDoc(t.doc),null==i||i.disconnect(),g.forEach((t=>t()))}));try{if(t.recordDOM){var b=ha(t,t.doc);i=b.observer,n=b.buffer}if(g.push(function(t){var e=t.mousemoveCb,r=t.sampling,i=t.doc,n=t.mirror;if(!1===r.mousemove)return()=>{};var s,o="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,h=[],u=vo(sa((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=sa(vo(sa((t=>{var e=aa(t),r=xo(t)?t.changedTouches[0]:t,i=r.clientX,o=r.clientY;s||(s=mo()),h.push({x:i,y:o,id:n.getId(e),timeOffset:mo()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?zo.Drag:t instanceof MouseEvent?zo.MouseMove:zo.TouchMove)})),o,{trailing:!1})),f=[ho("mousemove",l,i),ho("touchmove",l,i),ho("drag",l,i)];return sa((()=>{f.forEach((t=>t()))}))}(t)),g.push(function(t){var e=t.mouseInteractionCb,i=t.doc,n=t.mirror,s=t.blockClass,o=t.blockSelector,a=t.sampling;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(Vo).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=Ct(t),h=(t=>i=>{var a=aa(i);if(!So(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=$o.Mouse;break;case"touch":h=$o.Touch;break;case"pen":h=$o.Pen}h===$o.Touch&&(Vo[t]===Vo.MouseDown?u="TouchStart":Vo[t]===Vo.MouseUp&&(u="TouchEnd"))}else xo(i)&&(h=$o.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===$o.Touch||u.startsWith("Mouse")&&h===$o.Mouse)&&(h=null)):Vo[t]===Vo.Click&&(h=l,l=null);var f=xo(i)?i.changedTouches[0]:i;if(f){var c=n.getId(a),v=f.clientX,d=f.clientY;sa(e)(r({type:Vo[u],id:c,x:v,y:d},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(Vo[t]){case Vo.MouseDown:case Vo.MouseUp:a=a.replace("mouse","pointer");break;case Vo.TouchStart:case Vo.TouchEnd:return}u.push(ho(a,h,i))})),sa((()=>{u.forEach((t=>t()))}))}(t)),g.push(ua(t)),g.push((d=t.viewportResizeCb,p=s,m=-1,y=-1,ho("resize",sa(vo(sa((()=>{var t=go(),e=wo();m===t&&y===e||(d({width:Number(e),height:Number(t)}),m=t,y=e)})),200)),p))),g.push(function(t){var e=t.inputCb,i=t.doc,n=t.mirror,s=t.blockClass,o=t.blockSelector,a=t.ignoreClass,h=t.ignoreSelector,u=t.maskInputOptions,l=t.maskInputFn,f=t.userTriggeredOnInput;function c(t){var e=aa(t),r=t.isTrusted,n=i.defaultView;if(!e||!n||e instanceof n.HTMLElement){var c=e&&e.tagName;if(e&&"OPTION"===c&&(e=ao.parentElement(e)),e&&c&&fa.indexOf(c)>=0&&!So(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var d=e.value,p=!1,m=Et(e)||"";"radio"===m||"checkbox"===m?p=e.checked:(u[c.toLowerCase()]||u[m])&&(d=kt({element:e,maskInputOptions:u,tagName:c,type:m,value:d,maskInputFn:l})),v(e,f?{text:d,isChecked:p,userTriggered:r}:{text:d,isChecked:p});var y=e.name;"radio"===m&&y&&p&&i.querySelectorAll('input[type="radio"][name="'+y+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}}))}}}function v(t,i){var s=ca.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){ca.set(t,i);var o=n.getId(t);sa(e)(r({},i,{id:o}))}}var d=("last"===t.sampling.input?["change"]:["input","change"]).map((t=>ho(t,sa(c),i))),p=i.defaultView;if(!p)return()=>{d.forEach((t=>t()))};var m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value");return m&&m.set&&d.push(...[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]].map((t=>po(t[0],t[1],{set(){sa(c)({target:this,isTrusted:!1})}},!1,p)))),sa((()=>{d.forEach((t=>t()))}))}(t)),g.push(function(t){var e=t.mediaInteractionCb,r=t.blockClass,i=t.blockSelector,n=t.mirror,s=t.sampling,o=t.doc,a=sa((t=>vo(sa((s=>{var o=aa(s);if(o&&!So(o,r,i,!0)){var a=o.currentTime,h=o.volume,u=o.muted,l=o.playbackRate,f=o.loop;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:f})}})),s.media||500))),h=[ho("play",a(qo.Play),o),ho("pause",a(qo.Pause),o),ho("seeked",a(qo.Seeked),o),ho("volumechange",a(qo.VolumeChange),o),ho("ratechange",a(qo.RateChange),o)];return sa((()=>{h.forEach((t=>t()))}))}(t)),t.recordDOM){var S=function(t){var e=new Map,r=new Set,i=!0,n=t=>{if(i)try{t()}catch(t){}},s=t=>{var r,i=e.get(t);if(i){for(;null==(r=i[0])?void 0:r.ready;){var s=i.shift();(null==s?void 0:s.emit)&&n(s.emit)}0===i.length&&e.delete(t)}};return{queueMutation(t,r){if(t){var i=e.get(t);i?(i.push({emit:r,ready:!0}),s(t)):n(r)}else n(r)},queuePendingMutation(o,a,h){if(!i)return()=>{};var u=e.get(o);u||e.set(o,u=[]);var l={emit:a,ready:!1};u.push(l);var f,c=!1,v=!1,d=()=>{c||v||(c=!0,void 0!==f&&r.delete(f),l.ready=!0,l.emit=void 0,s(o))};try{f=t.setTimeout(d,pa),c||v?t.clearTimeout(f):r.add(f)}catch(t){d()}return e=>{!v&&i&&(v=!0,void 0!==f&&(t.clearTimeout(f),r.delete(f)),c?e&&n(h):(l.ready=!0,e||(l.emit=void 0),s(o)))}},reset(){i=!1,r.forEach((e=>t.clearTimeout(e))),r.clear(),e.clear()}}}(s);g.push(S.reset),g.push(function(t,e){var r=t.styleSheetRuleCb,i=t.mirror,n=t.stylesheetManager,s=e.win,o=e.mutationQueue;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var a=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=da(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,(()=>r({id:l,styleId:f,adds:[{rule:a,index:h}]}))),h}),"host")}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){return void 0===r&&(r=this.cssRules.length),s.CSSStyleSheet.prototype.insertRule.apply(this,[t+" { "+e+" }",r])};var h,u,l=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=da(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,(()=>r({id:l,styleId:f,removes:[{index:a}]}))),h}),"host")}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(h=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(h,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);try{var u=null==h?void 0:h.then;if(e.ownerNode||!h||"function"!=typeof u)return h;n.onCssomSheetMutation(e);var l=da(e,i,n.styleMirror),f=l.id,c=l.styleId;if(!(f&&-1!==f||c&&-1!==c))return h;var v=o.queuePendingMutation(e,(()=>r({id:f,styleId:c,replace:a})),(()=>{var t=ct(e);null!==t&&r({id:f,styleId:c,replace:t})}));try{u.call(h,(()=>v(!0)),(()=>v(!1)))}catch(t){v(!1)}}catch(t){}return h}),"host")})),s.CSSStyleSheet.prototype.replaceSync&&(u=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=da(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,(()=>r({id:l,styleId:f,replaceSync:a}))),h}),"host")}));var f={};wa("CSSGroupingRule")?f.CSSGroupingRule=s.CSSGroupingRule:(wa("CSSMediaRule")&&(f.CSSMediaRule=s.CSSMediaRule),wa("CSSConditionRule")&&(f.CSSConditionRule=s.CSSConditionRule),wa("CSSSupportsRule")&&(f.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(f).forEach((t=>{var e=t[0],s=t[1];c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e.parentStyleSheet);var u=da(e.parentStyleSheet,i,n.styleMirror),l=u.id,f=u.styleId;if(e.parentStyleSheet&&(l&&-1!==l||f&&-1!==f)){var c=[...va(e),h];o.queueMutation(e.parentStyleSheet,(()=>r({id:l,styleId:f,adds:[{rule:a,index:c}]})))}return h}),"host")}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:sa(((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e.parentStyleSheet);var u=da(e.parentStyleSheet,i,n.styleMirror),l=u.id,f=u.styleId;if(e.parentStyleSheet&&(l&&-1!==l||f&&-1!==f)){var c=[...va(e),a];o.queueMutation(e.parentStyleSheet,(()=>r({id:l,styleId:f,removes:[{index:c}]})))}return h}),"host")})})),sa((()=>{s.CSSStyleSheet.prototype.insertRule=a,s.CSSStyleSheet.prototype.deleteRule=l,h&&(s.CSSStyleSheet.prototype.replace=h),u&&(s.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach((t=>{var e=t[0],r=t[1];r.prototype.insertRule=c[e].insertRule,r.prototype.deleteRule=c[e].deleteRule}))}))}(t,{win:s,mutationQueue:S})),g.push(ma(t,t.doc)),g.push(function(t,e){var r=t.styleDeclarationCb,i=t.mirror,n=t.ignoreCSSAttributes,s=t.stylesheetManager,o=e.win,a=e.mutationQueue,h=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(h,{apply:sa(((t,e,o)=>{var h,u=o[0],l=o[1],f=o[2],c=t.apply(e,o);if(n.has(u))return c;var v=null==(h=e.parentRule)?void 0:h.parentStyleSheet;s.onCssomSheetMutation(v);var d=da(v,i,s.styleMirror),p=d.id,m=d.styleId;if(p&&-1!==p||m&&-1!==m){var y=va(e.parentRule);a.queueMutation(v,(()=>r({id:p,styleId:m,set:{property:u,value:l,priority:f},index:y})))}return c}),"host")});var u=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:sa(((t,e,o)=>{var h,u=o[0],l=t.apply(e,o);if(n.has(u))return l;var f=null==(h=e.parentRule)?void 0:h.parentStyleSheet;s.onCssomSheetMutation(f);var c=da(f,i,s.styleMirror),v=c.id,d=c.styleId;if(v&&-1!==v||d&&-1!==d){var p=va(e.parentRule);a.queueMutation(f,(()=>r({id:v,styleId:d,remove:{property:u},index:p})))}return l}),"host")}),sa((()=>{o.CSSStyleDeclaration.prototype.setProperty=h,o.CSSStyleDeclaration.prototype.removeProperty=u}))}(t,{win:s,mutationQueue:S})),t.collectFonts&&g.push(function(t){var e=t.fontCb,r=t.doc,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,o=i.FontFace;i.FontFace=function(t,e,r){var i=new o(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var a=oo(r.fonts,"add",(function(t){return function(r){return setTimeout(sa((()=>{var t=s.get(r);t&&(e(t),s.delete(r))})),0),t.apply(this,[r])}}));return n.push((()=>{i.FontFace=o})),n.push(a),sa((()=>{n.forEach((t=>t()))}))}(t))}for(var k of(g.push((a=(o=t).doc,h=o.mirror,u=o.blockClass,l=o.blockSelector,f=o.selectionCb,c=!0,(v=sa((()=>{var t=a.getSelection();if(!(!t||c&&(null==t?void 0:t.isCollapsed))){c=t.isCollapsed||!1;for(var e=[],r=t.rangeCount||0,i=0;r>i;i++){var n=t.getRangeAt(i),s=n.startContainer,o=n.startOffset,v=n.endContainer,d=n.endOffset;So(s,u,l,!0)||So(v,u,l,!0)||e.push({start:h.getId(s),startOffset:o,end:h.getId(v),endOffset:d})}f({ranges:e})}})))(),ho("selectionchange",v))),g.push(function(t){var e=t.customElementCb,r=t.doc.defaultView;return r&&r.customElements?oo(r.customElements,"define",(function(t){return function(r,i,n){try{e({define:{name:r}})}catch(t){console.warn("Custom element callback failed for "+r)}return t.apply(this,[r,i,n])}})):()=>{}}(t)),t.plugins))g.push(k.observer(k.callback,s,k.options))}catch(t){try{w()}catch(t){}throw t}return w}function ga(t){return void 0!==window[t]}function wa(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class ba{constructor(t){u(this,"iframeRemoteIdToLocalIdMap",new WeakMap),u(this,"iframeLocalIdToRemoteIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){if(0>e)return e;var n=r||this.getRemoteIdToLocalIdMap(t),s=i||this.getLocalIdToRemoteIdMap(t),o=n.get(e);return void 0===o&&(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getRemoteIdToLocalIdMap(t),i=this.getLocalIdToRemoteIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i;return"number"!=typeof e||0>e?e:null!==(i=(r||this.getLocalIdToRemoteIdMap(t)).get(e))&&void 0!==i?i:-1}getRemoteIds(t,e){var r=this.getLocalIdToRemoteIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeRemoteIdToLocalIdMap=new WeakMap,void(this.iframeLocalIdToRemoteIdMap=new WeakMap);this.iframeRemoteIdToLocalIdMap.delete(t),this.iframeLocalIdToRemoteIdMap.delete(t)}getRemoteIdToLocalIdMap(t){var e=this.iframeRemoteIdToLocalIdMap.get(t);return e||this.iframeRemoteIdToLocalIdMap.set(t,e=new Map),e}getLocalIdToRemoteIdMap(t){var e=this.iframeLocalIdToRemoteIdMap.get(t);return e||this.iframeLocalIdToRemoteIdMap.set(t,e=new Map),e}}class Sa{constructor(t){u(this,"iframes",new WeakMap),u(this,"crossOriginIframeMap",new WeakMap),u(this,"crossOriginIframeMirror",new ba(zt)),u(this,"crossOriginIframeStyleMirror"),u(this,"crossOriginIframeRootIdMap",new WeakMap),u(this,"mirror"),u(this,"mutationCb"),u(this,"wrappedEmit"),u(this,"loadListener"),u(this,"pageHideListener"),u(this,"stylesheetManager"),u(this,"recordCrossOriginIframes"),u(this,"messageHandler"),u(this,"nestedIframeListeners",new Map),u(this,"attachedWindows",new WeakMap),u(this,"attachedDocuments",new WeakMap),u(this,"attachedIframes",new Map),u(this,"loadListenerDisposers",new WeakMap),u(this,"iframeElementsById",new Map),u(this,"pageHideHandlers",new WeakMap),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ba(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}registerLoadListenerDisposer(t,e){var r=this.loadListenerDisposers.get(t);r||this.loadListenerDisposers.set(t,r=new Set),r.add(e);var i=this.mirror.getId(t);-1!==i&&this.iframeElementsById.set(i,t)}getIframeElementById(t){var e,r,i;return null!==(e=null!==(r=null==(i=this.attachedIframes.get(t))?void 0:i.element)&&void 0!==r?r:this.iframeElementsById.get(t))&&void 0!==e?e:null}forgetIframeId(t){this.attachedIframes.delete(t),this.iframeElementsById.delete(t)}disposeLoadListeners(t){var e=this.loadListenerDisposers.get(t);e&&(e.forEach((t=>lo(t))),this.loadListenerDisposers.delete(t))}removePageHideListener(t){var e=this.pageHideHandlers.get(t);e&&(e.forEach((t=>{uo(t.win,"pagehide",t.handler)})),this.pageHideHandlers.delete(t))}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);if(t.contentDocument){var n=this.attachedDocuments.get(t);n||this.attachedDocuments.set(t,n=new Set),n.add(t.contentDocument)}this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var s=t.contentWindow;if(this.recordCrossOriginIframes&&s&&!this.nestedIframeListeners.has(s)){var o=this.handleMessage.bind(this);lo((()=>{s.addEventListener("message",o),this.nestedIframeListeners.set(s,o);var e=this.attachedWindows.get(t);e||this.attachedWindows.set(t,e=new Set),e.add(s)}))}lo((()=>{var e=t.contentWindow;if(e){var r=this.pageHideHandlers.get(t);if(r)for(var i of r)if(i.win===e)return;var n=()=>{var e;null==(e=this.pageHideListener)||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument),t.contentWindow&&this.crossOriginIframeMap.delete(t.contentWindow)};e.addEventListener("pagehide",n),r||this.pageHideHandlers.set(t,r=new Set),r.add({win:e,handler:n})}})),null==(r=this.loadListener)||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var r;switch(e.type){case Ho.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:Ho.IncrementalSnapshot,data:{source:zo.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Ho.Meta:case Ho.Load:case Ho.DomContentLoaded:return!1;case Ho.Plugin:return e;case Ho.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case Ho.IncrementalSnapshot:switch(e.data.source){case zo.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case zo.Drag:case zo.TouchMove:case zo.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case zo.ViewportResize:return!1;case zo.MediaInteraction:case zo.MouseInteraction:case zo.Scroll:case zo.CanvasMutation:case zo.Input:return this.replaceIds(e.data,t,["id"]),e;case zo.StyleSheetRule:case zo.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case zo.Font:return e;case zo.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case zo.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(r=e.data.styles)||r.forEach((e=>{this.replaceStyleIds(e,t,["styleId"])})),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(e[n]=Array.isArray(e[n])?t.getIds(r,e[n]):t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===Jo.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.iframeElementsById.get(t)||this.mirror.getNode(t);if(this.iframeElementsById.delete(t),r){var i=r.contentWindow,n=this.attachedWindows.get(r);n&&(n.forEach((t=>{var e=this.nestedIframeListeners.get(t);e&&(uo(t,"message",e),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)})),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)&&(uo(i,"message",this.nestedIframeListeners.get(i)),this.nestedIframeListeners.delete(i)),i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r),this.disposeLoadListeners(r),this.removePageHideListener(r);var s=this.attachedDocuments.get(r);s&&(s.forEach((t=>{lo((()=>this.mirror.removeNodeFromMap(t)))})),lo((()=>la(r,s))),this.attachedDocuments.delete(r))}e&&this.attachedIframes.delete(t)}cleanupDetachedIframes(){if(0!==this.attachedIframes.size){var t=[];this.attachedIframes.forEach(((e,r)=>{this.mirror.has(r)||t.push(r)})),t.forEach((t=>this.removeIframeById(t)))}}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var r=t.content;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)}))}destroy(){this.recordCrossOriginIframes&&uo(window,"message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{uo(e,"message",t)})),this.nestedIframeListeners.clear();var t=new Set;this.iframeElementsById.forEach((e=>t.add(e))),this.attachedIframes.forEach((e=>t.add(e.element))),t.forEach((t=>{this.disposeLoadListeners(t),this.removePageHideListener(t)})),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap,this.loadListenerDisposers=new WeakMap,this.pageHideHandlers=new WeakMap,this.attachedDocuments=new WeakMap,this.attachedWindows=new WeakMap,this.iframeElementsById=new Map}}class ka{constructor(t){u(this,"shadowDoms",new WeakSet),u(this,"mutationCb"),u(this,"scrollCb"),u(this,"bypassOptions"),u(this,"mirror"),u(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){var i,n;if(ht(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var s=null!==(i=null==(n=ao.host(t))?void 0:n.ownerDocument)&&void 0!==i?i:e,o=ha(r({},this.bypassOptions,{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),a=o.observer,h=o.buffer;this.restoreHandlers.push({doc:s,handler(){a.disconnect(),h.destroy(),h.releaseCanvasManager();var t=oa.indexOf(h);-1!==t&&oa.splice(t,1)}}),this.restoreHandlers.push({doc:s,handler:ua(r({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}),setTimeout((()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(ao.host(t))),this.restoreHandlers.push({doc:s,handler:ma({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)})}),0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var r=this;this.restoreHandlers.push({doc:e,handler:oo(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=ao.shadowRoot(this);return s&&Uo(this)&&r.addShadowRoot(s,e),n}}))})}reset(){this.restoreHandlers.forEach((t=>{var e=t.handler;try{e()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}resetForDoc(t){var e=[];for(var r of this.restoreHandlers)if(r.doc===t)try{r.handler()}catch(t){}else e.push(r);this.restoreHandlers=e}}var Ca="skip-frame";function Ma(t){if("object"!=typeof t||null===t)return!1;var e=t.y,r=t.width,i=t.height;return Number.isFinite(t.x)&&Number.isFinite(e)&&Number.isFinite(r)&&Number.isFinite(i)&&r>=0&&i>=0}for(var xa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Aa="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ea=0;64>Ea;Ea++)Aa[xa.charCodeAt(Ea)]=Ea;var Ra=function(t){var e,r,i,n,s,o=.75*t.length,a=t.length,h=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var u=new ArrayBuffer(o),l=new Uint8Array(u);for(e=0;a>e;e+=4)r=Aa[t.charCodeAt(e)],i=Aa[t.charCodeAt(e+1)],n=Aa[t.charCodeAt(e+2)],s=Aa[t.charCodeAt(e+3)],l[h++]=r<<2|i>>4,l[h++]=(15&i)<<4|n>>2,l[h++]=(3&n)<<6|63&s;return u},Ia=new Map,Ta=(t,e,r)=>{if(t&&(Da(t,e)||"object"==typeof t)){var i=function(t,e){var r=Ia.get(t);return r||Ia.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function Oa(t,e,r,i){return t instanceof Array?t.map((t=>Oa(t,e,r,i))):null===t?t:t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray?{rr_type:t.constructor.name,args:[Object.values(t)]}:t instanceof ArrayBuffer?{rr_type:t.constructor.name,base64:function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;i>e;e+=3)n+=xa[r[e]>>2],n+=xa[(3&r[e])<<4|r[e+1]>>4],n+=xa[(15&r[e+1])<<2|r[e+2]>>6],n+=xa[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t)}:t instanceof DataView?{rr_type:t.constructor.name,args:[Oa(t.buffer,e,r,i),t.byteOffset,t.byteLength]}:t instanceof HTMLImageElement?{rr_type:t.constructor.name,src:t.src}:t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[Oa(t.data,e,r,i),t.width,t.height]}:Da(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Ta(t,e,r)}:t}var _a=(t,e,r,i)=>t.map((t=>Oa(t,e,r,i))),Da=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"==typeof e[t]));return Boolean(r.find((r=>t instanceof e[r])))},Na=["webgl","webgl2"];function La(t){return"nodeType"in t}function Fa(t,e,i,n){var s=[];try{if(n){var o=function(t,e,i){var n=t.GPUCanvasContext;if((null==n?void 0:n.prototype)&&"function"==typeof n.prototype.configure)return oo(n.prototype,"configure",(function(n){return function(s){var o=function(t){var e=t.canvas;return e&&"object"==typeof e?e:null}(this);if(!o||La(o)&&So(o,e,i,!0))return n.call(this,s);La(o)&&!("__context"in o)&&(o.__context="webgpu");var a=function(t){var e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return n.call(this,null!==a&&s?r({},s,{usage:"number"==typeof s.usage?s.usage|a:a}):s)}}))}(t,e,i);o&&s.push(o)}var a=oo(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(r){for(var s=function(t){return"experimental-webgl"===t?"webgl":t}(r),o=arguments.length,a=new Array(o>1?o-1:0),h=1;o>h;h++)a[h-1]=arguments[h];if(!So(this,e,i,!0)&&("__context"in this||(this.__context=s),n&&Na.includes(s)))if(a[0]&&"object"==typeof a[0]){var u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[r,...a])}}));s.push(a)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach((t=>t()))}}function Ba(t,e,r,i,n,s,o){var a=[],h=Object.getOwnPropertyNames(t),u=function(h){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))return 0;try{if("function"!=typeof t[h])return 0;var u=oo(t,h,(function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;a>l;l++)u[l]=arguments[l];var f=t.apply(this,u);if(Ta(f,s,this),this.canvas&&"tagName"in this.canvas&&!So(this.canvas,i,n,!0)){var c=_a(u,s,this,o);r(this.canvas,{type:e,property:h,args:c})}return f}}));a.push(u)}catch(s){var l=po(t,h,{set(t){this.canvas&&"tagName"in this.canvas&&!So(this.canvas,i,n,!0)&&r(this.canvas,{type:e,property:h,args:[t],setter:!0})}});a.push(l)}};for(var l of h)u(l);return a}var Pa,ja,Ua,Wa='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentFingerprintMap = /* @__PURE__ */ new Map();\n const lastSentAtMap = /* @__PURE__ */ new Map();\n const PROVIDER_KEYFRAME_INTERVAL_MS = 3e4;\n function hashPixels(data) {\n const view = new Uint32Array(\n data.buffer,\n data.byteOffset,\n data.byteLength >>> 2\n );\n let primaryHash = 2166136261;\n let secondaryHash = 2654435769;\n for (let i2 = 0; i2 < view.length; i2++) {\n primaryHash ^= view[i2];\n primaryHash = Math.imul(primaryHash, 16777619);\n secondaryHash ^= view[i2];\n secondaryHash = Math.imul(secondaryHash, 2246822507);\n }\n return `${(primaryHash >>> 0).toString(16)}:${(secondaryHash >>> 0).toString(16)}`;\n }\n function frameFingerprint(width, height, data) {\n return `${width}x${height}:${hashPixels(data)}`;\n }\n function transparentFingerprint(width, height) {\n const pixelCount = width * height;\n let hash = transparentFingerprintMap.get(pixelCount);\n if (hash === void 0) {\n hash = hashPixels(new Uint8ClampedArray(pixelCount * 4));\n transparentFingerprintMap.set(pixelCount, hash);\n }\n return `${width}x${height}:${hash}`;\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("resetFrameDedup" in e.data) {\n lastFingerprintMap.clear();\n return;\n }\n if ("OffscreenCanvas" in globalThis) {\n const {\n id,\n bitmap,\n width,\n height,\n displayWidth,\n displayHeight,\n dataURLOptions,\n maskRegions\n } = e.data;\n try {\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d", {\n willReadFrequently: true\n });\n }\n const ctx = reusableCtx;\n ctx.clearRect(0, 0, width, height);\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n if (maskRegions) {\n ctx.fillStyle = "black";\n for (const region of maskRegions) {\n ctx.fillRect(region.x, region.y, region.width, region.height);\n }\n }\n const fingerprint = frameFingerprint(\n width,\n height,\n ctx.getImageData(0, 0, width, height).data\n );\n const lastFingerprint = lastFingerprintMap.get(id) ?? transparentFingerprint(width, height);\n if (fingerprint === lastFingerprint) {\n const lastSentAt = lastSentAtMap.get(id);\n const keyframeDue = maskRegions !== void 0 && lastSentAt !== void 0 && Date.now() - lastSentAt >= PROVIDER_KEYFRAME_INTERVAL_MS;\n if (!keyframeDue) {\n return worker.postMessage({ id });\n }\n }\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n worker.postMessage({\n id,\n type: blob.type,\n base64: encode(arrayBuffer),\n // cpu intensive\n displayWidth,\n displayHeight\n });\n lastFingerprintMap.set(id, fingerprint);\n lastSentAtMap.set(id, Date.now());\n } catch {\n worker.postMessage({ id });\n }\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n',Ha="undefined"!=typeof self&&self.Blob&&new Blob([Wa],{type:"text/javascript;charset=utf-8"});function Ga(t){var e;try{if(!(e=Ha&&(self.URL||self.webkitURL).createObjectURL(Ha)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(e)})),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Wa),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class za{constructor(t){u(this,"pendingCanvasMutations",new Map),u(this,"rafStamps",{latestId:0,invokeId:null}),u(this,"mirror"),u(this,"mutationCb"),u(this,"resetObservers"),u(this,"frozen",!1),u(this,"locked",!1),u(this,"rafIdTimestamp",null),u(this,"rafIdFlush",null),u(this,"refCount",0),u(this,"torndown",!1),u(this,"resetFrameDedup",null),u(this,"processMutation",((t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)}));var e=t.sampling,r=void 0===e?"all":e,i=t.win,n=t.blockClass,s=t.blockSelector,o=t.recordCanvas,a=t.dataURLOptions,h=t.resolutionScale,l=t.canvasMasking;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&"all"===r&&this.initCanvasMutationObserver(i,n,s,a),o&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,n,s,{dataURLOptions:a,resolutionScale:h,canvasMasking:l})}onFullSnapshot(){var t;null==(t=this.resetFrameDedup)||t.call(this)}acquire(){this.refCount+=1}reset(){this.refCount>0&&(this.refCount-=1),this.refCount>0||this.teardown()}teardown(){this.torndown||(this.torndown=!0,this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,i,n,s){var o=this;if("OffscreenCanvas"in r){var a,h="number"==typeof s.resolutionScale&&Number.isFinite(s.resolutionScale)?Math.min(1,Math.max(.1,s.resolutionScale)):1,u=Fa(r,i,n,!0),l=new Map;try{a=new Ga}catch(t){return}var f=!1;a.onerror=()=>{var t;f=!0,cancelAnimationFrame(c),null==(t=a.terminate)||t.call(a),this.resetFrameDedup=null},this.resetFrameDedup=()=>{a.postMessage({resetFrameDedup:!0})},a.onmessage=t=>{var e=t.data.id;if(l.set(e,!1),"base64"in t.data){var r=t.data,i=r.displayWidth,n=r.displayHeight;this.mutationCb({id:e,type:Yo["2D"],commands:[{property:"clearRect",args:[0,0,i,n]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r.base64}],type:r.type}]},0,0,i,n]}],displayWidth:i,displayHeight:n})}};var c,v=1e3/t,d=0,p=t=>{var u,m;f||(d&&v>t-d||(d=t,(u=[],m=t=>{try{t.querySelectorAll("canvas").forEach((t=>{So(t,i,n,!0)||u.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&m(t.shadowRoot)}))}catch(t){}},m(r.document),u).forEach(function(){var t=e((function*(t){var e,r,i=o.mirror.getId(t);if(!l.get(i)&&0!==t.width&&0!==t.height){l.set(i,!0);try{if(["webgl","webgl2"].includes(t.__context)){var n=t.getContext(t.__context);if(null==(e=null==n?void 0:n.isContextLost)?void 0:e.call(n))return void l.set(i,!1);!1===(null==(r=null==n?void 0:n.getContextAttributes())?void 0:r.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var u=t.clientWidth||t.width,f=t.clientHeight||t.height,c=Math.max(1,Math.round(u*h)),v=Math.max(1,Math.round(f*h)),d=function(t,e,r,i,n,s){if(t&&"function"==typeof t.regionsFn){var o;try{o=t.regionsFn(e)}catch(t){return Ca}if(void 0!==o){if(!Array.isArray(o)||!o.every(Ma))return Ca;var a=r/n,h=i/s;return o.filter((t=>t.width>0&&t.height>0)).map((t=>{var e=Math.floor(t.x*a),r=Math.floor(t.y*h);return{x:e,y:r,width:Math.ceil((t.x+t.width)*a)-e,height:Math.ceil((t.y+t.height)*h)-r}}))}}}(s.canvasMasking,t,c,v,u,f);if(d===Ca)return void l.set(i,!1);var p=yield createImageBitmap(t,1>h?{resizeWidth:c,resizeHeight:v,resizeQuality:"medium"}:{resizeWidth:c,resizeHeight:v});a.postMessage({id:i,bitmap:p,width:c,height:v,displayWidth:u,displayHeight:f,dataURLOptions:s.dataURLOptions,maskRegions:d},[p])}catch(t){l.set(i,!1)}}}));return function(e){return t.apply(this,arguments)}}())),c=requestAnimationFrame(p))};c=requestAnimationFrame(p),this.resetObservers=()=>{var t;u(),cancelAnimationFrame(c),null==(t=a.terminate)||t.call(a),this.resetFrameDedup=null}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Fa(t,e,r,!1),s=function(t,e,r,i,n){var s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[o])return 1;var a=oo(e.CanvasRenderingContext2D.prototype,o,(function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;a>u;u++)h[u]=arguments[u];return So(this.canvas,r,i,!0)||setTimeout((()=>{var r=_a(h,e,this,n);t(this.canvas,{type:Yo["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(n){var h=po(e.CanvasRenderingContext2D.prototype,o,{set(e){So(this.canvas,r,i,!0)||t(this.canvas,{type:Yo["2D"],property:o,args:[e],setter:!0})}});s.push(h)}};for(var h of o)a(h);return()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i),o=function(t,e,r,i,n){var s=[];return void 0!==e.WebGLRenderingContext&&s.push(...Ba(e.WebGLRenderingContext.prototype,Yo.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...Ba(e.WebGL2RenderingContext.prototype,Yo.WebGL2,t,r,i,e,n)),()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(t);if(r&&-1!==e){var n=r.map((t=>i(t,a)));this.mutationCb({id:e,type:r[0].type,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class Va{constructor(t){var e;u(this,"trackedLinkElements",new WeakSet),u(this,"pendingDeferredSheets",new Set),u(this,"mutationCb"),u(this,"adoptedStyleSheetCb"),u(this,"maskAllElementAttributes"),u(this,"maskAttributeFn"),u(this,"styleMirror",new Fo),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb,this.maskAllElementAttributes=null!==(e=t.maskAllElementAttributes)&&void 0!==e&&e,this.maskAttributeFn=t.maskAttributeFn}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}beginDeferredLinkInlining(t,e){if(-1===e||!t.isConnected)return null;var r=null,i=null;try{(i=t.sheet)&&(r=wt(i))}catch(t){}if(!r||!i)return tt(),null;var n=r,s=!1,o={sheet:i,invalidate(){s=!0}};this.pendingDeferredSheets.add(o);var a=!1;return{advance:r=>{if(a)return!0;var h,u,l=M(),f=I(),c=!0;try{if(s)return a=!0,tt(),!0;if(!n.advance(r))return c=!1,!1;a=!0;var v=n.text();if(!t.isConnected)return!0;var d=null;try{d=t.sheet}catch(t){}return d!==i?(tt(),!0):v?(this.emitCssTextMutation(t,e,v),!0):(tt(),!0)}finally{c&&this.pendingDeferredSheets.delete(o),O(h=M()-l,null!=(u=f)?u:x)||(H.totalMs+=h,h>H.slowestSliceMs&&(H.slowestSliceMs=h))}},remainingRules:()=>n.remainingRules(),discard:()=>{this.pendingDeferredSheets.delete(o)}}}onCssomSheetMutation(t){if(t&&0!==this.pendingDeferredSheets.size)for(var e of this.pendingDeferredSheets)e.sheet===t&&(this.pendingDeferredSheets.delete(e),e.invalidate())}inlineDeferredLinkElement(t,e){var r;null==(r=this.beginDeferredLinkInlining(t,e))||r.advance(1/0)}emitCssTextMutation(t,e,r){this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e,attributes:{_cssText:xt({element:t,name:"_cssText",value:r,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn})}}]})}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;if(r.styleMirror.has(t))e=r.styleMirror.getId(t);else{var s=r.styleMirror.add(t);e=s;var o=M();try{X((()=>{try{var e=t.rules||t.cssRules;e&&J(e)}catch(t){}n.push({styleId:s,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:vt(e,t.href),index:r})))})}))}finally{K(M()-o)}}i.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,this.pendingDeferredSheets.clear(),re.forEach((t=>t.abort())),re.clear()}trackStylesheetInLinkElement(t){}}class $a{constructor(){u(this,"nodeMap",new WeakMap),u(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).some((t=>t!==e))}add(t,e){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}var Ya=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var qa=document.createElement("iframe");document.body.appendChild(qa),Array.from=(null==(n=qa.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(qa)}}catch(t){console.debug("Unable to override Array.from",t)}var Za=St(),Ja=new Set([zo.Mutation,zo.MediaInteraction,zo.StyleSheetRule,zo.CanvasMutation,zo.Font,zo.Log,zo.StyleDeclaration,zo.AdoptedStyleSheet]);function Xa(t){var e=window;if("function"==typeof e.requestIdleCallback){var r=e.requestIdleCallback(t,{timeout:2e3});return{cancel(){var t;return null==(t=e.cancelIdleCallback)?void 0:t.call(e,r)}}}var i=setTimeout(t,250);return{cancel:()=>clearTimeout(i)}}function Ka(t){var e;void 0===t&&(t={});var i=t,n=i.emit,s=i.checkoutEveryNms,o=i.checkoutEveryNth,a=i.blockClass,h=void 0===a?"rr-block":a,u=i.blockSelector,l=void 0===u?null:u,f=i.ignoreClass,c=void 0===f?"rr-ignore":f,v=i.ignoreSelector,d=void 0===v?null:v,p=i.maskTextClass,m=void 0===p?"rr-mask":p,y=i.maskTextSelector,g=void 0===y?null:y,w=i.inlineStylesheet,b=void 0===w||w,S=i.inlineStylesheetBudgetRules,k=i.maskAllInputs,C=i.maskInputOptions,M=i.slimDOMOptions,x=i.maskInputFn,A=i.maskTextFn,E=i.maskAllElementAttributes,I=void 0!==E&&E,T=i.maskAttributeFn,O=i.hooks,_=i.packFn,D=i.sampling,N=void 0===D?{}:D,L=i.dataURLOptions,F=void 0===L?{}:L,B=i.canvasResolutionScale,j=i.canvasMasking,U=i.mousemoveWait,W=i.recordDOM,H=void 0===W||W,G=i.recordCanvas,Y=void 0!==G&&G,q=i.recordCrossOriginIframes,Z=void 0!==q&&q,J=i.recordAfter,X=void 0===J?"DOMContentLoaded"===t.recordAfter?t.recordAfter:"load":J,K=i.userTriggeredOnInput,Q=void 0!==K&&K,tt=i.collectFonts,rt=void 0!==tt&&tt,it=i.inlineImages,nt=void 0!==it&&it,st=i.plugins,ot=i.keepIframeSrcFn,at=void 0===ot?()=>!1:ot,ht=i.ignoreCSSAttributes,ut=void 0===ht?new Set([]):ht,lt=i.attributeFilter;Qo=i.errorHandler;var ft=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},F),ct=!Z||window.parent===window,vt=!1;if(!ct)try{window.parent.document&&(vt=!1)}catch(t){vt=!0}if(ct&&!n)throw new Error("emit function is required");if(!ct&&!vt)return()=>{};void 0!==U&&void 0===N.mousemove&&(N.mousemove=U),Za.reset();var dt,pt=!0===k?{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!==C?C:{password:!0},mt=fe(void 0!==M&&M);Ao();var yt,gt,wt=0,St=new Map,kt=t=>{for(var e of st||[])e.eventProcessor&&(t=e.eventProcessor(t));return _&&!vt&&(t=_(t)),t};Pa=(t,e)=>{var r,i=t;if(i.timestamp=mo(),!(null==(r=oa[0])?void 0:r.isFrozen())||i.type===Ho.FullSnapshot||i.type===Ho.IncrementalSnapshot&&Ja.has(i.data.source)||oa.forEach((t=>t.unfreeze())),ct)null==n||n(kt(i),e);else if(vt){var a={type:"rrweb",event:kt(i),origin:window.location.origin,isCheckout:e};window.parent.postMessage(a,"*")}if(i.type===Ho.FullSnapshot)dt=i,wt=0;else if(i.type===Ho.IncrementalSnapshot){if(i.data.source===zo.Mutation&&i.data.isAttachIframe)return;wt++,(o&&wt>=o||s&&i.timestamp-dt.timestamp>s)&&ja(!0)}};var Ct=t=>{if(t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null,i=new Set;if(t.adds.length>0)for(var n of t.adds){var s=Za.getNode(n.node.id);s&&"IFRAME"===s.nodeName&&i.add(s)}t.removes.forEach((t=>{var r=t.id;if(!e||!e.has(r)){var n=Et.getIframeElementById(r);n&&i.has(n)?Et.forgetIframeId(r):(null==yt||yt(r),Et.removeIframeById(r))}})),null==gt||gt(),Et.cleanupDetachedIframes()}Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.Mutation},t)})},Mt=t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.Scroll},t)}),xt=t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.CanvasMutation},t)}),At=new Va({mutationCb:Ct,adoptedStyleSheetCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.AdoptedStyleSheet},t)}),maskAllElementAttributes:I,maskAttributeFn:T}),Et=new Sa({mirror:Za,mutationCb:Ct,stylesheetManager:At,recordCrossOriginIframes:Z,wrappedEmit:Pa});for(var Rt of st||[])Rt.getMirror&&Rt.getMirror({nodeMirror:Za,crossOriginIframeMirror:Et.crossOriginIframeMirror,crossOriginIframeStyleMirror:Et.crossOriginIframeStyleMirror});var It=new $a,Tt=null==j?void 0:j.configured;Ua=new za({recordCanvas:Y,mutationCb:xt,win:window,blockClass:h,blockSelector:l,mirror:Za,sampling:N.canvas,dataURLOptions:ft,resolutionScale:B,canvasMasking:j});var Ot=new ka({mutationCb:Ct,scrollCb:Mt,bypassOptions:{blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskInputOptions:pt,dataURLOptions:ft,maskTextFn:A,maskInputFn:x,maskAllElementAttributes:I,maskAttributeFn:T,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,sampling:N,slimDOMOptions:mt,iframeManager:Et,stylesheetManager:At,canvasManager:Ua,keepIframeSrcFn:at,processedNodeManager:It,attributeFilter:lt},mirror:Za});ja=function(t){if(void 0===t&&(t=!1),H){z(S);try{Pa({type:Ho.Meta,data:{href:window.location.href,width:wo(),height:go()}},t),null==e||e.cancel(),e=void 0,At.reset(),Ot.init(),oa.forEach((t=>t.lock()));var r,i=null;try{i=function(t,e){var r=e||{},i=r.mirror,n=void 0===i?new bt:i,s=r.blockClass,o=void 0===s?"rr-block":s,a=r.blockSelector,h=void 0===a?null:a,u=r.maskTextClass,l=void 0===u?"rr-mask":u,f=r.maskTextSelector,c=void 0===f?null:f,v=r.inlineStylesheet,d=void 0===v||v,p=r.inlineImages,m=void 0!==p&&p,y=r.recordCanvas,g=void 0!==y&&y,w=r.canvasMaskingConfigured,b=r.maskAllInputs,S=void 0!==b&&b,k=r.maskTextFn,C=r.maskInputFn,M=r.maskAllElementAttributes,x=void 0!==M&&M,A=r.maskAttributeFn,E=r.slimDOM,R=r.dataURLOptions,I=r.preserveWhiteSpace,T=r.onSerialize,O=r.onIframeLoad,_=r.iframeLoadTimeout,D=r.onIframeListenerRegistered,N=r.onStylesheetLoad,L=r.stylesheetLoadTimeout,F=r.keepIframeSrcFn,B=void 0===F?()=>!1:F,P=r.maxDepth,j=r.inlineStylesheetBudgetRules,U=!0===S?{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===S?{password:!0}:S,W=fe(void 0!==E&&E);z(j);try{return le(t,{doc:t,mirror:n,blockClass:o,blockSelector:h,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:U,maskTextFn:k,maskInputFn:C,maskAllElementAttributes:x,maskAttributeFn:A,slimDOMOptions:W,dataURLOptions:R,inlineImages:m,recordCanvas:g,canvasMaskingConfigured:w,preserveWhiteSpace:I,onSerialize:T,onIframeLoad:O,iframeLoadTimeout:_,onIframeListenerRegistered:D,onStylesheetLoad:N,stylesheetLoadTimeout:L,keepIframeSrcFn:B,newlyAddedElement:!1,maxDepth:P})}finally{V()}}(document,{mirror:Za,blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskAllInputs:pt,inlineStylesheetBudgetRules:S,maskTextFn:A,maskInputFn:x,maskAllElementAttributes:I,maskAttributeFn:T,slimDOM:mt,dataURLOptions:ft,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,onSerialize(t){Io(t,Za)&&Et.addIframe(t),To(t,Za)&&At.trackLinkElement(t),_o(t)&&Ot.addShadowRoot(ao.shadowRoot(t),document)},onIframeLoad(t,e){Et.attachIframe(t,e),Ot.observeAttachShadow(t)},onIframeListenerRegistered(t,e){Et.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){At.attachLinkElement(t,e)},keepIframeSrcFn:at})}finally{s=P,P=[],r=s}if(!i)return console.warn("Failed to snapshot the document");if(Pa({type:Ho.FullSnapshot,data:{node:i,initialOffset:yo(window)}},t),oa.forEach((t=>t.unlock())),Ua.onFullSnapshot(),r.length){var n=function(t,e,r){var i=!1,n=null,s=0,o=null,a=()=>null!==o||t.length>s,h=()=>{var r=t[s];t[s]=null,s+=1,r&&lo((()=>{o=e.beginDeferredLinkInlining(r,Za.getId(r))}))},u=()=>{if(o){var t=o,e=!0;lo((()=>{e=t.advance(200)})),e&&(o=null)}},l=t=>{if(n=null,!i){var e=0;do{try{o||h(),u()}catch(t){null==o||o.discard(),o=null,et(1)}e+=1}while(!i&&a()&&(t?!t.didTimeout&&t.timeRemaining()>5:10>e));i||(a()?n=Xa(l):r())}};return n=Xa(l),{cancel(){i=!0,null==o||o.discard(),o=null,null==n||n.cancel(),n=null},flush(){if(!i){i=!0,null==n||n.cancel(),n=null;for(var e=0,l=0;a()&&50>e;){o||h();var f=o;if(f)if(Math.floor(f.remainingRules()/200)+1>50-e)f.discard(),o=null,l+=1;else{try{u()}catch(t){null==o||o.discard(),o=null,l+=1}e+=1}}if(a()||l>0){for(var c=l+(null!==o?1:0),v=s;t.length>v;v++)null!==t[v]&&(c+=1);et(c),null==o||o.discard(),o=null}r()}}}}(r,At,(()=>{e===n&&(e=void 0)}));e=n}Z&&Et.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&At.adoptStyleSheets(document.adoptedStyleSheets,Za.getId(document))}finally{V()}var s}};try{var _t=[];for(var Dt of(_t.push(ho("pagehide",(()=>{try{null==e||e.flush()}catch(t){}e=void 0}),window)),["visibilitychange","freeze","resume"]))_t.push(ho(Dt,R,document));yt=t=>{var e=St.get(t);e&&(e.forEach((t=>{lo(t);var e=_t.indexOf(t);-1!==e&&_t.splice(e,1)})),St.delete(t))},gt=()=>{for(var t of St){var e=t[0],r=Za.getNode(e);if(r)try{r.contentDocument&&r.contentDocument.defaultView||null==yt||yt(e)}catch(t){null==yt||yt(e)}else null==yt||yt(e)}};var Nt=t=>{var e;return sa(ya)({mutationCb:Ct,mousemoveCb:(t,e)=>Pa({type:Ho.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.MouseInteraction},t)}),scrollCb:Mt,viewportResizeCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.ViewportResize},t)}),inputCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.Input},t)}),mediaInteractionCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.MediaInteraction},t)}),styleSheetRuleCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.StyleSheetRule},t)}),styleDeclarationCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.StyleDeclaration},t)}),canvasMutationCb:xt,fontCb:t=>Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.Font},t)}),selectionCb(t){Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.Selection},t)})},customElementCb(t){Pa({type:Ho.IncrementalSnapshot,data:r({source:zo.CustomElement},t)})},blockClass:h,ignoreClass:c,ignoreSelector:d,maskTextClass:m,maskTextSelector:g,maskInputOptions:pt,inlineStylesheet:b,sampling:N,recordDOM:H,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,userTriggeredOnInput:Q,collectFonts:rt,doc:t,maskInputFn:x,maskTextFn:A,maskAllElementAttributes:I,maskAttributeFn:T,keepIframeSrcFn:at,blockSelector:l,slimDOMOptions:mt,dataURLOptions:ft,mirror:Za,iframeManager:Et,stylesheetManager:At,shadowDomManager:Ot,processedNodeManager:It,canvasManager:Ua,ignoreCSSAttributes:ut,attributeFilter:lt,plugins:(null==(e=null==st?void 0:st.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>Pa({type:Ho.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},O)};Et.addLoadListener((t=>{try{var e=Za.getId(t),r=Nt(t.contentDocument);if("function"==typeof r&&(_t.push(r),-1!==e)){var i=St.get(e);i||St.set(e,i=new Set),i.add(r)}}catch(t){console.warn(t)}})),Et.addPageHideListener((t=>{var e=Za.getId(t);null==yt||yt(e),la(t)}));var Lt=-1,Ft=t=>Pa({type:Ho.Custom,data:{tag:Go,payload:t}}),Bt=()=>{var t,e,r,i,n=document,s=null!==(t=null!==(e=null!==(r=null!==(i=n.fullscreenElement)&&void 0!==i?i:n.webkitFullscreenElement)&&void 0!==r?r:n.mozFullScreenElement)&&void 0!==e?e:n.msFullscreenElement)&&void 0!==t?t:null,o=s?Za.getId(s):-1;o!==Lt&&(-1!==Lt&&Ft({id:Lt,enter:!1}),Lt=o,-1!==o&&Ft({id:o,enter:!0}))},Pt=()=>{ja();var t=Nt(document);"function"==typeof t&&_t.push(t),_t.push(ho("fullscreenchange",Bt)),_t.push(ho("webkitfullscreenchange",Bt)),_t.push(ho("mozfullscreenchange",Bt)),_t.push(ho("MSFullscreenChange",Bt)),Ya=!0};return["interactive","complete"].includes(document.readyState)?Pt():(_t.push(ho("DOMContentLoaded",(()=>{Pa({type:Ho.DomContentLoaded,data:{}}),"DOMContentLoaded"===X&&Pt()}))),_t.push(ho("load",(()=>{Pa({type:Ho.Load,data:{}}),"load"===X&&Pt()}),window))),()=>{try{null==e||e.flush()}catch(t){}e=void 0,_t.forEach((t=>lo(t))),It.destroy(),Et.removeLoadListener(),Et.destroy(),St.clear(),Ot.reset(),Za.reset(),Ya=!1,Qo=void 0}}catch(t){console.warn(t)}}function Qa(t){return{all:t=t||new Map,on(e,r){var i=t.get(e);i?i.push(r):t.set(e,[r])},off(e,r){var i=t.get(e);i&&(r?i.splice(i.indexOf(r)>>>0,1):t.set(e,[]))},emit(e,r){var i=t.get(e);i&&i.slice().map((function(t){t(r)})),(i=t.get("*"))&&i.slice().map((function(t){t(e,r)}))}}}Ka.addCustomEvent=(t,e)=>{if(!Ya)throw new Error("please add custom event after start recording");Pa({type:Ho.Custom,data:{tag:t,payload:e}})},Ka.freezePage=()=>{oa.forEach((t=>t.freeze()))},Ka.takeFullSnapshot=t=>{if(!Ya)throw new Error("please take full snapshot after start recording");ja(t)},Ka.mirror=Za;var th,eh,rh=Object.freeze(Object.defineProperty({__proto__:null,default:Qa},Symbol.toStringTag,{value:"Module"}));function ih(t,e){if(void 0===t&&(t=window),void 0===e&&(e=document),!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var r,i=t.HTMLElement||t.Element,n=468,s={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||h,scrollIntoView:i.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,a=(r=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?d.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):s.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(u(arguments[0])?s.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):d.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==u(arguments[0])){var t=arguments[0].left,e=arguments[0].top;d.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==u(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):s.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==u(arguments[0])){var r=function(t){for(;t!==e.body&&!1===c(t);)t=t.parentNode||t.host;return t}(this),i=r.getBoundingClientRect(),n=this.getBoundingClientRect();r!==e.body?(d.call(this,r,r.scrollLeft+n.left-i.left,r.scrollTop+n.top-i.top),"fixed"!==t.getComputedStyle(r).position&&t.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):t.scrollBy({left:n.left,top:n.top,behavior:"smooth"})}else s.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function h(t,e){this.scrollLeft=t,this.scrollTop=e}function u(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(t,e){return"Y"===e?t.scrollHeight>t.clientHeight+a:"X"===e?t.scrollWidth>t.clientWidth+a:void 0}function f(e,r){var i=t.getComputedStyle(e,null)["overflow"+r];return"auto"===i||"scroll"===i}function c(t){var e=l(t,"Y")&&f(t,"Y"),r=l(t,"X")&&f(t,"X");return e||r}function v(e){var r,i,s,a=(o()-e.startTime)/n;a=a>1?1:a,r=.5*(1-Math.cos(Math.PI*a)),e.method.call(e.scrollable,i=e.startX+(e.x-e.startX)*r,s=e.startY+(e.y-e.startY)*r),i===e.x&&s===e.y||t.requestAnimationFrame(v.bind(t,e))}function d(r,i,n){var a,u,l,f,c=o();r===e.body?(a=t,u=t.scrollX||t.pageXOffset,l=t.scrollY||t.pageYOffset,f=s.scroll):(a=r,u=r.scrollLeft,l=r.scrollTop,f=h),v({scrollable:a,method:f,startTime:c,startX:u,startY:l,x:i,y:n})}}class nh{constructor(t,e){void 0===t&&(t=[]),u(this,"timeOffset",0),u(this,"speed"),u(this,"actions"),u(this,"raf",null),u(this,"lastTimestamp"),this.actions=t,this.speed=e.speed}addAction(t){var e=!0===this.raf;if(this.actions.length&&this.actions[this.actions.length-1].delay>t.delay){var r=this.findActionIndex(t);this.actions.splice(r,0,t)}else this.actions.push(t);e&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){var t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){var e=this.actions[0];if(e.delay>this.timeOffset)break;this.actions.shift(),e.doAction()}this.raf=0>=this.actions.length||requestAnimationFrame(this.rafCheck.bind(this))}clear(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return null!==this.raf}findActionIndex(t){for(var e=0,r=this.actions.length-1;r>=e;){var i=Math.floor((e+r)/2);if(t.delay>this.actions[i].delay)e=i+1;else{if(t.delay>=this.actions[i].delay)return i+1;r=i-1}}return e}}function sh(t,e){if(t.type===Ho.IncrementalSnapshot&&t.data.source===zo.MouseMove&&t.data.positions&&t.data.positions.length){var r=t.timestamp+t.data.positions[0].timeOffset;return t.delay=r-e,r-e}return t.delay=t.timestamp-e,t.delay}function oh(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}(eh=th||(th={}))[eh.NotStarted=0]="NotStarted",eh[eh.Running=1]="Running",eh[eh.Stopped=2]="Stopped";var ah={type:"xstate.init"};function hh(t){return void 0===t?[]:[].concat(t)}function uh(t){return{type:"xstate.assign",assignment:t}}function lh(t,e){return"string"==typeof(t="string"==typeof t&&e&&e[t]?e[t]:t)?{type:t}:"function"==typeof t?{type:t.name,exec:t}:t}function fh(t){return function(e){return t===e}}function ch(t){return"string"==typeof t?{type:t}:t}function vh(t,e){return{value:t,context:e,actions:[],changed:!1,matches:fh(t)}}function dh(t,e,r){var i=e,n=!1;return[t.filter((function(t){if("xstate.assign"===t.type){n=!0;var e=Object.assign({},i);return"function"==typeof t.assignment?e=t.assignment(i,r):Object.keys(t.assignment).forEach((function(n){e[n]="function"==typeof t.assignment[n]?t.assignment[n](i,r):t.assignment[n]})),i=e,!1}return!0})),i,n]}function ph(t,e){void 0===e&&(e={});var r=oh(dh(hh(t.states[t.initial].entry).map((function(t){return lh(t,e.actions)})),t.context,ah),2),i={config:t,le:e,initialState:{value:t.initial,actions:r[0],context:r[1],matches:fh(t.initial)},transition(e,r){var n,s,o="string"==typeof e?{value:e,context:t.context}:e,a=o.value,h=o.context,u=ch(r),l=t.states[a];if(l.on){var f=hh(l.on[u.type]);try{for(var c=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:()=>(t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t})}}(f),v=c.next();!v.done;v=c.next()){var d=v.value;if(void 0===d)return vh(a,h);var p="string"==typeof d?{target:d}:d,m=p.target,y=void 0===m?a:m,g=p.actions,w=void 0===g?[]:g,b=p.cond;if((void 0===b?function(){return!0}:b)(h,u)){var S=oh(dh([].concat(l.exit,w,t.states[y].entry).filter((function(t){return t})).map((function(t){return lh(t,i.le.actions)})),h,u),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==a||k.length>0||S[2],matches:fh(y)}}}}catch(t){n={error:t}}finally{try{v&&!v.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}}return vh(a,h)}};return i}var mh=function(t,e){return t.actions.forEach((function(r){var i=r.exec;return i&&i(t.context,e)}))};function yh(t){var e=t.initialState,r=th.NotStarted,i=new Set,n={l:t,send(n){r===th.Running&&(e=t.transition(e,n),mh(e,ch(n)),i.forEach((function(t){return t(e)})))},subscribe:t=>(i.add(t),t(e),{unsubscribe:()=>i.delete(t)}),start(i){if(i){var s="object"==typeof i?i:{context:t.config.context,value:i};e={value:s.value,actions:[],context:s.context,matches:fh(s.value)}}return r=th.Running,mh(e,ah),n},stop:()=>(r=th.Stopped,i.clear(),n),get state(){return e},get status(){return r}};return n}function gh(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===Ho.Meta&&e>=i.timestamp)return t.slice(r)}return t}var wh=new Map;function bh(t,e){var r=wh.get(t);return r||wh.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}function Sh(t,r,i){return function(){var n=e((function*(e){if(e&&"object"==typeof e&&"rr_type"in e){if(i&&(i.isUnchanged=!1),"ImageBitmap"===e.rr_type&&"args"in e){var n=yield Sh(t,r,i)(e.args);return yield createImageBitmap.apply(null,n)}if("index"in e){if(i||null===r)return e;var s=e.index;return bh(r,e.rr_type)[s]}if("args"in e){var o=e.args;return new(0,window[e.rr_type])(...yield Promise.all(o.map(Sh(t,r,i))))}if("base64"in e)return Ra(e.base64);if("src"in e){var a=t.get(e.src);if(a)return a;var h=new Image;return h.src=e.src,t.set(e.src,h),h}if("data"in e&&"Blob"===e.rr_type){var u=yield Promise.all(e.data.map(Sh(t,r,i)));return new Blob(u,{type:e.type})}}else if(Array.isArray(e))return yield Promise.all(e.map(Sh(t,r,i)));return e}));return function(t){return n.apply(this,arguments)}}()}var kh=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ch(t){return Mh.apply(this,arguments)}function Mh(){return(Mh=e((function*(t){var e=t.mutation,r=t.target,i=t.type,n=t.imageMap,s=t.errorHandler;try{var o=function(t,e){try{return e===Yo.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch(t){return null}}(r,i);if(!o)return;if(e.setter)return void(o[e.property]=e.args[0]);var a=o[e.property],h=yield Promise.all(e.args.map(Sh(n,o)));!function(t,e){if(null==e?void 0:e.constructor){var r=e.constructor.name;if(kh.includes(r)){var i=bh(t,r);i.includes(e)||i.push(e)}}}(o,a.apply(o,h))}catch(t){s(e,t)}}))).apply(this,arguments)}function xh(){return xh=e((function*(t){var r=t.event,i=t.mutations,n=t.imageMap,s=t.errorHandler,o=t.target.getContext("2d");if(o){var a=i.map(function(){var t=e((function*(t){return Promise.all(t.args.map(Sh(n,o)))}));return function(e){return t.apply(this,arguments)}}());(yield Promise.all(a)).forEach(((t,e)=>{var a=i[e];try{if(a.setter)return void(o[a.property]=a.args[0]);var h=o[a.property];"drawImage"===a.property&&"string"==typeof a.args[0]?(n.get(r),h.apply(o,a.args)):h.apply(o,t)}catch(t){s(a,t)}}))}else s(i[0],new Error("Canvas context is null"))})),xh.apply(this,arguments)}function Ah(t){return Eh.apply(this,arguments)}function Eh(){return Eh=e((function*(t){var e=t.event,r=t.mutation,i=t.target,n=t.imageMap,s=t.canvasEventMap,o=t.errorHandler;try{var a=s.get(e)||r,h="commands"in a?a.commands:[a];if([Yo.WebGL,Yo.WebGL2].includes(r.type)){for(var u=0;h.length>u;u++){var l=h[u];yield Ch({mutation:l,type:r.type,target:i,imageMap:n,errorHandler:o})}return}yield function(t){return xh.apply(this,arguments)}({event:e,mutations:h,target:i,imageMap:n,errorHandler:o})}catch(t){o(r,t)}})),Eh.apply(this,arguments)}var Rh=["AUDIO","VIDEO"];class Ih{constructor(t){u(this,"mediaMap",new Map),u(this,"warn"),u(this,"service"),u(this,"speedService"),u(this,"emitter"),u(this,"getCurrentTime"),u(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(Zo.Start,this.start.bind(this)),this.emitter.on(Zo.SkipStart,this.start.bind(this)),this.emitter.on(Zo.Pause,this.pause.bind(this)),this.emitter.on(Zo.Finish,this.pause.bind(this)),this.speedService.subscribe((()=>{this.syncAllMediaElements()}))}syncAllMediaElements(t){void 0===t&&(t={pause:!1}),this.mediaMap.forEach(((e,r)=>{this.syncTargetWithState(r),t.pause&&r.pause()}))}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo(t){var e=t.target,r=t.mediaState;if(r.isPlaying){var i=(t.time-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in e&&e.duration;if(Number.isNaN(n))return void this.waitForMetadata(e);var s=r.currentTimeAtLastInteraction+i;e.loop&&!1!==n&&(s%=n),e.currentTime=s}else e.pause(),e.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(t){if(!this.metadataCallbackMap.has(t)&&"addEventListener"in t){var e=()=>{this.metadataCallbackMap.delete(t);var e=this.mediaMap.get(t);e&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e})};this.metadataCallbackMap.set(t,e),t.addEventListener("loadedmetadata",e,{once:!0})}}getMediaStateFromMutation(t){var e,r,i,n,s,o=t.target,a=t.timeOffset,h=t.mutation,u=this.mediaMap.get(o),l=h.type,f=h.playbackRate,c=h.currentTime,v=h.muted,d=h.volume,p=h.loop;return{isPlaying:l===qo.Play||l!==qo.Pause&&((null==u?void 0:u.isPlaying)||null!==o.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(e=null!=c?c:null==u?void 0:u.currentTimeAtLastInteraction)&&void 0!==e?e:0,lastInteractionTimeOffset:a,playbackRate:null!==(r=null!=f?f:null==u?void 0:u.playbackRate)&&void 0!==r?r:1,volume:null!==(i=null!=d?d:null==u?void 0:u.volume)&&void 0!==i?i:1,muted:null!==(n=null!=v?v:null==u?void 0:u.muted)&&void 0!==n?n:null===o.getAttribute("muted"),loop:null!==(s=null!=p?p:null==u?void 0:u.loop)&&void 0!==s?s:null===o.getAttribute("loop")}}syncTargetWithState(t){var e=this.mediaMap.get(t);if(e){var r=e.muted,i=e.loop,n=e.volume,s=e.isPlaying,o=this.service.state.matches("paused"),a=e.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e}),t.volume!==n&&(t.volume=n),t.muted=r,t.loop=i,t.playbackRate!==a&&(t.playbackRate=a),s&&!o?t.play():t.pause()}catch(t){this.warn("Failed to replay media interactions: "+(t.message||t))}}}addMediaElements(t,e,r){if(this.isSupportedMediaElement(t)){var i=t,n=r.getMeta(i);if(n&&"attributes"in n){var s,o=this.service.state.matches("paused"),a=n.attributes;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==i.getAttribute("autoplay"))&&o&&i.pause();var h=1;"number"==typeof a.rr_mediaPlaybackRate&&(h=a.rr_mediaPlaybackRate);var u;u="boolean"==typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==i.getAttribute("muted");var l;l="boolean"==typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==i.getAttribute("loop");var f=1;"number"==typeof a.rr_mediaVolume&&(f=a.rr_mediaVolume);var c=0;"number"==typeof a.rr_mediaCurrentTime&&(c=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:s,currentTimeAtLastInteraction:c,lastInteractionTimeOffset:e,playbackRate:h,volume:f,muted:u,loop:l}),this.syncTargetWithState(i)}}}mediaMutation(t){var e=t.target,r=t.timeOffset,i=t.mutation;Rh.includes(e.nodeName)&&(this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:i})),this.syncTargetWithState(e))}isSupportedMediaElement(t){return Rh.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Th(t,e){if(!("DIALOG"!==t.nodeName||t instanceof vs)){var r=t,i=r.open,n=i&&r.matches("dialog:modal"),s=r.getAttribute("rr_open_mode"),o="string"==typeof(null==e?void 0:e.attributes.open)||"string"==typeof r.getAttribute("open"),a="modal"===s;i&&!(n&&"non-modal"===s||!n&&a)||(r.isConnected?(i&&r.close(),o&&(a?r.showModal():r.show())):console.warn("dialog is not attached to the dom",r))}}var Oh=Qa||rh,_h="[replayer]",Dh={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Nh(t){return t.type==Ho.IncrementalSnapshot&&(t.data.source==zo.TouchMove||t.data.source==zo.MouseInteraction&&t.data.type==Vo.TouchStart)}class Lh{constructor(t,e){var i=this;if(u(this,"wrapper"),u(this,"iframe"),u(this,"service"),u(this,"speedService"),u(this,"config"),u(this,"usingVirtualDom",!1),u(this,"virtualDom",new Fs),u(this,"mouse"),u(this,"mouseTail",null),u(this,"tailPositions",[]),u(this,"emitter",Oh()),u(this,"nextUserInteractionEvent"),u(this,"legacy_missingNodeRetryMap",{}),u(this,"cache",ri()),u(this,"imageMap",new Map),u(this,"canvasEventMap",new Map),u(this,"mirror",St()),u(this,"styleMirror",new Fo),u(this,"pendingAdoptedStyleSheets",new Map),u(this,"adoptedStyleSheetTokens",new Map),u(this,"mediaManager"),u(this,"firstFullSnapshot",null),u(this,"newDocumentQueue",[]),u(this,"mousePos",null),u(this,"touchActive",null),u(this,"lastMouseDownEvent",null),u(this,"lastHoveredRootNode"),u(this,"lastSelectionData",null),u(this,"lastScrollMap",new Map),u(this,"constructedStyleMutations",[]),u(this,"adoptedStyleSheets",[]),u(this,"emitterHandlers",[]),u(this,"serviceSubscription"),u(this,"speedServiceSubscription"),u(this,"timeouts",new Set),u(this,"applyGeneration",0),u(this,"seekRebuildInFlight",!1),u(this,"styleSheetLoadListeners",new Map),u(this,"handleResize",(t=>{for(var e of(this.iframe.style.display="inherit",[this.mouseTail,this.iframe]))e&&(e.setAttribute("width",String(t.width)),e.setAttribute("height",String(t.height)))})),u(this,"shouldCastInSyncMode",(t=>{switch(t.type){case Ho.DomContentLoaded:case Ho.Load:return!1;case Ho.Custom:return t.data.tag===Go;default:return!0}})),u(this,"applyEvents",((t,e)=>{var r,i=++this.applyGeneration;this.seekRebuildInFlight=!0,this.discardStaleFlushBuffers(),function(t){var e,r=t.events,i=t.castEvent,n=t.yieldBudgetMs,s=t.schedule,o=t.isCancelled,a=t.onComplete,h=null!==(e=t.now)&&void 0!==e?e:()=>performance.now(),u=0,l=t=>{if(t||!o()){var e=(()=>{for(var t=n>0?h()+n:1/0;r.length>u;){if(i(r[u]),u++,o())return!1;if(h()>=t)break}return u>=r.length})();o()||(e?a(t):s((()=>l(!1))))}};l(!0)}({events:t.filter(this.shouldCastInSyncMode),castEvent:t=>this.getCastFn(t,!0)(),yieldBudgetMs:null!==(r=this.config.seekYieldBudgetMs)&&void 0!==r?r:0,schedule:t=>{this.addTimeout(t,0)},isCancelled:()=>i!==this.applyGeneration,onComplete:t=>{this.seekRebuildInFlight=!1,this.emitter.emit(Zo.Flush),t||this.service.state.matches("playing")?e():this.service.state.matches("paused")&&(this.timer.clear(),this.timer.timeOffset=0)}})})),u(this,"getCastFn",(function(t,e){var n;switch(void 0===e&&(e=!1),t.type){case Ho.DomContentLoaded:case Ho.Load:break;case Ho.Custom:n=()=>{e||i.emitter.emit(Zo.CustomEvent,t),t.data.tag===Go&&i.applyFullscreen(t.data.payload)};break;case Ho.Meta:n=()=>i.emitter.emit(Zo.Resize,{width:t.data.width,height:t.data.height});break;case Ho.FullSnapshot:n=()=>{var n;if(i.clearFullscreen(),i.firstFullSnapshot){if(i.firstFullSnapshot===t)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.mediaManager.reset(),i.styleMirror.reset(),i.pendingAdoptedStyleSheets.clear(),i.adoptedStyleSheetTokens.clear(),i.rebuildFullSnapshot(t,e),null==(n=i.iframe.contentWindow)||n.scrollTo(r({},t.data.initialOffset,{behavior:"instant"}))};break;case Ho.IncrementalSnapshot:n=()=>{if(i.applyIncremental(t,e),!e&&(t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){for(var r of i.service.state.context.events)if(r.timestamp>t.timestamp&&i.isUserInteraction(r)){r.delay-t.delay>i.config.inactivePeriodThreshold*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=r);break}if(i.nextUserInteractionEvent){var n={speed:Math.min(Math.round((i.nextUserInteractionEvent.delay-t.delay)/5e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:n}),i.emitter.emit(Zo.SkipStart,n)}}}}return()=>{for(var r of(n&&n(),i.config.plugins||[]))r.handler&&r.handler(t,e,{replayer:i});i.service.send({type:"CAST_EVENT",payload:{event:t}});var s=i.service.state.context.events.length-1;if(!i.config.liveMode&&t===i.service.state.context.events[s]){var o=i.applyGeneration,a=()=>{o===i.applyGeneration&&(i.seekRebuildInFlight?i.addTimeout(a,50):i.service.state.context.events.length-1>s||(i.backToNormal(),i.service.send("END"),i.emitter.emit(Zo.Finish)))},h=50;t.type===Ho.IncrementalSnapshot&&t.data.source===zo.MouseMove&&t.data.positions.length&&(h+=Math.max(0,-t.data.positions[0].timeOffset)),setTimeout(a,h)}i.emitter.emit(Zo.EventCast,t)}})),!(null==e?void 0:e.liveMode)&&2>t.length)throw new Error("Replayer need at least 2 events.");var n={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Dh,useVirtualDom:!0,seekYieldBudgetMs:0,logger:console};for(var s of(this.config=Object.assign({},n,e),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEvents=this.applyEvents.bind(this),this.addEmitterHandler(Zo.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))s.getMirror&&s.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(Zo.Flush,(()=>{if(this.usingVirtualDom){var t={mirror:this.mirror,applyCanvas:(t,e,r)=>{Ah({event:t,mutation:e,target:r,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(t,e)=>{t.source===zo.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===zo.StyleDeclaration&&this.applyStyleDeclaration(t,e)},afterAppend:(t,e)=>{for(var r of this.config.plugins||[])r.onBuild&&r.onBuild(t,{id:e,replayer:this})}};if(this.iframe.contentDocument)try{Ts(this.iframe.contentDocument,this.virtualDom,t,this.virtualDom.mirror)}catch(t){this.warn(t)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(var e in this.legacy_missingNodeRetryMap)try{var r=this.legacy_missingNodeRetryMap[e],i=Ds(r.node,this.mirror,this.virtualDom.mirror);Ts(i,r.node,t,this.virtualDom.mirror),r.node=i}catch(t){this.warn(t)}this.constructedStyleMutations.forEach((t=>{this.applyStyleSheetMutation(t)})),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach((t=>{this.applyAdoptedStyleSheet(t)})),this.adoptedStyleSheets=[],this.pendingAdoptedStyleSheets.forEach(((t,e)=>{this.applyAdoptedStyleSheet({source:zo.AdoptedStyleSheet,id:e,styleIds:t})}))}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){var n=this.lastMouseDownEvent;n[0].dispatchEvent(n[1])}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null),this.lastScrollMap.size&&(this.lastScrollMap.forEach((t=>{this.applyScroll(t,!0)})),this.lastScrollMap.clear())})),this.addEmitterHandler(Zo.PlayBack,(()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.lastScrollMap.clear()}));var o,a,h,l,f,c=new nh([],{speed:this.config.speed});this.service=(o={events:t.map((t=>e&&e.unpackFn?e.unpackFn(t):t)).sort(((t,e)=>t.timestamp-e.timestamp)),timer:c,timeOffset:0,baselineTime:0,lastPlayedEvent:null},h=(a={getCastFn:this.getCastFn,applyEvents:this.applyEvents,emitter:this.emitter}).getCastFn,l=a.applyEvents,f=a.emitter,yh(ph({id:"player",context:o,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},RESET_LAST_PLAYED:{target:"playing",actions:["resetLastPlayedEvent"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},RESET_LAST_PLAYED:{target:"paused",actions:["resetLastPlayedEvent"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:uh({lastPlayedEvent:(t,e)=>"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}),recordTimeOffset:uh(((t,e)=>{var i=t.timeOffset;return"payload"in e&&"timeOffset"in e.payload&&(i=e.payload.timeOffset),r({},t,{timeOffset:i,baselineTime:t.events[0].timestamp+i})})),play(t){var e,r=t.timer,i=t.events,n=t.baselineTime,s=t.lastPlayedEvent;for(var o of(r.clear(),r.timeOffset=0,i))sh(o,n);var a=gh(i,n),u=a.some((t=>t.type===Ho.FullSnapshot&&t.timestamp===n)),c=null==s?void 0:s.timestamp;(null==s?void 0:s.type)===Ho.IncrementalSnapshot&&s.data.source===zo.MouseMove&&(c=s.timestamp+(null==(e=s.data.positions[0])?void 0:e.timeOffset)),(c||0)>n&&f.emit(Zo.PlayBack);var v=new Array;for(var d of a)(!c||c>=n||d.timestamp>c&&d!==s)&&(n>d.timestamp||u&&d.timestamp===n&&(d.type===Ho.Meta||d.type===Ho.FullSnapshot))&&v.push(d);l(v,(()=>{var e=function(){if(n>i.timestamp||u&&i.timestamp===n&&(i.type===Ho.Meta||i.type===Ho.FullSnapshot))return 0;if(c&&n>c&&i===s)return 0;var t=h(i,!1);r.addAction({doAction(){t()},delay:i.delay})};for(var i of gh(t.events,n))e();r.start()}))},pause(t){t.timer.clear()},resetLastPlayedEvent:uh((t=>r({},t,{lastPlayedEvent:null}))),startLive:uh({baselineTime:(t,e)=>(t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now())}),addEvent:uh(((t,e)=>{var i=t.baselineTime,n=t.timer,s=t.events;if("ADD_EVENT"===e.type){var o=e.payload.event;sh(o,i);var a=s.length-1;if(s[a]&&s[a].timestamp>o.timestamp){for(var u=-1,l=0;a>=l;){var f=Math.floor((l+a)/2);s[f].timestamp>o.timestamp?a=f-1:l=f+1}-1===u&&(u=l),s.splice(u,0,o)}else s.push(o);if(i>o.timestamp)e.payload.applyPastEventSynchronously&&h(o,!0)();else if(n.isActive()){var c=h(o,!1);n.addAction({doAction(){c()},delay:o.delay})}}return r({},t,{events:s})}))}}))),this.service.start(),this.serviceSubscription=this.service.subscribe((t=>{this.emitter.emit(Zo.StateChange,{player:t})})),this.speedService=function(t){return yh(ph({id:"speed",context:t,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed(t,e){"payload"in e&&t.timer.setSpeed(e.payload.speed)},recordSpeed:uh({normalSpeed(t){return t.timer.speed}}),restoreSpeed(t){t.timer.setSpeed(t.normalSpeed)}}}))}({normalSpeed:-1,timer:c}),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe((t=>{this.emitter.emit(Zo.StateChange,{speed:t})})),this.mediaManager=new Ih({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var v=this.service.state.context.events.find((t=>t.type===Ho.Meta)),d=this.service.state.context.events.find((t=>t.type===Ho.FullSnapshot));if(v){var p=v.data,m=p.width,y=p.height;this.addTimeout((()=>{this.emitter.emit(Zo.Resize,{width:m,height:y})}),0)}d&&this.addTimeout((()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=d,this.rebuildFullSnapshot(d),null==(t=this.iframe.contentWindow)||t.scrollTo(r({},d.data.initialOffset,{behavior:"instant"})))}),1),this.service.state.context.events.find(Nh)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,e){return this.emitter.on(t,e),this}off(t,e){return this.emitter.off(t,e),this}addEmitterHandler(t,e){this.emitter.on(t,e),this.emitterHandlers.push({event:t,handler:e})}addTimeout(t,e){var r=setTimeout((()=>{this.timeouts.delete(r),t()}),e);return this.timeouts.add(r),r}setConfig(t){Object.keys(t).forEach((e=>{this.config[e]=t[e]})),this.config.skipInactive||this.backToNormal(),void 0!==t.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),void 0!==t.mouseTail&&(!1===t.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){var t=this.service.state.context.events[0],e=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:e.timestamp,totalTime:e.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){var t=this.service.state.context;return t.baselineTime-t.events[0].timestamp}getMirror(){return this.mirror}play(t){var e,r;void 0===t&&(t=0),this.seekRebuildInFlight&&this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.remove("rrweb-paused"),this.emitter.emit(Zo.Start)}pause(t){var e,r;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null==(r=null==(e=this.iframe.contentDocument)?void 0:e.getElementsByTagName("html")[0])||r.classList.add("rrweb-paused"),this.emitter.emit(Zo.Pause)}resume(t){void 0===t&&(t=0),this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(Zo.Resume)}destroy(){var t,e;this.wrapper&&this.wrapper.parentNode&&(this.pause(),this.emitterHandlers.forEach((t=>{this.emitter.off(t.event,t.handler)})),this.emitterHandlers=[],null==(t=this.serviceSubscription)||t.unsubscribe(),null==(e=this.speedServiceSubscription)||e.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.service.stop(),this.speedService.stop(),this.timeouts.forEach((t=>clearTimeout(t))),this.timeouts.clear(),this.styleSheetLoadListeners.forEach(((t,e)=>{e.removeEventListener("load",t)})),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Zo.Destroy))}startLive(t){this.applyGeneration++,this.seekRebuildInFlight&&(this.seekRebuildInFlight=!1,this.emitter.emit(Zo.Flush),this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("playing")&&this.service.send({type:"PAUSE"})),this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){var e=this.config.unpackFn?this.config.unpackFn(t):t;Nh(e)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((()=>this.service.send({type:"ADD_EVENT",payload:{event:e,applyPastEventSynchronously:this.config.liveMode}})))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=ri()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(ih(this.iframe.contentWindow,this.iframe.contentDocument),Ao(this.iframe.contentWindow))}applyFullscreen(t){var e=t;if(e&&"number"==typeof e.id&&"boolean"==typeof e.enter){var r=this.mirror.getNode(e.id);if(r&&r.nodeType===Node.ELEMENT_NODE){var i=r;e.enter?i.setAttribute("rr_fullscreen",""):i.removeAttribute("rr_fullscreen")}}}clearFullscreen(){var t;null==(t=this.iframe.contentDocument)||t.querySelectorAll("[rr_fullscreen]").forEach((t=>t.removeAttribute("rr_fullscreen")))}discardStaleFlushBuffers(){this.lastScrollMap.clear(),this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[]}rebuildFullSnapshot(t,e){var r=this;if(void 0===e&&(e=!1),!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var i=[],n=new Set,s=(e,r)=>{for(var s of("DIALOG"===e.nodeName&&n.add(e),this.collectIframeAndAttachDocument(i,e),this.mediaManager.isSupportedMediaElement(e)&&this.mediaManager.addMediaElements(e,t.timestamp-this.service.state.context.events[0].timestamp,this.mirror),this.config.plugins||[]))s.onBuild&&s.onBuild(e,{id:r,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),function(t,e){var r=e.doc,i=e.onVisit,n=e.hackCss,s=void 0===n||n,o=e.afterAppend,a=e.cache,h=e.mirror,u=void 0===h?new bt:h,l=oi(t,{doc:r,mirror:u,skipChild:!1,hackCss:s,afterAppend:o,cache:a});(function(t,e){for(var r of t.getIds())t.has(r)&&e(t.getNode(r))})(u,(t=>{i&&i(t),function(t,e){var r=e.getMeta(t);if((null==r?void 0:r.type)===c.Element){var i=t;for(var n in r.attributes)if({}.hasOwnProperty.call(r.attributes,n)&&n.startsWith("rr_")){var s=r.attributes[n];"rr_scrollLeft"===n&&(i.scrollLeft=s),"rr_scrollTop"===n&&(i.scrollTop=s)}}}(t,u)}))}(t.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(this.iframe.contentDocument,t.data.node.id);var o=function(){var t=a.mutationInQueue;r.attachDocumentToIframe(t,a.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var a of i)o();var h=this.iframe.contentDocument;this.insertStyleRules(h.documentElement,h.head),n.forEach((t=>Th(t))),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Zo.FullsnapshotRebuilded,t),e||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,e){var r,i,n=(i=this.config.blockClass,["."+i+" { background: currentColor }","noscript { display: none !important; }","[rr_fullscreen] { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; max-width: none !important; max-height: none !important; z-index: 2147483647 !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&n.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var s=this.virtualDom.createElement("style");this.virtualDom.mirror.add(s,Zs(s,this.virtualDom.unserializedId)),t.insertBefore(s,e),s.rules.push({source:zo.StyleSheetRule,adds:n.map(((t,e)=>({rule:t,index:e})))})}else{var o=document.createElement("style");t.insertBefore(o,e);for(var a=0;n.length>a;a++)null==(r=o.sheet)||r.insertRule(n[a],a)}}attachDocumentToIframe(t,e){var r=this,i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],s=new Set,o=(t,r)=>{"DIALOG"===t.nodeName&&s.add(t),this.collectIframeAndAttachDocument(n,t);var o=i.getMeta(t);if((null==o?void 0:o.type)===Jo.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){var a=e.contentDocument;this.insertStyleRules(a.documentElement,a.head)}if(!this.usingVirtualDom)for(var h of this.config.plugins||[])h.onBuild&&h.onBuild(t,{id:r,replayer:this})};oi(t.node,{doc:e.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(e.contentDocument,t.node.id);var a=function(){var t=h.mutationInQueue;r.attachDocumentToIframe(t,h.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter((e=>e!==t))};for(var h of n)a();s.forEach((t=>Th(t)))}collectIframeAndAttachDocument(t,e){if(Io(e,this.mirror)){var r=this.newDocumentQueue.find((t=>t.parentId===this.mirror.getId(e)));r&&t.push({mutationInQueue:r,builtNode:e})}}waitForStylesheetLoad(){var t,e=null==(t=this.iframe.contentDocument)?void 0:t.head;if(e){var r,i=new Set,n=this.service.state,s=()=>{n=this.service.state};this.emitter.on(Zo.Start,s),this.emitter.on(Zo.Pause,s);var o=()=>{this.emitter.off(Zo.Start,s),this.emitter.off(Zo.Pause,s)};e.querySelectorAll('link[rel="stylesheet"]').forEach((t=>{t.sheet||(i.add(t),t.addEventListener("load",(()=>{i.delete(t),0===i.size&&-1!==r&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Zo.LoadStylesheetEnd),r&&clearTimeout(r),o())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Zo.LoadStylesheetStart),r=setTimeout((()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,o()}),this.config.loadTimeout))}}preloadAllImages(){var t=this;return e((function*(){var e=[],r=function*(r){r.type===Ho.IncrementalSnapshot&&r.data.source===zo.CanvasMutation&&(e.push(t.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach((e=>{t.preloadImages(e,r)})))};for(var i of t.service.state.context.events)yield*r(i);return Promise.all(e)}))()}preloadImages(t,e){if("drawImage"===t.property&&"string"==typeof t.args[0]&&!this.imageMap.has(e)){var r=document.createElement("canvas"),i=r.getContext("2d"),n=null==i?void 0:i.createImageData(r.width,r.height);null==i||i.putImageData(n,0,0)}}deserializeAndPreloadCanvasEvents(t,i){var n=this;return e((function*(){if(!n.canvasEventMap.has(i)){var s={isUnchanged:!0};if("commands"in t){var o=yield Promise.all(t.commands.map(function(){var t=e((function*(t){var e=yield Promise.all(t.args.map(Sh(n.imageMap,null,s)));return r({},t,{args:e})}));return function(e){return t.apply(this,arguments)}}()));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{commands:o}))}else{var a=yield Promise.all(t.args.map(Sh(n.imageMap,null,s)));!1===s.isUnchanged&&n.canvasEventMap.set(i,r({},t,{args:a}))}}}))()}applyIncremental(t,e){var r,i,n,s=t.data;switch(s.source){case zo.Mutation:try{this.applyMutation(s,e)}catch(t){this.warn("Exception in mutation "+(t.message||t),s)}break;case zo.Drag:case zo.TouchMove:case zo.MouseMove:if(e){var o=s.positions[s.positions.length-1];this.mousePos={x:o.x,y:o.y,id:o.id,debugData:s}}else s.positions.forEach((r=>{this.timer.addAction({doAction:()=>{this.moveAndHover(r.x,r.y,r.id,e,s)},delay:r.timeOffset+t.timestamp-this.service.state.context.baselineTime})})),this.timer.addAction({doAction(){},delay:t.delay-(null==(r=s.positions[0])?void 0:r.timeOffset)});break;case zo.MouseInteraction:if(-1===s.id)break;var a=new Event(Ct(Vo[s.type])),h=this.mirror.getNode(s.id);if(!h)return this.debugNodeNotFound(s,s.id);this.emitter.emit(Zo.MouseInteraction,{type:s.type,target:h});var u=this.config.triggerFocus;switch(s.type){case Vo.Blur:"blur"in h&&h.blur();break;case Vo.Focus:u&&h.focus&&h.focus({preventScroll:!0});break;case Vo.Click:case Vo.TouchStart:case Vo.TouchEnd:case Vo.MouseDown:case Vo.MouseUp:e?(s.type===Vo.TouchStart?this.touchActive=!0:s.type===Vo.TouchEnd&&(this.touchActive=!1),s.type===Vo.MouseDown?this.lastMouseDownEvent=[h,a]:s.type===Vo.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:s.x||0,y:s.y||0,id:s.id,debugData:s}):(s.type===Vo.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x||0,s.y||0,s.id,e,s),s.type===Vo.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):s.type===Vo.TouchStart?this.mouse.classList.add("touch-active"):s.type===Vo.TouchEnd?this.mouse.classList.remove("touch-active"):h.dispatchEvent(a));break;case Vo.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:h.dispatchEvent(a)}break;case zo.Scroll:if(-1===s.id)break;if(e&&this.lastScrollMap.set(s.id,s),this.usingVirtualDom){var l=this.virtualDom.mirror.getNode(s.id);if(!l)return this.debugNodeNotFound(s,s.id);l.scrollData=s;break}this.applyScroll(s,e);break;case zo.ViewportResize:this.emitter.emit(Zo.Resize,{width:s.width,height:s.height});break;case zo.Input:if(-1===s.id)break;if(this.usingVirtualDom){var f=this.virtualDom.mirror.getNode(s.id);if(!f)return this.debugNodeNotFound(s,s.id);f.inputData=s;break}this.applyInput(s);break;case zo.MediaInteraction:var c=this.usingVirtualDom?this.virtualDom.mirror.getNode(s.id):this.mirror.getNode(s.id);if(!c)return this.debugNodeNotFound(s,s.id);this.mediaManager.mediaMutation({target:c,timeOffset:t.timestamp-this.service.state.context.events[0].timestamp,mutation:s});break;case zo.StyleSheetRule:case zo.StyleDeclaration:this.usingVirtualDom?s.styleId?this.constructedStyleMutations.push(s):s.id&&(null==(i=this.virtualDom.mirror.getNode(s.id))||i.rules.push(s)):this.applyStyleSheetMutation(s);break;case zo.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var v=this.virtualDom.mirror.getNode(s.id);if(!v)return this.debugNodeNotFound(s,s.id);v.canvasMutations.push({event:t,mutation:s})}else{var d=this.mirror.getNode(s.id);if(!d)return this.debugNodeNotFound(s,s.id);Ah({event:t,mutation:s,target:d,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case zo.Font:try{var p=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);null==(n=this.iframe.contentDocument)||n.fonts.add(p)}catch(t){this.warn(t)}break;case zo.Selection:if(e){this.lastSelectionData=s;break}this.applySelection(s);break;case zo.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(s):this.applyAdoptedStyleSheet(s)}}applyMutation(t,e){var i,n,s,o=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&e&&(this.usingVirtualDom=!0,i=this.iframe.contentDocument,s=this.virtualDom,void 0===(n=this.mirror)&&(n=new ki),void 0===s&&(s=new Fs),function t(e,r){var i=Ys(e,s,n,r);if(null!==i)if("IFRAME"!==(null==r?void 0:r.nodeName)&&e.nodeType!==As.DOCUMENT_FRAGMENT_NODE&&(null==r||r.appendChild(i),i.parentNode=r,i.parentElement=r),"IFRAME"===e.nodeName){var o=e.contentDocument;o&&t(o,i)}else e.nodeType!==As.DOCUMENT_NODE&&e.nodeType!==As.ELEMENT_NODE&&e.nodeType!==As.DOCUMENT_FRAGMENT_NODE||(e.nodeType===As.ELEMENT_NODE&&e.shadowRoot&&t(e.shadowRoot,i),e.childNodes.forEach((e=>t(e,i))))}(i,null),Object.keys(this.legacy_missingNodeRetryMap).length))for(var a in this.legacy_missingNodeRetryMap)try{var h=this.legacy_missingNodeRetryMap[a],u=Ys(h.node,this.virtualDom,this.mirror);u&&(h.node=u)}catch(t){this.warn(t)}var l=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.filter((e=>!!l.getNode(e.id)||(this.warnNodeNotFound(t,e.id),!1))).forEach((e=>{var r,i=l.getNode(e.id);if(i){var n=l.getNode(e.parentId);if(!n)return this.warnNodeNotFound(t,e.parentId);if(e.isShadow&&_o(n)&&(n=n.shadowRoot),l.removeNodeFromMap(i),n)try{n.removeChild(i),this.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===n.nodeName&&(null==(r=n.rules)?void 0:r.length)>0&&(n.rules=[])}catch(e){if(!(e instanceof DOMException))throw e;this.warn("parent could not remove child in mutation",n,i,t)}}}));var f=r({},this.legacy_missingNodeRetryMap),c=[],v=e=>{var r,i;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");var n=l.getNode(e.parentId);if(!n)return e.node.type===Jo.Document?this.newDocumentQueue.push(e):t.adds.some((t=>t.node.id===e.parentId))?c.push(e):void 0;if(e.node.isShadow){if(_o(n))n=n.shadowRoot;else{if(!at(n))return this.warn("Parent does not support shadow root, skipping mutation",e);n=n.shadowRoot}var s=this.pendingAdoptedStyleSheets.get(e.parentId);s&&!this.usingVirtualDom&&this.applyAdoptedStyleSheet({source:zo.AdoptedStyleSheet,id:e.parentId,styleIds:s})}var o=null,a=null;if(e.previousId&&(o=l.getNode(e.previousId)),e.nextId&&(a=l.getNode(e.nextId)),!e.node.rootId||l.getNode(e.node.rootId)){var h=e.node.rootId?l.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Io(n,l))this.attachDocumentToIframe(e,n);else{var u=(t,e)=>{if(!this.usingVirtualDom)for(var r of(Th(t),this.config.plugins||[]))r.onBuild&&r.onBuild(t,{id:e,replayer:this})},v=oi(e.node,{doc:h,mirror:l,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:u});if(-1!==e.previousId&&-1!==e.nextId){var d=l.getMeta(n);if(d&&d.type===Jo.Element&&e.node.type===Jo.Text){var p=Array.isArray(n.childNodes)?n.childNodes:Array.from(n.childNodes);if("textarea"===d.tagName)for(var m of p)m.nodeType===n.TEXT_NODE&&n.removeChild(m);else if("style"===d.tagName&&1===p.length)for(var y of p)y.nodeType!==n.TEXT_NODE||l.hasNode(y)||(v.textContent=y.textContent,n.removeChild(y))}else if((null==d?void 0:d.type)===Jo.Document){var g=n;e.node.type===Jo.DocumentType&&(null==(r=g.childNodes[0])?void 0:r.nodeType)===Node.DOCUMENT_TYPE_NODE&&g.removeChild(g.childNodes[0]),"HTML"===v.nodeName&&g.documentElement&&g.removeChild(g.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?n.insertBefore(v,o.nextSibling):a&&a.parentNode?n.contains(a)?n.insertBefore(v,a):n.insertBefore(v,null):n.appendChild(v),u(v,e.node.id),this.usingVirtualDom&&"#text"===v.nodeName&&"STYLE"===n.nodeName&&(null==(i=n.rules)?void 0:i.length)>0&&(n.rules=[]),Io(v,this.mirror)){var w=this.mirror.getId(v),b=this.newDocumentQueue.find((t=>t.parentId===w));b&&(this.attachDocumentToIframe(b,v),this.newDocumentQueue=this.newDocumentQueue.filter((t=>t!==b)))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(f,n,v,e)}else f[e.node.id]={node:v,mutation:e}}}};t.adds.forEach((t=>{v(t)}));for(var d=performance.now();c.length;){var p=Eo(c);if(c.length=0,performance.now()-d>150){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}for(var m of p)l.getNode(m.value.parentId)?Ro(m,(t=>{v(t)})):this.debug("Drop resolve tree since there is no parent for the root node.",m)}Object.keys(f).length&&Object.assign(this.legacy_missingNodeRetryMap,f),Lo(t.texts).forEach((e=>{var r,i=l.getNode(e.id);if(!i){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}if(i.textContent=e.value,this.usingVirtualDom){var n=i.parentNode;(null==(r=null==n?void 0:n.rules)?void 0:r.length)>0&&(n.rules=[])}})),t.attributes.forEach((e=>{var i,n,s=l.getNode(e.id);if(!s){if(t.removes.find((t=>t.id===e.id)))return;return this.warnNodeNotFound(t,e.id)}var a=function(){if("string"==typeof h){var t=e.attributes[h];if(null===t)s.removeAttribute(h),"open"===h&&function(t,e){if(!("DIALOG"!==t.nodeName||t instanceof vs)){var r=t;r.isConnected?null===e.attributes.open&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode")):console.warn("dialog is not attached to the dom",r)}}(s,e);else if("string"==typeof t)try{if("_cssText"===h&&("LINK"===s.nodeName||"STYLE"===s.nodeName))try{var a=l.getMeta(s),u=s.nextSibling,f=s.parentNode,c=oi(r({},a,{attributes:r({},a.attributes,e.attributes)}),{doc:s.ownerDocument,mirror:l,skipChild:!0,hackCss:!0,cache:o.cache});if(Object.assign(a.attributes,e.attributes),c&&f)return s.parentNode===f&&f.removeChild(s),f.insertBefore(c,u),l.replace(e.id,c),1}catch(t){}if("value"===h&&"TEXTAREA"===s.nodeName){var v=s;v.childNodes.forEach((t=>v.removeChild(t)));var d=null==(i=s.ownerDocument)?void 0:i.createTextNode(t);d&&v.appendChild(d)}else"xlink:href"===h&&(null==(n=l.getMeta(s))?void 0:n.isSVG)?s.setAttributeNS("http://www.w3.org/1999/xlink",h,t):s.setAttribute(h,t);"rr_open_mode"===h&&"DIALOG"===s.nodeName&&Th(s,e)}catch(t){o.warn("An error occurred may due to the checkout feature.",t)}else if("style"===h){var p=t,m=s;for(var y in p)if(!1===p[y])m.style.removeProperty(y);else if(p[y]instanceof Array){var g=p[y];m.style.setProperty(y,g[0],g[1])}else m.style.setProperty(y,p[y])}}};for(var h in e.attributes)if(a())break}))}applyScroll(t,e){var r,i,n=this.mirror.getNode(t.id);if(!n)return this.debugNodeNotFound(t,t.id);var s=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)null==(r=this.iframe.contentWindow)||r.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else if((null==s?void 0:s.type)===Jo.Document)null==(i=n.defaultView)||i.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else try{n.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}catch(t){}}applyInput(t){var e=this.mirror.getNode(t.id);if(!e)return this.debugNodeNotFound(t,t.id);try{e.checked=t.isChecked,e.value=t.text}catch(t){}}applySelection(t){try{var e=new Set,r=t.ranges.map((t=>{var r=t.startOffset,i=t.end,n=t.endOffset,s=this.mirror.getNode(t.start),o=this.mirror.getNode(i);if(s&&o){var a=new Range;a.setStart(s,r),a.setEnd(o,n);var h=s.ownerDocument,u=null==h?void 0:h.getSelection();return u&&e.add(u),{range:a,selection:u}}}));e.forEach((t=>t.removeAllRanges())),r.forEach((t=>{var e;return t&&(null==(e=t.selection)?void 0:e.addRange(t.range))}))}catch(t){}}applyStyleSheetMutation(t){var e,r=null;t.styleId?r=this.styleMirror.getStyle(t.styleId):t.id&&(r=(null==(e=this.mirror.getNode(t.id))?void 0:e.sheet)||null),r&&(t.source===zo.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===zo.StyleDeclaration&&this.applyStyleDeclaration(t,r))}applyStyleSheetRule(t,e){var r,i,n,s;if(null==(r=t.adds)||r.forEach((t=>{var r=t.rule,i=t.index;try{if(Array.isArray(i)){var n=No(i),s=n.index,o=Do(e.cssRules,n.positions);null==o||o.insertRule(r,s)}else{var a=void 0===i?void 0:Math.min(i,e.cssRules.length);null==e||e.insertRule(r,a)}}catch(t){}})),null==(i=t.removes)||i.forEach((t=>{var r=t.index;try{if(Array.isArray(r)){var i=No(r),n=i.index,s=Do(e.cssRules,i.positions);null==s||s.deleteRule(n||0)}else null==e||e.deleteRule(r)}catch(t){}})),"string"==typeof t.replace)try{null==(n=e.replace)||n.call(e,t.replace)}catch(t){}if("string"==typeof t.replaceSync)try{null==(s=e.replaceSync)||s.call(e,t.replaceSync)}catch(t){}}applyStyleDeclaration(t,e){var r,i;if(t.set){var n=Do(e.rules,t.index);null==(r=null==n?void 0:n.style)||r.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){var s=Do(e.rules,t.index);null==(i=null==s?void 0:s.style)||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var e,r=this.mirror.getNode(t.id);if(r){var i={};this.adoptedStyleSheetTokens.set(t.id,i),null==(e=t.styles)||e.forEach((t=>{var e,i=null,n=null;if(n="#document"===r.nodeName?r.defaultView:(null==(e=r.ownerDocument)?void 0:e.defaultView)||null)try{i=new n.CSSStyleSheet,this.styleMirror.add(i,t.styleId),this.applyStyleSheetRule({source:zo.StyleSheetRule,adds:t.rules},i)}catch(t){}}));var n=0,s=(e,r)=>{if(this.adoptedStyleSheetTokens.get(t.id)===i){var o=r.map((t=>this.styleMirror.getStyle(t))).filter((t=>null!==t)),a=!1;try{_o(e)?(e.shadowRoot.adoptedStyleSheets=o,a=!0):"#document"===e.nodeName&&(e.adoptedStyleSheets=o,a=!0)}catch(t){}a?this.pendingAdoptedStyleSheets.delete(t.id):this.pendingAdoptedStyleSheets.set(t.id,r),a&&o.length===r.length||n>=10||(this.addTimeout((()=>s(e,r)),0+100*n),n++)}};s(r,t.styleIds)}}legacy_resolveMissingNode(t,e,r,i){var n=i.previousId,s=i.nextId,o=n&&t[n],a=s&&t[s];if(o){var h=o.node,u=o.mutation;e.insertBefore(h,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,e,h,u)}if(a){var l=a.node,f=a.mutation;e.insertBefore(l,r.nextSibling),delete t[f.node.id],delete this.legacy_missingNodeRetryMap[f.node.id],(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(t,e,l,f)}}moveAndHover(t,e,r,i,n){var s=this.mirror.getNode(r);if(!s)return this.debugNodeNotFound(n,r);var o=Oo(s,this.iframe),a=t*o.absoluteScale+o.x,h=e*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=h+"px",i||this.drawMouseTail({x:a,y:h}),this.hoverElements(s)}drawMouseTail(t){if(this.mouseTail){var e=!0===this.config.mouseTail?Dh:Object.assign({},Dh,this.config.mouseTail),r=e.lineCap,i=e.lineWidth,n=e.strokeStyle,s=e.duration,o=()=>{if(this.mouseTail){var t=this.mouseTail.getContext("2d");t&&this.tailPositions.length&&(t.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),t.beginPath(),t.lineWidth=i,t.lineCap=r,t.strokeStyle=n,t.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach((e=>t.lineTo(e.x,e.y))),t.stroke())}};this.tailPositions.push(t),o(),setTimeout((()=>{this.tailPositions=this.tailPositions.filter((e=>e!==t)),o()}),s/this.speedService.state.context.timer.speed)}}hoverElements(t){var e;null==(e=this.lastHoveredRootNode||this.iframe.contentDocument)||e.querySelectorAll(".\\:hover").forEach((t=>{t.classList.remove(":hover")}));var r=t.getRootNode();this.lastHoveredRootNode=r.nodeType===Node.DOCUMENT_NODE||r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r:void 0;for(var i=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;i;)i.classList.add(":hover"),i=i.parentElement}isUserInteraction(t){return t.type===Ho.IncrementalSnapshot&&t.data.source>zo.Mutation&&zo.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Zo.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,e){this.warn("Node with id '"+e+"' not found. ",t)}warnCanvasMutationFailed(t,e){this.warn("Has error on canvas update",e,"canvas mutation:",t)}debugNodeNotFound(t,e){this.debug("Node with id '"+e+"' not found. ",t)}warn(){if(this.config.showWarning){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.warn(_h,...e)}}debug(){if(this.config.showDebug){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.log(_h,...e)}}}var Fh=Ka.addCustomEvent,Bh=Ka.freezePage,Ph=Ka.takeFullSnapshot;export{Ho as EventType,zo as IncrementalSource,Vo as MouseInteractions,Lh as Replayer,Zo as ReplayerEvents,Fh as addCustomEvent,Ah as canvasMutation,Bh as freezePage,rt as getDeferredStylesheetStats,T as getDiscardedDurationSamples,Y as getLastSnapshotCost,it as getMutationCost,co as mirror,Ka as record,ue as resetMaxDepthState,nt as resetSnapshotCostState,Ph as takeFullSnapshot,Wo as utils,he as wasMaxDepthReached};
|
|
2
2
|
//# sourceMappingURL=rrweb.js.map
|