posthog-js 1.347.2 → 1.348.0

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.
Files changed (74) hide show
  1. package/dist/array.full.es5.js +1 -1
  2. package/dist/array.full.js +1 -1
  3. package/dist/array.full.no-external.js +1 -1
  4. package/dist/array.js +1 -1
  5. package/dist/array.no-external.js +1 -1
  6. package/dist/conversations.js +1 -1
  7. package/dist/conversations.js.map +1 -1
  8. package/dist/customizations.full.js +1 -1
  9. package/dist/lazy-recorder.js +1 -1
  10. package/dist/main.js +1 -1
  11. package/dist/main.js.map +1 -1
  12. package/dist/module.d.ts +43 -1
  13. package/dist/module.full.d.ts +43 -1
  14. package/dist/module.full.js +1 -1
  15. package/dist/module.full.js.map +1 -1
  16. package/dist/module.full.no-external.d.ts +43 -1
  17. package/dist/module.full.no-external.js +1 -1
  18. package/dist/module.full.no-external.js.map +1 -1
  19. package/dist/module.js +1 -1
  20. package/dist/module.js.map +1 -1
  21. package/dist/module.no-external.d.ts +43 -1
  22. package/dist/module.no-external.js +1 -1
  23. package/dist/module.no-external.js.map +1 -1
  24. package/dist/posthog-recorder.js +1 -1
  25. package/dist/product-tours-preview.d.ts +2 -0
  26. package/dist/product-tours-preview.js +1 -1
  27. package/dist/product-tours-preview.js.map +1 -1
  28. package/dist/product-tours.js +1 -1
  29. package/dist/product-tours.js.map +1 -1
  30. package/dist/src/extensions/conversations/external/components/ConversationsWidget.d.ts +43 -2
  31. package/dist/src/extensions/conversations/external/components/TicketListItem.d.ts +13 -0
  32. package/dist/src/extensions/conversations/external/components/TicketListView.d.ts +15 -0
  33. package/dist/src/extensions/conversations/external/components/styles.d.ts +184 -0
  34. package/dist/src/extensions/conversations/external/components/utils.d.ts +8 -0
  35. package/dist/src/extensions/conversations/external/index.d.ts +39 -1
  36. package/dist/src/extensions/product-tours/product-tours.d.ts +2 -0
  37. package/dist/src/posthog-product-tours-types.d.ts +42 -0
  38. package/dist/surveys-preview.d.ts +2 -0
  39. package/lib/package.json +1 -1
  40. package/lib/src/extensions/conversations/external/components/ConversationsWidget.d.ts +43 -2
  41. package/lib/src/extensions/conversations/external/components/ConversationsWidget.js +96 -28
  42. package/lib/src/extensions/conversations/external/components/ConversationsWidget.js.map +1 -1
  43. package/lib/src/extensions/conversations/external/components/TicketListItem.d.ts +13 -0
  44. package/lib/src/extensions/conversations/external/components/TicketListItem.js +47 -0
  45. package/lib/src/extensions/conversations/external/components/TicketListItem.js.map +1 -0
  46. package/lib/src/extensions/conversations/external/components/TicketListView.d.ts +15 -0
  47. package/lib/src/extensions/conversations/external/components/TicketListView.js +75 -0
  48. package/lib/src/extensions/conversations/external/components/TicketListView.js.map +1 -0
  49. package/lib/src/extensions/conversations/external/components/styles.d.ts +184 -0
  50. package/lib/src/extensions/conversations/external/components/styles.js +189 -0
  51. package/lib/src/extensions/conversations/external/components/styles.js.map +1 -1
  52. package/lib/src/extensions/conversations/external/components/utils.d.ts +8 -0
  53. package/lib/src/extensions/conversations/external/components/utils.js +49 -0
  54. package/lib/src/extensions/conversations/external/components/utils.js.map +1 -0
  55. package/lib/src/extensions/conversations/external/index.d.ts +39 -1
  56. package/lib/src/extensions/conversations/external/index.js +253 -31
  57. package/lib/src/extensions/conversations/external/index.js.map +1 -1
  58. package/lib/src/extensions/product-tours/components/ProductTourSurveyStepInner.js +1 -1
  59. package/lib/src/extensions/product-tours/components/ProductTourSurveyStepInner.js.map +1 -1
  60. package/lib/src/extensions/product-tours/product-tours.d.ts +2 -0
  61. package/lib/src/extensions/product-tours/product-tours.js +78 -71
  62. package/lib/src/extensions/product-tours/product-tours.js.map +1 -1
  63. package/lib/src/posthog-product-tours-types.d.ts +42 -0
  64. package/lib/src/posthog-product-tours-types.js +43 -1
  65. package/lib/src/posthog-product-tours-types.js.map +1 -1
  66. package/lib/src/utils/product-tour-event-receiver.js +2 -1
  67. package/lib/src/utils/product-tour-event-receiver.js.map +1 -1
  68. package/lib/tsconfig.tsbuildinfo +1 -1
  69. package/package.json +3 -3
  70. package/react/dist/esm/index.js +25 -1
  71. package/react/dist/esm/index.js.map +1 -1
  72. package/react/dist/types/index.d.ts +4 -2
  73. package/react/dist/umd/index.js +25 -0
  74. package/react/dist/umd/index.js.map +1 -1
@@ -1,2 +1,2 @@
1
- !function(){"use strict";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;e<arguments.length;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=["inputs"],o=["inputId"],a=["inputs"],h=["inputId"],u=["type"],l=Object.defineProperty,c=(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),f=Object.defineProperty,d=(t,e,r)=>((t,e,r)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),v=(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))(v||{}),p={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},g={};function w(t){if(g[t])return g[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 p?p[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 m?m[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 g[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?g[t]=u:r}catch(t){return r}}var y={};function b(t,e,r){var i,n=t+"."+String(r);if(y[n])return y[n].call(e);var s=w(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(y[n]=o,o.call(e)):e[r]}var S={};function k(t,e,r){var i=t+"."+String(r);if(S[i])return S[i].bind(e);var n=w(t)[r];return"function"!=typeof n?e[r]:(S[i]=n,n.bind(e))}var C={childNodes:function(t){return b("Node",t,"childNodes")},parentNode:function(t){return b("Node",t,"parentNode")},parentElement:function(t){return b("Node",t,"parentElement")},textContent:function(t){return b("Node",t,"textContent")},contains:function(t,e){return k("Node",t,"contains")(e)},getRootNode:function(t){return k("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?b("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?b("Element",t,"shadowRoot"):null},querySelector:function(t,e){return b("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return b("Element",t,"querySelectorAll")(e)},mutationObserver:function(){return w("MutationObserver").constructor},patch:function(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}};function I(t){return t.nodeType===t.ELEMENT_NODE}function M(t){var e=t&&"host"in t&&"mode"in t&&C.host(t)||null;return Boolean(e&&"shadowRoot"in e&&C.shadowRoot(e)===t)}function x(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function R(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;!r&&t.ownerNode&&(r=t.ownerNode.baseURI);var i=Array.from(e,(t=>_(t,r))).join("");return(n=i).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(t){return null}var n}function _(t,e){var r;if(function(t){return"styleSheet"in t}(t)){var i;try{i=R(t.styleSheet)||function(t){var{cssText:e}=t;if(e.split('"').length<3)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(" ")+";"}(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return P(i,t.styleSheet.href)}catch(t){}return i}var n,s=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,s=s.replace(n,"$1\\$2")),e?P(s,e):s}class O{constructor(){d(this,"idNodeMap",new Map),d(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))),I(t)){var r=C.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){var r=e.id;this.idNodeMap.set(r,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 T(t){var{element:e,maskInputOptions:r,tagName:i,type:n,value:s,maskInputFn:o}=t,a=s||"",h=n&&A(n);return(r[i.toLowerCase()]||h&&r[h])&&(a=o?o(a,e):"*".repeat(a.length)),a}function A(t){return t.toLowerCase()}var E="__rrweb_original__";function B(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?A(e):null}function L(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 N=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,D=/^(?:[a-z+]+:)?\/\//i,F=/^www\..*/i,j=/^(data:)([^,]*),(.*)/i;function P(t,e){return(t||"").replace(N,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(D.test(h)||F.test(h))return"url("+u+h+u+")";if(j.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("/"),c=h.split("/");for(var f of(l.pop(),c))"."!==f&&(".."===f?l.pop():l.push(f));return"url("+u+l.join("/")+u+")"}))}var U="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",W=4096;var z,q,H=1,G=new RegExp("[^a-z0-9-_:]"),V=-2;function J(){return H++}var Y=/^[^ \t\n\r\u000c]+/,Z=/^[, \t\n\r\u000c]+/;var X=new WeakMap;function K(t,e){return e&&""!==e.trim()?tt(t,e):e}function Q(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function tt(t,e){var r=X.get(t);if(r||(r=t.createElement("a"),X.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function et(t,e,r,i,n,s){if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){var o=K(t,i);if("img"===e&&o.startsWith("data:")&&n){var a=n,h=o;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(h=function(t,e,r,i){if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>W||t.naturalHeight>W)return e;try{var n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight;var s=n.getContext("2d");return s?(s.drawImage(t,0,0),n.toDataURL(r||"image/webp",null!=i?i:.4)):e}catch(t){return e}}(a,o,s.type,s.quality)),(null==s?void 0:s.maxBase64ImageLength)&&(u=h,h=!(l=s.maxBase64ImageLength)||u.length<=l?u:U),h}return o}return"xlink:href"===r&&"#"!==i[0]?K(t,i):"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?(i=n[0],r+=i.length,i):""}for(var n=[];i(Z),!(r>=e.length);){var s=i(Y);if(","===s.slice(-1))s=K(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=K(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?P(i,tt(t)):"object"===e&&"data"===r?K(t,i):i:K(t,i);var u,l}function rt(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function it(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&it(C.parentNode(t),e,r);for(var i=t.classList.length;i--;){var n=t.classList[i];if(e.test(n))return!0}return!!r&&it(C.parentNode(t),e,r)}function nt(t,e,r,i){var n;if(I(t)){if(n=t,!C.childNodes(n).length)return!1}else{if(null===C.parentElement(t))return!1;n=C.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(it(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 st(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:o,inlineStylesheet:a,maskInputOptions:h={},maskTextFn:u,maskInputFn:l,dataURLOptions:c={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1}=e,g=function(t,e){if(!e.hasNode(t))return;var r=e.getId(t);return 1===r?void 0:r}(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:v.Document,childNodes:[],compatMode:t.compatMode}:{type:v.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:v.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:g};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,{doc:s,blockClass:o,blockSelector:a,inlineStylesheet:h,maskInputOptions:u={},maskInputFn:l,dataURLOptions:c={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:g}=e,w=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;){var n=t.classList[i];if(e.test(n))return!0}if(r)return t.matches(r)}catch(t){}return!1}(t,o,a),y=function(t){if(t instanceof HTMLFormElement)return"form";var e=A(t.tagName);return G.test(e)?"div":e}(t),b={},S=t.attributes.length,k=0;k<S;k++){var I=t.attributes[k];rt(y,I.name,I.value)||(b[I.name]=et(s,y,A(I.name),I.value,t,c))}if("link"===y&&h){var M=function(t){return t.href}(t);if(M){var x=ot(s,M);if(!x&&M.includes(".css"))x=ot(s,window.location.origin+"/"+M.replace(window.location.href,""));var _=null;x&&(_=R(x)),_&&(delete b.rel,delete b.href,b._cssText=_)}}if("style"===y&&t.sheet&&!(t.innerText||C.textContent(t)||"").trim().length){var O=R(t.sheet);O&&(b._cssText=O)}if("input"===y||"textarea"===y||"select"===y){var L=t.value,N=t.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&L?b.value=T({element:t,type:B(t),tagName:y,value:L,maskInputOptions:u,maskInputFn:l}):N&&(b.checked=N)}"option"===y&&(t.selected&&!u.select?b.selected=!0:delete b.selected);if("dialog"===y&&t.open)try{b.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){b.rr_open_mode="modal",b.ph_rr_could_not_detect_modal=!0}if("canvas"===y&&d)if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;r<t.width;r+=50)for(var i=0;i<t.height;i+=50){var n=e.getImageData,s=E in n?n[E]:n;if(new Uint32Array(s.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)||(b.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){var D=t.toDataURL(c.type,c.quality),F=s.createElement("canvas");F.width=t.width,F.height=t.height,D!==F.toDataURL(c.type,c.quality)&&(b.rr_dataURL=D)}if("img"===y&&f){z||(z=s.createElement("canvas"),q=z.getContext("2d"));var j=t,P=j.currentSrc||j.getAttribute("src")||"<unknown-src>",U=j.crossOrigin,W=()=>{j.removeEventListener("load",W);try{z.width=j.naturalWidth,z.height=j.naturalHeight,q.drawImage(j,0,0),b.rr_dataURL=z.toDataURL(c.type,c.quality)}catch(t){if("anonymous"!==j.crossOrigin)return j.crossOrigin="anonymous",void(j.complete&&0!==j.naturalWidth?W():j.addEventListener("load",W));console.warn("Cannot inline img src="+P+"! Error: "+t)}"anonymous"===j.crossOrigin&&(U?b.crossOrigin=U:j.removeAttribute("crossorigin"))};j.complete&&0!==j.naturalWidth?W():j.addEventListener("load",W)}if("audio"===y||"video"===y){var H=b;H.rr_mediaState=t.paused?"paused":"played",H.rr_mediaCurrentTime=t.currentTime,H.rr_mediaPlaybackRate=t.playbackRate,H.rr_mediaMuted=t.muted,H.rr_mediaLoop=t.loop,H.rr_mediaVolume=t.volume}m||(t.scrollLeft&&(b.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(b.rr_scrollTop=t.scrollTop));if(w){var{width:V,height:J,left:Y,top:Z}=t.getBoundingClientRect();b={class:b.class,rr_width:V+"px",rr_height:J+"px",rr_left:Math.floor(Y+((null==(r=s.defaultView)?void 0:r.scrollX)||0))+"px",rr_top:Math.floor(Z+((null==(i=s.defaultView)?void 0:i.scrollY)||0))+"px"}}"iframe"!==y||p(b.src)||(t.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(y)&&(n=!0)}catch(t){}return{type:v.Element,tagName:y,attributes:b,childNodes:[],isSVG:Q(t)||void 0,needBlock:w,rootId:g,isCustom:n}}(t,{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:a,maskInputOptions:h,maskInputFn:l,dataURLOptions:c,inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m,rootId:g});case t.TEXT_NODE:return function(t,e){var r,{needsMask:i,maskTextFn:n,rootId:s}=e,o=C.parentNode(t),a=o&&o.tagName,h=C.textContent(t),u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(u&&h){try{t.nextSibling||t.previousSibling||(null==(r=o.sheet)?void 0:r.cssRules)&&(h=R(o.sheet))}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}h=P(h,tt(e.doc))}l&&(h="SCRIPT_PLACEHOLDER");!u&&!l&&h&&i&&(h=n?n(h,C.parentElement(t)):h.replace(/[\S]/g,"*"));return{type:v.Text,textContent:h||"",isStyle:u,rootId:s}}(t,{doc:r,needsMask:o,maskTextFn:u,rootId:g});case t.CDATA_SECTION_NODE:return{type:v.CDATA,textContent:"",rootId:g};case t.COMMENT_NODE:return{type:v.Comment,textContent:C.textContent(t)||"",rootId:g};default:return!1}}function ot(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function at(t){return null==t?"":t.toLowerCase()}var ht=50,ut=!1,lt=!1;function ct(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:h=!1,inlineStylesheet:u=!0,maskInputOptions:l={},maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:R=(()=>!1),newlyAddedElement:_=!1,depth:O=0,maxDepth:T=ht}=e,{needsMask:A}=e,{preserveWhiteSpace:E=!0}=e;if(O>=T)return lt=!0,ut||(ut=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+T+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;A||(A=nt(t,o,a,void 0===A));var B,N=st(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:A,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:R,newlyAddedElement:_});if(!N)return console.warn(t,"not serialized"),null;B=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===v.Comment)return!0;if(t.type===v.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"===L(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(at(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===at(t.attributes.name)||"icon"===at(t.attributes.rel)||"apple-touch-icon"===at(t.attributes.rel)||"shortcut icon"===at(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&at(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(at(t.attributes.property).match(/^(og|twitter|fb):/)||at(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===at(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===at(t.attributes.name)||"googlebot"===at(t.attributes.name)||"bingbot"===at(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===at(t.attributes.name)||"generator"===at(t.attributes.name)||"framework"===at(t.attributes.name)||"publisher"===at(t.attributes.name)||"progid"===at(t.attributes.name)||at(t.attributes.property).match(/^article:/)||at(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===at(t.attributes.name)||"yandex-verification"===at(t.attributes.name)||"csrf-token"===at(t.attributes.name)||"p:domain_verify"===at(t.attributes.name)||"verify-v1"===at(t.attributes.name)||"verification"===at(t.attributes.name)||"shopify-checkout-api-token"===at(t.attributes.name)))return!0}}return!1}(N,d)&&(E||N.type!==v.Text||N.isStyle||N.textContent.replace(/^\s+|\s+$/gm,"").length)?J():V;var D=Object.assign(N,{id:B});if(i.add(t,D),B===V)return null;w&&w(t);var F=!h;if(D.type===v.Element){F=F&&!D.needBlock,delete D.needBlock;var j=C.shadowRoot(t);j&&x(j)&&(D.isShadowHost=!0)}if((D.type===v.Document||D.type===v.Element)&&F){d.headWhitespace&&D.type===v.Element&&"head"===D.tagName&&(E=!1);var P={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:A,maskTextClass:o,maskTextSelector:a,skipChild:h,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:R,depth:O+1,maxDepth:T};if(D.type===v.Element&&"textarea"===D.tagName&&void 0!==D.attributes.value);else for(var U of Array.from(C.childNodes(t))){var W=ct(U,P);W&&D.childNodes.push(W)}var z=null;if(I(t)&&(z=C.shadowRoot(t)))for(var q of Array.from(C.childNodes(z))){var H=ct(q,P);H&&(x(z)&&(H.isShadow=!0),D.childNodes.push(H))}}var G=C.parentNode(t);return G&&M(G)&&x(G)&&(D.isShadow=!0),D.type===v.Element&&"iframe"===D.tagName&&function(t,e,r){var i=t.contentWindow;if(i){var n,s=!1;try{n=i.document.readyState}catch(t){return}if("complete"===n){var o="about:blank";if(i.location.href!==o||t.src===o||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}else{var a=setTimeout((()=>{s||(e(),s=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(a),s=!0,e()}))}}}(t,(()=>{var e=t.contentDocument;if(e&&y){var r=ct(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:A,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:R,depth:O+1,maxDepth:T});r&&y(t,r)}}),b),D.type===v.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===L(D.attributes.href))&&function(t,e,r){var i,n=!1;try{i=t.sheet}catch(t){return}if(!i){var s=setTimeout((()=>{n||(e(),n=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(s),n=!0,e()}))}}(t,(()=>{if(S){var e=ct(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:A,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:R,depth:O,maxDepth:T});e&&S(t,e)}}),k),D}function ft(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function dt(t){if(Object.prototype.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:function(){return t[e]}})})),r}var vt,pt={exports:{}};function mt(){if(vt)return pt.exports;vt=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 pt.exports=e(),pt.exports.createColors=e,pt.exports}var gt,wt,yt,bt,St,kt,Ct=dt(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function It(){if(wt)return gt;wt=1;var t=mt(),e=Ct;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{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).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 gt=r,r.default=r,gt}function Mt(){if(bt)return yt;bt=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes)this.block(t,r+i);else{var n=(t.raws.between||"")+(e?";":"");this.builder(r+i+n,t)}}beforeAfter(t,e){var r;r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"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;o<n;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;i<t.nodes.length;i++){var n=t.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==i||r)}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)}decl(t,e){var r=this.raw(t,"between","colon"),i=t.prop+r+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(e,r,i){var n;if(i||(i=r),r&&void 0!==(n=e.raws[r]))return n;var s=e.parent;if("before"===i){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return t[i];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[i])return o.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(e,i);var a,h="raw"+((a=i)[0].toUpperCase()+a.slice(1));return this[h]?n=this[h](o,e):o.walk((t=>{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}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){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(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 yt=e,e.default=e,yt}function xt(){if(kt)return St;kt=1;var t=Mt();function e(e,r){new t(r).stringify(e)}return St=e,e.default=e,St}var Rt,_t,Ot,Tt,At,Et,Bt,Lt,Nt,Dt,Ft,jt,Pt,Ut,Wt,$t,zt,qt,Ht,Gt,Vt,Jt,Yt,Zt,Xt,Kt,Qt,te,ee,re,ie,ne,se,oe,ae,he,ue,le,ce,fe,de,ve,pe,me,ge,we,ye,be,Se,ke,Ce,Ie,Me,xe={};function Re(){return Rt||(Rt=1,xe.isClean=Symbol("isClean"),xe.my=Symbol("my")),xe}function _e(){if(Ot)return _t;Ot=1;var t=It(),e=Mt(),r=xt(),{isClean:i,my:n}=Re();function s(t,e){var r=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;s<t.length;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 in void 0===t&&(t={}),this.raws={},this[i]=!1,this[n]=!0,t)if("nodes"===e)for(var r of(this.nodes=[],t[e]))"function"==typeof r.clone?this.append(r.clone()):this.append(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=s(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{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new t(e)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,r)=>(t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!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=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}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;a<s;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)}: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):t.index&&(i=this.positionInside(t.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.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;n<r;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={},i=null==e;e=e||new Map;var n=0;for(var s in this)if(Object.prototype.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}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 _t=a,a.default=a,_t}function Oe(){if(At)return Tt;At=1;var t=_e();class e extends t{constructor(t){super(t),this.type="comment"}}return Tt=e,e.default=e,Tt}function Te(){if(Bt)return Et;Bt=1;var t=_e();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 Et=e,e.default=e,Et}function Ae(){if(Nt)return Lt;Nt=1;var t,e,r,i,n=Oe(),s=Te(),o=_e(),{isClean:a,my:h}=Re();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c 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;r<t;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){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.indexes[i]<this.proxyOf.nodes.length&&(e=this.indexes[i],!1!==(r=t(this.proxyOf.nodes[e],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)=>"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;n<r;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;n<e;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)=>(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)i<(r=this.indexes[o])&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=0===i&&"prepend",s=this.normalize(e,this.proxyOf.nodes[i],n).reverse();for(var o of(i=this.index(t),s))this.proxyOf.nodes.splice(i,0,o);for(var a in this.indexes)i<=(r=this.indexes[a])&&(this.indexes[a]=r+s.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"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 v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(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 v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;r<t;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)(e=this.indexes[r])>=t&&(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){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}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 c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},Lt=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},Lt}function Ee(){if(Ft)return Dt;Ft=1;var t=Ae();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 Dt=e,e.default=e,t.registerAtRule(e),Dt}function Be(){if(Pt)return jt;Pt=1;var t,e,i=Ae();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},jt=n,n.default=n,jt}function Le(){if(Wt)return Ut;Wt=1;return Ut={nanoid:function(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(t,e){return void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i}}}}function Ne(){if(zt)return $t;zt=1;var{existsSync:t,readFileSync:e}=Ct,{dirname:r,join:i}=Ct,{SourceMapConsumer:n,SourceMapGenerator:s}=Ct;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=e.map?e.map.prev:void 0,n=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),n&&(this.text=n)}}consumer(){return this.consumerCache||(this.consumerCache=new n(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.match(/data:application\/json;([^,]+),/)[1];throw 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(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"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 n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return $t=o,o.default=o,$t}function De(){if(Ht)return qt;Ht=1;var{nanoid:t}=Le(),{isAbsolute:e,resolve:i}=Ct,{SourceMapConsumer:n,SourceMapGenerator:s}=Ct,{fileURLToPath:o,pathToFileURL:a}=Ct,h=It(),u=Ne(),l=Ct,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;n<s;n++)r[n]=i,i+=e[n].length+1;return t[c]=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&&(!d||/^\w+:\/\//.test(n.from)||e(n.from)?this.file=n.from:this.file=i(n.from)),d&&f){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 c=e,f=r;if("number"==typeof c.offset){u=c.offset;var d=this.fromOffset(u);e=d.line,r=d.col}else e=c.line,r=c.column,u=this.fromLineAndColumn(e,r);if("number"==typeof f.offset){o=f.offset;var v=this.fromOffset(o);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{u=e;var p=this.fromOffset(u);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 v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(t>=e[e.length-1])r=e.length-1;else for(var i,n=e.length-2;r<n;)if(t<e[i=r+(n-r>>1)])n=i-1;else{if(!(t>=e[i+1])){r=i;break}r=i+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,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,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 f=u.sourceContentFor(l.source);return f&&(c.source=f),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 qt=p,p.default=p,l&&l.registerInput&&l.registerInput(p),qt}function Fe(){if(Vt)return Gt;Vt=1;var t,e,r=Ae();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=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 n of i)n.raws.before=e.raws.before;return i}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},Gt=i,i.default=i,r.registerRoot(i),Gt}function je(){if(Yt)return Jt;Yt=1;var t={comma:e=>t.split(e,[","],!0),space:e=>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 Jt=t,t.default=t,Jt}function Pe(){if(Xt)return Zt;Xt=1;var t=Ae(),e=je();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 Zt=r,r.default=r,t.registerRule(r),Zt}function Ue(){if(ee)return te;ee=1;var{dirname:t,relative:e,resolve:r,sep:i}=Ct,{SourceMapConsumer:n,SourceMapGenerator:s}=Ct,{pathToFileURL:o}=Ct,a=De(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return te=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 this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}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}},te}function We(){if(ie)return re;ie=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),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),g=":".charCodeAt(0),w="@".charCodeAt(0),y=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return re=function(C,I){void 0===I&&(I={});var M,x,R,_,O,T,A,E,B,L,N=C.css.valueOf(),D=I.ignoreErrors,F=N.length,j=0,P=[],U=[];function W(t){throw C.error("Unclosed "+t,j)}return{back:function(t){U.push(t)},endOfFile:function(){return 0===U.length&&j>=F},nextToken:function(C){if(U.length)return U.pop();if(!(j>=F)){var I=!!C&&C.ignoreUnclosed;switch(M=N.charCodeAt(j)){case n:case s:case a:case h:case o:_=j;do{_+=1,M=N.charCodeAt(_)}while(M===s||M===n||M===a||M===h||M===o);T=["space",N.slice(j,_)],j=_-1;break;case u:case l:case d:case v:case g:case p:case f:var z=String.fromCharCode(M);T=[z,z,j];break;case c:if(L=P.length?P.pop()[1]:"",B=N.charCodeAt(j+1),"url"===L&&B!==t&&B!==e&&B!==s&&B!==n&&B!==a&&B!==o&&B!==h){_=j;do{if(A=!1,-1===(_=N.indexOf(")",_+1))){if(D||I){_=j;break}W("bracket")}for(E=_;N.charCodeAt(E-1)===r;)E-=1,A=!A}while(A);T=["brackets",N.slice(j,_+1),j,_],j=_}else _=N.indexOf(")",j+1),x=N.slice(j,_+1),-1===_||S.test(x)?T=["(","(",j]:(T=["brackets",x,j,_],j=_);break;case t:case e:O=M===t?"'":'"',_=j;do{if(A=!1,-1===(_=N.indexOf(O,_+1))){if(D||I){_=j+1;break}W("string")}for(E=_;N.charCodeAt(E-1)===r;)E-=1,A=!A}while(A);T=["string",N.slice(j,_+1),j,_],j=_;break;case w:y.lastIndex=j+1,y.test(N),_=0===y.lastIndex?N.length-1:y.lastIndex-2,T=["at-word",N.slice(j,_+1),j,_],j=_;break;case r:for(_=j,R=!0;N.charCodeAt(_+1)===r;)_+=1,R=!R;if(M=N.charCodeAt(_+1),R&&M!==i&&M!==s&&M!==n&&M!==a&&M!==h&&M!==o&&(_+=1,k.test(N.charAt(_)))){for(;k.test(N.charAt(_+1));)_+=1;N.charCodeAt(_+1)===s&&(_+=1)}T=["word",N.slice(j,_+1),j,_],j=_;break;default:M===i&&N.charCodeAt(j+1)===m?(0===(_=N.indexOf("*/",j+2)+1)&&(D||I?_=N.length:W("comment")),T=["comment",N.slice(j,_+1),j,_],j=_):(b.lastIndex=j+1,b.test(N),_=0===b.lastIndex?N.length-1:b.lastIndex-2,T=["word",N.slice(j,_+1),j,_],P.push(T),j=_)}return j++,T}},position:function(){return j}}}}function $e(){if(se)return ne;se=1;var t=Ee(),e=Oe(),r=Te(),i=Fe(),n=Pe(),s=We(),o={empty:!0,space:!0};return ne=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&&(e=h[h.length-1],s.source.end=this.getPosition(e[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,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}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(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[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++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.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,h,u=r.length,l="",c=!0,f=0;f<u;f+=1)"space"!==(s=(n=r[f])[0])||f!==u-1||i?"comment"===s?(h=r[f-1]?r[f-1][0]:"empty",a=r[f+1]?r[f+1][0]:"empty",o[h]||o[a]||","===l.slice(-1)?c=!1:l+=n[1]):l+=n[1]:c=!1;if(!c){var d=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:d,value:l}}t[e]=l}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;i<t.length;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 ze(){if(ae)return oe;ae=1;var t=Ae(),e=De(),r=$e();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 oe=i,i.default=i,t.registerParse(i),oe}function qe(){if(ue)return he;ue=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return he=t,t.default=t,he}function He(){if(ce)return le;ce=1;var t=qe();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 le=e,e.default=e,le}function Ge(){if(de)return fe;de=1;var t={};return fe=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Ve(){if(pe)return ve;pe=1;var t=Ae(),i=Be(),n=Ue(),s=ze(),o=He(),a=Fe(),h=xt(),{isClean:u,my:l}=Re(),c=Ge(),f={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},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function y(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>y(t))),t}var b={};class S{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 S||i instanceof o)a=y(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[l]&&t.rebuild(a)}else a=y(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,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(!v[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;e<t.plugins.length;e++){var r=t.plugins[e],i=t.runOnRoot(r);if(m(i))try{yield i}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var n=t.result.root;!n[u];){n[u]=!0;for(var s=[w(n)];s.length>0;){var o=t.visitTick(s);if(m(o))try{yield o}catch(e){var a=s[s.length-1].node;throw t.handleError(e,a)}}}if(t.listeners.OnceExit){var h=function*(e){t.result.lastPlugin=l;try{if("document"===n.type){var r=n.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(n,t.helpers)}catch(e){throw t.handleError(e)}};for(var[l,c]of t.listeners.OnceExit)yield*h(c)}}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 m(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=new n(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins){if(m(this.runOnRoot(t)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!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,i]of t){this.result.lastPlugin=r;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(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&e.visitorIndex<i.length){var[n,s]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var o,a=e.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[u])return o[u]=!0,void t.push(w(o));e.iterator=0,delete r.indexes[a]}for(var h=e.events;e.eventIndex<h.length;){var l=h[e.eventIndex];if(e.eventIndex+=1,l===p)return void(r.nodes&&r.nodes.length&&(r[u]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[u]=!0;var e=g(t);for(var r of e)if(r===p)t.nodes&&t.each((t=>{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},ve=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),ve}function Je(){if(ye)return we;ye=1;var t=Be(),e=Ve(),r=function(){if(ge)return me;ge=1;var t=Ue(),e=ze(),r=He(),i=xt(),n=Ge();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){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get:()=>h.root});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.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 me=s,s.default=s,me}(),i=Fe();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",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 we=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),we}function Ye(){if(Se)return be;Se=1;var t=Ee(),e=Oe(),n=Ae(),a=It(),h=Te(),u=Be(),l=function(){if(Qt)return Kt;Qt=1;var t=Ee(),e=Oe(),n=Te(),a=De(),h=Ne(),u=Fe(),l=Pe();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,s);if(v)for(var m of(d=[],v)){var g=r({},m,{__proto__:a.prototype});g.map&&(g.map=r({},g.map,{__proto__:h.prototype})),d.push(g)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var w=p.source,{inputId:y}=w,b=i(w,o);p.source=b,null!=y&&(p.source.input=d[y])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return Kt=c,c.default=c,Kt}(),c=De(),f=Ve(),d=je(),v=_e(),p=ze(),m=Je(),g=He(),w=Fe(),y=Pe(),b=xt(),S=qe();function k(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}return k.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 m).version,r}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new h(t),k.rule=t=>new y(t),k.root=t=>new w(t),k.document=t=>new u(t),k.CssSyntaxError=a,k.Declaration=h,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=g,k.Input=c,k.Rule=y,k.Root=w,k.Node=v,f.registerPostcss(k),be=k,k.default=k,be}!function(){if(Me)return Ie;Me=1;var{Input:t}=Ye(),e=function(){if(Ce)return ke;Ce=1;var t=Oe(),e=$e(),r=We();return ke=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=""}}}();Ie=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}();var Ze=ft(Ye());Ze.stringify,Ze.fromJSON,Ze.plugin,Ze.parse,Ze.list,Ze.document,Ze.comment,Ze.atRule,Ze.rule,Ze.decl,Ze.root,Ze.CssSyntaxError,Ze.Declaration,Ze.Container,Ze.Processor,Ze.Document,Ze.Comment,Ze.Warning,Ze.AtRule,Ze.Result,Ze.Input,Ze.Rule,Ze.Root,Ze.Node;var Xe=Object.defineProperty,Ke=(t,e,r)=>((t,e,r)=>e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);function Qe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function tr(t){if(Object.prototype.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:function(){return t[e]}})})),r}var er,rr={exports:{}};function ir(){if(er)return rr.exports;er=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 rr.exports=e(),rr.exports.createColors=e,rr.exports}var nr,sr,or,ar,hr,ur,lr=tr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function cr(){if(sr)return nr;sr=1;var t=ir(),e=lr;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{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).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 nr=r,r.default=r,nr}function fr(){if(ar)return or;ar=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes)this.block(t,r+i);else{var n=(t.raws.between||"")+(e?";":"");this.builder(r+i+n,t)}}beforeAfter(t,e){var r;r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"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;o<n;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;i<t.nodes.length;i++){var n=t.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==i||r)}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)}decl(t,e){var r=this.raw(t,"between","colon"),i=t.prop+r+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(e,r,i){var n;if(i||(i=r),r&&void 0!==(n=e.raws[r]))return n;var s=e.parent;if("before"===i){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return t[i];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[i])return o.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(e,i);var a,h="raw"+((a=i)[0].toUpperCase()+a.slice(1));return this[h]?n=this[h](o,e):o.walk((t=>{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}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){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(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 or=e,e.default=e,or}function dr(){if(ur)return hr;ur=1;var t=fr();function e(e,r){new t(r).stringify(e)}return hr=e,e.default=e,hr}var vr,pr,mr,gr,wr,yr,br,Sr,kr,Cr,Ir,Mr,xr,Rr,_r,Or,Tr,Ar,Er,Br,Lr,Nr,Dr,Fr,jr,Pr,Ur,Wr,$r,zr,qr,Hr,Gr,Vr,Jr,Yr,Zr,Xr,Kr,Qr,ti,ei,ri,ii,ni,si,oi,ai,hi,ui,li,ci,fi,di={};function vi(){return vr||(vr=1,di.isClean=Symbol("isClean"),di.my=Symbol("my")),di}function pi(){if(mr)return pr;mr=1;var t=cr(),e=fr(),r=dr(),{isClean:i,my:n}=vi();function s(t,e){var r=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;s<t.length;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 in void 0===t&&(t={}),this.raws={},this[i]=!1,this[n]=!0,t)if("nodes"===e)for(var r of(this.nodes=[],t[e]))"function"==typeof r.clone?this.append(r.clone()):this.append(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=s(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{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new t(e)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,r)=>(t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!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=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}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;a<s;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)}: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):t.index&&(i=this.positionInside(t.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.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;n<r;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={},i=null==e;e=e||new Map;var n=0;for(var s in this)if(Object.prototype.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}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 pr=a,a.default=a,pr}function mi(){if(wr)return gr;wr=1;var t=pi();class e extends t{constructor(t){super(t),this.type="comment"}}return gr=e,e.default=e,gr}function gi(){if(br)return yr;br=1;var t=pi();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 yr=e,e.default=e,yr}function wi(){if(kr)return Sr;kr=1;var t,e,r,i,n=mi(),s=gi(),o=pi(),{isClean:a,my:h}=vi();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c 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;r<t;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){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.indexes[i]<this.proxyOf.nodes.length&&(e=this.indexes[i],!1!==(r=t(this.proxyOf.nodes[e],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)=>"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;n<r;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;n<e;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)=>(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)i<(r=this.indexes[o])&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=0===i&&"prepend",s=this.normalize(e,this.proxyOf.nodes[i],n).reverse();for(var o of(i=this.index(t),s))this.proxyOf.nodes.splice(i,0,o);for(var a in this.indexes)i<=(r=this.indexes[a])&&(this.indexes[a]=r+s.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"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 v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(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 v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;r<t;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)(e=this.indexes[r])>=t&&(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){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}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 c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},Sr=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},Sr}function yi(){if(Ir)return Cr;Ir=1;var t=wi();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 Cr=e,e.default=e,t.registerAtRule(e),Cr}function bi(){if(xr)return Mr;xr=1;var t,e,i=wi();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},Mr=n,n.default=n,Mr}function Si(){if(_r)return Rr;_r=1;return Rr={nanoid:function(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(t,e){return void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i}}}}function ki(){if(Tr)return Or;Tr=1;var{existsSync:t,readFileSync:e}=lr,{dirname:r,join:i}=lr,{SourceMapConsumer:n,SourceMapGenerator:s}=lr;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=e.map?e.map.prev:void 0,n=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),n&&(this.text=n)}}consumer(){return this.consumerCache||(this.consumerCache=new n(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.match(/data:application\/json;([^,]+),/)[1];throw 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(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"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 n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Or=o,o.default=o,Or}function Ci(){if(Er)return Ar;Er=1;var{nanoid:t}=Si(),{isAbsolute:e,resolve:i}=lr,{SourceMapConsumer:n,SourceMapGenerator:s}=lr,{fileURLToPath:o,pathToFileURL:a}=lr,h=cr(),u=ki(),l=lr,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;n<s;n++)r[n]=i,i+=e[n].length+1;return t[c]=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&&(!d||/^\w+:\/\//.test(n.from)||e(n.from)?this.file=n.from:this.file=i(n.from)),d&&f){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 c=e,f=r;if("number"==typeof c.offset){u=c.offset;var d=this.fromOffset(u);e=d.line,r=d.col}else e=c.line,r=c.column,u=this.fromLineAndColumn(e,r);if("number"==typeof f.offset){o=f.offset;var v=this.fromOffset(o);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{u=e;var p=this.fromOffset(u);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 v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(t>=e[e.length-1])r=e.length-1;else for(var i,n=e.length-2;r<n;)if(t<e[i=r+(n-r>>1)])n=i-1;else{if(!(t>=e[i+1])){r=i;break}r=i+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,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,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 f=u.sourceContentFor(l.source);return f&&(c.source=f),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 Ar=p,p.default=p,l&&l.registerInput&&l.registerInput(p),Ar}function Ii(){if(Lr)return Br;Lr=1;var t,e,r=wi();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=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 n of i)n.raws.before=e.raws.before;return i}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},Br=i,i.default=i,r.registerRoot(i),Br}function Mi(){if(Dr)return Nr;Dr=1;var t={comma:e=>t.split(e,[","],!0),space:e=>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 Nr=t,t.default=t,Nr}function xi(){if(jr)return Fr;jr=1;var t=wi(),e=Mi();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 Fr=r,r.default=r,t.registerRule(r),Fr}function Ri(){if($r)return Wr;$r=1;var{dirname:t,relative:e,resolve:r,sep:i}=lr,{SourceMapConsumer:n,SourceMapGenerator:s}=lr,{pathToFileURL:o}=lr,a=Ci(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return Wr=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 this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}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}},Wr}function _i(){if(qr)return zr;qr=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),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),g=":".charCodeAt(0),w="@".charCodeAt(0),y=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return zr=function(C,I){void 0===I&&(I={});var M,x,R,_,O,T,A,E,B,L,N=C.css.valueOf(),D=I.ignoreErrors,F=N.length,j=0,P=[],U=[];function W(t){throw C.error("Unclosed "+t,j)}return{back:function(t){U.push(t)},endOfFile:function(){return 0===U.length&&j>=F},nextToken:function(C){if(U.length)return U.pop();if(!(j>=F)){var I=!!C&&C.ignoreUnclosed;switch(M=N.charCodeAt(j)){case n:case s:case a:case h:case o:_=j;do{_+=1,M=N.charCodeAt(_)}while(M===s||M===n||M===a||M===h||M===o);T=["space",N.slice(j,_)],j=_-1;break;case u:case l:case d:case v:case g:case p:case f:var z=String.fromCharCode(M);T=[z,z,j];break;case c:if(L=P.length?P.pop()[1]:"",B=N.charCodeAt(j+1),"url"===L&&B!==t&&B!==e&&B!==s&&B!==n&&B!==a&&B!==o&&B!==h){_=j;do{if(A=!1,-1===(_=N.indexOf(")",_+1))){if(D||I){_=j;break}W("bracket")}for(E=_;N.charCodeAt(E-1)===r;)E-=1,A=!A}while(A);T=["brackets",N.slice(j,_+1),j,_],j=_}else _=N.indexOf(")",j+1),x=N.slice(j,_+1),-1===_||S.test(x)?T=["(","(",j]:(T=["brackets",x,j,_],j=_);break;case t:case e:O=M===t?"'":'"',_=j;do{if(A=!1,-1===(_=N.indexOf(O,_+1))){if(D||I){_=j+1;break}W("string")}for(E=_;N.charCodeAt(E-1)===r;)E-=1,A=!A}while(A);T=["string",N.slice(j,_+1),j,_],j=_;break;case w:y.lastIndex=j+1,y.test(N),_=0===y.lastIndex?N.length-1:y.lastIndex-2,T=["at-word",N.slice(j,_+1),j,_],j=_;break;case r:for(_=j,R=!0;N.charCodeAt(_+1)===r;)_+=1,R=!R;if(M=N.charCodeAt(_+1),R&&M!==i&&M!==s&&M!==n&&M!==a&&M!==h&&M!==o&&(_+=1,k.test(N.charAt(_)))){for(;k.test(N.charAt(_+1));)_+=1;N.charCodeAt(_+1)===s&&(_+=1)}T=["word",N.slice(j,_+1),j,_],j=_;break;default:M===i&&N.charCodeAt(j+1)===m?(0===(_=N.indexOf("*/",j+2)+1)&&(D||I?_=N.length:W("comment")),T=["comment",N.slice(j,_+1),j,_],j=_):(b.lastIndex=j+1,b.test(N),_=0===b.lastIndex?N.length-1:b.lastIndex-2,T=["word",N.slice(j,_+1),j,_],P.push(T),j=_)}return j++,T}},position:function(){return j}}}}function Oi(){if(Gr)return Hr;Gr=1;var t=yi(),e=mi(),r=gi(),i=Ii(),n=xi(),s=_i(),o={empty:!0,space:!0};return Hr=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&&(e=h[h.length-1],s.source.end=this.getPosition(e[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,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}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(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[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++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.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,h,u=r.length,l="",c=!0,f=0;f<u;f+=1)"space"!==(s=(n=r[f])[0])||f!==u-1||i?"comment"===s?(h=r[f-1]?r[f-1][0]:"empty",a=r[f+1]?r[f+1][0]:"empty",o[h]||o[a]||","===l.slice(-1)?c=!1:l+=n[1]):l+=n[1]:c=!1;if(!c){var d=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:d,value:l}}t[e]=l}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;i<t.length;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 Ti(){if(Jr)return Vr;Jr=1;var t=wi(),e=Ci(),r=Oi();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 Vr=i,i.default=i,t.registerParse(i),Vr}function Ai(){if(Zr)return Yr;Zr=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Yr=t,t.default=t,Yr}function Ei(){if(Kr)return Xr;Kr=1;var t=Ai();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 Xr=e,e.default=e,Xr}function Bi(){if(ti)return Qr;ti=1;var t={};return Qr=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Li(){if(ri)return ei;ri=1;var t=wi(),i=bi(),n=Ri(),s=Ti(),o=Ei(),a=Ii(),h=dr(),{isClean:u,my:l}=vi(),c=Bi(),f={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},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function y(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>y(t))),t}var b={};class S{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 S||i instanceof o)a=y(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[l]&&t.rebuild(a)}else a=y(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,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(!v[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;e<t.plugins.length;e++){var r=t.plugins[e],i=t.runOnRoot(r);if(m(i))try{yield i}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var n=t.result.root;!n[u];){n[u]=!0;for(var s=[w(n)];s.length>0;){var o=t.visitTick(s);if(m(o))try{yield o}catch(e){var a=s[s.length-1].node;throw t.handleError(e,a)}}}if(t.listeners.OnceExit){var h=function*(e){t.result.lastPlugin=l;try{if("document"===n.type){var r=n.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(n,t.helpers)}catch(e){throw t.handleError(e)}};for(var[l,c]of t.listeners.OnceExit)yield*h(c)}}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 m(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=new n(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins){if(m(this.runOnRoot(t)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!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,i]of t){this.result.lastPlugin=r;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(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&e.visitorIndex<i.length){var[n,s]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var o,a=e.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[u])return o[u]=!0,void t.push(w(o));e.iterator=0,delete r.indexes[a]}for(var h=e.events;e.eventIndex<h.length;){var l=h[e.eventIndex];if(e.eventIndex+=1,l===p)return void(r.nodes&&r.nodes.length&&(r[u]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[u]=!0;var e=g(t);for(var r of e)if(r===p)t.nodes&&t.each((t=>{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},ei=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),ei}function Ni(){if(oi)return si;oi=1;var t=bi(),e=Li(),r=function(){if(ni)return ii;ni=1;var t=Ri(),e=Ti(),r=Ei(),i=dr(),n=Bi();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){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get:()=>h.root});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.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 ii=s,s.default=s,ii}(),i=Ii();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",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 si=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),si}function Di(){if(hi)return ai;hi=1;var t=yi(),e=mi(),n=wi(),s=cr(),o=gi(),u=bi(),l=function(){if(Ur)return Pr;Ur=1;var t=yi(),e=mi(),n=gi(),s=Ci(),o=ki(),u=Ii(),l=xi();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,a);if(v)for(var m of(d=[],v)){var g=r({},m,{__proto__:s.prototype});g.map&&(g.map=r({},g.map,{__proto__:o.prototype})),d.push(g)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var w=p.source,{inputId:y}=w,b=i(w,h);p.source=b,null!=y&&(p.source.input=d[y])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return Pr=c,c.default=c,Pr}(),c=Ci(),f=Li(),d=Mi(),v=pi(),p=Ti(),m=Ni(),g=Ei(),w=Ii(),y=xi(),b=dr(),S=Ai();function k(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}return k.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 m).version,r}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new o(t),k.rule=t=>new y(t),k.root=t=>new w(t),k.document=t=>new u(t),k.CssSyntaxError=s,k.Declaration=o,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=g,k.Input=c,k.Rule=y,k.Root=w,k.Node=v,f.registerPostcss(k),ai=k,k.default=k,ai}!function(){if(fi)return ci;fi=1;var{Input:t}=Di(),e=function(){if(li)return ui;li=1;var t=mi(),e=Oi(),r=_i();return ui=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=""}}}();ci=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}();var Fi=Qe(Di());Fi.stringify,Fi.fromJSON,Fi.plugin,Fi.parse,Fi.list,Fi.document,Fi.comment,Fi.atRule,Fi.rule,Fi.decl,Fi.root,Fi.CssSyntaxError,Fi.Declaration,Fi.Container,Fi.Processor,Fi.Document,Fi.Comment,Fi.Warning,Fi.AtRule,Fi.Result,Fi.Input,Fi.Rule,Fi.Root,Fi.Node;class ji{constructor(){Ke(this,"parentElement",null),Ke(this,"parentNode",null),Ke(this,"ownerDocument"),Ke(this,"firstChild",null),Ke(this,"lastChild",null),Ke(this,"previousSibling",null),Ke(this,"nextSibling",null),Ke(this,"ELEMENT_NODE",1),Ke(this,"TEXT_NODE",3),Ke(this,"nodeType"),Ke(this,"nodeName"),Ke(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof ji))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"}}var Pi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ui={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Wi={};function $i(t){if(Wi[t])return Wi[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 Pi?Pi[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 Ui?Ui[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 Wi[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?Wi[t]=u:r}catch(t){return r}}var zi={};function qi(t,e,r){var i,n=t+"."+String(r);if(zi[n])return zi[n].call(e);var s=$i(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(zi[n]=o,o.call(e)):e[r]}var Hi={};function Gi(t,e,r){var i=t+"."+String(r);if(Hi[i])return Hi[i].bind(e);var n=$i(t)[r];return"function"!=typeof n?e[r]:(Hi[i]=n,n.bind(e))}function Vi(){return $i("MutationObserver").constructor}function Ji(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}var Yi={childNodes:function(t){return qi("Node",t,"childNodes")},parentNode:function(t){return qi("Node",t,"parentNode")},parentElement:function(t){return qi("Node",t,"parentElement")},textContent:function(t){return qi("Node",t,"textContent")},contains:function(t,e){return Gi("Node",t,"contains")(e)},getRootNode:function(t){return Gi("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?qi("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?qi("Element",t,"shadowRoot"):null},querySelector:function(t,e){return qi("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return qi("Element",t,"querySelectorAll")(e)},mutationObserver:Vi,patch:Ji};function Zi(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}var Xi="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.",Ki={map:{},getId:()=>(console.error(Xi),-1),getNode:()=>(console.error(Xi),null),removeNodeFromMap(){console.error(Xi)},has:()=>(console.error(Xi),!1),reset(){console.error(Xi)}};function Qi(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;a<s;a++)o[a]=arguments[a];var h=Date.now();n||!1!==r.leading||(n=h);var u=e-(h-n),l=this;u<=0||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 tn(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){setTimeout((()=>{r.set.call(this,t)}),0),s&&s.set&&s.set.call(this,t)}}),()=>tn(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ki=new Proxy(Ki,{get:(t,e,r)=>("map"===e&&console.error(Xi),Reflect.get(t,e,r))}));var en=Date.now;function rn(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=Yi.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=Yi.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function nn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function sn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function on(t){return t?t.nodeType===t.ELEMENT_NODE?t:Yi.parentElement(t):null}function an(t,e,r,i){if(!t)return!1;var n=on(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(it(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 hn(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===V}function un(t,e){if(M(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=Yi.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||un(i,e))}function ln(t){return Boolean(t.changedTouches)}function cn(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function fn(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function dn(t){return!!t&&(t instanceof ji&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(Yi.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(en=()=>(new Date).getTime());class vn{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(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 pn(t){var e,r=null;return"getRootNode"in t&&(null==(e=Yi.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Yi.host(Yi.getRootNode(t))&&(r=Yi.host(Yi.getRootNode(t))),r}function mn(t){var e=t.ownerDocument;if(!e)return!1;var r=function(t){for(var e,r=t;e=pn(r);)r=e;return r}(t);return Yi.contains(e,r)}function gn(t){var e=t.ownerDocument;return!!e&&(Yi.contains(e,t)||mn(t))}var wn=(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))(wn||{}),yn=(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))(yn||{}),bn=(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))(bn||{}),Sn=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Sn||{}),kn=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(kn||{}),Cn=(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))(Cn||{}),In=(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))(In||{});function Mn(t){return"__ln"in t}class xn{constructor(){c(this,"length",0),c(this,"head",null),c(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;r<t;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&&Mn(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&&Mn(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 Rn,_n=(t,e)=>t+"@"+e;class On{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),c(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var t=[],e=new Set,r=new xn,i=t=>{for(var e=t,r=V;r===V;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=Yi.parentNode(n);if(s&&gn(n)&&"TEXTAREA"!==s.tagName){var o=M(s)?this.mirror.getId(pn(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=ct(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{cn(t,this.mirror)&&this.iframeManager.addIframe(t),fn(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),dn(n)&&this.shadowDomManager.addShadowRoot(Yi.shadowRoot(n),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},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)An(this.removesSubTreeCache,s,this.mirror)&&!this.movedSet.has(Yi.parentNode(s))||n(s);for(var o of this.addedSet)En(this.droppedSet,o)||An(this.removesSubTreeCache,o,this.mirror)?En(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(Yi.parentNode(a.value)),l=i(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var c=r.tail;c;){var f=c;if(c=c.previous,f){var d=this.mirror.getId(Yi.parentNode(f.value));if(-1===i(f.value))continue;if(-1!==d){h=f;break}var v=f.value,p=Yi.parentNode(v);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var m=Yi.host(p);if(-1!==this.mirror.getId(m)){h=f;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}a=h.previous,r.removeNode(h.value),n(h.value)}var g={texts:this.texts.map((t=>{var e=t.node,r=Yi.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{attributes:e}=t;if("string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);r.length<e.style.length&&(r+i).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(g))}})),c(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(e),this.attributeMap.set(t,e)),e.attributes.value=Array.from(Yi.childNodes(t),(t=>Yi.textContent(t)||"")).join("")})),c(this,"processMutation",(t=>{if(!hn(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=Yi.textContent(t.target);an(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:nt(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,on(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if("value"===i){var s=B(r);n=T({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(an(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var o=this.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!this.keepIframeSrcFn(n)){if(r.contentDocument)return;i="rr_src"}if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!rt(r.tagName,i))if(o.attributes[i]=et(this.doc,A(r.tagName),A(i),n,r,this.dataURLOptions),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var a=this.unattachedDoc.createElement("span");for(var h of(t.oldValue&&a.setAttribute("style",t.oldValue),Array.from(r.style))){var u=r.style.getPropertyValue(h),l=r.style.getPropertyPriority(h);u!==a.style.getPropertyValue(h)||l!==a.style.getPropertyPriority(h)?o.styleDiff[h]=""===l?u:[u,l]:o._unchangedStyles[h]=[u,l]}for(var c of Array.from(a.style))""===r.style.getPropertyValue(c)&&(o.styleDiff[c]=!1)}else"open"===i&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break;case"childList":if(an(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=M(t.target)?this.mirror.getId(Yi.host(t.target)):this.mirror.getId(t.target);an(t.target,this.blockClass,this.blockSelector,!1)||hn(e,this.mirror,this.slimDOMOptions)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Tn(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||un(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[_n(r,i)]?Tn(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!M(t.target)||!x(t.target))||void 0}),function(t,e){var r=[t];for(;r.length;){var i=r.pop();e.has(i)||(e.add(i),Yi.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),c(this,"genAdds",((t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(hn(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[_n(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);an(t,this.blockClass,this.blockSelector,!1)||(Yi.childNodes(t).forEach((t=>this.genAdds(t))),dn(t)&&Yi.childNodes(Yi.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}))}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((e=>{this[e]=t[e]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function Tn(t,e){t.delete(e),Yi.childNodes(e).forEach((e=>Tn(t,e)))}function An(t,e,r){return 0!==t.size&&function(t,e,r){var i=Yi.parentNode(e);return!!i&&t.has(i)}(t,e)}function En(t,e){return 0!==t.size&&Bn(t,e)}function Bn(t,e){var r=Yi.parentNode(e);return!!r&&(!!t.has(r)||Bn(t,r))}var Ln=t=>{if(!Rn)return t;return function(){try{return t(...arguments)}catch(t){if(Rn&&!0===Rn(t))return;throw t}}},Nn=[];function Dn(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 Fn(t,e){var r=new On;Nn.push(r),r.init(t);var i=new(Vi())(Ln(r.processMutations.bind(r)));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function jn(t){var{mouseInteractionCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,sampling:a}=t;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(bn).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=A(t),h=(t=>i=>{var a=Dn(i);if(!an(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=Sn.Mouse;break;case"touch":h=Sn.Touch;break;case"pen":h=Sn.Pen}h===Sn.Touch?bn[t]===bn.MouseDown?u="TouchStart":bn[t]===bn.MouseUp&&(u="TouchEnd"):Sn.Pen}else ln(i)&&(h=Sn.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===Sn.Touch||u.startsWith("Mouse")&&h===Sn.Mouse)&&(h=null)):bn[t]===bn.Click&&(h=l,l=null);var c=ln(i)?i.changedTouches[0]:i;if(c){var f=n.getId(a),{clientX:d,clientY:v}=c;Ln(e)(r({type:bn[u],id:f,x:d,y:v},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(bn[t]){case bn.MouseDown:case bn.MouseUp:a=a.replace("mouse","pointer");break;case bn.TouchStart:case bn.TouchEnd:return}u.push(Zi(a,h,i))})),Ln((()=>{u.forEach((t=>t()))}))}function Pn(t){var{scrollCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,sampling:o}=t;return Zi("scroll",Ln(Qi(Ln((t=>{var o=Dn(t);if(o&&!an(o,n,s,!0)){var a=i.getId(o);if(o===r&&r.defaultView){var h=rn(r.defaultView);e({id:a,x:h.left,y:h.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}})),o.scroll||100)),r)}var Un=["INPUT","TEXTAREA","SELECT"],Wn=new WeakMap;function $n(t){return function(t,e){if(Gn("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Gn("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Gn("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Gn("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){var r=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(r)}else if(t.parentStyleSheet){var i=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(i)}return e}(t,[])}function zn(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function qn(t,e){var r,i,n,{mirror:s,stylesheetManager:o}=t,a=null;a="#document"===e.nodeName?s.getId(e):s.getId(Yi.host(e));var h="#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,u=(null==h?void 0:h.prototype)?Object.getOwnPropertyDescriptor(null==h?void 0:h.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&h&&u?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var t;return null==(t=u.get)?void 0:t.call(this)},set(t){var e,r=null==(e=u.set)?void 0:e.call(this,t);if(null!==a&&-1!==a)try{o.adoptStyleSheets(t,a)}catch(t){}return r}}),Ln((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))):()=>{}}function Hn(t,e){void 0===e&&(e={});var i,n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){var{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:h,styleSheetRuleCb:u,styleDeclarationCb:l,canvasMutationCb:c,fontCb:f,selectionCb:d,customElementCb:v}=t;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),c(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),f(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),d(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),v(...arguments)}}(t,e),t.recordDOM&&(i=Fn(t,t.doc));var s=function(t){var{mousemoveCb:e,sampling:r,doc:i,mirror:n}=t;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=Qi(Ln((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=Ln(Qi(Ln((t=>{var e=Dn(t),{clientX:r,clientY:i}=ln(t)?t.changedTouches[0]:t;s||(s=en()),h.push({x:r,y:i,id:n.getId(e),timeOffset:en()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?yn.Drag:t instanceof MouseEvent?yn.MouseMove:yn.TouchMove)})),o,{trailing:!1})),c=[Zi("mousemove",l,i),Zi("touchmove",l,i),Zi("drag",l,i)];return Ln((()=>{c.forEach((t=>t()))}))}(t),o=jn(t),a=Pn(t),h=function(t,e){var{viewportResizeCb:r}=t,{win:i}=e,n=-1,s=-1;return Zi("resize",Ln(Qi(Ln((()=>{var t=nn(),e=sn();n===t&&s===e||(r({width:Number(e),height:Number(t)}),n=t,s=e)})),200)),i)}(t,{win:n}),u=function(t){var{inputCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,ignoreClass:a,ignoreSelector:h,maskInputOptions:u,maskInputFn:l,sampling:c,userTriggeredOnInput:f}=t;function d(t){var e=Dn(t),r=t.isTrusted,n=e&&e.tagName;if(e&&"OPTION"===n&&(e=Yi.parentElement(e)),e&&n&&!(Un.indexOf(n)<0)&&!an(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var c=e.value,d=!1,p=B(e)||"";"radio"===p||"checkbox"===p?d=e.checked:(u[n.toLowerCase()]||u[p])&&(c=T({element:e,maskInputOptions:u,tagName:n,type:p,value:c,maskInputFn:l})),v(e,f?{text:c,isChecked:d,userTriggered:r}:{text:c,isChecked:d});var m=e.name;"radio"===p&&m&&d&&i.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!d,userTriggered:!1}:{text:r,isChecked:!d})}}))}}function v(t,i){var s=Wn.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){Wn.set(t,i);var o=n.getId(t);Ln(e)(r({},i,{id:o}))}}var p=("last"===c.input?["change"]:["input","change"]).map((t=>Zi(t,Ln(d),i))),m=i.defaultView;if(!m)return()=>{p.forEach((t=>t()))};var g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),w=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...w.map((t=>tn(t[0],t[1],{set(){Ln(d)({target:this,isTrusted:!1})}},!1,m)))),Ln((()=>{p.forEach((t=>t()))}))}(t),l=function(t){var{mediaInteractionCb:e,blockClass:r,blockSelector:i,mirror:n,sampling:s,doc:o}=t,a=Ln((t=>Qi(Ln((s=>{var o=Dn(s);if(o&&!an(o,r,i,!0)){var{currentTime:a,volume:h,muted:u,playbackRate:l,loop:c}=o;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:c})}})),s.media||500))),h=[Zi("play",a(Cn.Play),o),Zi("pause",a(Cn.Pause),o),Zi("seeked",a(Cn.Seeked),o),Zi("volumechange",a(Cn.VolumeChange),o),Zi("ratechange",a(Cn.RateChange),o)];return Ln((()=>{h.forEach((t=>t()))}))}(t),c=()=>{},f=()=>{},d=()=>{},v=()=>{};t.recordDOM&&(c=function(t,e){var{styleSheetRuleCb:r,mirror:i,stylesheetManager:n}=t,{win:s}=e;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Ln(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=zn(e,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:a}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){void 0===r&&(r=this.cssRules.length);var i=t+" { "+e+" }";return s.CSSStyleSheet.prototype.insertRule.apply(this,[i,r])};var a,h,u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:o}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replace:o}),t.apply(e,s)}))})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replaceSync:o}),t.apply(e,s)}))}));var l={};Vn("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Vn("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Vn("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Vn("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(l).forEach((t=>{var[e,s]=t;c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:Ln(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=zn(e.parentStyleSheet,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:[...$n(e),a||0]}]}),t.apply(e,s)}))}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e.parentStyleSheet,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:[...$n(e),o]}]}),t.apply(e,s)}))})})),Ln((()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=u,a&&(s.CSSStyleSheet.prototype.replace=a),h&&(s.CSSStyleSheet.prototype.replaceSync=h),Object.entries(l).forEach((t=>{var[e,r]=t;r.prototype.insertRule=c[e].insertRule,r.prototype.deleteRule=c[e].deleteRule}))}))}(t,{win:n}),f=qn(t,t.doc),d=function(t,e){var{styleDeclarationCb:r,mirror:i,ignoreCSSAttributes:n,stylesheetManager:s}=t,{win:o}=e,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Ln(((t,e,o)=>{var h,[u,l,c]=o;if(n.has(u))return a.apply(e,[u,l,c]);var{id:f,styleId:d}=zn(null==(h=e.parentRule)?void 0:h.parentStyleSheet,i,s.styleMirror);return(f&&-1!==f||d&&-1!==d)&&r({id:f,styleId:d,set:{property:u,value:l,priority:c},index:$n(e.parentRule)}),t.apply(e,o)}))});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:Ln(((t,e,o)=>{var a,[u]=o;if(n.has(u))return h.apply(e,[u]);var{id:l,styleId:c}=zn(null==(a=e.parentRule)?void 0:a.parentStyleSheet,i,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,remove:{property:u},index:$n(e.parentRule)}),t.apply(e,o)}))}),Ln((()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h}))}(t,{win:n}),t.collectFonts&&(v=function(t){var{fontCb:e,doc:r}=t,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=Ji(r.fonts,"add",(function(t){return function(r){return setTimeout(Ln((()=>{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),Ln((()=>{n.forEach((t=>t()))}))}(t)));var p=function(t){var{doc:e,mirror:r,blockClass:i,blockSelector:n,selectionCb:s}=t,o=!0,a=Ln((()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;u<h;u++){var l=t.getRangeAt(u),{startContainer:c,startOffset:f,endContainer:d,endOffset:v}=l;an(c,i,n,!0)||an(d,i,n,!0)||a.push({start:r.getId(c),startOffset:f,end:r.getId(d),endOffset:v})}s({ranges:a})}}));return a(),Zi("selectionchange",a)}(t),m=function(t){var{doc:e,customElementCb:r}=t,i=e.defaultView;return i&&i.customElements?Ji(i.customElements,"define",(function(t){return function(e,i,n){try{r({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return t.apply(this,[e,i,n])}})):()=>{}}(t),g=[];for(var w of t.plugins)g.push(w.observer(w.callback,n,w.options));return Ln((()=>{Nn.forEach((t=>t.destroy())),Nn.forEach((t=>t.reset())),null==i||i.disconnect(),s(),o(),a(),h(),u(),l(),c(),f(),d(),v(),p(),m(),g.forEach((t=>t())),Nn.length=0}))}function Gn(t){return void 0!==window[t]}function Vn(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Jn{constructor(t){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){var n=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),o=n.get(e);return o||(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i=r||this.getRemoteIdToIdMap(t);if("number"!=typeof e)return e;var n=i.get(e);return n||-1}getRemoteIds(t,e){var r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class Yn{constructor(t){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new Jn(J)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),c(this,"messageHandler"),c(this,"nestedIframeListeners",new Map),c(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Jn(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)}addLoadListener(t){this.loadListener=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);this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var n=t.contentWindow;if(this.recordCrossOriginIframes&&n&&!this.nestedIframeListeners.has(n)){var s=this.handleMessage.bind(this);this.nestedIframeListeners.set(n,s),n.addEventListener("message",s)}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 wn.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:wn.IncrementalSnapshot,data:{source:yn.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case wn.Meta:case wn.Load:case wn.DomContentLoaded:return!1;case wn.Plugin:return e;case wn.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case wn.IncrementalSnapshot:switch(e.data.source){case yn.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 yn.Drag:case yn.TouchMove:case yn.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case yn.ViewportResize:return!1;case yn.MediaInteraction:case yn.MouseInteraction:case yn.Scroll:case yn.CanvasMutation:case yn.Input:return this.replaceIds(e.data,t,["id"]),e;case yn.StyleSheetRule:case yn.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case yn.Font:return e;case yn.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case yn.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])&&(Array.isArray(e[n])?e[n]=t.getIds(r,e[n]):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===In.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.mirror.getNode(t);if(r){var i=r.contentWindow;if(i&&this.nestedIframeListeners.has(i)){var n=this.nestedIframeListeners.get(i);i.removeEventListener("message",n),this.nestedIframeListeners.delete(i)}i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r)}e&&this.attachedIframes.delete(t)}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var{content:r}=t;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&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{e.removeEventListener("message",t)})),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap}}class Zn{constructor(t){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(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){if(x(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var i=Fn(r({},this.bypassOptions,{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push((()=>i.disconnect())),this.restoreHandlers.push(Pn(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(Yi.host(t))),this.restoreHandlers.push(qn({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(Ji(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=Yi.shadowRoot(this);return s&&gn(this)&&r.addShadowRoot(s,e),n}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Qn=0;Qn<64;Qn++)Kn[Xn.charCodeAt(Qn)]=Qn;var ts=new Map;var es=(t,e,r)=>{if(t&&(ns(t,e)||"object"==typeof t)){var i=function(t,e){var r=ts.get(t);return r||(r=new Map,ts.set(t,r)),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 rs(t,e,r,i){if(t instanceof Array)return t.map((t=>rs(t,e,r,i)));if(null===t)return t;if(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)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;e<i;e+=3)n+=Xn[r[e]>>2],n+=Xn[(3&r[e])<<4|r[e+1]>>4],n+=Xn[(15&r[e+1])<<2|r[e+2]>>6],n+=Xn[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)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[rs(t.buffer,e,r,i),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){var n=t.constructor.name,{src:s}=t;return{rr_type:n,src:s}}if(t instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}}return t instanceof ImageData?{rr_type:t.constructor.name,args:[rs(t.data,e,r,i),t.width,t.height]}:ns(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:es(t,e,r)}:t}var is=(t,e,r,i)=>t.map((t=>rs(t,e,r,i))),ns=(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])))};function ss(t,e,r,i){var n=[];try{var s=Ji(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(n){for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;a<s;a++)o[a-1]=arguments[a];if(!an(this,e,r,!0)){var h=function(t){return"experimental-webgl"===t?"webgl":t}(n);if("__context"in this||(this.__context=h),i&&["webgl","webgl2"].includes(h))if(o[0]&&"object"==typeof o[0]){var u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return t.apply(this,[n,...o])}}));n.push(s)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((t=>t()))}}function os(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=Ji(t,h,(function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var c=t.apply(this,u);if(es(c,s,this),"tagName"in this.canvas&&!an(this.canvas,i,n,!0)){var f=is(u,s,this,o),d={type:e,property:h,args:f};r(this.canvas,d)}return c}}));a.push(u)}catch(i){var l=tn(t,h,{set(t){r(this.canvas,{type:e,property:h,args:[t],setter:!0})}});a.push(l)}};for(var l of h)u(l);return a}var as,hs,us,ls='(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 lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n',cs="undefined"!=typeof self&&self.Blob&&new Blob([ls],{type:"text/javascript;charset=utf-8"});function fs(t){var e;try{if(!(e=cs&&(self.URL||self.webkitURL).createObjectURL(cs)))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(ls),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class ds{constructor(t){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(this,"rafIdTimestamp",null),c(this,"rafIdFlush",null),c(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{sampling:e="all",win:r,blockClass:i,blockSelector:n,recordCanvas:s,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&"all"===e&&this.initCanvasMutationObserver(r,i,n,o),s&&"number"==typeof e&&this.initCanvasFPSObserver(e,r,i,n,{dataURLOptions:o})}reset(){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,a=ss(r,i,n,!0),h=new Map,u=new fs;u.onmessage=t=>{var{id:e}=t.data;if(h.set(e,!1),"base64"in t.data){var{base64:r,type:i,width:n,height:s}=t.data;this.mutationCb({id:e,type:kn["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var l,c=1e3/t,f=0,d=t=>{var a,v;f&&t-f<c?l=requestAnimationFrame(d):(f=t,(a=[],v=t=>{t.querySelectorAll("canvas").forEach((t=>{an(t,i,n,!0)||a.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&v(t.shadowRoot)}))},v(r.document),a).forEach(function(){var t=e((function*(t){var e,r=o.mirror.getId(t);if(!h.get(r)&&0!==t.width&&0!==t.height){if(h.set(r,!0),["webgl","webgl2"].includes(t.__context)){var i=t.getContext(t.__context);!1===(null==(e=null==i?void 0:i.getContextAttributes())?void 0:e.preserveDrawingBuffer)&&i.clear(i.COLOR_BUFFER_BIT)}var n=t.clientWidth||t.width,a=t.clientHeight||t.height,l=yield createImageBitmap(t,{resizeWidth:n,resizeHeight:a});u.postMessage({id:r,bitmap:l,width:n,height:a,dataURLOptions:s.dataURLOptions},[l])}}));return function(e){return t.apply(this,arguments)}}()),l=requestAnimationFrame(d))};l=requestAnimationFrame(d),this.resetObservers=()=>{a(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=ss(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=Ji(e.CanvasRenderingContext2D.prototype,o,(function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;u<a;u++)h[u]=arguments[u];return an(this.canvas,r,i,!0)||setTimeout((()=>{var r=is(h,e,this,n);t(this.canvas,{type:kn["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(r){var h=tn(e.CanvasRenderingContext2D.prototype,o,{set(e){t(this.canvas,{type:kn["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 s.push(...os(e.WebGLRenderingContext.prototype,kn.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...os(e.WebGL2RenderingContext.prototype,kn.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,u))),{type:s}=r[0];this.mutationCb({id:e,type:s,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class vs{constructor(t){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new vn),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}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;r.styleMirror.has(t)?e=r.styleMirror.getId(t):(e=r.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:_(e,t.href),index:r})))})),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}trackStylesheetInLinkElement(t){}}class ps{constructor(){c(this,"nodeMap",new WeakMap),c(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 ms=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var gs=document.createElement("iframe");document.body.appendChild(gs),Array.from=(null==(n=gs.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(gs)}}catch(t){console.debug("Unable to override Array.from",t)}var ws,ys,bs=new O;function Ss(t){void 0===t&&(t={});var{emit:e,checkoutEveryNms:i,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:h=null,maskTextClass:u="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:g,packFn:w,sampling:y={},dataURLOptions:b={},mousemoveWait:S,recordDOM:k=!0,recordCanvas:C=!1,recordCrossOriginIframes:I=!1,recordAfter:M=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:R=!1,inlineImages:_=!1,plugins:T,keepIframeSrcFn:A=(()=>!1),ignoreCSSAttributes:E=new Set([]),errorHandler:B}=t;Rn=B;var L=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},b),N=!I||window.parent===window,D=!1;if(!N)try{window.parent.document&&(D=!1)}catch(t){D=!0}if(N&&!e)throw new Error("emit function is required");if(!N&&!D)return()=>{};void 0!==S&&void 0===y.mousemove&&(y.mousemove=S),bs.reset();var F,j=!0===f?{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!==d?d:{password:!0},P=!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===v,headMetaDescKeywords:"all"===v,headTitleMutations:"all"===v}:v||{};!function(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var U=0,W=t=>{for(var e of T||[])e.eventProcessor&&(t=e.eventProcessor(t));return w&&!D&&(t=w(t)),t};as=(t,r)=>{var s,o=t;if(o.timestamp=en(),!(null==(s=Nn[0])?void 0:s.isFrozen())||o.type===wn.FullSnapshot||o.type===wn.IncrementalSnapshot&&o.data.source===yn.Mutation||Nn.forEach((t=>t.unfreeze())),N)null==e||e(W(o),r);else if(D){var a={type:"rrweb",event:W(o),origin:window.location.origin,isCheckout:r};window.parent.postMessage(a,"*")}if(o.type===wn.FullSnapshot)F=o,U=0;else if(o.type===wn.IncrementalSnapshot){if(o.data.source===yn.Mutation&&o.data.isAttachIframe)return;U++;var h=n&&U>=n,u=i&&o.timestamp-F.timestamp>i;(h||u)&&hs(!0)}};var z=t=>{if(I&&t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null;t.removes.forEach((t=>{var{id:r}=t;e&&e.has(r)||V.removeIframeById(r)}))}as({type:wn.IncrementalSnapshot,data:r({source:yn.Mutation},t)})},q=t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.Scroll},t)}),H=t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.CanvasMutation},t)}),G=new vs({mutationCb:z,adoptedStyleSheetCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.AdoptedStyleSheet},t)})}),V=new Yn({mirror:bs,mutationCb:z,stylesheetManager:G,recordCrossOriginIframes:I,wrappedEmit:as});for(var J of T||[])J.getMirror&&J.getMirror({nodeMirror:bs,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});var Y=new ps;us=new ds({recordCanvas:C,mutationCb:H,win:window,blockClass:s,blockSelector:o,mirror:bs,sampling:y.canvas,dataURLOptions:L});var Z=new Zn({mutationCb:z,scrollCb:q,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:j,dataURLOptions:L,maskTextFn:m,maskInputFn:p,recordCanvas:C,inlineImages:_,sampling:y,slimDOMOptions:P,iframeManager:V,stylesheetManager:G,canvasManager:us,keepIframeSrcFn:A,processedNodeManager:Y},mirror:bs});hs=function(t){if(void 0===t&&(t=!1),k){as({type:wn.Meta,data:{href:window.location.href,width:sn(),height:nn()}},t),G.reset(),Z.init(),Nn.forEach((t=>t.lock()));var e=function(t,e){var{mirror:r=new O,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:h=!1,recordCanvas:u=!1,maskAllInputs:l=!1,maskTextFn:c,maskInputFn:f,slimDOM:d=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:S=(()=>!1),maxDepth:k}=e||{};return ct(t,{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===l?{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===l?{password:!0}:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:v,inlineImages:h,recordCanvas:u,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1,maxDepth:k})}(document,{mirror:bs,blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:j,maskTextFn:m,maskInputFn:p,slimDOM:P,dataURLOptions:L,recordCanvas:C,inlineImages:_,onSerialize:t=>{cn(t,bs)&&V.addIframe(t),fn(t,bs)&&G.trackLinkElement(t),dn(t)&&Z.addShadowRoot(Yi.shadowRoot(t),document)},onIframeLoad:(t,e)=>{V.attachIframe(t,e),Z.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{G.attachLinkElement(t,e)},keepIframeSrcFn:A});if(!e)return console.warn("Failed to snapshot the document");as({type:wn.FullSnapshot,data:{node:e,initialOffset:rn(window)}},t),Nn.forEach((t=>t.unlock())),I&&V.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,bs.getId(document))}};try{var X=[],K=t=>{var e;return Ln(Hn)({mutationCb:z,mousemoveCb:(t,e)=>as({type:wn.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.MouseInteraction},t)}),scrollCb:q,viewportResizeCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.ViewportResize},t)}),inputCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.Input},t)}),mediaInteractionCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.MediaInteraction},t)}),styleSheetRuleCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.StyleSheetRule},t)}),styleDeclarationCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.StyleDeclaration},t)}),canvasMutationCb:H,fontCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.Font},t)}),selectionCb:t=>{as({type:wn.IncrementalSnapshot,data:r({source:yn.Selection},t)})},customElementCb:t=>{as({type:wn.IncrementalSnapshot,data:r({source:yn.CustomElement},t)})},blockClass:s,ignoreClass:a,ignoreSelector:h,maskTextClass:u,maskTextSelector:l,maskInputOptions:j,inlineStylesheet:c,sampling:y,recordDOM:k,recordCanvas:C,inlineImages:_,userTriggeredOnInput:x,collectFonts:R,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:A,blockSelector:o,slimDOMOptions:P,dataURLOptions:L,mirror:bs,iframeManager:V,stylesheetManager:G,shadowDomManager:Z,processedNodeManager:Y,canvasManager:us,ignoreCSSAttributes:E,plugins:(null==(e=null==T?void 0:T.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>as({type:wn.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},g)};V.addLoadListener((t=>{try{X.push(K(t.contentDocument))}catch(t){console.warn(t)}}));var Q=()=>{hs(),X.push(K(document)),ms=!0};return"interactive"===document.readyState||"complete"===document.readyState?Q():(X.push(Zi("DOMContentLoaded",(()=>{as({type:wn.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&Q()}))),X.push(Zi("load",(()=>{as({type:wn.Load,data:{}}),"load"===M&&Q()}),window))),()=>{X.forEach((t=>t())),Y.destroy(),V.removeLoadListener(),V.destroy(),bs.reset(),ms=!1,Rn=void 0}}catch(t){console.warn(t)}}Ss.addCustomEvent=(t,e)=>{if(!ms)throw new Error("please add custom event after start recording");as({type:wn.Custom,data:{tag:t,payload:e}})},Ss.freezePage=()=>{Nn.forEach((t=>t.freeze()))},Ss.takeFullSnapshot=t=>{if(!ms)throw new Error("please take full snapshot after start recording");hs(t)},Ss.mirror=bs,(ys=ws||(ws={}))[ys.NotStarted=0]="NotStarted",ys[ys.Running=1]="Running",ys[ys.Stopped=2]="Stopped";var{addCustomEvent:ks}=Ss,{freezePage:Cs}=Ss,{takeFullSnapshot:Is}=Ss,Ms=Object.defineProperty,xs=(t,e,r)=>((t,e,r)=>e in t?Ms(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);class Rs{constructor(t){xs(this,"fileName"),xs(this,"functionName"),xs(this,"lineNumber"),xs(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){var t=this.lineNumber||"",e=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+t+":"+e+")":this.fileName+":"+t+":"+e}}var _s=/(^|@)\S+:\d+/,Os=/^\s*at .*(\S+:\d+|\(native\))/m,Ts=/^(eval@)?(\[native code])?$/,As={parse:function(t){return t?void 0!==t.stacktrace||void 0!==t["opera#sourceloc"]?this.parseOpera(t):t.stack&&t.stack.match(Os)?this.parseV8OrIE(t):t.stack?this.parseFFOrSafari(t):[]:[]},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));if(!e)throw new Error("Cannot parse given url: "+t);return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter((function(t){return!!t.match(Os)}),this).map((function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var e=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=e.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(e=r?e.replace(r[0],""):e).split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:i.pop()),s=i.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Rs({functionName:s,fileName:o,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter((function(t){return!t.match(Ts)}),this).map((function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new Rs({functionName:t});var e=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(e),i=r&&r[1]?r[1]:void 0,n=this.extractLocation(t.replace(e,""));return new Rs({functionName:i,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split("\n"),i=[],n=2,s=r.length;n<s;n+=2){var o=e.exec(r[n]);o&&i.push(new Rs({fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera10:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),i=[],n=0,s=r.length;n<s;n+=2){var o=e.exec(r[n]);o&&i.push(new Rs({functionName:o[3]||void 0,fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera11:function(t){return t.stack.split("\n").filter((function(t){return!!t.match(_s)&&!t.match(/^Error created at/)}),this).map((function(t){var e=t.split("@"),r=this.extractLocation(e.pop()),i=(e.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Rs({functionName:i,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function Es(t){if(!t||!t.outerHTML)return"";for(var e="";t.parentElement;){var r=t.localName;if(!r)break;r=r.toLowerCase();var i=t.parentElement,n=[];if(i.children&&i.children.length>0)for(var s=0;s<i.children.length;s++){var o=i.children[s];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===r&&n.push(o)}n.length>1&&(r+=":eq("+n.indexOf(t)+")"),e=r+(e?">"+e:""),t=i}return e}function Bs(t){return Array.isArray(t)}function Ls(t){return"object"==typeof t&&null!==t&&!Bs(t)}function Ns(t,e){if(0===e)return!0;var r=Object.keys(t);for(var i of r)if(Ls(t[i])&&Ns(t[i],e-1))return!0;return!1}function Ds(t,e){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,e);var i=[],n=[];return JSON.stringify(t,(function(t,e){if(i.length>0){var s=i.indexOf(this);~s?i.splice(s+1):i.push(this),~s?n.splice(s,1/0,t):n.push(t),~i.indexOf(e)&&(e=i[0]===e?"[Circular ~]":"[Circular ~."+n.slice(0,i.indexOf(e)).join(".")+"]")}else i.push(e);if(null===e)return e;if(void 0===e)return"undefined";if(function(t){if(Ls(t)&&Object.keys(t).length>r.numOfKeysLimit)return!0;if("function"==typeof t)return!0;if(Ls(t)&&Ns(t,r.depthOfLimit))return!0;return!1}(e))return function(t){var e=t.toString();r.stringLengthLimit&&e.length>r.stringLengthLimit&&(e=e.slice(0,r.stringLengthLimit)+"...");return e}(e);if("bigint"==typeof e)return e.toString()+"n";if(e instanceof Event){var o={};for(var a in e){var h=e[a];Bs(h)?o[a]=Es(h.length?h[0]:null):o[a]=h}return o}return e instanceof Node?e instanceof HTMLElement?e?e.outerHTML:"":e.nodeName:e instanceof Error?e.stack?e.stack+"\nEnd of stack for Error object":e.name+": "+e.message:e}))}var Fs={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function js(t,e,r){var i,n=r?Object.assign({},Fs,r):Fs,s=n.logger;if(!s)return()=>{};i="string"==typeof s?e[s]:s;var o=0,a=!1,h=[];if(n.level.includes("error")){var u=e=>{var r=e.message,i=e.error,s=As.parse(i).map((t=>t.toString())),o=[Ds(r,n.stringifyOptions)];t({level:"error",trace:s,payload:o})};e.addEventListener("error",u),h.push((()=>{e.removeEventListener("error",u)}));var l=e=>{var r,i;e.reason instanceof Error?i=[Ds("Uncaught (in promise) "+(r=e.reason).name+": "+r.message,n.stringifyOptions)]:(r=new Error,i=[Ds("Uncaught (in promise)",n.stringifyOptions),Ds(e.reason,n.stringifyOptions)]);var s=As.parse(r).map((t=>t.toString()));t({level:"error",trace:s,payload:i})};e.addEventListener("unhandledrejection",l),h.push((()=>{e.removeEventListener("unhandledrejection",l)}))}for(var c of n.level)h.push(f(i,c));return()=>{h.forEach((t=>t()))};function f(e,r){var i=this;return e[r]?function(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}(e,r,(e=>function(){for(var s=arguments.length,h=new Array(s),u=0;u<s;u++)h[u]=arguments[u];if(e.apply(i,h),!("assert"===r&&h[0]||a)){a=!0;try{var l=As.parse(new Error).map((t=>t.toString())).splice(1),c=("assert"===r?h.slice(1):h).map((t=>Ds(t,n.stringifyOptions)));++o<n.lengthThreshold?t({level:r,trace:l,payload:c}):o===n.lengthThreshold&&t({level:"warn",trace:[],payload:[Ds("The number of log records reached the threshold.")]})}catch(t){e("rrweb logger error:",t,...h)}finally{a=!1}}})):()=>{}}}var Ps=t=>({name:"rrweb/console@1",observer:js,options:t}),Us="undefined"!=typeof window?window:void 0,Ws="undefined"!=typeof globalThis?globalThis:Us;"undefined"==typeof self&&(Ws.self=Ws),"undefined"==typeof File&&(Ws.File=function(){});var $s=Array.prototype.forEach,zs=null==Ws?void 0:Ws.navigator,qs=null==Ws?void 0:Ws.document;null==Ws||Ws.location,null==Ws||Ws.fetch,null!=Ws&&Ws.XMLHttpRequest&&"withCredentials"in new Ws.XMLHttpRequest&&Ws.XMLHttpRequest,null==Ws||Ws.AbortController,null==zs||zs.userAgent;var Hs=null!=Us?Us:{};var Gs=function(t){return t.trim()},Vs=Array.isArray,Js=Object.prototype,Ys=Js.hasOwnProperty,Zs=Js.toString,Xs=Vs||function(t){return"[object Array]"===Zs.call(t)},Ks=t=>"function"==typeof t,Qs=t=>t===Object(t)&&!Xs(t),to=t=>void 0===t,eo=t=>"[object String]"==Zs.call(t),ro=t=>null===t,io=t=>to(t)||ro(t),no=t=>"[object Number]"==Zs.call(t)&&t==t,so=t=>"[object Boolean]"===Zs.call(t),oo=t=>t instanceof FormData;function ao(t,e,r,i,n){return e>r&&(i.warn("min cannot be greater than max."),e=r),no(t)?t>r?(i.warn(" cannot be greater than max: "+r+". Using max value instead."),r):t<e?(i.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(i.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+n),ao(n||r,e,r,i))}class ho{constructor(t){this.t={},this.i=t.i,this.o=ao(t.bucketSize,0,100,t.h),this.u=ao(t.refillRate,0,this.o,t.h),this.v=ao(t.refillInterval,0,864e5,t.h)}m(t,e){var r=e-t.lastAccess,i=Math.floor(r/this.v);if(i>0){var n=i*this.u;t.tokens=Math.min(t.tokens+n,this.o),t.lastAccess=t.lastAccess+i*this.v}}consumeRateLimit(t){var e,r=Date.now(),i=String(t),n=this.t[i];return n?this.m(n,r):(n={tokens:this.o,lastAccess:r},this.t[i]=n),0===n.tokens||(n.tokens--,0===n.tokens&&(null==(e=this.i)||e.call(this,t)),0===n.tokens)}stop(){this.t={}}}var uo=t=>t instanceof Document,lo={LIB_VERSION:"1.347.2"},co=function(t,e){var{debugEnabled:r}=void 0===e?{}:e,i={S:function(e){if(Us&&(Hs.POSTHOG_DEBUG||r)&&!to(Us.console)&&Us.console){for(var i=("__rrweb_original__"in Us.console[e]?Us.console[e].__rrweb_original__:Us.console[e]),n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];i(t,...s)}},info:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];i.S("log",...e)},warn:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];i.S("warn",...e)},error:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];i.S("error",...e)},critical:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];console.error(t,...r)},uninitializedWarning:t=>{i.error("You must initialize PostHog before calling "+t)},createLogger:(e,r)=>co(t+" "+e,r)};return i},fo=co("[PostHog.js]"),vo=fo.createLogger,po={};function mo(t,e,r){if(!io(t)){if(Xs(t))return function(t,e,r){if(Xs(t))if($s&&t.forEach===$s)t.forEach(e,r);else if("length"in t&&t.length===+t.length)for(var i=0,n=t.length;i<n;i++)if(i in t&&e.call(r,t[i],i)===po)return}(t,e,r);if(oo(t)){for(var i of t.entries())if(e.call(r,i[1],i[0])===po)return}else for(var n in t)if(Ys.call(t,n)&&e.call(r,t[n],n)===po)return}}function go(t,e,r,i){var{capture:n=!1,passive:s=!0}={};null==t||t.addEventListener(e,r,{capture:n,passive:s})}var wo=["localhost","127.0.0.1"],yo=t=>{var e=null==qs?void 0:qs.createElement("a");return to(e)?null:(e.href=t,e)},bo=function(t,e){var r,i;void 0===e&&(e="&");var n=[];return mo(t,(function(t,e){to(t)||to(e)||"undefined"===e||(r=encodeURIComponent((t=>t instanceof File)(t)?t.name:t.toString()),i=encodeURIComponent(e),n[n.length]=i+"="+r)})),n.join(e)};function So(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return Ks(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}function ko(t,e){var r,i=function(t){try{return"string"==typeof t?new URL(t).hostname:"url"in t?new URL(t.url).hostname:t.hostname}catch(t){return null}}(t),n={hostname:i,isHostDenied:!1};if(null==(r=e.payloadHostDenyList)||!r.length||null==i||!i.trim().length)return n;for(var s of e.payloadHostDenyList)if(i.endsWith(s))return{hostname:i,isHostDenied:!0};return n}var Co="$session_recording_remote_config",Io="$session_is_sampled",Mo="$session_past_minimum_duration",xo="$session_recording_url_trigger_activated_session",Ro="$session_recording_event_trigger_activated_session",_o="$debug_first_full_snapshot_timestamp",Oo=new RegExp("(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})"),To=new RegExp("(\\d{3}-?\\d{2}-?\\d{4})");var Ao="[SessionRecording]",Eo="redacted",Bo={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:t=>t,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},Lo=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],No=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],Do=["/s/","/e/","/i/"];function Fo(t,e,r,i){if(io(t))return t;var n=(null==e?void 0:e["content-length"])||function(t){return new Blob([t]).size}(t);return eo(n)&&(n=parseInt(n)),n>r?Ao+" "+i+" body too large to record ("+n+" bytes)":t}function jo(t,e){if(io(t))return t;var r=t;return function(t,e){if(io(t))return!1;if(eo(t)){if(t=Gs(t),Oo.test((t||"").replace(/[- ]/g,"")))return!1;if(To.test(t))return!1}return!0}(r)||(r=Ao+" "+e+" body "+Eo),mo(No,(t=>{var i,n;null!=(i=r)&&i.length&&-1!==(null==(n=r)?void 0:n.indexOf(t))&&(r=Ao+" "+e+" body "+Eo+" as might contain: "+t)})),r}var Po=(t,e)=>{var i,n,s,o={payloadSizeLimitBytes:Bo.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...Bo.performanceEntryTypeToObserve],payloadHostDenyList:[...e.payloadHostDenyList||[],...Bo.payloadHostDenyList]},a=!1!==t.session_recording.recordHeaders&&e.recordHeaders,h=!1!==t.session_recording.recordBody&&e.recordBody,u=!1!==t.capture_performance&&e.recordPerformance,l=(i=o,s=Math.min(1e6,null!==(n=i.payloadSizeLimitBytes)&&void 0!==n?n:1e6),t=>(null!=t&&t.requestBody&&(t.requestBody=Fo(t.requestBody,t.requestHeaders,s,"Request")),null!=t&&t.responseBody&&(t.responseBody=Fo(t.responseBody,t.responseHeaders,s,"Response")),t)),c=e=>{return l(((t,e)=>{var r,i=yo(t.name),n=0===e.indexOf("http")?null==(r=yo(e))?void 0:r.pathname:e;"/"===n&&(n="");var s=null==i?void 0:i.pathname.replace(n||"","");if(!(i&&s&&Do.some((t=>0===s.indexOf(t)))))return t})((i=(r=e).requestHeaders,io(i)||mo(Object.keys(null!=i?i:{}),(t=>{Lo.includes(t.toLowerCase())&&(i[t]=Eo)})),r),t.api_host));var r,i},f=Ks(t.session_recording.maskNetworkRequestFn);return f&&Ks(t.session_recording.maskCapturedNetworkRequestFn)&&fo.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),f&&(t.session_recording.maskCapturedNetworkRequestFn=e=>{var i=t.session_recording.maskNetworkRequestFn({url:e.name});return r({},e,{name:null==i?void 0:i.url})}),o.maskRequestFn=Ks(t.session_recording.maskCapturedNetworkRequestFn)?e=>{var r,i=c(e);return i&&null!==(r=null==t.session_recording.maskCapturedNetworkRequestFn?void 0:t.session_recording.maskCapturedNetworkRequestFn(i))&&void 0!==r?r:void 0}:t=>function(t){if(!to(t))return t.requestBody=jo(t.requestBody,"Request"),t.responseBody=jo(t.responseBody,"Response"),t}(c(t)),r({},Bo,o,{recordHeaders:a,recordBody:h,recordPerformance:u,recordInitialRequests:u})},Uo=vo("[Recorder]"),Wo=t=>"navigation"===t.entryType,$o=t=>"resource"===t.entryType;function zo(t,e,r){if(r.recordInitialRequests){var i=e.performance.getEntries().filter((t=>Wo(t)||$o(t)&&r.initiatorTypes.includes(t.initiatorType)));t({requests:i.flatMap((t=>Zo({entry:t,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var n=new e.PerformanceObserver((e=>{var i=e.getEntries().filter((t=>Wo(t)||$o(t)&&r.initiatorTypes.includes(t.initiatorType)&&(t=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==t.initiatorType&&"fetch"!==t.initiatorType)(t)));t({requests:i.flatMap((t=>Zo({entry:t,method:void 0,status:void 0,networkRequest:{}})))})})),s=PerformanceObserver.supportedEntryTypes.filter((t=>r.performanceEntryTypeToObserve.includes(t)));return n.observe({entryTypes:s}),()=>{n.disconnect()}}function qo(t,e){return!!e&&(so(e)||e[t])}function Ho(t){var{type:e,recordBody:r,headers:i,url:n}=t;function s(t){var e=Object.keys(i).find((t=>"content-type"===t.toLowerCase())),r=e&&i[e];return t.some((t=>null==r?void 0:r.includes(t)))}if(!r)return!1;if(function t(e){try{return"string"==typeof e?e.startsWith("blob:"):e instanceof URL?"blob:"===e.protocol:e instanceof Request&&t(e.url)}catch(t){return!1}}(n))return!1;if(so(r))return!0;if(Xs(r))return s(r);var o=r[e];return so(o)?o:s(o)}function Go(t,e,r,i,n,s){return Vo.apply(this,arguments)}function Vo(){return Vo=e((function*(t,e,r,i,n,s){if(void 0===s&&(s=0),s>10)return Uo.warn("Failed to get performance entry for request",{url:r,initiatorType:e}),null;var o=function(t,e){for(var r=t.length-1;r>=0;r-=1)if(e(t[r]))return t[r]}(t.performance.getEntriesByName(r),(t=>$o(t)&&t.initiatorType===e&&(to(i)||t.startTime>=i)&&(to(n)||t.startTime<=n)));return o||(yield new Promise((t=>setTimeout(t,50*s))),Go(t,e,r,i,n,s+1))})),Vo.apply(this,arguments)}function Jo(t){var{body:e,options:r,url:i}=t;if(io(e))return null;var{hostname:n,isHostDenied:s}=ko(i,r);if(s)return n+" is in deny list";if(eo(e))return e;if(uo(e))return e.textContent;if(oo(e))return bo(e);if(Qs(e))try{return JSON.stringify(e)}catch(t){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(e)}var Yo=t=>!ro(t)&&("navigation"===t.entryType||"resource"===t.entryType);function Zo(t){var{entry:e,method:i,status:n,networkRequest:s,isInitial:o,start:a,end:h,url:u,initiatorType:l}=t;a=e?e.startTime:a,h=e?e.responseEnd:h;var c=Math.floor(Date.now()-performance.now()),f=Math.floor(c+(a||0)),d=[r({},e?e.toJSON():{name:u},{startTime:to(a)?void 0:Math.round(a),endTime:to(h)?void 0:Math.round(h),timeOrigin:c,timestamp:f,method:i,initiatorType:l||(e?e.initiatorType:void 0),status:n,requestHeaders:s.requestHeaders,requestBody:s.requestBody,responseHeaders:s.responseHeaders,responseBody:s.responseBody,isInitial:o})];if(Yo(e))for(var v of e.serverTiming||[])d.push({timeOrigin:c,timestamp:f,startTime:Math.round(e.startTime),name:v.name,duration:v.duration,entryType:"serverTiming"});return d}var Xo=["video/","audio/"];function Ko(t){return new Promise(((e,r)=>{var i=setTimeout((()=>e("[SessionReplay] Timeout while trying to read body")),500);try{t.clone().text().then((t=>e(t)),(t=>r(t))).finally((()=>clearTimeout(i)))}catch(t){clearTimeout(i),e("[SessionReplay] Failed to read body")}}))}function Qo(){return(Qo=e((function*(t){var{r:e,options:r,url:i}=t,{hostname:n,isHostDenied:s}=ko(i,r);return s?Promise.resolve(n+" is in deny list"):Ko(e)}))).apply(this,arguments)}function ta(){return(ta=e((function*(t){var{r:e,options:r,url:i}=t,n=function(t){var e,{r:r,options:i,url:n}=t;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var s=null==(e=r.headers.get("Content-Type"))?void 0:e.toLowerCase(),o=Xo.some((t=>null==s?void 0:s.startsWith(t)));if(s&&o)return"Content-Type "+s+" is not supported";var{hostname:a,isHostDenied:h}=ko(n,i);return h?a+" is in deny list":null}({r:e,options:r,url:i});return ro(n)?Ko(e):Promise.resolve(n)}))).apply(this,arguments)}function ea(t,r,i){if(!i.initiatorTypes.includes("fetch"))return()=>{};var n=qo("request",i.recordHeaders),s=qo("response",i.recordHeaders),o=So(r,"fetch",(o=>function(){var a=e((function*(e,a){var h,u,l,c=new Request(e,a),f={};try{var d={};c.headers.forEach(((t,e)=>{d[e]=t})),n&&(f.requestHeaders=d),Ho({type:"request",headers:d,url:e,recordBody:i.recordBody})&&(f.requestBody=yield function(t){return Qo.apply(this,arguments)}({r:c,options:i,url:e})),u=r.performance.now(),h=yield o(c),l=r.performance.now();var v={};return h.headers.forEach(((t,e)=>{v[e]=t})),s&&(f.responseHeaders=v),Ho({type:"response",headers:v,url:e,recordBody:i.recordBody})&&(f.responseBody=yield function(t){return ta.apply(this,arguments)}({r:h,options:i,url:e})),h}finally{Go(r,"fetch",c.url,u,l).then((e=>{var r,i=Zo({entry:e,method:c.method,status:null==(r=h)?void 0:r.status,networkRequest:f,start:u,end:l,url:c.url,initiatorType:"fetch"});t({requests:i})})).catch((()=>{}))}}));return function(t,e){return a.apply(this,arguments)}}()));return()=>{o()}}var ra=null;function ia(t,e,i){if(!("performance"in e))return()=>{};if(ra)return Uo.warn("Network observer already initialised, doing nothing"),()=>{};var n=i?Object.assign({},Bo,i):Bo,s=e=>{var i=[];e.requests.forEach((t=>{var e=n.maskRequestFn(t);e&&i.push(e)})),i.length>0&&t(r({},e,{requests:i}))},o=zo(s,e,n),a=()=>{},h=()=>{};return(n.recordHeaders||n.recordBody)&&(a=function(t,e,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var i=qo("request",r.recordHeaders),n=qo("response",r.recordHeaders),s=So(e.XMLHttpRequest.prototype,"open",(s=>function(o,a,h,u,l){void 0===h&&(h=!0);var c,f,d=this,v=new Request(a),p={},m={},g=d.setRequestHeader.bind(d);d.setRequestHeader=(t,e)=>(m[t]=e,g(t,e)),i&&(p.requestHeaders=m);var w=d.send.bind(d);d.send=t=>(Ho({type:"request",headers:m,url:a,recordBody:r.recordBody})&&(p.requestBody=Jo({body:t,options:r,url:a})),c=e.performance.now(),w(t));var y=()=>{d.removeEventListener("readystatechange",b),d.removeEventListener("error",y),d.removeEventListener("abort",y),d.removeEventListener("timeout",y)},b=()=>{if(d.readyState===d.DONE){y(),f=e.performance.now();var i={};d.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{var e=t.split(": "),r=e.shift(),n=e.join(": ");r&&(i[r]=n)})),n&&(p.responseHeaders=i),Ho({type:"response",headers:i,url:a,recordBody:r.recordBody})&&(p.responseBody=Jo({body:d.response,options:r,url:a})),Go(e,"xmlhttprequest",v.url,c,f).then((e=>{var r=Zo({entry:e,method:o,status:null==d?void 0:d.status,networkRequest:p,start:c,end:f,url:a.toString(),initiatorType:"xmlhttprequest"});t({requests:r})})).catch((()=>{}))}};d.addEventListener("readystatechange",b),d.addEventListener("error",y),d.addEventListener("abort",y),d.addEventListener("timeout",y),s.call(d,o,a.toString(),h,u,l)}));return()=>{s()}}(s,e,n),h=ea(s,e,n)),ra=()=>{o(),a(),h(),ra=null}}var na=t=>({name:"rrweb/network@1",observer:ia,options:t}),sa=function(t){return 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}({}),oa=function(t){return 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}({}),aa="disabled",ha="sampled",ua="active",la="buffering",ca="paused",fa="trigger",da=fa+"_activated",va=fa+"_pending",pa=fa+"_"+aa;function ma(t,e,r){return e.some((e=>{var i;return"regex"===e.matching&&(null!==(i=null==r?void 0:r.get(e.url))&&void 0!==i?i:new RegExp(e.url)).test(t)}))}class ga{constructor(t){this.k=t}triggerStatus(t){var e=this.k.map((e=>e.triggerStatus(t)));return e.includes(da)?da:e.includes(va)?va:pa}stop(){this.k.forEach((t=>t.stop()))}}class wa{constructor(t){this.k=t}triggerStatus(t){var e=new Set;for(var r of this.k)e.add(r.triggerStatus(t));switch(e.delete(pa),e.size){case 0:return pa;case 1:return Array.from(e)[0];default:return va}}stop(){this.k.forEach((t=>t.stop()))}}class ya{triggerStatus(){return va}stop(){}}var ba=t=>"sessionRecording"in t;class Sa{constructor(t){this.C=[],this.I=[],this.M=new Map,this.R=new Map,this.O="",this.urlBlocked=!1,this._instance=t}onConfig(t){var e,r;this.C=(ba(t)?Qs(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.urlTriggers:[]:null==t?void 0:t.urlTriggers)||[],this.I=(ba(t)?Qs(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.urlBlocklist:[]:null==t?void 0:t.urlBlocklist)||[],this.T()}T(){for(var t of(this.M.clear(),this.R.clear(),this.C))if("regex"===t.matching&&!this.M.has(t.url))try{this.M.set(t.url,new RegExp(t.url))}catch(e){fo.error("Invalid URL trigger regex pattern:",t.url,e)}for(var e of this.I)if("regex"===e.matching&&!this.R.has(e.url))try{this.R.set(e.url,new RegExp(e.url))}catch(t){fo.error("Invalid URL blocklist regex pattern:",e.url,t)}}onRemoteConfig(t){this.onConfig(t)}A(t){var e;return 0===this.C.length?pa:(null==(e=this._instance)?void 0:e.get_property(xo))===t?da:va}triggerStatus(t){var e=this.A(t),r=e===da?da:e===va?va:pa;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:r}),r}checkUrlTriggerConditions(t,e,r,i){if(void 0!==Us&&Us.location.href){var n=Us.location.href;if(n!==this.O){this.O=n;var s=this.urlBlocked,o=ma(n,this.I,this.R);if(!s||!o){o&&!s?t():!o&&s&&e();var a=this.A(i)===da,h=ma(n,this.C,this.M);!a&&h&&r("url")}}}}stop(){this.O=""}}class ka{constructor(t){this.linkedFlag=null,this.linkedFlagSeen=!1,this.B=()=>{},this._instance=t}triggerStatus(){var t=va;return io(this.linkedFlag)&&(t=pa),this.linkedFlagSeen&&(t=da),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:t}),t}onConfig(t,e){var r;if(this.linkedFlag=(ba(t)?Qs(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.linkedFlag:null:null==t?void 0:t.linkedFlag)||null,!io(this.linkedFlag)&&!this.linkedFlagSeen){var i=eo(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,n=eo(this.linkedFlag)?null:this.linkedFlag.variant;this.B=this._instance.onFeatureFlags(((t,r)=>{var s=!1;if(Qs(r)&&i in r){var o=r[i];s=so(o)?!0===o:n?o===n:!!o}this.linkedFlagSeen=s,s&&e(i,n)}))}}onRemoteConfig(t,e){this.onConfig(t,e)}stop(){this.B()}}class Ca{constructor(t){this.L=[],this._instance=t}onConfig(t){var e;this.L=(ba(t)?Qs(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.eventTriggers:[]:null==t?void 0:t.eventTriggers)||[]}onRemoteConfig(t){this.onConfig(t)}N(t){var e;return 0===this.L.length?pa:(null==(e=this._instance)?void 0:e.get_property(Ro))===t?da:va}triggerStatus(t){var e=this.N(t),r=e===da?da:e===va?va:pa;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:r}),r}stop(){}}function Ia(t){return t.isRecordingEnabled?la:aa}function Ma(t){if(!t.receivedFlags)return la;if(!t.isRecordingEnabled)return aa;if(t.urlTriggerMatching.urlBlocked)return ca;var e=!0===t.isSampled,r=new ga([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId);return e?ha:r===da?ua:r===va?la:!1===t.isSampled?aa:ua}function xa(t){if(!t.receivedFlags)return la;if(!t.isRecordingEnabled)return aa;if(t.urlTriggerMatching.urlBlocked)return ca;var e=new wa([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId),r=e!==pa,i=so(t.isSampled);return r&&e===va?la:r&&e===pa||i&&!t.isSampled?aa:!0===t.isSampled?ha:ua}function Ra(t){var e,r;return(null==(e=JSON.stringify(t,(r=[],function(t,e){if(Qs(e)){for(;r.length>0&&r[r.length-1]!==this;)r.pop();return r.includes(e)?"[Circular]":(r.push(e),e)}return e})))?void 0:e.length)||0}var _a=Uint8Array,Oa=Uint16Array,Ta=Uint32Array,Aa=new _a([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ea=new _a([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ba=new _a([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),La=function(t,e){for(var r=new Oa(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Ta(r[30]);for(i=1;i<30;++i)for(var s=r[i];s<r[i+1];++s)n[s]=s-r[i]<<5|i;return[r,n]},Na=La(Aa,2),Da=Na[0],Fa=Na[1];Da[28]=258,Fa[258]=28;for(var ja=La(Ea,0)[1],Pa=new Oa(32768),Ua=0;Ua<32768;++Ua){var Wa=(43690&Ua)>>>1|(21845&Ua)<<1;Wa=(61680&(Wa=(52428&Wa)>>>2|(13107&Wa)<<2))>>>4|(3855&Wa)<<4,Pa[Ua]=((65280&Wa)>>>8|(255&Wa)<<8)>>>1}var $a=function(t,e,r){for(var i=t.length,n=0,s=new Oa(e);n<i;++n)++s[t[n]-1];var o,a=new Oa(e);for(n=0;n<e;++n)a[n]=a[n-1]+s[n-1]<<1;if(r){o=new Oa(1<<e);var h=15-e;for(n=0;n<i;++n)if(t[n])for(var u=n<<4|t[n],l=e-t[n],c=a[t[n]-1]++<<l,f=c|(1<<l)-1;c<=f;++c)o[Pa[c]>>>h]=u}else for(o=new Oa(i),n=0;n<i;++n)o[n]=Pa[a[t[n]-1]++]>>>15-t[n];return o},za=new _a(288);for(Ua=0;Ua<144;++Ua)za[Ua]=8;for(Ua=144;Ua<256;++Ua)za[Ua]=9;for(Ua=256;Ua<280;++Ua)za[Ua]=7;for(Ua=280;Ua<288;++Ua)za[Ua]=8;var qa=new _a(32);for(Ua=0;Ua<32;++Ua)qa[Ua]=5;var Ha=$a(za,9,0),Ga=$a(qa,5,0),Va=function(t){return(t/8>>0)+(7&t&&1)},Ja=function(t,e,r){(null==r||r>t.length)&&(r=t.length);var i=new(t instanceof Oa?Oa:t instanceof Ta?Ta:_a)(r-e);return i.set(t.subarray(e,r)),i},Ya=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8},Za=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},Xa=function(t,e){for(var r=[],i=0;i<t.length;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[new _a(0),0];if(1==n){var o=new _a(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort((function(t,e){return t.f-e.f})),r.push({s:-1,f:25001});var a=r[0],h=r[1],u=0,l=1,c=2;for(r[0]={s:-1,f:a.f+h.f,l:a,r:h};l!=n-1;)a=r[r[u].f<r[c].f?u++:c++],h=r[u!=l&&r[u].f<r[c].f?u++:c++],r[l++]={s:-1,f:a.f+h.f,l:a,r:h};var f=s[0].s;for(i=1;i<n;++i)s[i].s>f&&(f=s[i].s);var d=new Oa(f+1),v=Ka(r[l-1],d,0);if(v>e){i=0;var p=0,m=v-e,g=1<<m;for(s.sort((function(t,e){return d[e.s]-d[t.s]||t.f-e.f}));i<n;++i){var w=s[i].s;if(!(d[w]>e))break;p+=g-(1<<v-d[w]),d[w]=e}for(p>>>=m;p>0;){var y=s[i].s;d[y]<e?p-=1<<e-d[y]++-1:++i}for(;i>=0&&p;--i){var b=s[i].s;d[b]==e&&(--d[b],++p)}v=e}return[new _a(d),v]},Ka=function(t,e,r){return-1==t.s?Math.max(Ka(t.l,e,r+1),Ka(t.r,e,r+1)):e[t.s]=r},Qa=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Oa(++e),i=0,n=t[0],s=1,o=function(t){r[i++]=t},a=1;a<=e;++a)if(t[a]==n&&a!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=t[a]}return[r.subarray(0,i),e]},th=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},eh=function(t,e,r){var i=r.length,n=Va(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<i;++s)t[n+s+4]=r[s];return 8*(n+4+i)},rh=function(t,e,r,i,n,s,o,a,h,u,l){Ya(e,l++,r),++n[256];for(var c=Xa(n,15),f=c[0],d=c[1],v=Xa(s,15),p=v[0],m=v[1],g=Qa(f),w=g[0],y=g[1],b=Qa(p),S=b[0],k=b[1],C=new Oa(19),I=0;I<w.length;++I)C[31&w[I]]++;for(I=0;I<S.length;++I)C[31&S[I]]++;for(var M=Xa(C,7),x=M[0],R=M[1],_=19;_>4&&!x[Ba[_-1]];--_);var O,T,A,E,B=u+5<<3,L=th(n,za)+th(s,qa)+o,N=th(n,f)+th(s,p)+o+14+3*_+th(C,x)+(2*C[16]+3*C[17]+7*C[18]);if(B<=L&&B<=N)return eh(e,l,t.subarray(h,h+u));if(Ya(e,l,1+(N<L)),l+=2,N<L){O=$a(f,d,0),T=f,A=$a(p,m,0),E=p;var D=$a(x,R,0);Ya(e,l,y-257),Ya(e,l+5,k-1),Ya(e,l+10,_-4),l+=14;for(I=0;I<_;++I)Ya(e,l+3*I,x[Ba[I]]);l+=3*_;for(var F=[w,S],j=0;j<2;++j){var P=F[j];for(I=0;I<P.length;++I){var U=31&P[I];Ya(e,l,D[U]),l+=x[U],U>15&&(Ya(e,l,P[I]>>>5&127),l+=P[I]>>>12)}}}else O=Ha,T=za,A=Ga,E=qa;for(I=0;I<a;++I)if(i[I]>255){U=i[I]>>>18&31;Za(e,l,O[U+257]),l+=T[U+257],U>7&&(Ya(e,l,i[I]>>>23&31),l+=Aa[U]);var W=31&i[I];Za(e,l,A[W]),l+=E[W],W>3&&(Za(e,l,i[I]>>>5&8191),l+=Ea[W])}else Za(e,l,O[i[I]]),l+=T[i[I]];return Za(e,l,O[256]),l+T[256]},ih=new Ta([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),nh=function(){for(var t=new Ta(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),sh=function(){var t=4294967295;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=nh[255&r^e[i]]^r>>>8;t=r},d:function(){return 4294967295^t}}},oh=function(t,e,r,i,n){return function(t,e,r,i,n,s){var o=t.length,a=new _a(i+o+5*(1+Math.floor(o/7e3))+n),h=a.subarray(i,a.length-n),u=0;if(!e||o<8)for(var l=0;l<=o;l+=65535){var c=l+65535;c<o?u=eh(h,u,t.subarray(l,c)):(h[l]=s,u=eh(h,u,t.subarray(l,o)))}else{for(var f=ih[e-1],d=f>>>13,v=8191&f,p=(1<<r)-1,m=new Oa(32768),g=new Oa(p+1),w=Math.ceil(r/3),y=2*w,b=function(e){return(t[e]^t[e+1]<<w^t[e+2]<<y)&p},S=new Ta(25e3),k=new Oa(288),C=new Oa(32),I=0,M=0,x=(l=0,0),R=0,_=0;l<o;++l){var O=b(l),T=32767&l,A=g[O];if(m[T]=A,g[O]=T,R<=l){var E=o-l;if((I>7e3||x>24576)&&E>423){u=rh(t,h,0,S,k,C,M,x,_,l-_,u),x=I=M=0,_=l;for(var B=0;B<286;++B)k[B]=0;for(B=0;B<30;++B)C[B]=0}var L=2,N=0,D=v,F=T-A&32767;if(E>2&&O==b(l-F))for(var j=Math.min(d,E)-1,P=Math.min(32767,l),U=Math.min(258,E);F<=P&&--D&&T!=A;){if(t[l+L]==t[l+L-F]){for(var W=0;W<U&&t[l+W]==t[l+W-F];++W);if(W>L){if(L=W,N=F,W>j)break;var z=Math.min(F,W-2),q=0;for(B=0;B<z;++B){var H=l-F+B+32768&32767,G=H-m[H]+32768&32767;G>q&&(q=G,A=H)}}}F+=(T=A)-(A=m[T])+32768&32767}if(N){S[x++]=268435456|Fa[L]<<18|ja[N];var V=31&Fa[L],J=31&ja[N];M+=Aa[V]+Ea[J],++k[257+V],++C[J],R=l+L,++I}else S[x++]=t[l],++k[t[l]]}}u=rh(t,h,s,S,k,C,M,x,_,l-_,u)}return Ja(a,0,i+Va(u)+n)}(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i,!0)},ah=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},hh=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&ah(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},uh=function(t){return 10+(t.filename&&t.filename.length+1||0)};class lh{constructor(t,e){var r,i;void 0===e&&(e={}),this.D={},this.F=t=>{if(!this.D[t]){var e,r;this.D[t]=!0;var i=this.j(t);null==(e=(r=this.P).onBlockedNode)||e.call(r,t,i)}},this.U=t=>{var e=this.j(t);if("svg"!==(null==e?void 0:e.nodeName)&&e instanceof Element){var r=e.closest("svg");if(r)return[this._rrweb.mirror.getId(r),r]}return[t,e]},this.j=t=>this._rrweb.mirror.getNode(t),this.W=t=>{var e,r,i,n,s,o,a,h;return(null!==(e=null==(r=t.removes)?void 0:r.length)&&void 0!==e?e:0)+(null!==(i=null==(n=t.attributes)?void 0:n.length)&&void 0!==i?i:0)+(null!==(s=null==(o=t.texts)?void 0:o.length)&&void 0!==s?s:0)+(null!==(a=null==(h=t.adds)?void 0:h.length)&&void 0!==a?a:0)},this.throttleMutations=t=>{if(3!==t.type||0!==t.data.source)return t;var e=t.data,r=this.W(e);e.attributes&&(e.attributes=e.attributes.filter((t=>{var[e]=this.U(t.id);return!this.$.consumeRateLimit(e)&&t})));var i=this.W(e);return 0!==i||r===i?t:void 0},this._rrweb=t,this.P=e,this.$=new ho({bucketSize:null!==(r=this.P.bucketSize)&&void 0!==r?r:100,refillRate:null!==(i=this.P.refillRate)&&void 0!==i?i:10,refillInterval:1e3,i:this.F,h:fo})}reset(){this.D={}}stop(){this.$.stop(),this.reset()}}function ch(t,e){return function(t){for(var e=0,r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return Math.abs(e)}(t)%100<ao(100*e,0,100,fo)}var fh="$sess_rec_flush_size";class dh{constructor(t){if(!t.persistence)throw new Error("it is not valid to not have persistence and be this far into setting up the application");this.q=t.get_property.bind(t),this.H=t.persistence.set_property.bind(t.persistence)}trackSize(t){var e=(Number(this.q(fh))||0)+t;this.H(fh,e)}reset(){return this.H(fh,0)}get currentTrackedSize(){return Number(this.q(fh))||0}}var vh=3e5;function ph(t){return Qs(t)?t.network_timing:t}var mh="[SessionRecording]",gh=vo(mh),wh=[oa.MouseMove,oa.MouseInteraction,oa.Scroll,oa.ViewportResize,oa.Input,oa.TouchMove,oa.MediaInteraction,oa.Drag],yh=t=>({rrwebMethod:t,enqueuedAt:Date.now(),attempt:1});function bh(){var t;return null==Hs||null==(t=Hs.__PosthogExtensions__)?void 0:t.rrweb}function Sh(){var t;return null==(t=bh())?void 0:t.record}function kh(t){return function(t,e){for(var r="",i=0;i<t.length;){var n=t[i++];r+=String.fromCharCode(n)}return r}(function(t,e){void 0===e&&(e={});var r=sh(),i=t.length;r.p(t);var n=oh(t,e,uh(e),8),s=n.length;return hh(n,e),ah(n,s-8,r.d()),ah(n,s-4,i),n}(function(t,e){var r=t.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(t);for(var i=new _a(t.length+(t.length>>>1)),n=0,s=function(t){i[n++]=t},o=0;o<r;++o){if(n+5>i.length){var a=new _a(n+8+(r-o<<1));a.set(i),i=a}var h=t.charCodeAt(o);h<128||e?s(h):h<2048?(s(192|h>>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++o))>>>18),s(128|h>>>12&63),s(128|h>>>6&63),s(128|63&h)):(s(224|h>>>12),s(128|h>>>6&63),s(128|63&h))}return Ja(i,0,n)}(JSON.stringify(t))))}function Ch(t,e){return t.type===sa.Custom&&t.data.tag===e}function Ih(t){return Ch(t,"sessionIdle")}function Mh(t){return Ch(t,"$session_ending")}function xh(t){return Ch(t,"$session_starting")}function Rh(t,e){if(void 0===e&&(e=6606028.8),t.size>=e&&t.data.length>1){var r=Math.floor(t.data.length/2),i=t.data.slice(0,r),n=t.data.slice(r);return[Rh({size:Ra(i),data:i,sessionId:t.sessionId,windowId:t.windowId}),Rh({size:Ra(n),data:n,sessionId:t.sessionId,windowId:t.windowId})].flatMap((t=>t))}return[t]}class _h{get sessionId(){return this.G}get V(){if(!this._instance.sessionManager)throw new Error(mh+" must be started with a valid sessionManager.");return this._instance.sessionManager}get J(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get Y(){var t=this._instance.get_property(Io);return!0===t?null:!1!==t&&(eo(t)?t===this.sessionId:null)}get Z(){var t,e=null==(t=this.X)?void 0:t.sampleRate;return no(e)?e:null}get K(){var t,e=null==(t=this.X)?void 0:t.minimumDurationMilliseconds;return no(e)?e:null}constructor(t){this.tt="/s/",this._forceAllowLocalhostNetworkCapture=!1,this.et=void 0,this.rt=Date.now(),this.it=[],this.nt="unknown",this.st=!1,this.ot=new ya,this.ht=[],this.ut=void 0,this.lt=void 0,this.ct=Ia,this.ft=void 0,this.dt=void 0,this.vt=void 0,this.gt=void 0,this.wt=(t,e,r)=>{var i,n;if(r&&(t!==this.G||e!==this.yt)){var s,o=!r.noSessionId&&(r.activityTimeout||r.sessionPastMaximumLength),a=this.G,h=this.yt;if(o)this.bt("$session_ending",{currentSessionId:a,currentWindowId:h,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.rt,flushed_size:null==(s=this.St)?void 0:s.currentTrackedSize});this.St&&this.St.reset(),null==(i=this._instance.persistence)||i.unregister(_o),this.st=!1,null==(n=bh())||null==n.resetMaxDepthState||n.resetMaxDepthState(),this.bt("$session_id_change",{sessionId:t,windowId:e,changeReason:r}),this.kt(),o&&this.bt("$session_starting",{previousSessionId:a,previousWindowId:h,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.rt}),no(this.Z)&&io(this.vt)&&this.Ct(t)}},this.It=()=>{var t;return(null==(t=this._instance.persistence)?void 0:t.props[Mo])===this.G},this.Mt=()=>{var t,e;if(0===this.xt.data.length)return null;var r=null==(t=this.xt.data[0])?void 0:t.timestamp,i=null==(e=this.xt.data[this.xt.data.length-1])?void 0:e.timestamp;return no(r)&&no(i)?i-r:null},this.Rt=()=>{var t,e,r=this.K;if(!no(r))return!1;if(!(null!==(t=null==(e=this._instance.config.session_recording)?void 0:e.strictMinimumDuration)&&void 0!==t&&t)){var i=this._t;return no(i)&&i>=0&&i<r}if(this.It())return!1;var n,s=this.Mt();return!!ro(s)||(!(s>=r)||(null==(n=this._instance.persistence)||n.register({[Mo]:this.G}),!1))},this.Ot=()=>{this.Tt()},this.At=()=>{this.bt("browser offline",{})},this.Et=()=>{this.bt("browser online",{})},this.Bt=()=>{if(null!=qs&&qs.visibilityState){var t="window "+qs.visibilityState;this.bt(t,{})}},this._instance=t;var{sessionId:e,windowId:r}=this.V.checkAndGetSessionAndWindowId();this.G=e,this.yt=r,this.Lt=new ka(this._instance),this.Nt=new Sa(this._instance),this.Dt=new Ca(this._instance),this.xt=this.Ft(),this.J>=this.V.sessionTimeoutMs&&gh.warn("session_idle_threshold_ms ("+this.J+") is greater than the session timeout ("+this.V.sessionTimeoutMs+"). Session will never be detected as idle"),this.St=new dh(this._instance)}get jt(){var t,e,r,i,n,s,o,a=null==(t=this.X)?void 0:t.masking,h={maskAllInputs:null==(e=this._instance.config.session_recording)?void 0:e.maskAllInputs,maskTextSelector:null==(r=this._instance.config.session_recording)?void 0:r.maskTextSelector,blockSelector:null==(i=this._instance.config.session_recording)?void 0:i.blockSelector},u=null!==(n=null==h?void 0:h.maskAllInputs)&&void 0!==n?n:null==a?void 0:a.maskAllInputs,l=null!==(s=null==h?void 0:h.maskTextSelector)&&void 0!==s?s:null==a?void 0:a.maskTextSelector,c=null!==(o=null==h?void 0:h.blockSelector)&&void 0!==o?o:null==a?void 0:a.blockSelector;return to(u)&&to(l)&&to(c)?void 0:{maskAllInputs:null==u||u,maskTextSelector:l,blockSelector:c}}get Pt(){var t,e,r,i,n,s,o,a=this._instance.config.session_recording.captureCanvas,h=null==(t=this.X)?void 0:t.canvasRecording,u=null!==(e=null!==(r=null==a?void 0:a.recordCanvas)&&void 0!==r?r:null==h?void 0:h.enabled)&&void 0!==e&&e,l=null!==(i=null!==(n=null==a?void 0:a.canvasFps)&&void 0!==n?n:null==h?void 0:h.fps)&&void 0!==i?i:4,c=null!==(s=null!==(o=null==a?void 0:a.canvasQuality)&&void 0!==o?o:null==h?void 0:h.quality)&&void 0!==s?s:.4;if("string"==typeof c){var f=parseFloat(c);c=isNaN(f)?.4:f}return{enabled:u,fps:ao(l,0,12,vo("canvas recording fps"),4),quality:ao(c,0,1,vo("canvas recording quality"),.4)}}get Ut(){var t,e=!(null==(t=this.X)||!t.consoleLogRecordingEnabled),r=this._instance.config.enable_recording_console_log;return null!=r?r:e}get Wt(){var t,e,r,i=null==(t=this.X)?void 0:t.networkPayloadCapture,n={recordHeaders:null==(e=this._instance.config.session_recording)?void 0:e.recordHeaders,recordBody:null==(r=this._instance.config.session_recording)?void 0:r.recordBody},s=(null==n?void 0:n.recordHeaders)||(null==i?void 0:i.recordHeaders),o=(null==n?void 0:n.recordBody)||(null==i?void 0:i.recordBody),a=ph(this._instance.config.capture_performance),h=ph(null==i?void 0:i.capturePerformance),u=!!(so(a)?a:h);return s||o||u?{recordHeaders:s,recordBody:o,recordPerformance:u}:void 0}$t(){var t,e,r=[],i=null==(t=Hs.__PosthogExtensions__)||null==(t=t.rrwebPlugins)?void 0:t.getRecordConsolePlugin;i&&this.Ut&&r.push(i());var n=null==(e=Hs.__PosthogExtensions__)||null==(e=e.rrwebPlugins)?void 0:e.getRecordNetworkPlugin;this.Wt&&Ks(n)&&(!wo.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?r.push(n(Po(this._instance.config,this.Wt))):gh.info("NetworkCapture not started because we are on localhost."));return r}zt(t){var e=this._instance.config.session_recording;if(e.maskCapturedNetworkRequestFn){var r,i=e.maskCapturedNetworkRequestFn({name:t});return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:null==i?void 0:i.url}if(e.maskNetworkRequestFn){var n=e.maskNetworkRequestFn({url:t});return null==n?void 0:n.url}return t}qt(t){try{return t.rrwebMethod(),!0}catch(e){return this.it.length<10?this.it.push({enqueuedAt:t.enqueuedAt||Date.now(),attempt:t.attempt+1,rrwebMethod:t.rrwebMethod}):gh.warn("could not emit queued rrweb event.",e,t),!1}}bt(t,e){return this.qt(yh((()=>Sh().addCustomEvent(t,e))))}Ht(){try{if(this._instance.config.capture_pageview||!Us)return;var t=new URL(Us.location.href),e=t.origin+t.pathname+t.search,r=this.zt(e);this.Gt!==r&&(this.Gt=r,this.bt("$url_changed",{href:r}))}catch(t){}}Vt(){if(this.it.length){var t=[...this.it];this.it=[],t.forEach((t=>{Date.now()-t.enqueuedAt<=2e3&&this.qt(t)}))}}Jt(){return this.qt(yh((()=>Sh().takeFullSnapshot())))}get Yt(){var t,e;return this.ot.triggerStatus(this.sessionId)!==va||["sampled","active"].includes(this.status)?null!==(t=null==(e=this._instance.config.session_recording)?void 0:e.full_snapshot_interval_millis)&&void 0!==t?t:vh:6e4}Zt(){if(this.Xt&&clearInterval(this.Xt),!0!==this.nt){var t=this.Yt;t&&(this.Xt=setInterval((()=>{this.Jt()}),t))}}Kt(){this.Nt.urlBlocked||(this.Nt.urlBlocked=!0,clearInterval(this.Xt),gh.info("recording paused due to URL blocker"),this.bt("recording paused",{reason:"url blocker"}))}Qt(){this.Nt.urlBlocked&&(this.Nt.urlBlocked=!1,this.Jt(),this.Zt(),this.bt("recording resumed",{reason:"left blocked url"}),gh.info("recording resumed"))}te(t){var e;this.ot.triggerStatus(this.sessionId)===va&&(null==(e=this._instance)||null==(e=e.persistence)||e.register({["url"===t?xo:Ro]:this.G}),this.Tt(),this.ee(t+"_trigger_matched"))}get isStarted(){return!!this.et}get X(){var t=this._instance.get_property(Co);if(t){var e=Qs(t)?t:JSON.parse(t);if(!this.isStarted){var r,i,n=null!==(r=e.cache_timestamp)&&void 0!==r?r:Date.now();if(Date.now()-n>3e5)return gh.info("persisted remote config for session recording is stale and will be ignored",{cacheTimestamp:n,persistedConfig:t}),void(null==(i=this._instance.persistence)||i.unregister(Co))}return e}}re(t,e){var r;this._instance.get_property(t)&&(e(),null==(r=this._instance.persistence)||r.unregister(t))}start(t){var e,r,i=this.X;if(i){var{sessionId:n,windowId:s}=this.V.checkAndGetSessionAndWindowId();this.G=n,this.yt=s,null==(e=this._instance.persistence)||e.unregister(_o),null!=i&&i.endpoint&&(this.tt=null==i?void 0:i.endpoint),"any"===(null==i?void 0:i.triggerMatchType)?(this.ct=Ma,this.ot=new ga([this.Dt,this.Nt])):(this.ct=xa,this.ot=new wa([this.Dt,this.Nt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:null==i?void 0:i.triggerMatchType}),this.Nt.onConfig(i),this.Dt.onConfig(i),null==(r=this.lt)||r.call(this),this.ie(),this.Lt.onConfig(i,((t,e)=>{this.ee("linked_flag_matched",{flag:t,variant:e})})),this.re("$replay_override_sampling",(()=>{this.overrideSampling()})),this.re("$replay_override_linked_flag",(()=>{this.overrideLinkedFlag()})),this.re("$replay_override_event_trigger",(()=>{this.overrideTrigger("event")})),this.re("$replay_override_url_trigger",(()=>{this.overrideTrigger("url")})),this.Ct(this.sessionId),this.ne(),go(Us,"beforeunload",this.Ot),go(Us,"offline",this.At),go(Us,"online",this.Et),go(Us,"visibilitychange",this.Bt),this.ft||(this.ft=this.V.onSessionId(this.wt)),this.dt||(this.dt=this.V.on("forcedIdleReset",(()=>{this.kt(),this.nt="unknown",this.stop(),this.gt=this.V.onSessionId(((t,e,r)=>{var i;null==(i=this.gt)||i.call(this),this.gt=void 0,this.wt(t,e,r)}))}))),io(this.ut)&&(this.ut=this._instance.on("eventCaptured",(t=>{try{if("$pageview"===t.event){var e=null!=t&&t.properties.$current_url?this.zt(null==t?void 0:t.properties.$current_url):"";if(!e)return;this.bt("$pageview",{href:e})}}catch(t){gh.error("Could not add $pageview to rrweb session",t)}}))),this.status===ua&&this.ee(t||"recording_initialized")}else gh.info("remote config must be stored in persistence before recording can start")}stop(){var t,e,r,i,n,s,o,a;null==Us||Us.removeEventListener("beforeunload",this.Ot),null==Us||Us.removeEventListener("offline",this.At),null==Us||Us.removeEventListener("online",this.Et),null==Us||Us.removeEventListener("visibilitychange",this.Bt),this.Tt(),this.Ft(),clearInterval(this.Xt),this.se(),null==(t=this.ut)||t.call(this),this.ut=void 0,null==(e=this.lt)||e.call(this),this.lt=void 0,null==(r=this.ft)||r.call(this),this.ft=void 0,null==(i=this.dt)||i.call(this),this.dt=void 0,null==(n=this.vt)||n.call(this),this.vt=void 0,null==(s=this.gt)||s.call(this),this.gt=void 0,this.Dt.stop(),this.Nt.stop(),this.Lt.stop(),null==(o=this.oe)||o.stop(),this.it=[],null==(a=this.et)||a.call(this),this.et=void 0,gh.info("stopped")}onRRwebEmit(t){var e,i,n,s,o,a;if(this.Vt(),t&&Qs(t)){if(t.type===sa.Meta){var h=this.zt(t.data.href);if(this.Gt=h,!h)return;t.data.href=h}else this.Ht();if(this.Nt.checkUrlTriggerConditions((()=>this.Kt()),(()=>this.Qt()),(t=>this.te(t)),this.sessionId),!this.Nt.urlBlocked||(u=t).type===sa.Custom&&"recording paused"===u.data.tag){var u,l,c;if(t.type===sa.FullSnapshot)this.Zt(),null==(l=this.oe)||l.reset(),null==(c=this._instance.persistence)||c.register_once({[_o]:t.timestamp},void 0);t.type===sa.FullSnapshot&&this.ot.triggerStatus(this.sessionId)===va&&this.ae();var f=this.oe?this.oe.throttleMutations(t):t;if(f){var d=function(t){var e=t;if(e&&Qs(e)&&6===e.type&&Qs(e.data)&&"rrweb/console@1"===e.data.plugin){e.data.payload.payload.length>10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var r=[],i=0;i<e.data.payload.payload.length;i++)e.data.payload.payload[i]&&e.data.payload.payload[i].length>2e3?r.push(e.data.payload.payload[i].slice(0,2e3)+"...[truncated]"):r.push(e.data.payload.payload[i]);return e.data.payload.payload=r,t}return t}(f),v=function(t){return Mh(t)?t.data.payload:null}(d),p=function(t){return xh(t)?t.data.payload:null}(d);if(v||p){var m=null!=v?v:p;null!=m&&m.lastActivityTimestamp&&(d.timestamp=m.lastActivityTimestamp)}else this.he(d);t.type===sa.FullSnapshot&&(this.ht.push([this.G,t.timestamp]),this.ht.length>6&&(this.ht=this.ht.slice(-6)));var g=null!==(e=null!==(i=null==v?void 0:v.currentSessionId)&&void 0!==i?i:null==p?void 0:p.nextSessionId)&&void 0!==e?e:this.G,w=null!==(n=null!==(s=null==v?void 0:v.currentWindowId)&&void 0!==s?s:null==p?void 0:p.nextWindowId)&&void 0!==n?n:this.yt;if(!0!==this.nt||function(t){return Ih(t)||Mh(t)||xh(t)}(d)){if(Ih(d)){var y=d.data.payload;if(y){var b=y.lastActivityTimestamp,S=y.threshold;d.timestamp=b+S}}var k=null===(o=this._instance.config.session_recording.compress_events)||void 0===o||o?function(t){try{if(t.type===sa.FullSnapshot)return r({},t,{data:kh(t.data),cv:"2024-10"});if(t.type===sa.IncrementalSnapshot&&t.data.source===oa.Mutation)return r({},t,{cv:"2024-10",data:r({},t.data,{texts:kh(t.data.texts),attributes:kh(t.data.attributes),removes:kh(t.data.removes),adds:kh(t.data.adds)})});if(t.type===sa.IncrementalSnapshot&&t.data.source===oa.StyleSheetRule)return r({},t,{cv:"2024-10",data:r({},t.data,{adds:t.data.adds?kh(t.data.adds):void 0,removes:t.data.removes?kh(t.data.removes):void 0})})}catch(t){gh.error("could not compress event - will use uncompressed event",t)}return t}(d):d,C={$snapshot_bytes:Ra(k),$snapshot_data:k,$session_id:g,$window_id:w};d.type===sa.FullSnapshot&&null!=(a=bh())&&null!=a.wasMaxDepthReached&&a.wasMaxDepthReached()&&(this.st=!0),this.status!==aa?this.ue(C):this.Ft()}}}}}get status(){return this.ct({receivedFlags:!0,isRecordingEnabled:!0,isSampled:this.Y,urlTriggerMatching:this.Nt,eventTriggerMatching:this.Dt,linkedFlagMatching:this.Lt,sessionId:this.sessionId})}log(t,e){var r;void 0===e&&(e="log"),null==(r=this._instance.sessionRecording)||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:e,trace:[],payload:[JSON.stringify(t)]}},timestamp:Date.now()})}overrideLinkedFlag(){this.Lt.linkedFlagSeen=!0,this.Jt(),this.ee("linked_flag_overridden")}overrideSampling(){var t;null==(t=this._instance.persistence)||t.register({[Io]:this.sessionId}),this.Jt(),this.ee("sampling_overridden")}overrideTrigger(t){this.te(t)}se(){this.le&&(clearTimeout(this.le),this.le=void 0)}Tt(){this.se();var t=this.Rt();if(this.status===la||this.status===ca||this.status===aa||t)return this.le=setTimeout((()=>{this.Tt()}),2e3),this.xt;this.xt.data.length>0&&Rh(this.xt).forEach((t=>{var e;null==(e=this.St)||e.trackSize(t.size),this.ce({$snapshot_bytes:t.size,$snapshot_data:t.data,$session_id:t.sessionId,$window_id:t.windowId,$lib:"web",$lib_version:lo.LIB_VERSION})}));return this.Ft()}ue(t){var e,r=2+((null==(e=this.xt)?void 0:e.data.length)||0),i=t.$session_id;!this.nt&&(this.xt.size+t.$snapshot_bytes+r>943718.4||this.xt.sessionId!==i)&&(this.xt=this.Tt(),this.xt.sessionId=i,this.xt.windowId=t.$window_id),this.xt.size+=t.$snapshot_bytes,this.xt.data.push(t.$snapshot_data),this.le||this.nt||(this.le=setTimeout((()=>{this.Tt()}),2e3))}ce(t){this._instance.capture("$snapshot",t,{_url:this._instance.requestRouter.endpointFor("api",this.tt),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}get _t(){var t,e,r=null==(t=this.xt)?void 0:t.data[(null==(e=this.xt)?void 0:e.data.length)-1],{sessionStartTimestamp:i}=this.V.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-i:null}ae(){if(!this.xt||0===this.xt.data.length)return this.Ft();for(var t=-1,e=this.xt.data.length-1;e>=0;e--)if(this.xt.data[e].type===sa.Meta){t=e;break}return t>=0?(this.xt.data=this.xt.data.slice(t),this.xt.size=this.xt.data.reduce(((t,e)=>t+Ra(e)),0),this.xt):this.Ft()}Ft(){return this.xt={size:0,data:[],sessionId:this.G,windowId:this.yt},this.xt}ee(t,e){this._instance.register_for_session({$session_recording_start_reason:t}),gh.info(t.replace("_"," "),e),-1===["recording_initialized","session_id_changed"].indexOf(t)&&this.bt(t,e)}fe(t){var e;return 3===t.type&&-1!==wh.indexOf(null==(e=t.data)?void 0:e.source)}he(t){var e=this.fe(t);e||this.nt||t.timestamp-this.rt>this.J&&(this.nt=!0,clearInterval(this.Xt),this.bt("sessionIdle",{eventTimestamp:t.timestamp,lastActivityTimestamp:this.rt,threshold:this.J,bufferLength:this.xt.data.length,bufferSize:this.xt.size}),this.Tt());var r=!1;if(e&&(this.rt=t.timestamp,this.nt)){var i="unknown"===this.nt;this.nt=!1,i||(this.bt("sessionNoLongerIdle",{reason:"user activity",type:t.type}),r=!0)}if(!this.nt){var{windowId:n,sessionId:s}=this.V.checkAndGetSessionAndWindowId(!e,t.timestamp),o=this.G!==s,a=this.yt!==n;this.yt=n,this.G=s,o||a?(this.stop(),this.start("session_id_changed")):r&&this.Zt()}}kt(){var t,e,r,i;null==(t=this._instance)||null==(t=t.persistence)||t.unregister(Ro),null==(e=this._instance)||null==(e=e.persistence)||e.unregister(xo),null==(r=this._instance)||null==(r=r.persistence)||r.unregister(Io),null==(i=this._instance)||null==(i=i.persistence)||i.unregister(Mo)}Ct(t){var e,r=this.G!==t,i=this.Z;if(no(i)){var n=this.Y,s=r||!so(n),o=s?ch(t,i):n;s&&(o?this.ee(ha):gh.warn("Sample rate ("+i+") has determined that this sessionId ("+t+") will not be sent to the server."),this.bt("samplingDecisionMade",{sampleRate:i,isSampled:o})),null==(e=this._instance.persistence)||e.register({[Io]:!!o&&t})}else{var a;null==(a=this._instance.persistence)||a.unregister(Io)}}ie(){0!==this.Dt.L.length&&io(this.lt)&&(this.lt=this._instance.on("eventCaptured",(t=>{try{this.Dt.L.includes(t.event)&&this.te("event")}catch(t){gh.error("Could not activate event trigger",t)}})))}get sdkDebugProperties(){var t,{sessionStartTimestamp:e}=this.V.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.xt.data.length,$sdk_debug_replay_internal_buffer_size:this.xt.size,$sdk_debug_current_session_duration:this._t,$sdk_debug_session_start:e,$sdk_debug_replay_flushed_size:null==(t=this.St)?void 0:t.currentTrackedSize,$sdk_debug_replay_full_snapshots:this.ht,$snapshot_max_depth_exceeded:this.st}}ne(){var t;if(!this.et){var e,i,n,s={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},o=this._instance.config.session_recording;for(var[a,h]of Object.entries(o||{}))a in s&&("maskInputOptions"===a?s.maskInputOptions=r({password:!0},h):s[a]=h);if(this.Pt&&this.Pt.enabled&&(s.recordCanvas=!0,s.sampling={canvas:this.Pt.fps},s.dataURLOptions={type:"image/webp",quality:this.Pt.quality}),this.jt)s.maskAllInputs=null===(e=this.jt.maskAllInputs)||void 0===e||e,s.maskTextSelector=null!==(i=this.jt.maskTextSelector)&&void 0!==i?i:void 0,s.blockSelector=null!==(n=this.jt.blockSelector)&&void 0!==n?n:void 0;var u=Sh();if(u){this.oe=null!==(t=this.oe)&&void 0!==t?t:new lh(u,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(t,e)=>{var r="Too many mutations on node '"+t+"'. Rate limiting. This could be due to SVG animations or something similar";gh.info(r,{node:e}),this.log(mh+" "+r,"warn")}});var l=this.$t();this.et=u(r({emit:t=>{this.onRRwebEmit(t)},plugins:l},s)),this.rt=Date.now(),this.nt=so(this.nt)?this.nt:"unknown",this.tryAddCustomEvent("$remote_config_received",this.X),this.bt("$session_options",{sessionRecordingOptions:s,activePlugins:l.map((t=>null==t?void 0:t.name))}),this.bt("$posthog_config",{config:this._instance.config})}else gh.error("_startRecorder was called but rrwebRecord is not available. This indicates something has gone wrong.")}}tryAddCustomEvent(t,e){return this.bt(t,e)}}Hs.__PosthogExtensions__=Hs.__PosthogExtensions__||{},Hs.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Ps,getRecordNetworkPlugin:na},Hs.__PosthogExtensions__.rrweb={record:Ss,version:"v2",wasMaxDepthReached:function(){return lt},resetMaxDepthState:function(){lt=!1,ut=!1}},Hs.__PosthogExtensions__.initSessionRecording=t=>new _h(t),Hs.rrweb={record:Ss,version:"v2"},Hs.rrwebConsoleRecord={getRecordConsolePlugin:Ps},Hs.getRecordNetworkPlugin=na}();
1
+ !function(){"use strict";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;e<arguments.length;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=["inputs"],o=["inputId"],a=["inputs"],h=["inputId"],u=["type"],l=Object.defineProperty,c=(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),f=Object.defineProperty,d=(t,e,r)=>((t,e,r)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),v=(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))(v||{}),p={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},g={};function w(t){if(g[t])return g[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 p?p[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 m?m[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 g[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?g[t]=u:r}catch(t){return r}}var y={};function b(t,e,r){var i,n=t+"."+String(r);if(y[n])return y[n].call(e);var s=w(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(y[n]=o,o.call(e)):e[r]}var S={};function k(t,e,r){var i=t+"."+String(r);if(S[i])return S[i].bind(e);var n=w(t)[r];return"function"!=typeof n?e[r]:(S[i]=n,n.bind(e))}var C={childNodes:function(t){return b("Node",t,"childNodes")},parentNode:function(t){return b("Node",t,"parentNode")},parentElement:function(t){return b("Node",t,"parentElement")},textContent:function(t){return b("Node",t,"textContent")},contains:function(t,e){return k("Node",t,"contains")(e)},getRootNode:function(t){return k("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?b("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?b("Element",t,"shadowRoot"):null},querySelector:function(t,e){return b("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return b("Element",t,"querySelectorAll")(e)},mutationObserver:function(){return w("MutationObserver").constructor},patch:function(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}};function I(t){return t.nodeType===t.ELEMENT_NODE}function M(t){var e=t&&"host"in t&&"mode"in t&&C.host(t)||null;return Boolean(e&&"shadowRoot"in e&&C.shadowRoot(e)===t)}function x(t){return"[object ShadowRoot]"===Object.prototype.toString.call(t)}function R(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;!r&&t.ownerNode&&(r=t.ownerNode.baseURI);var i=Array.from(e,(t=>_(t,r))).join("");return(n=i).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(t){return null}var n}function _(t,e){var r;if(function(t){return"styleSheet"in t}(t)){var i;try{i=R(t.styleSheet)||function(t){var{cssText:e}=t;if(e.split('"').length<3)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(" ")+";"}(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return P(i,t.styleSheet.href)}catch(t){}return i}var n,s=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,s=s.replace(n,"$1\\$2")),e?P(s,e):s}class O{constructor(){d(this,"idNodeMap",new Map),d(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))),I(t)){var r=C.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){var r=e.id;this.idNodeMap.set(r,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 T(t){var{element:e,maskInputOptions:r,tagName:i,type:n,value:s,maskInputFn:o}=t,a=s||"",h=n&&A(n);return(r[i.toLowerCase()]||h&&r[h])&&(a=o?o(a,e):"*".repeat(a.length)),a}function A(t){return t.toLowerCase()}var E="__rrweb_original__";function B(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?A(e):null}function L(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 N=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,D=/^(?:[a-z+]+:)?\/\//i,F=/^www\..*/i,j=/^(data:)([^,]*),(.*)/i;function P(t,e){return(t||"").replace(N,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(D.test(h)||F.test(h))return"url("+u+h+u+")";if(j.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("/"),c=h.split("/");for(var f of(l.pop(),c))"."!==f&&(".."===f?l.pop():l.push(f));return"url("+u+l.join("/")+u+")"}))}var U="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",W=4096;var z,q,H=1,G=new RegExp("[^a-z0-9-_:]"),V=-2;function J(){return H++}var Y=/^[^ \t\n\r\u000c]+/,Z=/^[, \t\n\r\u000c]+/;var X=new WeakMap;function K(t,e){return e&&""!==e.trim()?tt(t,e):e}function Q(t){return Boolean("svg"===t.tagName||t.ownerSVGElement)}function tt(t,e){var r=X.get(t);if(r||(r=t.createElement("a"),X.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function et(t,e,r,i,n,s){if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){var o=K(t,i);if("img"===e&&o.startsWith("data:")&&n){var a=n,h=o;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(h=function(t,e,r,i){if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>W||t.naturalHeight>W)return e;try{var n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight;var s=n.getContext("2d");return s?(s.drawImage(t,0,0),n.toDataURL(r||"image/webp",null!=i?i:.4)):e}catch(t){return e}}(a,o,s.type,s.quality)),(null==s?void 0:s.maxBase64ImageLength)&&(u=h,h=!(l=s.maxBase64ImageLength)||u.length<=l?u:U),h}return o}return"xlink:href"===r&&"#"!==i[0]?K(t,i):"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?(i=n[0],r+=i.length,i):""}for(var n=[];i(Z),!(r>=e.length);){var s=i(Y);if(","===s.slice(-1))s=K(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=K(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?P(i,tt(t)):"object"===e&&"data"===r?K(t,i):i:K(t,i);var u,l}function rt(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function it(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&it(C.parentNode(t),e,r);for(var i=t.classList.length;i--;){var n=t.classList[i];if(e.test(n))return!0}return!!r&&it(C.parentNode(t),e,r)}function nt(t,e,r,i){var n;if(I(t)){if(n=t,!C.childNodes(n).length)return!1}else{if(null===C.parentElement(t))return!1;n=C.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(it(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 st(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:o,inlineStylesheet:a,maskInputOptions:h={},maskTextFn:u,maskInputFn:l,dataURLOptions:c={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1}=e,g=function(t,e){if(!e.hasNode(t))return;var r=e.getId(t);return 1===r?void 0:r}(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:v.Document,childNodes:[],compatMode:t.compatMode}:{type:v.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:v.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:g};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,{doc:s,blockClass:o,blockSelector:a,inlineStylesheet:h,maskInputOptions:u={},maskInputFn:l,dataURLOptions:c={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:g}=e,w=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;){var n=t.classList[i];if(e.test(n))return!0}if(r)return t.matches(r)}catch(t){}return!1}(t,o,a),y=function(t){if(t instanceof HTMLFormElement)return"form";var e=A(t.tagName);return G.test(e)?"div":e}(t),b={},S=t.attributes.length,k=0;k<S;k++){var I=t.attributes[k];rt(y,I.name,I.value)||(b[I.name]=et(s,y,A(I.name),I.value,t,c))}if("link"===y&&h){var M=function(t){return t.href}(t);if(M){var x=ot(s,M);if(!x&&M.includes(".css"))x=ot(s,window.location.origin+"/"+M.replace(window.location.href,""));var _=null;x&&(_=R(x)),_&&(delete b.rel,delete b.href,b._cssText=_)}}if("style"===y&&t.sheet&&!(t.innerText||C.textContent(t)||"").trim().length){var O=R(t.sheet);O&&(b._cssText=O)}if("input"===y||"textarea"===y||"select"===y){var L=t.value,N=t.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&L?b.value=T({element:t,type:B(t),tagName:y,value:L,maskInputOptions:u,maskInputFn:l}):N&&(b.checked=N)}"option"===y&&(t.selected&&!u.select?b.selected=!0:delete b.selected);if("dialog"===y&&t.open)try{b.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){b.rr_open_mode="modal",b.ph_rr_could_not_detect_modal=!0}if("canvas"===y&&d)if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;r<t.width;r+=50)for(var i=0;i<t.height;i+=50){var n=e.getImageData,s=E in n?n[E]:n;if(new Uint32Array(s.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)||(b.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){var D=t.toDataURL(c.type,c.quality),F=s.createElement("canvas");F.width=t.width,F.height=t.height,D!==F.toDataURL(c.type,c.quality)&&(b.rr_dataURL=D)}if("img"===y&&f){z||(z=s.createElement("canvas"),q=z.getContext("2d"));var j=t,P=j.currentSrc||j.getAttribute("src")||"<unknown-src>",U=j.crossOrigin,W=()=>{j.removeEventListener("load",W);try{z.width=j.naturalWidth,z.height=j.naturalHeight,q.drawImage(j,0,0),b.rr_dataURL=z.toDataURL(c.type,c.quality)}catch(t){if("anonymous"!==j.crossOrigin)return j.crossOrigin="anonymous",void(j.complete&&0!==j.naturalWidth?W():j.addEventListener("load",W));console.warn("Cannot inline img src="+P+"! Error: "+t)}"anonymous"===j.crossOrigin&&(U?b.crossOrigin=U:j.removeAttribute("crossorigin"))};j.complete&&0!==j.naturalWidth?W():j.addEventListener("load",W)}if("audio"===y||"video"===y){var H=b;H.rr_mediaState=t.paused?"paused":"played",H.rr_mediaCurrentTime=t.currentTime,H.rr_mediaPlaybackRate=t.playbackRate,H.rr_mediaMuted=t.muted,H.rr_mediaLoop=t.loop,H.rr_mediaVolume=t.volume}m||(t.scrollLeft&&(b.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(b.rr_scrollTop=t.scrollTop));if(w){var{width:V,height:J,left:Y,top:Z}=t.getBoundingClientRect();b={class:b.class,rr_width:V+"px",rr_height:J+"px",rr_left:Math.floor(Y+((null==(r=s.defaultView)?void 0:r.scrollX)||0))+"px",rr_top:Math.floor(Z+((null==(i=s.defaultView)?void 0:i.scrollY)||0))+"px"}}"iframe"!==y||p(b.src)||(t.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(y)&&(n=!0)}catch(t){}return{type:v.Element,tagName:y,attributes:b,childNodes:[],isSVG:Q(t)||void 0,needBlock:w,rootId:g,isCustom:n}}(t,{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:a,maskInputOptions:h,maskInputFn:l,dataURLOptions:c,inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m,rootId:g});case t.TEXT_NODE:return function(t,e){var r,{needsMask:i,maskTextFn:n,rootId:s}=e,o=C.parentNode(t),a=o&&o.tagName,h=C.textContent(t),u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(u&&h){try{t.nextSibling||t.previousSibling||(null==(r=o.sheet)?void 0:r.cssRules)&&(h=R(o.sheet))}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}h=P(h,tt(e.doc))}l&&(h="SCRIPT_PLACEHOLDER");!u&&!l&&h&&i&&(h=n?n(h,C.parentElement(t)):h.replace(/[\S]/g,"*"));return{type:v.Text,textContent:h||"",isStyle:u,rootId:s}}(t,{doc:r,needsMask:o,maskTextFn:u,rootId:g});case t.CDATA_SECTION_NODE:return{type:v.CDATA,textContent:"",rootId:g};case t.COMMENT_NODE:return{type:v.Comment,textContent:C.textContent(t)||"",rootId:g};default:return!1}}function ot(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function at(t){return null==t?"":t.toLowerCase()}var ht=50,ut=!1,lt=!1;function ct(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:h=!1,inlineStylesheet:u=!0,maskInputOptions:l={},maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:R=(()=>!1),newlyAddedElement:_=!1,depth:O=0,maxDepth:T=ht}=e,{needsMask:A}=e,{preserveWhiteSpace:E=!0}=e;if(O>=T)return lt=!0,ut||(ut=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+T+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;A||(A=nt(t,o,a,void 0===A));var B,N=st(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:A,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:R,newlyAddedElement:_});if(!N)return console.warn(t,"not serialized"),null;B=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===v.Comment)return!0;if(t.type===v.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"===L(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(at(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===at(t.attributes.name)||"icon"===at(t.attributes.rel)||"apple-touch-icon"===at(t.attributes.rel)||"shortcut icon"===at(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&at(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(at(t.attributes.property).match(/^(og|twitter|fb):/)||at(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===at(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===at(t.attributes.name)||"googlebot"===at(t.attributes.name)||"bingbot"===at(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===at(t.attributes.name)||"generator"===at(t.attributes.name)||"framework"===at(t.attributes.name)||"publisher"===at(t.attributes.name)||"progid"===at(t.attributes.name)||at(t.attributes.property).match(/^article:/)||at(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===at(t.attributes.name)||"yandex-verification"===at(t.attributes.name)||"csrf-token"===at(t.attributes.name)||"p:domain_verify"===at(t.attributes.name)||"verify-v1"===at(t.attributes.name)||"verification"===at(t.attributes.name)||"shopify-checkout-api-token"===at(t.attributes.name)))return!0}}return!1}(N,d)&&(E||N.type!==v.Text||N.isStyle||N.textContent.replace(/^\s+|\s+$/gm,"").length)?J():V;var D=Object.assign(N,{id:B});if(i.add(t,D),B===V)return null;w&&w(t);var F=!h;if(D.type===v.Element){F=F&&!D.needBlock,delete D.needBlock;var j=C.shadowRoot(t);j&&x(j)&&(D.isShadowHost=!0)}if((D.type===v.Document||D.type===v.Element)&&F){d.headWhitespace&&D.type===v.Element&&"head"===D.tagName&&(E=!1);var P={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:A,maskTextClass:o,maskTextSelector:a,skipChild:h,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:R,depth:O+1,maxDepth:T};if(D.type===v.Element&&"textarea"===D.tagName&&void 0!==D.attributes.value);else for(var U of Array.from(C.childNodes(t))){var W=ct(U,P);W&&D.childNodes.push(W)}var z=null;if(I(t)&&(z=C.shadowRoot(t)))for(var q of Array.from(C.childNodes(z))){var H=ct(q,P);H&&(x(z)&&(H.isShadow=!0),D.childNodes.push(H))}}var G=C.parentNode(t);return G&&M(G)&&x(G)&&(D.isShadow=!0),D.type===v.Element&&"iframe"===D.tagName&&function(t,e,r){var i=t.contentWindow;if(i){var n,s=!1;try{n=i.document.readyState}catch(t){return}if("complete"===n){var o="about:blank";if(i.location.href!==o||t.src===o||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}else{var a=setTimeout((()=>{s||(e(),s=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(a),s=!0,e()}))}}}(t,(()=>{var e=t.contentDocument;if(e&&y){var r=ct(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:A,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:R,depth:O+1,maxDepth:T});r&&y(t,r)}}),b),D.type===v.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===L(D.attributes.href))&&function(t,e,r){var i,n=!1;try{i=t.sheet}catch(t){return}if(!i){var s=setTimeout((()=>{n||(e(),n=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(s),n=!0,e()}))}}(t,(()=>{if(S){var e=ct(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:A,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:E,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:R,depth:O,maxDepth:T});e&&S(t,e)}}),k),D}function ft(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function dt(t){if(Object.prototype.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:function(){return t[e]}})})),r}var vt,pt={exports:{}};function mt(){if(vt)return pt.exports;vt=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 pt.exports=e(),pt.exports.createColors=e,pt.exports}var gt,wt,yt,bt,St,kt,Ct=dt(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function It(){if(wt)return gt;wt=1;var t=mt(),e=Ct;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{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).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 gt=r,r.default=r,gt}function Mt(){if(bt)return yt;bt=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes)this.block(t,r+i);else{var n=(t.raws.between||"")+(e?";":"");this.builder(r+i+n,t)}}beforeAfter(t,e){var r;r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"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;o<n;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;i<t.nodes.length;i++){var n=t.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==i||r)}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)}decl(t,e){var r=this.raw(t,"between","colon"),i=t.prop+r+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(e,r,i){var n;if(i||(i=r),r&&void 0!==(n=e.raws[r]))return n;var s=e.parent;if("before"===i){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return t[i];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[i])return o.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(e,i);var a,h="raw"+((a=i)[0].toUpperCase()+a.slice(1));return this[h]?n=this[h](o,e):o.walk((t=>{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}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){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(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 yt=e,e.default=e,yt}function xt(){if(kt)return St;kt=1;var t=Mt();function e(e,r){new t(r).stringify(e)}return St=e,e.default=e,St}var Rt,_t,Ot,Tt,At,Et,Bt,Lt,Nt,Dt,Ft,jt,Pt,Ut,Wt,$t,zt,qt,Ht,Gt,Vt,Jt,Yt,Zt,Xt,Kt,Qt,te,ee,re,ie,ne,se,oe,ae,he,ue,le,ce,fe,de,ve,pe,me,ge,we,ye,be,Se,ke,Ce,Ie,Me,xe={};function Re(){return Rt||(Rt=1,xe.isClean=Symbol("isClean"),xe.my=Symbol("my")),xe}function _e(){if(Ot)return _t;Ot=1;var t=It(),e=Mt(),r=xt(),{isClean:i,my:n}=Re();function s(t,e){var r=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;s<t.length;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 in void 0===t&&(t={}),this.raws={},this[i]=!1,this[n]=!0,t)if("nodes"===e)for(var r of(this.nodes=[],t[e]))"function"==typeof r.clone?this.append(r.clone()):this.append(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=s(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{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new t(e)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,r)=>(t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!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=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}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;a<s;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)}: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):t.index&&(i=this.positionInside(t.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.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;n<r;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={},i=null==e;e=e||new Map;var n=0;for(var s in this)if(Object.prototype.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}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 _t=a,a.default=a,_t}function Oe(){if(At)return Tt;At=1;var t=_e();class e extends t{constructor(t){super(t),this.type="comment"}}return Tt=e,e.default=e,Tt}function Te(){if(Bt)return Et;Bt=1;var t=_e();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 Et=e,e.default=e,Et}function Ae(){if(Nt)return Lt;Nt=1;var t,e,r,i,n=Oe(),s=Te(),o=_e(),{isClean:a,my:h}=Re();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c 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;r<t;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){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.indexes[i]<this.proxyOf.nodes.length&&(e=this.indexes[i],!1!==(r=t(this.proxyOf.nodes[e],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)=>"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;n<r;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;n<e;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)=>(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)i<(r=this.indexes[o])&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=0===i&&"prepend",s=this.normalize(e,this.proxyOf.nodes[i],n).reverse();for(var o of(i=this.index(t),s))this.proxyOf.nodes.splice(i,0,o);for(var a in this.indexes)i<=(r=this.indexes[a])&&(this.indexes[a]=r+s.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"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 v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(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 v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;r<t;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)(e=this.indexes[r])>=t&&(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){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}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 c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},Lt=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},Lt}function Ee(){if(Ft)return Dt;Ft=1;var t=Ae();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 Dt=e,e.default=e,t.registerAtRule(e),Dt}function Be(){if(Pt)return jt;Pt=1;var t,e,i=Ae();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},jt=n,n.default=n,jt}function Le(){if(Wt)return Ut;Wt=1;return Ut={nanoid:function(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(t,e){return void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i}}}}function Ne(){if(zt)return $t;zt=1;var{existsSync:t,readFileSync:e}=Ct,{dirname:r,join:i}=Ct,{SourceMapConsumer:n,SourceMapGenerator:s}=Ct;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=e.map?e.map.prev:void 0,n=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),n&&(this.text=n)}}consumer(){return this.consumerCache||(this.consumerCache=new n(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.match(/data:application\/json;([^,]+),/)[1];throw 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(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"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 n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return $t=o,o.default=o,$t}function De(){if(Ht)return qt;Ht=1;var{nanoid:t}=Le(),{isAbsolute:e,resolve:i}=Ct,{SourceMapConsumer:n,SourceMapGenerator:s}=Ct,{fileURLToPath:o,pathToFileURL:a}=Ct,h=It(),u=Ne(),l=Ct,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;n<s;n++)r[n]=i,i+=e[n].length+1;return t[c]=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&&(!d||/^\w+:\/\//.test(n.from)||e(n.from)?this.file=n.from:this.file=i(n.from)),d&&f){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 c=e,f=r;if("number"==typeof c.offset){u=c.offset;var d=this.fromOffset(u);e=d.line,r=d.col}else e=c.line,r=c.column,u=this.fromLineAndColumn(e,r);if("number"==typeof f.offset){o=f.offset;var v=this.fromOffset(o);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{u=e;var p=this.fromOffset(u);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 v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(t>=e[e.length-1])r=e.length-1;else for(var i,n=e.length-2;r<n;)if(t<e[i=r+(n-r>>1)])n=i-1;else{if(!(t>=e[i+1])){r=i;break}r=i+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,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,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 f=u.sourceContentFor(l.source);return f&&(c.source=f),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 qt=p,p.default=p,l&&l.registerInput&&l.registerInput(p),qt}function Fe(){if(Vt)return Gt;Vt=1;var t,e,r=Ae();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=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 n of i)n.raws.before=e.raws.before;return i}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},Gt=i,i.default=i,r.registerRoot(i),Gt}function je(){if(Yt)return Jt;Yt=1;var t={comma:e=>t.split(e,[","],!0),space:e=>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 Jt=t,t.default=t,Jt}function Pe(){if(Xt)return Zt;Xt=1;var t=Ae(),e=je();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 Zt=r,r.default=r,t.registerRule(r),Zt}function Ue(){if(ee)return te;ee=1;var{dirname:t,relative:e,resolve:r,sep:i}=Ct,{SourceMapConsumer:n,SourceMapGenerator:s}=Ct,{pathToFileURL:o}=Ct,a=De(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return te=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 this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}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}},te}function We(){if(ie)return re;ie=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),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),g=":".charCodeAt(0),w="@".charCodeAt(0),y=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return re=function(C,I){void 0===I&&(I={});var M,x,R,_,O,T,A,E,B,L,N=C.css.valueOf(),D=I.ignoreErrors,F=N.length,j=0,P=[],U=[];function W(t){throw C.error("Unclosed "+t,j)}return{back:function(t){U.push(t)},endOfFile:function(){return 0===U.length&&j>=F},nextToken:function(C){if(U.length)return U.pop();if(!(j>=F)){var I=!!C&&C.ignoreUnclosed;switch(M=N.charCodeAt(j)){case n:case s:case a:case h:case o:_=j;do{_+=1,M=N.charCodeAt(_)}while(M===s||M===n||M===a||M===h||M===o);T=["space",N.slice(j,_)],j=_-1;break;case u:case l:case d:case v:case g:case p:case f:var z=String.fromCharCode(M);T=[z,z,j];break;case c:if(L=P.length?P.pop()[1]:"",B=N.charCodeAt(j+1),"url"===L&&B!==t&&B!==e&&B!==s&&B!==n&&B!==a&&B!==o&&B!==h){_=j;do{if(A=!1,-1===(_=N.indexOf(")",_+1))){if(D||I){_=j;break}W("bracket")}for(E=_;N.charCodeAt(E-1)===r;)E-=1,A=!A}while(A);T=["brackets",N.slice(j,_+1),j,_],j=_}else _=N.indexOf(")",j+1),x=N.slice(j,_+1),-1===_||S.test(x)?T=["(","(",j]:(T=["brackets",x,j,_],j=_);break;case t:case e:O=M===t?"'":'"',_=j;do{if(A=!1,-1===(_=N.indexOf(O,_+1))){if(D||I){_=j+1;break}W("string")}for(E=_;N.charCodeAt(E-1)===r;)E-=1,A=!A}while(A);T=["string",N.slice(j,_+1),j,_],j=_;break;case w:y.lastIndex=j+1,y.test(N),_=0===y.lastIndex?N.length-1:y.lastIndex-2,T=["at-word",N.slice(j,_+1),j,_],j=_;break;case r:for(_=j,R=!0;N.charCodeAt(_+1)===r;)_+=1,R=!R;if(M=N.charCodeAt(_+1),R&&M!==i&&M!==s&&M!==n&&M!==a&&M!==h&&M!==o&&(_+=1,k.test(N.charAt(_)))){for(;k.test(N.charAt(_+1));)_+=1;N.charCodeAt(_+1)===s&&(_+=1)}T=["word",N.slice(j,_+1),j,_],j=_;break;default:M===i&&N.charCodeAt(j+1)===m?(0===(_=N.indexOf("*/",j+2)+1)&&(D||I?_=N.length:W("comment")),T=["comment",N.slice(j,_+1),j,_],j=_):(b.lastIndex=j+1,b.test(N),_=0===b.lastIndex?N.length-1:b.lastIndex-2,T=["word",N.slice(j,_+1),j,_],P.push(T),j=_)}return j++,T}},position:function(){return j}}}}function $e(){if(se)return ne;se=1;var t=Ee(),e=Oe(),r=Te(),i=Fe(),n=Pe(),s=We(),o={empty:!0,space:!0};return ne=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&&(e=h[h.length-1],s.source.end=this.getPosition(e[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,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}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(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[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++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.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,h,u=r.length,l="",c=!0,f=0;f<u;f+=1)"space"!==(s=(n=r[f])[0])||f!==u-1||i?"comment"===s?(h=r[f-1]?r[f-1][0]:"empty",a=r[f+1]?r[f+1][0]:"empty",o[h]||o[a]||","===l.slice(-1)?c=!1:l+=n[1]):l+=n[1]:c=!1;if(!c){var d=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:d,value:l}}t[e]=l}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;i<t.length;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 ze(){if(ae)return oe;ae=1;var t=Ae(),e=De(),r=$e();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 oe=i,i.default=i,t.registerParse(i),oe}function qe(){if(ue)return he;ue=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return he=t,t.default=t,he}function He(){if(ce)return le;ce=1;var t=qe();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 le=e,e.default=e,le}function Ge(){if(de)return fe;de=1;var t={};return fe=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Ve(){if(pe)return ve;pe=1;var t=Ae(),i=Be(),n=Ue(),s=ze(),o=He(),a=Fe(),h=xt(),{isClean:u,my:l}=Re(),c=Ge(),f={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},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function y(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>y(t))),t}var b={};class S{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 S||i instanceof o)a=y(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[l]&&t.rebuild(a)}else a=y(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,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(!v[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;e<t.plugins.length;e++){var r=t.plugins[e],i=t.runOnRoot(r);if(m(i))try{yield i}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var n=t.result.root;!n[u];){n[u]=!0;for(var s=[w(n)];s.length>0;){var o=t.visitTick(s);if(m(o))try{yield o}catch(e){var a=s[s.length-1].node;throw t.handleError(e,a)}}}if(t.listeners.OnceExit){var h=function*(e){t.result.lastPlugin=l;try{if("document"===n.type){var r=n.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(n,t.helpers)}catch(e){throw t.handleError(e)}};for(var[l,c]of t.listeners.OnceExit)yield*h(c)}}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 m(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=new n(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins){if(m(this.runOnRoot(t)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!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,i]of t){this.result.lastPlugin=r;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(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&e.visitorIndex<i.length){var[n,s]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var o,a=e.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[u])return o[u]=!0,void t.push(w(o));e.iterator=0,delete r.indexes[a]}for(var h=e.events;e.eventIndex<h.length;){var l=h[e.eventIndex];if(e.eventIndex+=1,l===p)return void(r.nodes&&r.nodes.length&&(r[u]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[u]=!0;var e=g(t);for(var r of e)if(r===p)t.nodes&&t.each((t=>{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},ve=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),ve}function Je(){if(ye)return we;ye=1;var t=Be(),e=Ve(),r=function(){if(ge)return me;ge=1;var t=Ue(),e=ze(),r=He(),i=xt(),n=Ge();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){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get:()=>h.root});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.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 me=s,s.default=s,me}(),i=Fe();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",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 we=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),we}function Ye(){if(Se)return be;Se=1;var t=Ee(),e=Oe(),n=Ae(),a=It(),h=Te(),u=Be(),l=function(){if(Qt)return Kt;Qt=1;var t=Ee(),e=Oe(),n=Te(),a=De(),h=Ne(),u=Fe(),l=Pe();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,s);if(v)for(var m of(d=[],v)){var g=r({},m,{__proto__:a.prototype});g.map&&(g.map=r({},g.map,{__proto__:h.prototype})),d.push(g)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var w=p.source,{inputId:y}=w,b=i(w,o);p.source=b,null!=y&&(p.source.input=d[y])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return Kt=c,c.default=c,Kt}(),c=De(),f=Ve(),d=je(),v=_e(),p=ze(),m=Je(),g=He(),w=Fe(),y=Pe(),b=xt(),S=qe();function k(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}return k.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 m).version,r}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new h(t),k.rule=t=>new y(t),k.root=t=>new w(t),k.document=t=>new u(t),k.CssSyntaxError=a,k.Declaration=h,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=g,k.Input=c,k.Rule=y,k.Root=w,k.Node=v,f.registerPostcss(k),be=k,k.default=k,be}!function(){if(Me)return Ie;Me=1;var{Input:t}=Ye(),e=function(){if(Ce)return ke;Ce=1;var t=Oe(),e=$e(),r=We();return ke=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=""}}}();Ie=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}();var Ze=ft(Ye());Ze.stringify,Ze.fromJSON,Ze.plugin,Ze.parse,Ze.list,Ze.document,Ze.comment,Ze.atRule,Ze.rule,Ze.decl,Ze.root,Ze.CssSyntaxError,Ze.Declaration,Ze.Container,Ze.Processor,Ze.Document,Ze.Comment,Ze.Warning,Ze.AtRule,Ze.Result,Ze.Input,Ze.Rule,Ze.Root,Ze.Node;var Xe=Object.defineProperty,Ke=(t,e,r)=>((t,e,r)=>e in t?Xe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);function Qe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function tr(t){if(Object.prototype.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:function(){return t[e]}})})),r}var er,rr={exports:{}};function ir(){if(er)return rr.exports;er=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 rr.exports=e(),rr.exports.createColors=e,rr.exports}var nr,sr,or,ar,hr,ur,lr=tr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function cr(){if(sr)return nr;sr=1;var t=ir(),e=lr;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{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).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 nr=r,r.default=r,nr}function fr(){if(ar)return or;ar=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes)this.block(t,r+i);else{var n=(t.raws.between||"")+(e?";":"");this.builder(r+i+n,t)}}beforeAfter(t,e){var r;r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"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;o<n;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;i<t.nodes.length;i++){var n=t.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==i||r)}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)}decl(t,e){var r=this.raw(t,"between","colon"),i=t.prop+r+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(e,r,i){var n;if(i||(i=r),r&&void 0!==(n=e.raws[r]))return n;var s=e.parent;if("before"===i){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return t[i];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[i])return o.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(e,i);var a,h="raw"+((a=i)[0].toUpperCase()+a.slice(1));return this[h]?n=this[h](o,e):o.walk((t=>{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}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){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(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 or=e,e.default=e,or}function dr(){if(ur)return hr;ur=1;var t=fr();function e(e,r){new t(r).stringify(e)}return hr=e,e.default=e,hr}var vr,pr,mr,gr,wr,yr,br,Sr,kr,Cr,Ir,Mr,xr,Rr,_r,Or,Tr,Ar,Er,Br,Lr,Nr,Dr,Fr,jr,Pr,Ur,Wr,$r,zr,qr,Hr,Gr,Vr,Jr,Yr,Zr,Xr,Kr,Qr,ti,ei,ri,ii,ni,si,oi,ai,hi,ui,li,ci,fi,di={};function vi(){return vr||(vr=1,di.isClean=Symbol("isClean"),di.my=Symbol("my")),di}function pi(){if(mr)return pr;mr=1;var t=cr(),e=fr(),r=dr(),{isClean:i,my:n}=vi();function s(t,e){var r=new t.constructor;for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;s<t.length;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 in void 0===t&&(t={}),this.raws={},this[i]=!1,this[n]=!0,t)if("nodes"===e)for(var r of(this.nodes=[],t[e]))"function"==typeof r.clone?this.append(r.clone()):this.append(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=s(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{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new t(e)}getProxyProcessor(){return{get:(t,e)=>"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e],set:(t,e,r)=>(t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0)}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!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=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}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;a<s;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)}: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):t.index&&(i=this.positionInside(t.index+1));return(i.line<r.line||i.line===r.line&&i.column<=r.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;n<r;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={},i=null==e;e=e||new Map;var n=0;for(var s in this)if(Object.prototype.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}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 pr=a,a.default=a,pr}function mi(){if(wr)return gr;wr=1;var t=pi();class e extends t{constructor(t){super(t),this.type="comment"}}return gr=e,e.default=e,gr}function gi(){if(br)return yr;br=1;var t=pi();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 yr=e,e.default=e,yr}function wi(){if(kr)return Sr;kr=1;var t,e,r,i,n=mi(),s=gi(),o=pi(),{isClean:a,my:h}=vi();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c 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;r<t;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){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.indexes[i]<this.proxyOf.nodes.length&&(e=this.indexes[i],!1!==(r=t(this.proxyOf.nodes[e],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)=>"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;n<r;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;n<e;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)=>(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)i<(r=this.indexes[o])&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=0===i&&"prepend",s=this.normalize(e,this.proxyOf.nodes[i],n).reverse();for(var o of(i=this.index(t),s))this.proxyOf.nodes.splice(i,0,o);for(var a in this.indexes)i<=(r=this.indexes[a])&&(this.indexes[a]=r+s.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"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 v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(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 v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;r<t;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)(e=this.indexes[r])>=t&&(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){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}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 c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},Sr=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},Sr}function yi(){if(Ir)return Cr;Ir=1;var t=wi();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 Cr=e,e.default=e,t.registerAtRule(e),Cr}function bi(){if(xr)return Mr;xr=1;var t,e,i=wi();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},Mr=n,n.default=n,Mr}function Si(){if(_r)return Rr;_r=1;return Rr={nanoid:function(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(t,e){return void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i}}}}function ki(){if(Tr)return Or;Tr=1;var{existsSync:t,readFileSync:e}=lr,{dirname:r,join:i}=lr,{SourceMapConsumer:n,SourceMapGenerator:s}=lr;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=e.map?e.map.prev:void 0,n=this.loadMap(e.from,i);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),n&&(this.text=n)}}consumer(){return this.consumerCache||(this.consumerCache=new n(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.match(/data:application\/json;([^,]+),/)[1];throw 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(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"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 n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Or=o,o.default=o,Or}function Ci(){if(Er)return Ar;Er=1;var{nanoid:t}=Si(),{isAbsolute:e,resolve:i}=lr,{SourceMapConsumer:n,SourceMapGenerator:s}=lr,{fileURLToPath:o,pathToFileURL:a}=lr,h=cr(),u=ki(),l=lr,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;n<s;n++)r[n]=i,i+=e[n].length+1;return t[c]=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&&(!d||/^\w+:\/\//.test(n.from)||e(n.from)?this.file=n.from:this.file=i(n.from)),d&&f){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 c=e,f=r;if("number"==typeof c.offset){u=c.offset;var d=this.fromOffset(u);e=d.line,r=d.col}else e=c.line,r=c.column,u=this.fromLineAndColumn(e,r);if("number"==typeof f.offset){o=f.offset;var v=this.fromOffset(o);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{u=e;var p=this.fromOffset(u);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 v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(t>=e[e.length-1])r=e.length-1;else for(var i,n=e.length-2;r<n;)if(t<e[i=r+(n-r>>1)])n=i-1;else{if(!(t>=e[i+1])){r=i;break}r=i+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,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,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 f=u.sourceContentFor(l.source);return f&&(c.source=f),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 Ar=p,p.default=p,l&&l.registerInput&&l.registerInput(p),Ar}function Ii(){if(Lr)return Br;Lr=1;var t,e,r=wi();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=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 n of i)n.raws.before=e.raws.before;return i}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},Br=i,i.default=i,r.registerRoot(i),Br}function Mi(){if(Dr)return Nr;Dr=1;var t={comma:e=>t.split(e,[","],!0),space:e=>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 Nr=t,t.default=t,Nr}function xi(){if(jr)return Fr;jr=1;var t=wi(),e=Mi();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 Fr=r,r.default=r,t.registerRule(r),Fr}function Ri(){if($r)return Wr;$r=1;var{dirname:t,relative:e,resolve:r,sep:i}=lr,{SourceMapConsumer:n,SourceMapGenerator:s}=lr,{pathToFileURL:o}=lr,a=Ci(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return Wr=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 this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}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}},Wr}function _i(){if(qr)return zr;qr=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),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),g=":".charCodeAt(0),w="@".charCodeAt(0),y=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return zr=function(C,I){void 0===I&&(I={});var M,x,R,_,O,T,A,E,B,L,N=C.css.valueOf(),D=I.ignoreErrors,F=N.length,j=0,P=[],U=[];function W(t){throw C.error("Unclosed "+t,j)}return{back:function(t){U.push(t)},endOfFile:function(){return 0===U.length&&j>=F},nextToken:function(C){if(U.length)return U.pop();if(!(j>=F)){var I=!!C&&C.ignoreUnclosed;switch(M=N.charCodeAt(j)){case n:case s:case a:case h:case o:_=j;do{_+=1,M=N.charCodeAt(_)}while(M===s||M===n||M===a||M===h||M===o);T=["space",N.slice(j,_)],j=_-1;break;case u:case l:case d:case v:case g:case p:case f:var z=String.fromCharCode(M);T=[z,z,j];break;case c:if(L=P.length?P.pop()[1]:"",B=N.charCodeAt(j+1),"url"===L&&B!==t&&B!==e&&B!==s&&B!==n&&B!==a&&B!==o&&B!==h){_=j;do{if(A=!1,-1===(_=N.indexOf(")",_+1))){if(D||I){_=j;break}W("bracket")}for(E=_;N.charCodeAt(E-1)===r;)E-=1,A=!A}while(A);T=["brackets",N.slice(j,_+1),j,_],j=_}else _=N.indexOf(")",j+1),x=N.slice(j,_+1),-1===_||S.test(x)?T=["(","(",j]:(T=["brackets",x,j,_],j=_);break;case t:case e:O=M===t?"'":'"',_=j;do{if(A=!1,-1===(_=N.indexOf(O,_+1))){if(D||I){_=j+1;break}W("string")}for(E=_;N.charCodeAt(E-1)===r;)E-=1,A=!A}while(A);T=["string",N.slice(j,_+1),j,_],j=_;break;case w:y.lastIndex=j+1,y.test(N),_=0===y.lastIndex?N.length-1:y.lastIndex-2,T=["at-word",N.slice(j,_+1),j,_],j=_;break;case r:for(_=j,R=!0;N.charCodeAt(_+1)===r;)_+=1,R=!R;if(M=N.charCodeAt(_+1),R&&M!==i&&M!==s&&M!==n&&M!==a&&M!==h&&M!==o&&(_+=1,k.test(N.charAt(_)))){for(;k.test(N.charAt(_+1));)_+=1;N.charCodeAt(_+1)===s&&(_+=1)}T=["word",N.slice(j,_+1),j,_],j=_;break;default:M===i&&N.charCodeAt(j+1)===m?(0===(_=N.indexOf("*/",j+2)+1)&&(D||I?_=N.length:W("comment")),T=["comment",N.slice(j,_+1),j,_],j=_):(b.lastIndex=j+1,b.test(N),_=0===b.lastIndex?N.length-1:b.lastIndex-2,T=["word",N.slice(j,_+1),j,_],P.push(T),j=_)}return j++,T}},position:function(){return j}}}}function Oi(){if(Gr)return Hr;Gr=1;var t=yi(),e=mi(),r=gi(),i=Ii(),n=xi(),s=_i(),o={empty:!0,space:!0};return Hr=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&&(e=h[h.length-1],s.source.end=this.getPosition(e[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,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}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(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[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++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.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,h,u=r.length,l="",c=!0,f=0;f<u;f+=1)"space"!==(s=(n=r[f])[0])||f!==u-1||i?"comment"===s?(h=r[f-1]?r[f-1][0]:"empty",a=r[f+1]?r[f+1][0]:"empty",o[h]||o[a]||","===l.slice(-1)?c=!1:l+=n[1]):l+=n[1]:c=!1;if(!c){var d=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:d,value:l}}t[e]=l}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;i<t.length;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 Ti(){if(Jr)return Vr;Jr=1;var t=wi(),e=Ci(),r=Oi();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 Vr=i,i.default=i,t.registerParse(i),Vr}function Ai(){if(Zr)return Yr;Zr=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Yr=t,t.default=t,Yr}function Ei(){if(Kr)return Xr;Kr=1;var t=Ai();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 Xr=e,e.default=e,Xr}function Bi(){if(ti)return Qr;ti=1;var t={};return Qr=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Li(){if(ri)return ei;ri=1;var t=wi(),i=bi(),n=Ri(),s=Ti(),o=Ei(),a=Ii(),h=dr(),{isClean:u,my:l}=vi(),c=Bi(),f={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},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function y(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>y(t))),t}var b={};class S{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 S||i instanceof o)a=y(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[l]&&t.rebuild(a)}else a=y(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,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(!v[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;e<t.plugins.length;e++){var r=t.plugins[e],i=t.runOnRoot(r);if(m(i))try{yield i}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var n=t.result.root;!n[u];){n[u]=!0;for(var s=[w(n)];s.length>0;){var o=t.visitTick(s);if(m(o))try{yield o}catch(e){var a=s[s.length-1].node;throw t.handleError(e,a)}}}if(t.listeners.OnceExit){var h=function*(e){t.result.lastPlugin=l;try{if("document"===n.type){var r=n.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(n,t.helpers)}catch(e){throw t.handleError(e)}};for(var[l,c]of t.listeners.OnceExit)yield*h(c)}}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 m(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=new n(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins){if(m(this.runOnRoot(t)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!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,i]of t){this.result.lastPlugin=r;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(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&e.visitorIndex<i.length){var[n,s]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var o,a=e.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[u])return o[u]=!0,void t.push(w(o));e.iterator=0,delete r.indexes[a]}for(var h=e.events;e.eventIndex<h.length;){var l=h[e.eventIndex];if(e.eventIndex+=1,l===p)return void(r.nodes&&r.nodes.length&&(r[u]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[u]=!0;var e=g(t);for(var r of e)if(r===p)t.nodes&&t.each((t=>{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},ei=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),ei}function Ni(){if(oi)return si;oi=1;var t=bi(),e=Li(),r=function(){if(ni)return ii;ni=1;var t=Ri(),e=Ti(),r=Ei(),i=dr(),n=Bi();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){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get:()=>h.root});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.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 ii=s,s.default=s,ii}(),i=Ii();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",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 si=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),si}function Di(){if(hi)return ai;hi=1;var t=yi(),e=mi(),n=wi(),s=cr(),o=gi(),u=bi(),l=function(){if(Ur)return Pr;Ur=1;var t=yi(),e=mi(),n=gi(),s=Ci(),o=ki(),u=Ii(),l=xi();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,a);if(v)for(var m of(d=[],v)){var g=r({},m,{__proto__:s.prototype});g.map&&(g.map=r({},g.map,{__proto__:o.prototype})),d.push(g)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var w=p.source,{inputId:y}=w,b=i(w,h);p.source=b,null!=y&&(p.source.input=d[y])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return Pr=c,c.default=c,Pr}(),c=Ci(),f=Li(),d=Mi(),v=pi(),p=Ti(),m=Ni(),g=Ei(),w=Ii(),y=xi(),b=dr(),S=Ai();function k(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}return k.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 m).version,r}return Object.defineProperty(n,"postcss",{get:()=>(r||(r=n()),r)}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new o(t),k.rule=t=>new y(t),k.root=t=>new w(t),k.document=t=>new u(t),k.CssSyntaxError=s,k.Declaration=o,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=g,k.Input=c,k.Rule=y,k.Root=w,k.Node=v,f.registerPostcss(k),ai=k,k.default=k,ai}!function(){if(fi)return ci;fi=1;var{Input:t}=Di(),e=function(){if(li)return ui;li=1;var t=mi(),e=Oi(),r=_i();return ui=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=""}}}();ci=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}();var Fi=Qe(Di());Fi.stringify,Fi.fromJSON,Fi.plugin,Fi.parse,Fi.list,Fi.document,Fi.comment,Fi.atRule,Fi.rule,Fi.decl,Fi.root,Fi.CssSyntaxError,Fi.Declaration,Fi.Container,Fi.Processor,Fi.Document,Fi.Comment,Fi.Warning,Fi.AtRule,Fi.Result,Fi.Input,Fi.Rule,Fi.Root,Fi.Node;class ji{constructor(){Ke(this,"parentElement",null),Ke(this,"parentNode",null),Ke(this,"ownerDocument"),Ke(this,"firstChild",null),Ke(this,"lastChild",null),Ke(this,"previousSibling",null),Ke(this,"nextSibling",null),Ke(this,"ELEMENT_NODE",1),Ke(this,"TEXT_NODE",3),Ke(this,"nodeType"),Ke(this,"nodeName"),Ke(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof ji))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"}}var Pi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ui={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Wi={};function $i(t){if(Wi[t])return Wi[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 Pi?Pi[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 Ui?Ui[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 Wi[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?Wi[t]=u:r}catch(t){return r}}var zi={};function qi(t,e,r){var i,n=t+"."+String(r);if(zi[n])return zi[n].call(e);var s=$i(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(zi[n]=o,o.call(e)):e[r]}var Hi={};function Gi(t,e,r){var i=t+"."+String(r);if(Hi[i])return Hi[i].bind(e);var n=$i(t)[r];return"function"!=typeof n?e[r]:(Hi[i]=n,n.bind(e))}function Vi(){return $i("MutationObserver").constructor}function Ji(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}var Yi={childNodes:function(t){return qi("Node",t,"childNodes")},parentNode:function(t){return qi("Node",t,"parentNode")},parentElement:function(t){return qi("Node",t,"parentElement")},textContent:function(t){return qi("Node",t,"textContent")},contains:function(t,e){return Gi("Node",t,"contains")(e)},getRootNode:function(t){return Gi("Node",t,"getRootNode")()},host:function(t){return t&&"host"in t?qi("ShadowRoot",t,"host"):null},styleSheets:function(t){return t.styleSheets},shadowRoot:function(t){return t&&"shadowRoot"in t?qi("Element",t,"shadowRoot"):null},querySelector:function(t,e){return qi("Element",t,"querySelector")(e)},querySelectorAll:function(t,e){return qi("Element",t,"querySelectorAll")(e)},mutationObserver:Vi,patch:Ji};function Zi(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}var Xi="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.",Ki={map:{},getId:()=>(console.error(Xi),-1),getNode:()=>(console.error(Xi),null),removeNodeFromMap(){console.error(Xi)},has:()=>(console.error(Xi),!1),reset(){console.error(Xi)}};function Qi(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;a<s;a++)o[a]=arguments[a];var h=Date.now();n||!1!==r.leading||(n=h);var u=e-(h-n),l=this;u<=0||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 tn(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){setTimeout((()=>{r.set.call(this,t)}),0),s&&s.set&&s.set.call(this,t)}}),()=>tn(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ki=new Proxy(Ki,{get:(t,e,r)=>("map"===e&&console.error(Xi),Reflect.get(t,e,r))}));var en=Date.now;function rn(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=Yi.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=Yi.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function nn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function sn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function on(t){return t?t.nodeType===t.ELEMENT_NODE?t:Yi.parentElement(t):null}function an(t,e,r,i){if(!t)return!1;var n=on(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(it(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 hn(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===V}function un(t,e){if(M(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=Yi.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||un(i,e))}function ln(t){return Boolean(t.changedTouches)}function cn(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function fn(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function dn(t){return!!t&&(t instanceof ji&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(Yi.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(en=()=>(new Date).getTime());class vn{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(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 pn(t){var e,r=null;return"getRootNode"in t&&(null==(e=Yi.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Yi.host(Yi.getRootNode(t))&&(r=Yi.host(Yi.getRootNode(t))),r}function mn(t){var e=t.ownerDocument;if(!e)return!1;var r=function(t){for(var e,r=t;e=pn(r);)r=e;return r}(t);return Yi.contains(e,r)}function gn(t){var e=t.ownerDocument;return!!e&&(Yi.contains(e,t)||mn(t))}var wn=(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))(wn||{}),yn=(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))(yn||{}),bn=(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))(bn||{}),Sn=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(Sn||{}),kn=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(kn||{}),Cn=(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))(Cn||{}),In=(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))(In||{});function Mn(t){return"__ln"in t}class xn{constructor(){c(this,"length",0),c(this,"head",null),c(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;r<t;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&&Mn(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&&Mn(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 Rn,_n=(t,e)=>t+"@"+e;class On{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),c(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var t=[],e=new Set,r=new xn,i=t=>{for(var e=t,r=V;r===V;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=Yi.parentNode(n);if(s&&gn(n)&&"TEXTAREA"!==s.tagName){var o=M(s)?this.mirror.getId(pn(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=ct(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{cn(t,this.mirror)&&this.iframeManager.addIframe(t),fn(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),dn(n)&&this.shadowDomManager.addShadowRoot(Yi.shadowRoot(n),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},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)An(this.removesSubTreeCache,s,this.mirror)&&!this.movedSet.has(Yi.parentNode(s))||n(s);for(var o of this.addedSet)En(this.droppedSet,o)||An(this.removesSubTreeCache,o,this.mirror)?En(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(Yi.parentNode(a.value)),l=i(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var c=r.tail;c;){var f=c;if(c=c.previous,f){var d=this.mirror.getId(Yi.parentNode(f.value));if(-1===i(f.value))continue;if(-1!==d){h=f;break}var v=f.value,p=Yi.parentNode(v);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var m=Yi.host(p);if(-1!==this.mirror.getId(m)){h=f;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}a=h.previous,r.removeNode(h.value),n(h.value)}var g={texts:this.texts.map((t=>{var e=t.node,r=Yi.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{attributes:e}=t;if("string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);r.length<e.style.length&&(r+i).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(g))}})),c(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(e),this.attributeMap.set(t,e)),e.attributes.value=Array.from(Yi.childNodes(t),(t=>Yi.textContent(t)||"")).join("")})),c(this,"processMutation",(t=>{if(!hn(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=Yi.textContent(t.target);an(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:nt(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,on(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if("value"===i){var s=B(r);n=T({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(an(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var o=this.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!this.keepIframeSrcFn(n)){if(r.contentDocument)return;i="rr_src"}if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!rt(r.tagName,i))if(o.attributes[i]=et(this.doc,A(r.tagName),A(i),n,r,this.dataURLOptions),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var a=this.unattachedDoc.createElement("span");for(var h of(t.oldValue&&a.setAttribute("style",t.oldValue),Array.from(r.style))){var u=r.style.getPropertyValue(h),l=r.style.getPropertyPriority(h);u!==a.style.getPropertyValue(h)||l!==a.style.getPropertyPriority(h)?o.styleDiff[h]=""===l?u:[u,l]:o._unchangedStyles[h]=[u,l]}for(var c of Array.from(a.style))""===r.style.getPropertyValue(c)&&(o.styleDiff[c]=!1)}else"open"===i&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break;case"childList":if(an(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=M(t.target)?this.mirror.getId(Yi.host(t.target)):this.mirror.getId(t.target);an(t.target,this.blockClass,this.blockSelector,!1)||hn(e,this.mirror,this.slimDOMOptions)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(Tn(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||un(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[_n(r,i)]?Tn(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!M(t.target)||!x(t.target))||void 0}),function(t,e){var r=[t];for(;r.length;){var i=r.pop();e.has(i)||(e.add(i),Yi.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),c(this,"genAdds",((t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(hn(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[_n(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);an(t,this.blockClass,this.blockSelector,!1)||(Yi.childNodes(t).forEach((t=>this.genAdds(t))),dn(t)&&Yi.childNodes(Yi.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)})))}}))}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((e=>{this[e]=t[e]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function Tn(t,e){t.delete(e),Yi.childNodes(e).forEach((e=>Tn(t,e)))}function An(t,e,r){return 0!==t.size&&function(t,e,r){var i=Yi.parentNode(e);return!!i&&t.has(i)}(t,e)}function En(t,e){return 0!==t.size&&Bn(t,e)}function Bn(t,e){var r=Yi.parentNode(e);return!!r&&(!!t.has(r)||Bn(t,r))}var Ln=t=>{if(!Rn)return t;return function(){try{return t(...arguments)}catch(t){if(Rn&&!0===Rn(t))return;throw t}}},Nn=[];function Dn(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 Fn(t,e){var r=new On;Nn.push(r),r.init(t);var i=new(Vi())(Ln(r.processMutations.bind(r)));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function jn(t){var{mouseInteractionCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,sampling:a}=t;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(bn).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=A(t),h=(t=>i=>{var a=Dn(i);if(!an(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=Sn.Mouse;break;case"touch":h=Sn.Touch;break;case"pen":h=Sn.Pen}h===Sn.Touch?bn[t]===bn.MouseDown?u="TouchStart":bn[t]===bn.MouseUp&&(u="TouchEnd"):Sn.Pen}else ln(i)&&(h=Sn.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===Sn.Touch||u.startsWith("Mouse")&&h===Sn.Mouse)&&(h=null)):bn[t]===bn.Click&&(h=l,l=null);var c=ln(i)?i.changedTouches[0]:i;if(c){var f=n.getId(a),{clientX:d,clientY:v}=c;Ln(e)(r({type:bn[u],id:f,x:d,y:v},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(bn[t]){case bn.MouseDown:case bn.MouseUp:a=a.replace("mouse","pointer");break;case bn.TouchStart:case bn.TouchEnd:return}u.push(Zi(a,h,i))})),Ln((()=>{u.forEach((t=>t()))}))}function Pn(t){var{scrollCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,sampling:o}=t;return Zi("scroll",Ln(Qi(Ln((t=>{var o=Dn(t);if(o&&!an(o,n,s,!0)){var a=i.getId(o);if(o===r&&r.defaultView){var h=rn(r.defaultView);e({id:a,x:h.left,y:h.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}})),o.scroll||100)),r)}var Un=["INPUT","TEXTAREA","SELECT"],Wn=new WeakMap;function $n(t){return function(t,e){if(Gn("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||Gn("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||Gn("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||Gn("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){var r=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(r)}else if(t.parentStyleSheet){var i=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(i)}return e}(t,[])}function zn(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function qn(t,e){var r,i,n,{mirror:s,stylesheetManager:o}=t,a=null;a="#document"===e.nodeName?s.getId(e):s.getId(Yi.host(e));var h="#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,u=(null==h?void 0:h.prototype)?Object.getOwnPropertyDescriptor(null==h?void 0:h.prototype,"adoptedStyleSheets"):void 0;return null!==a&&-1!==a&&h&&u?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var t;return null==(t=u.get)?void 0:t.call(this)},set(t){var e,r=null==(e=u.set)?void 0:e.call(this,t);if(null!==a&&-1!==a)try{o.adoptStyleSheets(t,a)}catch(t){}return r}}),Ln((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))):()=>{}}function Hn(t,e){void 0===e&&(e={});var i,n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){var{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:h,styleSheetRuleCb:u,styleDeclarationCb:l,canvasMutationCb:c,fontCb:f,selectionCb:d,customElementCb:v}=t;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),c(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),f(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),d(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),v(...arguments)}}(t,e),t.recordDOM&&(i=Fn(t,t.doc));var s=function(t){var{mousemoveCb:e,sampling:r,doc:i,mirror:n}=t;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=Qi(Ln((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=Ln(Qi(Ln((t=>{var e=Dn(t),{clientX:r,clientY:i}=ln(t)?t.changedTouches[0]:t;s||(s=en()),h.push({x:r,y:i,id:n.getId(e),timeOffset:en()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?yn.Drag:t instanceof MouseEvent?yn.MouseMove:yn.TouchMove)})),o,{trailing:!1})),c=[Zi("mousemove",l,i),Zi("touchmove",l,i),Zi("drag",l,i)];return Ln((()=>{c.forEach((t=>t()))}))}(t),o=jn(t),a=Pn(t),h=function(t,e){var{viewportResizeCb:r}=t,{win:i}=e,n=-1,s=-1;return Zi("resize",Ln(Qi(Ln((()=>{var t=nn(),e=sn();n===t&&s===e||(r({width:Number(e),height:Number(t)}),n=t,s=e)})),200)),i)}(t,{win:n}),u=function(t){var{inputCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,ignoreClass:a,ignoreSelector:h,maskInputOptions:u,maskInputFn:l,sampling:c,userTriggeredOnInput:f}=t;function d(t){var e=Dn(t),r=t.isTrusted,n=e&&e.tagName;if(e&&"OPTION"===n&&(e=Yi.parentElement(e)),e&&n&&!(Un.indexOf(n)<0)&&!an(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var c=e.value,d=!1,p=B(e)||"";"radio"===p||"checkbox"===p?d=e.checked:(u[n.toLowerCase()]||u[p])&&(c=T({element:e,maskInputOptions:u,tagName:n,type:p,value:c,maskInputFn:l})),v(e,f?{text:c,isChecked:d,userTriggered:r}:{text:c,isChecked:d});var m=e.name;"radio"===p&&m&&d&&i.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!d,userTriggered:!1}:{text:r,isChecked:!d})}}))}}function v(t,i){var s=Wn.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){Wn.set(t,i);var o=n.getId(t);Ln(e)(r({},i,{id:o}))}}var p=("last"===c.input?["change"]:["input","change"]).map((t=>Zi(t,Ln(d),i))),m=i.defaultView;if(!m)return()=>{p.forEach((t=>t()))};var g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),w=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...w.map((t=>tn(t[0],t[1],{set(){Ln(d)({target:this,isTrusted:!1})}},!1,m)))),Ln((()=>{p.forEach((t=>t()))}))}(t),l=function(t){var{mediaInteractionCb:e,blockClass:r,blockSelector:i,mirror:n,sampling:s,doc:o}=t,a=Ln((t=>Qi(Ln((s=>{var o=Dn(s);if(o&&!an(o,r,i,!0)){var{currentTime:a,volume:h,muted:u,playbackRate:l,loop:c}=o;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:c})}})),s.media||500))),h=[Zi("play",a(Cn.Play),o),Zi("pause",a(Cn.Pause),o),Zi("seeked",a(Cn.Seeked),o),Zi("volumechange",a(Cn.VolumeChange),o),Zi("ratechange",a(Cn.RateChange),o)];return Ln((()=>{h.forEach((t=>t()))}))}(t),c=()=>{},f=()=>{},d=()=>{},v=()=>{};t.recordDOM&&(c=function(t,e){var{styleSheetRuleCb:r,mirror:i,stylesheetManager:n}=t,{win:s}=e;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Ln(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=zn(e,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:a}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){void 0===r&&(r=this.cssRules.length);var i=t+" { "+e+" }";return s.CSSStyleSheet.prototype.insertRule.apply(this,[i,r])};var a,h,u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:o}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replace:o}),t.apply(e,s)}))})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replaceSync:o}),t.apply(e,s)}))}));var l={};Vn("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(Vn("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),Vn("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),Vn("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(l).forEach((t=>{var[e,s]=t;c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:Ln(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=zn(e.parentStyleSheet,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:[...$n(e),a||0]}]}),t.apply(e,s)}))}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:Ln(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=zn(e.parentStyleSheet,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:[...$n(e),o]}]}),t.apply(e,s)}))})})),Ln((()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=u,a&&(s.CSSStyleSheet.prototype.replace=a),h&&(s.CSSStyleSheet.prototype.replaceSync=h),Object.entries(l).forEach((t=>{var[e,r]=t;r.prototype.insertRule=c[e].insertRule,r.prototype.deleteRule=c[e].deleteRule}))}))}(t,{win:n}),f=qn(t,t.doc),d=function(t,e){var{styleDeclarationCb:r,mirror:i,ignoreCSSAttributes:n,stylesheetManager:s}=t,{win:o}=e,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Ln(((t,e,o)=>{var h,[u,l,c]=o;if(n.has(u))return a.apply(e,[u,l,c]);var{id:f,styleId:d}=zn(null==(h=e.parentRule)?void 0:h.parentStyleSheet,i,s.styleMirror);return(f&&-1!==f||d&&-1!==d)&&r({id:f,styleId:d,set:{property:u,value:l,priority:c},index:$n(e.parentRule)}),t.apply(e,o)}))});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:Ln(((t,e,o)=>{var a,[u]=o;if(n.has(u))return h.apply(e,[u]);var{id:l,styleId:c}=zn(null==(a=e.parentRule)?void 0:a.parentStyleSheet,i,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,remove:{property:u},index:$n(e.parentRule)}),t.apply(e,o)}))}),Ln((()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h}))}(t,{win:n}),t.collectFonts&&(v=function(t){var{fontCb:e,doc:r}=t,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=Ji(r.fonts,"add",(function(t){return function(r){return setTimeout(Ln((()=>{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),Ln((()=>{n.forEach((t=>t()))}))}(t)));var p=function(t){var{doc:e,mirror:r,blockClass:i,blockSelector:n,selectionCb:s}=t,o=!0,a=Ln((()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;u<h;u++){var l=t.getRangeAt(u),{startContainer:c,startOffset:f,endContainer:d,endOffset:v}=l;an(c,i,n,!0)||an(d,i,n,!0)||a.push({start:r.getId(c),startOffset:f,end:r.getId(d),endOffset:v})}s({ranges:a})}}));return a(),Zi("selectionchange",a)}(t),m=function(t){var{doc:e,customElementCb:r}=t,i=e.defaultView;return i&&i.customElements?Ji(i.customElements,"define",(function(t){return function(e,i,n){try{r({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return t.apply(this,[e,i,n])}})):()=>{}}(t),g=[];for(var w of t.plugins)g.push(w.observer(w.callback,n,w.options));return Ln((()=>{Nn.forEach((t=>t.destroy())),Nn.forEach((t=>t.reset())),null==i||i.disconnect(),s(),o(),a(),h(),u(),l(),c(),f(),d(),v(),p(),m(),g.forEach((t=>t())),Nn.length=0}))}function Gn(t){return void 0!==window[t]}function Vn(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Jn{constructor(t){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){var n=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),o=n.get(e);return o||(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i=r||this.getRemoteIdToIdMap(t);if("number"!=typeof e)return e;var n=i.get(e);return n||-1}getRemoteIds(t,e){var r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||(e=new Map,this.iframeIdToRemoteIdMap.set(t,e)),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||(e=new Map,this.iframeRemoteIdToIdMap.set(t,e)),e}}class Yn{constructor(t){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new Jn(J)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),c(this,"messageHandler"),c(this,"nestedIframeListeners",new Map),c(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Jn(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)}addLoadListener(t){this.loadListener=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);this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var n=t.contentWindow;if(this.recordCrossOriginIframes&&n&&!this.nestedIframeListeners.has(n)){var s=this.handleMessage.bind(this);this.nestedIframeListeners.set(n,s),n.addEventListener("message",s)}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 wn.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:wn.IncrementalSnapshot,data:{source:yn.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case wn.Meta:case wn.Load:case wn.DomContentLoaded:return!1;case wn.Plugin:return e;case wn.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case wn.IncrementalSnapshot:switch(e.data.source){case yn.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 yn.Drag:case yn.TouchMove:case yn.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case yn.ViewportResize:return!1;case yn.MediaInteraction:case yn.MouseInteraction:case yn.Scroll:case yn.CanvasMutation:case yn.Input:return this.replaceIds(e.data,t,["id"]),e;case yn.StyleSheetRule:case yn.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case yn.Font:return e;case yn.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case yn.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])&&(Array.isArray(e[n])?e[n]=t.getIds(r,e[n]):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===In.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.mirror.getNode(t);if(r){var i=r.contentWindow;if(i&&this.nestedIframeListeners.has(i)){var n=this.nestedIframeListeners.get(i);i.removeEventListener("message",n),this.nestedIframeListeners.delete(i)}i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r)}e&&this.attachedIframes.delete(t)}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var{content:r}=t;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&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{e.removeEventListener("message",t)})),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap}}class Zn{constructor(t){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(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){if(x(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var i=Fn(r({},this.bypassOptions,{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push((()=>i.disconnect())),this.restoreHandlers.push(Pn(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(Yi.host(t))),this.restoreHandlers.push(qn({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(Ji(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=Yi.shadowRoot(this);return s&&gn(this)&&r.addShadowRoot(s,e),n}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Qn=0;Qn<64;Qn++)Kn[Xn.charCodeAt(Qn)]=Qn;var ts=new Map;var es=(t,e,r)=>{if(t&&(ns(t,e)||"object"==typeof t)){var i=function(t,e){var r=ts.get(t);return r||(r=new Map,ts.set(t,r)),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 rs(t,e,r,i){if(t instanceof Array)return t.map((t=>rs(t,e,r,i)));if(null===t)return t;if(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)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;e<i;e+=3)n+=Xn[r[e]>>2],n+=Xn[(3&r[e])<<4|r[e+1]>>4],n+=Xn[(15&r[e+1])<<2|r[e+2]>>6],n+=Xn[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)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[rs(t.buffer,e,r,i),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){var n=t.constructor.name,{src:s}=t;return{rr_type:n,src:s}}if(t instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}}return t instanceof ImageData?{rr_type:t.constructor.name,args:[rs(t.data,e,r,i),t.width,t.height]}:ns(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:es(t,e,r)}:t}var is=(t,e,r,i)=>t.map((t=>rs(t,e,r,i))),ns=(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])))};function ss(t,e,r,i){var n=[];try{var s=Ji(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(n){for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;a<s;a++)o[a-1]=arguments[a];if(!an(this,e,r,!0)){var h=function(t){return"experimental-webgl"===t?"webgl":t}(n);if("__context"in this||(this.__context=h),i&&["webgl","webgl2"].includes(h))if(o[0]&&"object"==typeof o[0]){var u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return t.apply(this,[n,...o])}}));n.push(s)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((t=>t()))}}function os(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=Ji(t,h,(function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;l<a;l++)u[l]=arguments[l];var c=t.apply(this,u);if(es(c,s,this),"tagName"in this.canvas&&!an(this.canvas,i,n,!0)){var f=is(u,s,this,o),d={type:e,property:h,args:f};r(this.canvas,d)}return c}}));a.push(u)}catch(i){var l=tn(t,h,{set(t){r(this.canvas,{type:e,property:h,args:[t],setter:!0})}});a.push(l)}};for(var l of h)u(l);return a}var as,hs,us,ls='(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 lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n',cs="undefined"!=typeof self&&self.Blob&&new Blob([ls],{type:"text/javascript;charset=utf-8"});function fs(t){var e;try{if(!(e=cs&&(self.URL||self.webkitURL).createObjectURL(cs)))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(ls),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class ds{constructor(t){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(this,"rafIdTimestamp",null),c(this,"rafIdFlush",null),c(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{sampling:e="all",win:r,blockClass:i,blockSelector:n,recordCanvas:s,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&"all"===e&&this.initCanvasMutationObserver(r,i,n,o),s&&"number"==typeof e&&this.initCanvasFPSObserver(e,r,i,n,{dataURLOptions:o})}reset(){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,a=ss(r,i,n,!0),h=new Map,u=new fs;u.onmessage=t=>{var{id:e}=t.data;if(h.set(e,!1),"base64"in t.data){var{base64:r,type:i,width:n,height:s}=t.data;this.mutationCb({id:e,type:kn["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var l,c=1e3/t,f=0,d=t=>{var a,v;f&&t-f<c?l=requestAnimationFrame(d):(f=t,(a=[],v=t=>{t.querySelectorAll("canvas").forEach((t=>{an(t,i,n,!0)||a.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&v(t.shadowRoot)}))},v(r.document),a).forEach(function(){var t=e((function*(t){var e,r=o.mirror.getId(t);if(!h.get(r)&&0!==t.width&&0!==t.height){if(h.set(r,!0),["webgl","webgl2"].includes(t.__context)){var i=t.getContext(t.__context);!1===(null==(e=null==i?void 0:i.getContextAttributes())?void 0:e.preserveDrawingBuffer)&&i.clear(i.COLOR_BUFFER_BIT)}var n=t.clientWidth||t.width,a=t.clientHeight||t.height,l=yield createImageBitmap(t,{resizeWidth:n,resizeHeight:a});u.postMessage({id:r,bitmap:l,width:n,height:a,dataURLOptions:s.dataURLOptions},[l])}}));return function(e){return t.apply(this,arguments)}}()),l=requestAnimationFrame(d))};l=requestAnimationFrame(d),this.resetObservers=()=>{a(),cancelAnimationFrame(l)}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=ss(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=Ji(e.CanvasRenderingContext2D.prototype,o,(function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;u<a;u++)h[u]=arguments[u];return an(this.canvas,r,i,!0)||setTimeout((()=>{var r=is(h,e,this,n);t(this.canvas,{type:kn["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(r){var h=tn(e.CanvasRenderingContext2D.prototype,o,{set(e){t(this.canvas,{type:kn["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 s.push(...os(e.WebGLRenderingContext.prototype,kn.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...os(e.WebGL2RenderingContext.prototype,kn.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,u))),{type:s}=r[0];this.mutationCb({id:e,type:s,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class vs{constructor(t){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new vn),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}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;r.styleMirror.has(t)?e=r.styleMirror.getId(t):(e=r.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:_(e,t.href),index:r})))})),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}trackStylesheetInLinkElement(t){}}class ps{constructor(){c(this,"nodeMap",new WeakMap),c(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 ms=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var gs=document.createElement("iframe");document.body.appendChild(gs),Array.from=(null==(n=gs.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(gs)}}catch(t){console.debug("Unable to override Array.from",t)}var ws,ys,bs=new O;function Ss(t){void 0===t&&(t={});var{emit:e,checkoutEveryNms:i,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:h=null,maskTextClass:u="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:g,packFn:w,sampling:y={},dataURLOptions:b={},mousemoveWait:S,recordDOM:k=!0,recordCanvas:C=!1,recordCrossOriginIframes:I=!1,recordAfter:M=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:R=!1,inlineImages:_=!1,plugins:T,keepIframeSrcFn:A=(()=>!1),ignoreCSSAttributes:E=new Set([]),errorHandler:B}=t;Rn=B;var L=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},b),N=!I||window.parent===window,D=!1;if(!N)try{window.parent.document&&(D=!1)}catch(t){D=!0}if(N&&!e)throw new Error("emit function is required");if(!N&&!D)return()=>{};void 0!==S&&void 0===y.mousemove&&(y.mousemove=S),bs.reset();var F,j=!0===f?{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!==d?d:{password:!0},P=!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===v,headMetaDescKeywords:"all"===v,headTitleMutations:"all"===v}:v||{};!function(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();var U=0,W=t=>{for(var e of T||[])e.eventProcessor&&(t=e.eventProcessor(t));return w&&!D&&(t=w(t)),t};as=(t,r)=>{var s,o=t;if(o.timestamp=en(),!(null==(s=Nn[0])?void 0:s.isFrozen())||o.type===wn.FullSnapshot||o.type===wn.IncrementalSnapshot&&o.data.source===yn.Mutation||Nn.forEach((t=>t.unfreeze())),N)null==e||e(W(o),r);else if(D){var a={type:"rrweb",event:W(o),origin:window.location.origin,isCheckout:r};window.parent.postMessage(a,"*")}if(o.type===wn.FullSnapshot)F=o,U=0;else if(o.type===wn.IncrementalSnapshot){if(o.data.source===yn.Mutation&&o.data.isAttachIframe)return;U++;var h=n&&U>=n,u=i&&o.timestamp-F.timestamp>i;(h||u)&&hs(!0)}};var z=t=>{if(I&&t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null;t.removes.forEach((t=>{var{id:r}=t;e&&e.has(r)||V.removeIframeById(r)}))}as({type:wn.IncrementalSnapshot,data:r({source:yn.Mutation},t)})},q=t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.Scroll},t)}),H=t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.CanvasMutation},t)}),G=new vs({mutationCb:z,adoptedStyleSheetCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.AdoptedStyleSheet},t)})}),V=new Yn({mirror:bs,mutationCb:z,stylesheetManager:G,recordCrossOriginIframes:I,wrappedEmit:as});for(var J of T||[])J.getMirror&&J.getMirror({nodeMirror:bs,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});var Y=new ps;us=new ds({recordCanvas:C,mutationCb:H,win:window,blockClass:s,blockSelector:o,mirror:bs,sampling:y.canvas,dataURLOptions:L});var Z=new Zn({mutationCb:z,scrollCb:q,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:j,dataURLOptions:L,maskTextFn:m,maskInputFn:p,recordCanvas:C,inlineImages:_,sampling:y,slimDOMOptions:P,iframeManager:V,stylesheetManager:G,canvasManager:us,keepIframeSrcFn:A,processedNodeManager:Y},mirror:bs});hs=function(t){if(void 0===t&&(t=!1),k){as({type:wn.Meta,data:{href:window.location.href,width:sn(),height:nn()}},t),G.reset(),Z.init(),Nn.forEach((t=>t.lock()));var e=function(t,e){var{mirror:r=new O,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:h=!1,recordCanvas:u=!1,maskAllInputs:l=!1,maskTextFn:c,maskInputFn:f,slimDOM:d=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:S=(()=>!1),maxDepth:k}=e||{};return ct(t,{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===l?{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===l?{password:!0}:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:v,inlineImages:h,recordCanvas:u,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1,maxDepth:k})}(document,{mirror:bs,blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:j,maskTextFn:m,maskInputFn:p,slimDOM:P,dataURLOptions:L,recordCanvas:C,inlineImages:_,onSerialize:t=>{cn(t,bs)&&V.addIframe(t),fn(t,bs)&&G.trackLinkElement(t),dn(t)&&Z.addShadowRoot(Yi.shadowRoot(t),document)},onIframeLoad:(t,e)=>{V.attachIframe(t,e),Z.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{G.attachLinkElement(t,e)},keepIframeSrcFn:A});if(!e)return console.warn("Failed to snapshot the document");as({type:wn.FullSnapshot,data:{node:e,initialOffset:rn(window)}},t),Nn.forEach((t=>t.unlock())),I&&V.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&G.adoptStyleSheets(document.adoptedStyleSheets,bs.getId(document))}};try{var X=[],K=t=>{var e;return Ln(Hn)({mutationCb:z,mousemoveCb:(t,e)=>as({type:wn.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.MouseInteraction},t)}),scrollCb:q,viewportResizeCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.ViewportResize},t)}),inputCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.Input},t)}),mediaInteractionCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.MediaInteraction},t)}),styleSheetRuleCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.StyleSheetRule},t)}),styleDeclarationCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.StyleDeclaration},t)}),canvasMutationCb:H,fontCb:t=>as({type:wn.IncrementalSnapshot,data:r({source:yn.Font},t)}),selectionCb:t=>{as({type:wn.IncrementalSnapshot,data:r({source:yn.Selection},t)})},customElementCb:t=>{as({type:wn.IncrementalSnapshot,data:r({source:yn.CustomElement},t)})},blockClass:s,ignoreClass:a,ignoreSelector:h,maskTextClass:u,maskTextSelector:l,maskInputOptions:j,inlineStylesheet:c,sampling:y,recordDOM:k,recordCanvas:C,inlineImages:_,userTriggeredOnInput:x,collectFonts:R,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:A,blockSelector:o,slimDOMOptions:P,dataURLOptions:L,mirror:bs,iframeManager:V,stylesheetManager:G,shadowDomManager:Z,processedNodeManager:Y,canvasManager:us,ignoreCSSAttributes:E,plugins:(null==(e=null==T?void 0:T.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>as({type:wn.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},g)};V.addLoadListener((t=>{try{X.push(K(t.contentDocument))}catch(t){console.warn(t)}}));var Q=()=>{hs(),X.push(K(document)),ms=!0};return"interactive"===document.readyState||"complete"===document.readyState?Q():(X.push(Zi("DOMContentLoaded",(()=>{as({type:wn.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&Q()}))),X.push(Zi("load",(()=>{as({type:wn.Load,data:{}}),"load"===M&&Q()}),window))),()=>{X.forEach((t=>t())),Y.destroy(),V.removeLoadListener(),V.destroy(),bs.reset(),ms=!1,Rn=void 0}}catch(t){console.warn(t)}}Ss.addCustomEvent=(t,e)=>{if(!ms)throw new Error("please add custom event after start recording");as({type:wn.Custom,data:{tag:t,payload:e}})},Ss.freezePage=()=>{Nn.forEach((t=>t.freeze()))},Ss.takeFullSnapshot=t=>{if(!ms)throw new Error("please take full snapshot after start recording");hs(t)},Ss.mirror=bs,(ys=ws||(ws={}))[ys.NotStarted=0]="NotStarted",ys[ys.Running=1]="Running",ys[ys.Stopped=2]="Stopped";var{addCustomEvent:ks}=Ss,{freezePage:Cs}=Ss,{takeFullSnapshot:Is}=Ss,Ms=Object.defineProperty,xs=(t,e,r)=>((t,e,r)=>e in t?Ms(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);class Rs{constructor(t){xs(this,"fileName"),xs(this,"functionName"),xs(this,"lineNumber"),xs(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){var t=this.lineNumber||"",e=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+t+":"+e+")":this.fileName+":"+t+":"+e}}var _s=/(^|@)\S+:\d+/,Os=/^\s*at .*(\S+:\d+|\(native\))/m,Ts=/^(eval@)?(\[native code])?$/,As={parse:function(t){return t?void 0!==t.stacktrace||void 0!==t["opera#sourceloc"]?this.parseOpera(t):t.stack&&t.stack.match(Os)?this.parseV8OrIE(t):t.stack?this.parseFFOrSafari(t):[]:[]},extractLocation:function(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));if(!e)throw new Error("Cannot parse given url: "+t);return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter((function(t){return!!t.match(Os)}),this).map((function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var e=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=e.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(e=r?e.replace(r[0],""):e).split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:i.pop()),s=i.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new Rs({functionName:s,fileName:o,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter((function(t){return!t.match(Ts)}),this).map((function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new Rs({functionName:t});var e=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(e),i=r&&r[1]?r[1]:void 0,n=this.extractLocation(t.replace(e,""));return new Rs({functionName:i,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split("\n"),i=[],n=2,s=r.length;n<s;n+=2){var o=e.exec(r[n]);o&&i.push(new Rs({fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera10:function(t){for(var e=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),i=[],n=0,s=r.length;n<s;n+=2){var o=e.exec(r[n]);o&&i.push(new Rs({functionName:o[3]||void 0,fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera11:function(t){return t.stack.split("\n").filter((function(t){return!!t.match(_s)&&!t.match(/^Error created at/)}),this).map((function(t){var e=t.split("@"),r=this.extractLocation(e.pop()),i=(e.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Rs({functionName:i,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function Es(t){if(!t||!t.outerHTML)return"";for(var e="";t.parentElement;){var r=t.localName;if(!r)break;r=r.toLowerCase();var i=t.parentElement,n=[];if(i.children&&i.children.length>0)for(var s=0;s<i.children.length;s++){var o=i.children[s];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===r&&n.push(o)}n.length>1&&(r+=":eq("+n.indexOf(t)+")"),e=r+(e?">"+e:""),t=i}return e}function Bs(t){return Array.isArray(t)}function Ls(t){return"object"==typeof t&&null!==t&&!Bs(t)}function Ns(t,e){if(0===e)return!0;var r=Object.keys(t);for(var i of r)if(Ls(t[i])&&Ns(t[i],e-1))return!0;return!1}function Ds(t,e){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,e);var i=[],n=[];return JSON.stringify(t,(function(t,e){if(i.length>0){var s=i.indexOf(this);~s?i.splice(s+1):i.push(this),~s?n.splice(s,1/0,t):n.push(t),~i.indexOf(e)&&(e=i[0]===e?"[Circular ~]":"[Circular ~."+n.slice(0,i.indexOf(e)).join(".")+"]")}else i.push(e);if(null===e)return e;if(void 0===e)return"undefined";if(function(t){if(Ls(t)&&Object.keys(t).length>r.numOfKeysLimit)return!0;if("function"==typeof t)return!0;if(Ls(t)&&Ns(t,r.depthOfLimit))return!0;return!1}(e))return function(t){var e=t.toString();r.stringLengthLimit&&e.length>r.stringLengthLimit&&(e=e.slice(0,r.stringLengthLimit)+"...");return e}(e);if("bigint"==typeof e)return e.toString()+"n";if(e instanceof Event){var o={};for(var a in e){var h=e[a];Bs(h)?o[a]=Es(h.length?h[0]:null):o[a]=h}return o}return e instanceof Node?e instanceof HTMLElement?e?e.outerHTML:"":e.nodeName:e instanceof Error?e.stack?e.stack+"\nEnd of stack for Error object":e.name+": "+e.message:e}))}var Fs={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function js(t,e,r){var i,n=r?Object.assign({},Fs,r):Fs,s=n.logger;if(!s)return()=>{};i="string"==typeof s?e[s]:s;var o=0,a=!1,h=[];if(n.level.includes("error")){var u=e=>{var r=e.message,i=e.error,s=As.parse(i).map((t=>t.toString())),o=[Ds(r,n.stringifyOptions)];t({level:"error",trace:s,payload:o})};e.addEventListener("error",u),h.push((()=>{e.removeEventListener("error",u)}));var l=e=>{var r,i;e.reason instanceof Error?i=[Ds("Uncaught (in promise) "+(r=e.reason).name+": "+r.message,n.stringifyOptions)]:(r=new Error,i=[Ds("Uncaught (in promise)",n.stringifyOptions),Ds(e.reason,n.stringifyOptions)]);var s=As.parse(r).map((t=>t.toString()));t({level:"error",trace:s,payload:i})};e.addEventListener("unhandledrejection",l),h.push((()=>{e.removeEventListener("unhandledrejection",l)}))}for(var c of n.level)h.push(f(i,c));return()=>{h.forEach((t=>t()))};function f(e,r){var i=this;return e[r]?function(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}(e,r,(e=>function(){for(var s=arguments.length,h=new Array(s),u=0;u<s;u++)h[u]=arguments[u];if(e.apply(i,h),!("assert"===r&&h[0]||a)){a=!0;try{var l=As.parse(new Error).map((t=>t.toString())).splice(1),c=("assert"===r?h.slice(1):h).map((t=>Ds(t,n.stringifyOptions)));++o<n.lengthThreshold?t({level:r,trace:l,payload:c}):o===n.lengthThreshold&&t({level:"warn",trace:[],payload:[Ds("The number of log records reached the threshold.")]})}catch(t){e("rrweb logger error:",t,...h)}finally{a=!1}}})):()=>{}}}var Ps=t=>({name:"rrweb/console@1",observer:js,options:t}),Us="undefined"!=typeof window?window:void 0,Ws="undefined"!=typeof globalThis?globalThis:Us;"undefined"==typeof self&&(Ws.self=Ws),"undefined"==typeof File&&(Ws.File=function(){});var $s=Array.prototype.forEach,zs=null==Ws?void 0:Ws.navigator,qs=null==Ws?void 0:Ws.document;null==Ws||Ws.location,null==Ws||Ws.fetch,null!=Ws&&Ws.XMLHttpRequest&&"withCredentials"in new Ws.XMLHttpRequest&&Ws.XMLHttpRequest,null==Ws||Ws.AbortController,null==zs||zs.userAgent;var Hs=null!=Us?Us:{};var Gs=function(t){return t.trim()},Vs=Array.isArray,Js=Object.prototype,Ys=Js.hasOwnProperty,Zs=Js.toString,Xs=Vs||function(t){return"[object Array]"===Zs.call(t)},Ks=t=>"function"==typeof t,Qs=t=>t===Object(t)&&!Xs(t),to=t=>void 0===t,eo=t=>"[object String]"==Zs.call(t),ro=t=>null===t,io=t=>to(t)||ro(t),no=t=>"[object Number]"==Zs.call(t)&&t==t,so=t=>"[object Boolean]"===Zs.call(t),oo=t=>t instanceof FormData;function ao(t,e,r,i,n){return e>r&&(i.warn("min cannot be greater than max."),e=r),no(t)?t>r?(i.warn(" cannot be greater than max: "+r+". Using max value instead."),r):t<e?(i.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(i.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+n),ao(n||r,e,r,i))}class ho{constructor(t){this.t={},this.i=t.i,this.o=ao(t.bucketSize,0,100,t.h),this.u=ao(t.refillRate,0,this.o,t.h),this.v=ao(t.refillInterval,0,864e5,t.h)}m(t,e){var r=e-t.lastAccess,i=Math.floor(r/this.v);if(i>0){var n=i*this.u;t.tokens=Math.min(t.tokens+n,this.o),t.lastAccess=t.lastAccess+i*this.v}}consumeRateLimit(t){var e,r=Date.now(),i=String(t),n=this.t[i];return n?this.m(n,r):(n={tokens:this.o,lastAccess:r},this.t[i]=n),0===n.tokens||(n.tokens--,0===n.tokens&&(null==(e=this.i)||e.call(this,t)),0===n.tokens)}stop(){this.t={}}}var uo=t=>t instanceof Document,lo={LIB_VERSION:"1.348.0"},co=function(t,e){var{debugEnabled:r}=void 0===e?{}:e,i={S:function(e){if(Us&&(Hs.POSTHOG_DEBUG||r)&&!to(Us.console)&&Us.console){for(var i=("__rrweb_original__"in Us.console[e]?Us.console[e].__rrweb_original__:Us.console[e]),n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];i(t,...s)}},info:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];i.S("log",...e)},warn:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];i.S("warn",...e)},error:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];i.S("error",...e)},critical:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];console.error(t,...r)},uninitializedWarning:t=>{i.error("You must initialize PostHog before calling "+t)},createLogger:(e,r)=>co(t+" "+e,r)};return i},fo=co("[PostHog.js]"),vo=fo.createLogger,po={};function mo(t,e,r){if(!io(t)){if(Xs(t))return function(t,e,r){if(Xs(t))if($s&&t.forEach===$s)t.forEach(e,r);else if("length"in t&&t.length===+t.length)for(var i=0,n=t.length;i<n;i++)if(i in t&&e.call(r,t[i],i)===po)return}(t,e,r);if(oo(t)){for(var i of t.entries())if(e.call(r,i[1],i[0])===po)return}else for(var n in t)if(Ys.call(t,n)&&e.call(r,t[n],n)===po)return}}function go(t,e,r,i){var{capture:n=!1,passive:s=!0}={};null==t||t.addEventListener(e,r,{capture:n,passive:s})}var wo=["localhost","127.0.0.1"],yo=t=>{var e=null==qs?void 0:qs.createElement("a");return to(e)?null:(e.href=t,e)},bo=function(t,e){var r,i;void 0===e&&(e="&");var n=[];return mo(t,(function(t,e){to(t)||to(e)||"undefined"===e||(r=encodeURIComponent((t=>t instanceof File)(t)?t.name:t.toString()),i=encodeURIComponent(e),n[n.length]=i+"="+r)})),n.join(e)};function So(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return Ks(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}function ko(t,e){var r,i=function(t){try{return"string"==typeof t?new URL(t).hostname:"url"in t?new URL(t.url).hostname:t.hostname}catch(t){return null}}(t),n={hostname:i,isHostDenied:!1};if(null==(r=e.payloadHostDenyList)||!r.length||null==i||!i.trim().length)return n;for(var s of e.payloadHostDenyList)if(i.endsWith(s))return{hostname:i,isHostDenied:!0};return n}var Co="$session_recording_remote_config",Io="$session_is_sampled",Mo="$session_past_minimum_duration",xo="$session_recording_url_trigger_activated_session",Ro="$session_recording_event_trigger_activated_session",_o="$debug_first_full_snapshot_timestamp",Oo=new RegExp("(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})"),To=new RegExp("(\\d{3}-?\\d{2}-?\\d{4})");var Ao="[SessionRecording]",Eo="redacted",Bo={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:t=>t,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},Lo=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],No=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],Do=["/s/","/e/","/i/"];function Fo(t,e,r,i){if(io(t))return t;var n=(null==e?void 0:e["content-length"])||function(t){return new Blob([t]).size}(t);return eo(n)&&(n=parseInt(n)),n>r?Ao+" "+i+" body too large to record ("+n+" bytes)":t}function jo(t,e){if(io(t))return t;var r=t;return function(t,e){if(io(t))return!1;if(eo(t)){if(t=Gs(t),Oo.test((t||"").replace(/[- ]/g,"")))return!1;if(To.test(t))return!1}return!0}(r)||(r=Ao+" "+e+" body "+Eo),mo(No,(t=>{var i,n;null!=(i=r)&&i.length&&-1!==(null==(n=r)?void 0:n.indexOf(t))&&(r=Ao+" "+e+" body "+Eo+" as might contain: "+t)})),r}var Po=(t,e)=>{var i,n,s,o={payloadSizeLimitBytes:Bo.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...Bo.performanceEntryTypeToObserve],payloadHostDenyList:[...e.payloadHostDenyList||[],...Bo.payloadHostDenyList]},a=!1!==t.session_recording.recordHeaders&&e.recordHeaders,h=!1!==t.session_recording.recordBody&&e.recordBody,u=!1!==t.capture_performance&&e.recordPerformance,l=(i=o,s=Math.min(1e6,null!==(n=i.payloadSizeLimitBytes)&&void 0!==n?n:1e6),t=>(null!=t&&t.requestBody&&(t.requestBody=Fo(t.requestBody,t.requestHeaders,s,"Request")),null!=t&&t.responseBody&&(t.responseBody=Fo(t.responseBody,t.responseHeaders,s,"Response")),t)),c=e=>{return l(((t,e)=>{var r,i=yo(t.name),n=0===e.indexOf("http")?null==(r=yo(e))?void 0:r.pathname:e;"/"===n&&(n="");var s=null==i?void 0:i.pathname.replace(n||"","");if(!(i&&s&&Do.some((t=>0===s.indexOf(t)))))return t})((i=(r=e).requestHeaders,io(i)||mo(Object.keys(null!=i?i:{}),(t=>{Lo.includes(t.toLowerCase())&&(i[t]=Eo)})),r),t.api_host));var r,i},f=Ks(t.session_recording.maskNetworkRequestFn);return f&&Ks(t.session_recording.maskCapturedNetworkRequestFn)&&fo.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),f&&(t.session_recording.maskCapturedNetworkRequestFn=e=>{var i=t.session_recording.maskNetworkRequestFn({url:e.name});return r({},e,{name:null==i?void 0:i.url})}),o.maskRequestFn=Ks(t.session_recording.maskCapturedNetworkRequestFn)?e=>{var r,i=c(e);return i&&null!==(r=null==t.session_recording.maskCapturedNetworkRequestFn?void 0:t.session_recording.maskCapturedNetworkRequestFn(i))&&void 0!==r?r:void 0}:t=>function(t){if(!to(t))return t.requestBody=jo(t.requestBody,"Request"),t.responseBody=jo(t.responseBody,"Response"),t}(c(t)),r({},Bo,o,{recordHeaders:a,recordBody:h,recordPerformance:u,recordInitialRequests:u})},Uo=vo("[Recorder]"),Wo=t=>"navigation"===t.entryType,$o=t=>"resource"===t.entryType;function zo(t,e,r){if(r.recordInitialRequests){var i=e.performance.getEntries().filter((t=>Wo(t)||$o(t)&&r.initiatorTypes.includes(t.initiatorType)));t({requests:i.flatMap((t=>Zo({entry:t,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var n=new e.PerformanceObserver((e=>{var i=e.getEntries().filter((t=>Wo(t)||$o(t)&&r.initiatorTypes.includes(t.initiatorType)&&(t=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==t.initiatorType&&"fetch"!==t.initiatorType)(t)));t({requests:i.flatMap((t=>Zo({entry:t,method:void 0,status:void 0,networkRequest:{}})))})})),s=PerformanceObserver.supportedEntryTypes.filter((t=>r.performanceEntryTypeToObserve.includes(t)));return n.observe({entryTypes:s}),()=>{n.disconnect()}}function qo(t,e){return!!e&&(so(e)||e[t])}function Ho(t){var{type:e,recordBody:r,headers:i,url:n}=t;function s(t){var e=Object.keys(i).find((t=>"content-type"===t.toLowerCase())),r=e&&i[e];return t.some((t=>null==r?void 0:r.includes(t)))}if(!r)return!1;if(function t(e){try{return"string"==typeof e?e.startsWith("blob:"):e instanceof URL?"blob:"===e.protocol:e instanceof Request&&t(e.url)}catch(t){return!1}}(n))return!1;if(so(r))return!0;if(Xs(r))return s(r);var o=r[e];return so(o)?o:s(o)}function Go(t,e,r,i,n,s){return Vo.apply(this,arguments)}function Vo(){return Vo=e((function*(t,e,r,i,n,s){if(void 0===s&&(s=0),s>10)return Uo.warn("Failed to get performance entry for request",{url:r,initiatorType:e}),null;var o=function(t,e){for(var r=t.length-1;r>=0;r-=1)if(e(t[r]))return t[r]}(t.performance.getEntriesByName(r),(t=>$o(t)&&t.initiatorType===e&&(to(i)||t.startTime>=i)&&(to(n)||t.startTime<=n)));return o||(yield new Promise((t=>setTimeout(t,50*s))),Go(t,e,r,i,n,s+1))})),Vo.apply(this,arguments)}function Jo(t){var{body:e,options:r,url:i}=t;if(io(e))return null;var{hostname:n,isHostDenied:s}=ko(i,r);if(s)return n+" is in deny list";if(eo(e))return e;if(uo(e))return e.textContent;if(oo(e))return bo(e);if(Qs(e))try{return JSON.stringify(e)}catch(t){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(e)}var Yo=t=>!ro(t)&&("navigation"===t.entryType||"resource"===t.entryType);function Zo(t){var{entry:e,method:i,status:n,networkRequest:s,isInitial:o,start:a,end:h,url:u,initiatorType:l}=t;a=e?e.startTime:a,h=e?e.responseEnd:h;var c=Math.floor(Date.now()-performance.now()),f=Math.floor(c+(a||0)),d=[r({},e?e.toJSON():{name:u},{startTime:to(a)?void 0:Math.round(a),endTime:to(h)?void 0:Math.round(h),timeOrigin:c,timestamp:f,method:i,initiatorType:l||(e?e.initiatorType:void 0),status:n,requestHeaders:s.requestHeaders,requestBody:s.requestBody,responseHeaders:s.responseHeaders,responseBody:s.responseBody,isInitial:o})];if(Yo(e))for(var v of e.serverTiming||[])d.push({timeOrigin:c,timestamp:f,startTime:Math.round(e.startTime),name:v.name,duration:v.duration,entryType:"serverTiming"});return d}var Xo=["video/","audio/"];function Ko(t){return new Promise(((e,r)=>{var i=setTimeout((()=>e("[SessionReplay] Timeout while trying to read body")),500);try{t.clone().text().then((t=>e(t)),(t=>r(t))).finally((()=>clearTimeout(i)))}catch(t){clearTimeout(i),e("[SessionReplay] Failed to read body")}}))}function Qo(){return(Qo=e((function*(t){var{r:e,options:r,url:i}=t,{hostname:n,isHostDenied:s}=ko(i,r);return s?Promise.resolve(n+" is in deny list"):Ko(e)}))).apply(this,arguments)}function ta(){return(ta=e((function*(t){var{r:e,options:r,url:i}=t,n=function(t){var e,{r:r,options:i,url:n}=t;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var s=null==(e=r.headers.get("Content-Type"))?void 0:e.toLowerCase(),o=Xo.some((t=>null==s?void 0:s.startsWith(t)));if(s&&o)return"Content-Type "+s+" is not supported";var{hostname:a,isHostDenied:h}=ko(n,i);return h?a+" is in deny list":null}({r:e,options:r,url:i});return ro(n)?Ko(e):Promise.resolve(n)}))).apply(this,arguments)}function ea(t,r,i){if(!i.initiatorTypes.includes("fetch"))return()=>{};var n=qo("request",i.recordHeaders),s=qo("response",i.recordHeaders),o=So(r,"fetch",(o=>function(){var a=e((function*(e,a){var h,u,l,c=new Request(e,a),f={};try{var d={};c.headers.forEach(((t,e)=>{d[e]=t})),n&&(f.requestHeaders=d),Ho({type:"request",headers:d,url:e,recordBody:i.recordBody})&&(f.requestBody=yield function(t){return Qo.apply(this,arguments)}({r:c,options:i,url:e})),u=r.performance.now(),h=yield o(c),l=r.performance.now();var v={};return h.headers.forEach(((t,e)=>{v[e]=t})),s&&(f.responseHeaders=v),Ho({type:"response",headers:v,url:e,recordBody:i.recordBody})&&(f.responseBody=yield function(t){return ta.apply(this,arguments)}({r:h,options:i,url:e})),h}finally{Go(r,"fetch",c.url,u,l).then((e=>{var r,i=Zo({entry:e,method:c.method,status:null==(r=h)?void 0:r.status,networkRequest:f,start:u,end:l,url:c.url,initiatorType:"fetch"});t({requests:i})})).catch((()=>{}))}}));return function(t,e){return a.apply(this,arguments)}}()));return()=>{o()}}var ra=null;function ia(t,e,i){if(!("performance"in e))return()=>{};if(ra)return Uo.warn("Network observer already initialised, doing nothing"),()=>{};var n=i?Object.assign({},Bo,i):Bo,s=e=>{var i=[];e.requests.forEach((t=>{var e=n.maskRequestFn(t);e&&i.push(e)})),i.length>0&&t(r({},e,{requests:i}))},o=zo(s,e,n),a=()=>{},h=()=>{};return(n.recordHeaders||n.recordBody)&&(a=function(t,e,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var i=qo("request",r.recordHeaders),n=qo("response",r.recordHeaders),s=So(e.XMLHttpRequest.prototype,"open",(s=>function(o,a,h,u,l){void 0===h&&(h=!0);var c,f,d=this,v=new Request(a),p={},m={},g=d.setRequestHeader.bind(d);d.setRequestHeader=(t,e)=>(m[t]=e,g(t,e)),i&&(p.requestHeaders=m);var w=d.send.bind(d);d.send=t=>(Ho({type:"request",headers:m,url:a,recordBody:r.recordBody})&&(p.requestBody=Jo({body:t,options:r,url:a})),c=e.performance.now(),w(t));var y=()=>{d.removeEventListener("readystatechange",b),d.removeEventListener("error",y),d.removeEventListener("abort",y),d.removeEventListener("timeout",y)},b=()=>{if(d.readyState===d.DONE){y(),f=e.performance.now();var i={};d.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{var e=t.split(": "),r=e.shift(),n=e.join(": ");r&&(i[r]=n)})),n&&(p.responseHeaders=i),Ho({type:"response",headers:i,url:a,recordBody:r.recordBody})&&(p.responseBody=Jo({body:d.response,options:r,url:a})),Go(e,"xmlhttprequest",v.url,c,f).then((e=>{var r=Zo({entry:e,method:o,status:null==d?void 0:d.status,networkRequest:p,start:c,end:f,url:a.toString(),initiatorType:"xmlhttprequest"});t({requests:r})})).catch((()=>{}))}};d.addEventListener("readystatechange",b),d.addEventListener("error",y),d.addEventListener("abort",y),d.addEventListener("timeout",y),s.call(d,o,a.toString(),h,u,l)}));return()=>{s()}}(s,e,n),h=ea(s,e,n)),ra=()=>{o(),a(),h(),ra=null}}var na=t=>({name:"rrweb/network@1",observer:ia,options:t}),sa=function(t){return 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}({}),oa=function(t){return 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}({}),aa="disabled",ha="sampled",ua="active",la="buffering",ca="paused",fa="trigger",da=fa+"_activated",va=fa+"_pending",pa=fa+"_"+aa;function ma(t,e,r){return e.some((e=>{var i;return"regex"===e.matching&&(null!==(i=null==r?void 0:r.get(e.url))&&void 0!==i?i:new RegExp(e.url)).test(t)}))}class ga{constructor(t){this.k=t}triggerStatus(t){var e=this.k.map((e=>e.triggerStatus(t)));return e.includes(da)?da:e.includes(va)?va:pa}stop(){this.k.forEach((t=>t.stop()))}}class wa{constructor(t){this.k=t}triggerStatus(t){var e=new Set;for(var r of this.k)e.add(r.triggerStatus(t));switch(e.delete(pa),e.size){case 0:return pa;case 1:return Array.from(e)[0];default:return va}}stop(){this.k.forEach((t=>t.stop()))}}class ya{triggerStatus(){return va}stop(){}}var ba=t=>"sessionRecording"in t;class Sa{constructor(t){this.C=[],this.I=[],this.M=new Map,this.R=new Map,this.O="",this.urlBlocked=!1,this._instance=t}onConfig(t){var e,r;this.C=(ba(t)?Qs(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.urlTriggers:[]:null==t?void 0:t.urlTriggers)||[],this.I=(ba(t)?Qs(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.urlBlocklist:[]:null==t?void 0:t.urlBlocklist)||[],this.T()}T(){for(var t of(this.M.clear(),this.R.clear(),this.C))if("regex"===t.matching&&!this.M.has(t.url))try{this.M.set(t.url,new RegExp(t.url))}catch(e){fo.error("Invalid URL trigger regex pattern:",t.url,e)}for(var e of this.I)if("regex"===e.matching&&!this.R.has(e.url))try{this.R.set(e.url,new RegExp(e.url))}catch(t){fo.error("Invalid URL blocklist regex pattern:",e.url,t)}}onRemoteConfig(t){this.onConfig(t)}A(t){var e;return 0===this.C.length?pa:(null==(e=this._instance)?void 0:e.get_property(xo))===t?da:va}triggerStatus(t){var e=this.A(t),r=e===da?da:e===va?va:pa;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:r}),r}checkUrlTriggerConditions(t,e,r,i){if(void 0!==Us&&Us.location.href){var n=Us.location.href;if(n!==this.O){this.O=n;var s=this.urlBlocked,o=ma(n,this.I,this.R);if(!s||!o){o&&!s?t():!o&&s&&e();var a=this.A(i)===da,h=ma(n,this.C,this.M);!a&&h&&r("url")}}}}stop(){this.O=""}}class ka{constructor(t){this.linkedFlag=null,this.linkedFlagSeen=!1,this.B=()=>{},this._instance=t}triggerStatus(){var t=va;return io(this.linkedFlag)&&(t=pa),this.linkedFlagSeen&&(t=da),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:t}),t}onConfig(t,e){var r;if(this.linkedFlag=(ba(t)?Qs(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.linkedFlag:null:null==t?void 0:t.linkedFlag)||null,!io(this.linkedFlag)&&!this.linkedFlagSeen){var i=eo(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,n=eo(this.linkedFlag)?null:this.linkedFlag.variant;this.B=this._instance.onFeatureFlags(((t,r)=>{var s=!1;if(Qs(r)&&i in r){var o=r[i];s=so(o)?!0===o:n?o===n:!!o}this.linkedFlagSeen=s,s&&e(i,n)}))}}onRemoteConfig(t,e){this.onConfig(t,e)}stop(){this.B()}}class Ca{constructor(t){this.L=[],this._instance=t}onConfig(t){var e;this.L=(ba(t)?Qs(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.eventTriggers:[]:null==t?void 0:t.eventTriggers)||[]}onRemoteConfig(t){this.onConfig(t)}N(t){var e;return 0===this.L.length?pa:(null==(e=this._instance)?void 0:e.get_property(Ro))===t?da:va}triggerStatus(t){var e=this.N(t),r=e===da?da:e===va?va:pa;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:r}),r}stop(){}}function Ia(t){return t.isRecordingEnabled?la:aa}function Ma(t){if(!t.receivedFlags)return la;if(!t.isRecordingEnabled)return aa;if(t.urlTriggerMatching.urlBlocked)return ca;var e=!0===t.isSampled,r=new ga([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId);return e?ha:r===da?ua:r===va?la:!1===t.isSampled?aa:ua}function xa(t){if(!t.receivedFlags)return la;if(!t.isRecordingEnabled)return aa;if(t.urlTriggerMatching.urlBlocked)return ca;var e=new wa([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId),r=e!==pa,i=so(t.isSampled);return r&&e===va?la:r&&e===pa||i&&!t.isSampled?aa:!0===t.isSampled?ha:ua}function Ra(t){var e,r;return(null==(e=JSON.stringify(t,(r=[],function(t,e){if(Qs(e)){for(;r.length>0&&r[r.length-1]!==this;)r.pop();return r.includes(e)?"[Circular]":(r.push(e),e)}return e})))?void 0:e.length)||0}var _a=Uint8Array,Oa=Uint16Array,Ta=Uint32Array,Aa=new _a([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ea=new _a([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ba=new _a([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),La=function(t,e){for(var r=new Oa(31),i=0;i<31;++i)r[i]=e+=1<<t[i-1];var n=new Ta(r[30]);for(i=1;i<30;++i)for(var s=r[i];s<r[i+1];++s)n[s]=s-r[i]<<5|i;return[r,n]},Na=La(Aa,2),Da=Na[0],Fa=Na[1];Da[28]=258,Fa[258]=28;for(var ja=La(Ea,0)[1],Pa=new Oa(32768),Ua=0;Ua<32768;++Ua){var Wa=(43690&Ua)>>>1|(21845&Ua)<<1;Wa=(61680&(Wa=(52428&Wa)>>>2|(13107&Wa)<<2))>>>4|(3855&Wa)<<4,Pa[Ua]=((65280&Wa)>>>8|(255&Wa)<<8)>>>1}var $a=function(t,e,r){for(var i=t.length,n=0,s=new Oa(e);n<i;++n)++s[t[n]-1];var o,a=new Oa(e);for(n=0;n<e;++n)a[n]=a[n-1]+s[n-1]<<1;if(r){o=new Oa(1<<e);var h=15-e;for(n=0;n<i;++n)if(t[n])for(var u=n<<4|t[n],l=e-t[n],c=a[t[n]-1]++<<l,f=c|(1<<l)-1;c<=f;++c)o[Pa[c]>>>h]=u}else for(o=new Oa(i),n=0;n<i;++n)o[n]=Pa[a[t[n]-1]++]>>>15-t[n];return o},za=new _a(288);for(Ua=0;Ua<144;++Ua)za[Ua]=8;for(Ua=144;Ua<256;++Ua)za[Ua]=9;for(Ua=256;Ua<280;++Ua)za[Ua]=7;for(Ua=280;Ua<288;++Ua)za[Ua]=8;var qa=new _a(32);for(Ua=0;Ua<32;++Ua)qa[Ua]=5;var Ha=$a(za,9,0),Ga=$a(qa,5,0),Va=function(t){return(t/8>>0)+(7&t&&1)},Ja=function(t,e,r){(null==r||r>t.length)&&(r=t.length);var i=new(t instanceof Oa?Oa:t instanceof Ta?Ta:_a)(r-e);return i.set(t.subarray(e,r)),i},Ya=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8},Za=function(t,e,r){r<<=7&e;var i=e/8>>0;t[i]|=r,t[i+1]|=r>>>8,t[i+2]|=r>>>16},Xa=function(t,e){for(var r=[],i=0;i<t.length;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[new _a(0),0];if(1==n){var o=new _a(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort((function(t,e){return t.f-e.f})),r.push({s:-1,f:25001});var a=r[0],h=r[1],u=0,l=1,c=2;for(r[0]={s:-1,f:a.f+h.f,l:a,r:h};l!=n-1;)a=r[r[u].f<r[c].f?u++:c++],h=r[u!=l&&r[u].f<r[c].f?u++:c++],r[l++]={s:-1,f:a.f+h.f,l:a,r:h};var f=s[0].s;for(i=1;i<n;++i)s[i].s>f&&(f=s[i].s);var d=new Oa(f+1),v=Ka(r[l-1],d,0);if(v>e){i=0;var p=0,m=v-e,g=1<<m;for(s.sort((function(t,e){return d[e.s]-d[t.s]||t.f-e.f}));i<n;++i){var w=s[i].s;if(!(d[w]>e))break;p+=g-(1<<v-d[w]),d[w]=e}for(p>>>=m;p>0;){var y=s[i].s;d[y]<e?p-=1<<e-d[y]++-1:++i}for(;i>=0&&p;--i){var b=s[i].s;d[b]==e&&(--d[b],++p)}v=e}return[new _a(d),v]},Ka=function(t,e,r){return-1==t.s?Math.max(Ka(t.l,e,r+1),Ka(t.r,e,r+1)):e[t.s]=r},Qa=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Oa(++e),i=0,n=t[0],s=1,o=function(t){r[i++]=t},a=1;a<=e;++a)if(t[a]==n&&a!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=t[a]}return[r.subarray(0,i),e]},th=function(t,e){for(var r=0,i=0;i<e.length;++i)r+=t[i]*e[i];return r},eh=function(t,e,r){var i=r.length,n=Va(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;s<i;++s)t[n+s+4]=r[s];return 8*(n+4+i)},rh=function(t,e,r,i,n,s,o,a,h,u,l){Ya(e,l++,r),++n[256];for(var c=Xa(n,15),f=c[0],d=c[1],v=Xa(s,15),p=v[0],m=v[1],g=Qa(f),w=g[0],y=g[1],b=Qa(p),S=b[0],k=b[1],C=new Oa(19),I=0;I<w.length;++I)C[31&w[I]]++;for(I=0;I<S.length;++I)C[31&S[I]]++;for(var M=Xa(C,7),x=M[0],R=M[1],_=19;_>4&&!x[Ba[_-1]];--_);var O,T,A,E,B=u+5<<3,L=th(n,za)+th(s,qa)+o,N=th(n,f)+th(s,p)+o+14+3*_+th(C,x)+(2*C[16]+3*C[17]+7*C[18]);if(B<=L&&B<=N)return eh(e,l,t.subarray(h,h+u));if(Ya(e,l,1+(N<L)),l+=2,N<L){O=$a(f,d,0),T=f,A=$a(p,m,0),E=p;var D=$a(x,R,0);Ya(e,l,y-257),Ya(e,l+5,k-1),Ya(e,l+10,_-4),l+=14;for(I=0;I<_;++I)Ya(e,l+3*I,x[Ba[I]]);l+=3*_;for(var F=[w,S],j=0;j<2;++j){var P=F[j];for(I=0;I<P.length;++I){var U=31&P[I];Ya(e,l,D[U]),l+=x[U],U>15&&(Ya(e,l,P[I]>>>5&127),l+=P[I]>>>12)}}}else O=Ha,T=za,A=Ga,E=qa;for(I=0;I<a;++I)if(i[I]>255){U=i[I]>>>18&31;Za(e,l,O[U+257]),l+=T[U+257],U>7&&(Ya(e,l,i[I]>>>23&31),l+=Aa[U]);var W=31&i[I];Za(e,l,A[W]),l+=E[W],W>3&&(Za(e,l,i[I]>>>5&8191),l+=Ea[W])}else Za(e,l,O[i[I]]),l+=T[i[I]];return Za(e,l,O[256]),l+T[256]},ih=new Ta([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),nh=function(){for(var t=new Ta(256),e=0;e<256;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),sh=function(){var t=4294967295;return{p:function(e){for(var r=t,i=0;i<e.length;++i)r=nh[255&r^e[i]]^r>>>8;t=r},d:function(){return 4294967295^t}}},oh=function(t,e,r,i,n){return function(t,e,r,i,n,s){var o=t.length,a=new _a(i+o+5*(1+Math.floor(o/7e3))+n),h=a.subarray(i,a.length-n),u=0;if(!e||o<8)for(var l=0;l<=o;l+=65535){var c=l+65535;c<o?u=eh(h,u,t.subarray(l,c)):(h[l]=s,u=eh(h,u,t.subarray(l,o)))}else{for(var f=ih[e-1],d=f>>>13,v=8191&f,p=(1<<r)-1,m=new Oa(32768),g=new Oa(p+1),w=Math.ceil(r/3),y=2*w,b=function(e){return(t[e]^t[e+1]<<w^t[e+2]<<y)&p},S=new Ta(25e3),k=new Oa(288),C=new Oa(32),I=0,M=0,x=(l=0,0),R=0,_=0;l<o;++l){var O=b(l),T=32767&l,A=g[O];if(m[T]=A,g[O]=T,R<=l){var E=o-l;if((I>7e3||x>24576)&&E>423){u=rh(t,h,0,S,k,C,M,x,_,l-_,u),x=I=M=0,_=l;for(var B=0;B<286;++B)k[B]=0;for(B=0;B<30;++B)C[B]=0}var L=2,N=0,D=v,F=T-A&32767;if(E>2&&O==b(l-F))for(var j=Math.min(d,E)-1,P=Math.min(32767,l),U=Math.min(258,E);F<=P&&--D&&T!=A;){if(t[l+L]==t[l+L-F]){for(var W=0;W<U&&t[l+W]==t[l+W-F];++W);if(W>L){if(L=W,N=F,W>j)break;var z=Math.min(F,W-2),q=0;for(B=0;B<z;++B){var H=l-F+B+32768&32767,G=H-m[H]+32768&32767;G>q&&(q=G,A=H)}}}F+=(T=A)-(A=m[T])+32768&32767}if(N){S[x++]=268435456|Fa[L]<<18|ja[N];var V=31&Fa[L],J=31&ja[N];M+=Aa[V]+Ea[J],++k[257+V],++C[J],R=l+L,++I}else S[x++]=t[l],++k[t[l]]}}u=rh(t,h,s,S,k,C,M,x,_,l-_,u)}return Ja(a,0,i+Va(u)+n)}(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,i,!0)},ah=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8},hh=function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=e.level<2?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&ah(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;i<=r.length;++i)t[i+10]=r.charCodeAt(i)}},uh=function(t){return 10+(t.filename&&t.filename.length+1||0)};class lh{constructor(t,e){var r,i;void 0===e&&(e={}),this.D={},this.F=t=>{if(!this.D[t]){var e,r;this.D[t]=!0;var i=this.j(t);null==(e=(r=this.P).onBlockedNode)||e.call(r,t,i)}},this.U=t=>{var e=this.j(t);if("svg"!==(null==e?void 0:e.nodeName)&&e instanceof Element){var r=e.closest("svg");if(r)return[this._rrweb.mirror.getId(r),r]}return[t,e]},this.j=t=>this._rrweb.mirror.getNode(t),this.W=t=>{var e,r,i,n,s,o,a,h;return(null!==(e=null==(r=t.removes)?void 0:r.length)&&void 0!==e?e:0)+(null!==(i=null==(n=t.attributes)?void 0:n.length)&&void 0!==i?i:0)+(null!==(s=null==(o=t.texts)?void 0:o.length)&&void 0!==s?s:0)+(null!==(a=null==(h=t.adds)?void 0:h.length)&&void 0!==a?a:0)},this.throttleMutations=t=>{if(3!==t.type||0!==t.data.source)return t;var e=t.data,r=this.W(e);e.attributes&&(e.attributes=e.attributes.filter((t=>{var[e]=this.U(t.id);return!this.$.consumeRateLimit(e)&&t})));var i=this.W(e);return 0!==i||r===i?t:void 0},this._rrweb=t,this.P=e,this.$=new ho({bucketSize:null!==(r=this.P.bucketSize)&&void 0!==r?r:100,refillRate:null!==(i=this.P.refillRate)&&void 0!==i?i:10,refillInterval:1e3,i:this.F,h:fo})}reset(){this.D={}}stop(){this.$.stop(),this.reset()}}function ch(t,e){return function(t){for(var e=0,r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return Math.abs(e)}(t)%100<ao(100*e,0,100,fo)}var fh="$sess_rec_flush_size";class dh{constructor(t){if(!t.persistence)throw new Error("it is not valid to not have persistence and be this far into setting up the application");this.q=t.get_property.bind(t),this.H=t.persistence.set_property.bind(t.persistence)}trackSize(t){var e=(Number(this.q(fh))||0)+t;this.H(fh,e)}reset(){return this.H(fh,0)}get currentTrackedSize(){return Number(this.q(fh))||0}}var vh=3e5;function ph(t){return Qs(t)?t.network_timing:t}var mh="[SessionRecording]",gh=vo(mh),wh=[oa.MouseMove,oa.MouseInteraction,oa.Scroll,oa.ViewportResize,oa.Input,oa.TouchMove,oa.MediaInteraction,oa.Drag],yh=t=>({rrwebMethod:t,enqueuedAt:Date.now(),attempt:1});function bh(){var t;return null==Hs||null==(t=Hs.__PosthogExtensions__)?void 0:t.rrweb}function Sh(){var t;return null==(t=bh())?void 0:t.record}function kh(t){return function(t,e){for(var r="",i=0;i<t.length;){var n=t[i++];r+=String.fromCharCode(n)}return r}(function(t,e){void 0===e&&(e={});var r=sh(),i=t.length;r.p(t);var n=oh(t,e,uh(e),8),s=n.length;return hh(n,e),ah(n,s-8,r.d()),ah(n,s-4,i),n}(function(t,e){var r=t.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(t);for(var i=new _a(t.length+(t.length>>>1)),n=0,s=function(t){i[n++]=t},o=0;o<r;++o){if(n+5>i.length){var a=new _a(n+8+(r-o<<1));a.set(i),i=a}var h=t.charCodeAt(o);h<128||e?s(h):h<2048?(s(192|h>>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++o))>>>18),s(128|h>>>12&63),s(128|h>>>6&63),s(128|63&h)):(s(224|h>>>12),s(128|h>>>6&63),s(128|63&h))}return Ja(i,0,n)}(JSON.stringify(t))))}function Ch(t,e){return t.type===sa.Custom&&t.data.tag===e}function Ih(t){return Ch(t,"sessionIdle")}function Mh(t){return Ch(t,"$session_ending")}function xh(t){return Ch(t,"$session_starting")}function Rh(t,e){if(void 0===e&&(e=6606028.8),t.size>=e&&t.data.length>1){var r=Math.floor(t.data.length/2),i=t.data.slice(0,r),n=t.data.slice(r);return[Rh({size:Ra(i),data:i,sessionId:t.sessionId,windowId:t.windowId}),Rh({size:Ra(n),data:n,sessionId:t.sessionId,windowId:t.windowId})].flatMap((t=>t))}return[t]}class _h{get sessionId(){return this.G}get V(){if(!this._instance.sessionManager)throw new Error(mh+" must be started with a valid sessionManager.");return this._instance.sessionManager}get J(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get Y(){var t=this._instance.get_property(Io);return!0===t?null:!1!==t&&(eo(t)?t===this.sessionId:null)}get Z(){var t,e=null==(t=this.X)?void 0:t.sampleRate;return no(e)?e:null}get K(){var t,e=null==(t=this.X)?void 0:t.minimumDurationMilliseconds;return no(e)?e:null}constructor(t){this.tt="/s/",this._forceAllowLocalhostNetworkCapture=!1,this.et=void 0,this.rt=Date.now(),this.it=[],this.nt="unknown",this.st=!1,this.ot=new ya,this.ht=[],this.ut=void 0,this.lt=void 0,this.ct=Ia,this.ft=void 0,this.dt=void 0,this.vt=void 0,this.gt=void 0,this.wt=(t,e,r)=>{var i,n;if(r&&(t!==this.G||e!==this.yt)){var s,o=!r.noSessionId&&(r.activityTimeout||r.sessionPastMaximumLength),a=this.G,h=this.yt;if(o)this.bt("$session_ending",{currentSessionId:a,currentWindowId:h,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.rt,flushed_size:null==(s=this.St)?void 0:s.currentTrackedSize});this.St&&this.St.reset(),null==(i=this._instance.persistence)||i.unregister(_o),this.st=!1,null==(n=bh())||null==n.resetMaxDepthState||n.resetMaxDepthState(),this.bt("$session_id_change",{sessionId:t,windowId:e,changeReason:r}),this.kt(),o&&this.bt("$session_starting",{previousSessionId:a,previousWindowId:h,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.rt}),no(this.Z)&&io(this.vt)&&this.Ct(t)}},this.It=()=>{var t;return(null==(t=this._instance.persistence)?void 0:t.props[Mo])===this.G},this.Mt=()=>{var t,e;if(0===this.xt.data.length)return null;var r=null==(t=this.xt.data[0])?void 0:t.timestamp,i=null==(e=this.xt.data[this.xt.data.length-1])?void 0:e.timestamp;return no(r)&&no(i)?i-r:null},this.Rt=()=>{var t,e,r=this.K;if(!no(r))return!1;if(!(null!==(t=null==(e=this._instance.config.session_recording)?void 0:e.strictMinimumDuration)&&void 0!==t&&t)){var i=this._t;return no(i)&&i>=0&&i<r}if(this.It())return!1;var n,s=this.Mt();return!!ro(s)||(!(s>=r)||(null==(n=this._instance.persistence)||n.register({[Mo]:this.G}),!1))},this.Ot=()=>{this.Tt()},this.At=()=>{this.bt("browser offline",{})},this.Et=()=>{this.bt("browser online",{})},this.Bt=()=>{if(null!=qs&&qs.visibilityState){var t="window "+qs.visibilityState;this.bt(t,{})}},this._instance=t;var{sessionId:e,windowId:r}=this.V.checkAndGetSessionAndWindowId();this.G=e,this.yt=r,this.Lt=new ka(this._instance),this.Nt=new Sa(this._instance),this.Dt=new Ca(this._instance),this.xt=this.Ft(),this.J>=this.V.sessionTimeoutMs&&gh.warn("session_idle_threshold_ms ("+this.J+") is greater than the session timeout ("+this.V.sessionTimeoutMs+"). Session will never be detected as idle"),this.St=new dh(this._instance)}get jt(){var t,e,r,i,n,s,o,a=null==(t=this.X)?void 0:t.masking,h={maskAllInputs:null==(e=this._instance.config.session_recording)?void 0:e.maskAllInputs,maskTextSelector:null==(r=this._instance.config.session_recording)?void 0:r.maskTextSelector,blockSelector:null==(i=this._instance.config.session_recording)?void 0:i.blockSelector},u=null!==(n=null==h?void 0:h.maskAllInputs)&&void 0!==n?n:null==a?void 0:a.maskAllInputs,l=null!==(s=null==h?void 0:h.maskTextSelector)&&void 0!==s?s:null==a?void 0:a.maskTextSelector,c=null!==(o=null==h?void 0:h.blockSelector)&&void 0!==o?o:null==a?void 0:a.blockSelector;return to(u)&&to(l)&&to(c)?void 0:{maskAllInputs:null==u||u,maskTextSelector:l,blockSelector:c}}get Pt(){var t,e,r,i,n,s,o,a=this._instance.config.session_recording.captureCanvas,h=null==(t=this.X)?void 0:t.canvasRecording,u=null!==(e=null!==(r=null==a?void 0:a.recordCanvas)&&void 0!==r?r:null==h?void 0:h.enabled)&&void 0!==e&&e,l=null!==(i=null!==(n=null==a?void 0:a.canvasFps)&&void 0!==n?n:null==h?void 0:h.fps)&&void 0!==i?i:4,c=null!==(s=null!==(o=null==a?void 0:a.canvasQuality)&&void 0!==o?o:null==h?void 0:h.quality)&&void 0!==s?s:.4;if("string"==typeof c){var f=parseFloat(c);c=isNaN(f)?.4:f}return{enabled:u,fps:ao(l,0,12,vo("canvas recording fps"),4),quality:ao(c,0,1,vo("canvas recording quality"),.4)}}get Ut(){var t,e=!(null==(t=this.X)||!t.consoleLogRecordingEnabled),r=this._instance.config.enable_recording_console_log;return null!=r?r:e}get Wt(){var t,e,r,i=null==(t=this.X)?void 0:t.networkPayloadCapture,n={recordHeaders:null==(e=this._instance.config.session_recording)?void 0:e.recordHeaders,recordBody:null==(r=this._instance.config.session_recording)?void 0:r.recordBody},s=(null==n?void 0:n.recordHeaders)||(null==i?void 0:i.recordHeaders),o=(null==n?void 0:n.recordBody)||(null==i?void 0:i.recordBody),a=ph(this._instance.config.capture_performance),h=ph(null==i?void 0:i.capturePerformance),u=!!(so(a)?a:h);return s||o||u?{recordHeaders:s,recordBody:o,recordPerformance:u}:void 0}$t(){var t,e,r=[],i=null==(t=Hs.__PosthogExtensions__)||null==(t=t.rrwebPlugins)?void 0:t.getRecordConsolePlugin;i&&this.Ut&&r.push(i());var n=null==(e=Hs.__PosthogExtensions__)||null==(e=e.rrwebPlugins)?void 0:e.getRecordNetworkPlugin;this.Wt&&Ks(n)&&(!wo.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?r.push(n(Po(this._instance.config,this.Wt))):gh.info("NetworkCapture not started because we are on localhost."));return r}zt(t){var e=this._instance.config.session_recording;if(e.maskCapturedNetworkRequestFn){var r,i=e.maskCapturedNetworkRequestFn({name:t});return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:null==i?void 0:i.url}if(e.maskNetworkRequestFn){var n=e.maskNetworkRequestFn({url:t});return null==n?void 0:n.url}return t}qt(t){try{return t.rrwebMethod(),!0}catch(e){return this.it.length<10?this.it.push({enqueuedAt:t.enqueuedAt||Date.now(),attempt:t.attempt+1,rrwebMethod:t.rrwebMethod}):gh.warn("could not emit queued rrweb event.",e,t),!1}}bt(t,e){return this.qt(yh((()=>Sh().addCustomEvent(t,e))))}Ht(){try{if(this._instance.config.capture_pageview||!Us)return;var t=new URL(Us.location.href),e=t.origin+t.pathname+t.search,r=this.zt(e);this.Gt!==r&&(this.Gt=r,this.bt("$url_changed",{href:r}))}catch(t){}}Vt(){if(this.it.length){var t=[...this.it];this.it=[],t.forEach((t=>{Date.now()-t.enqueuedAt<=2e3&&this.qt(t)}))}}Jt(){return this.qt(yh((()=>Sh().takeFullSnapshot())))}get Yt(){var t,e;return this.ot.triggerStatus(this.sessionId)!==va||["sampled","active"].includes(this.status)?null!==(t=null==(e=this._instance.config.session_recording)?void 0:e.full_snapshot_interval_millis)&&void 0!==t?t:vh:6e4}Zt(){if(this.Xt&&clearInterval(this.Xt),!0!==this.nt){var t=this.Yt;t&&(this.Xt=setInterval((()=>{this.Jt()}),t))}}Kt(){this.Nt.urlBlocked||(this.Nt.urlBlocked=!0,clearInterval(this.Xt),gh.info("recording paused due to URL blocker"),this.bt("recording paused",{reason:"url blocker"}))}Qt(){this.Nt.urlBlocked&&(this.Nt.urlBlocked=!1,this.Jt(),this.Zt(),this.bt("recording resumed",{reason:"left blocked url"}),gh.info("recording resumed"))}te(t){var e;this.ot.triggerStatus(this.sessionId)===va&&(null==(e=this._instance)||null==(e=e.persistence)||e.register({["url"===t?xo:Ro]:this.G}),this.Tt(),this.ee(t+"_trigger_matched"))}get isStarted(){return!!this.et}get X(){var t=this._instance.get_property(Co);if(t){var e=Qs(t)?t:JSON.parse(t);if(!this.isStarted){var r,i,n=null!==(r=e.cache_timestamp)&&void 0!==r?r:Date.now();if(Date.now()-n>3e5)return gh.info("persisted remote config for session recording is stale and will be ignored",{cacheTimestamp:n,persistedConfig:t}),void(null==(i=this._instance.persistence)||i.unregister(Co))}return e}}re(t,e){var r;this._instance.get_property(t)&&(e(),null==(r=this._instance.persistence)||r.unregister(t))}start(t){var e,r,i=this.X;if(i){var{sessionId:n,windowId:s}=this.V.checkAndGetSessionAndWindowId();this.G=n,this.yt=s,null==(e=this._instance.persistence)||e.unregister(_o),null!=i&&i.endpoint&&(this.tt=null==i?void 0:i.endpoint),"any"===(null==i?void 0:i.triggerMatchType)?(this.ct=Ma,this.ot=new ga([this.Dt,this.Nt])):(this.ct=xa,this.ot=new wa([this.Dt,this.Nt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:null==i?void 0:i.triggerMatchType}),this.Nt.onConfig(i),this.Dt.onConfig(i),null==(r=this.lt)||r.call(this),this.ie(),this.Lt.onConfig(i,((t,e)=>{this.ee("linked_flag_matched",{flag:t,variant:e})})),this.re("$replay_override_sampling",(()=>{this.overrideSampling()})),this.re("$replay_override_linked_flag",(()=>{this.overrideLinkedFlag()})),this.re("$replay_override_event_trigger",(()=>{this.overrideTrigger("event")})),this.re("$replay_override_url_trigger",(()=>{this.overrideTrigger("url")})),this.Ct(this.sessionId),this.ne(),go(Us,"beforeunload",this.Ot),go(Us,"offline",this.At),go(Us,"online",this.Et),go(Us,"visibilitychange",this.Bt),this.ft||(this.ft=this.V.onSessionId(this.wt)),this.dt||(this.dt=this.V.on("forcedIdleReset",(()=>{this.kt(),this.nt="unknown",this.stop(),this.gt=this.V.onSessionId(((t,e,r)=>{var i;null==(i=this.gt)||i.call(this),this.gt=void 0,this.wt(t,e,r)}))}))),io(this.ut)&&(this.ut=this._instance.on("eventCaptured",(t=>{try{if("$pageview"===t.event){var e=null!=t&&t.properties.$current_url?this.zt(null==t?void 0:t.properties.$current_url):"";if(!e)return;this.bt("$pageview",{href:e})}}catch(t){gh.error("Could not add $pageview to rrweb session",t)}}))),this.status===ua&&this.ee(t||"recording_initialized")}else gh.info("remote config must be stored in persistence before recording can start")}stop(){var t,e,r,i,n,s,o,a;null==Us||Us.removeEventListener("beforeunload",this.Ot),null==Us||Us.removeEventListener("offline",this.At),null==Us||Us.removeEventListener("online",this.Et),null==Us||Us.removeEventListener("visibilitychange",this.Bt),this.Tt(),this.Ft(),clearInterval(this.Xt),this.se(),null==(t=this.ut)||t.call(this),this.ut=void 0,null==(e=this.lt)||e.call(this),this.lt=void 0,null==(r=this.ft)||r.call(this),this.ft=void 0,null==(i=this.dt)||i.call(this),this.dt=void 0,null==(n=this.vt)||n.call(this),this.vt=void 0,null==(s=this.gt)||s.call(this),this.gt=void 0,this.Dt.stop(),this.Nt.stop(),this.Lt.stop(),null==(o=this.oe)||o.stop(),this.it=[],null==(a=this.et)||a.call(this),this.et=void 0,gh.info("stopped")}onRRwebEmit(t){var e,i,n,s,o,a;if(this.Vt(),t&&Qs(t)){if(t.type===sa.Meta){var h=this.zt(t.data.href);if(this.Gt=h,!h)return;t.data.href=h}else this.Ht();if(this.Nt.checkUrlTriggerConditions((()=>this.Kt()),(()=>this.Qt()),(t=>this.te(t)),this.sessionId),!this.Nt.urlBlocked||(u=t).type===sa.Custom&&"recording paused"===u.data.tag){var u,l,c;if(t.type===sa.FullSnapshot)this.Zt(),null==(l=this.oe)||l.reset(),null==(c=this._instance.persistence)||c.register_once({[_o]:t.timestamp},void 0);t.type===sa.FullSnapshot&&this.ot.triggerStatus(this.sessionId)===va&&this.ae();var f=this.oe?this.oe.throttleMutations(t):t;if(f){var d=function(t){var e=t;if(e&&Qs(e)&&6===e.type&&Qs(e.data)&&"rrweb/console@1"===e.data.plugin){e.data.payload.payload.length>10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var r=[],i=0;i<e.data.payload.payload.length;i++)e.data.payload.payload[i]&&e.data.payload.payload[i].length>2e3?r.push(e.data.payload.payload[i].slice(0,2e3)+"...[truncated]"):r.push(e.data.payload.payload[i]);return e.data.payload.payload=r,t}return t}(f),v=function(t){return Mh(t)?t.data.payload:null}(d),p=function(t){return xh(t)?t.data.payload:null}(d);if(v||p){var m=null!=v?v:p;null!=m&&m.lastActivityTimestamp&&(d.timestamp=m.lastActivityTimestamp)}else this.he(d);t.type===sa.FullSnapshot&&(this.ht.push([this.G,t.timestamp]),this.ht.length>6&&(this.ht=this.ht.slice(-6)));var g=null!==(e=null!==(i=null==v?void 0:v.currentSessionId)&&void 0!==i?i:null==p?void 0:p.nextSessionId)&&void 0!==e?e:this.G,w=null!==(n=null!==(s=null==v?void 0:v.currentWindowId)&&void 0!==s?s:null==p?void 0:p.nextWindowId)&&void 0!==n?n:this.yt;if(!0!==this.nt||function(t){return Ih(t)||Mh(t)||xh(t)}(d)){if(Ih(d)){var y=d.data.payload;if(y){var b=y.lastActivityTimestamp,S=y.threshold;d.timestamp=b+S}}var k=null===(o=this._instance.config.session_recording.compress_events)||void 0===o||o?function(t){try{if(t.type===sa.FullSnapshot)return r({},t,{data:kh(t.data),cv:"2024-10"});if(t.type===sa.IncrementalSnapshot&&t.data.source===oa.Mutation)return r({},t,{cv:"2024-10",data:r({},t.data,{texts:kh(t.data.texts),attributes:kh(t.data.attributes),removes:kh(t.data.removes),adds:kh(t.data.adds)})});if(t.type===sa.IncrementalSnapshot&&t.data.source===oa.StyleSheetRule)return r({},t,{cv:"2024-10",data:r({},t.data,{adds:t.data.adds?kh(t.data.adds):void 0,removes:t.data.removes?kh(t.data.removes):void 0})})}catch(t){gh.error("could not compress event - will use uncompressed event",t)}return t}(d):d,C={$snapshot_bytes:Ra(k),$snapshot_data:k,$session_id:g,$window_id:w};d.type===sa.FullSnapshot&&null!=(a=bh())&&null!=a.wasMaxDepthReached&&a.wasMaxDepthReached()&&(this.st=!0),this.status!==aa?this.ue(C):this.Ft()}}}}}get status(){return this.ct({receivedFlags:!0,isRecordingEnabled:!0,isSampled:this.Y,urlTriggerMatching:this.Nt,eventTriggerMatching:this.Dt,linkedFlagMatching:this.Lt,sessionId:this.sessionId})}log(t,e){var r;void 0===e&&(e="log"),null==(r=this._instance.sessionRecording)||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:e,trace:[],payload:[JSON.stringify(t)]}},timestamp:Date.now()})}overrideLinkedFlag(){this.Lt.linkedFlagSeen=!0,this.Jt(),this.ee("linked_flag_overridden")}overrideSampling(){var t;null==(t=this._instance.persistence)||t.register({[Io]:this.sessionId}),this.Jt(),this.ee("sampling_overridden")}overrideTrigger(t){this.te(t)}se(){this.le&&(clearTimeout(this.le),this.le=void 0)}Tt(){this.se();var t=this.Rt();if(this.status===la||this.status===ca||this.status===aa||t)return this.le=setTimeout((()=>{this.Tt()}),2e3),this.xt;this.xt.data.length>0&&Rh(this.xt).forEach((t=>{var e;null==(e=this.St)||e.trackSize(t.size),this.ce({$snapshot_bytes:t.size,$snapshot_data:t.data,$session_id:t.sessionId,$window_id:t.windowId,$lib:"web",$lib_version:lo.LIB_VERSION})}));return this.Ft()}ue(t){var e,r=2+((null==(e=this.xt)?void 0:e.data.length)||0),i=t.$session_id;!this.nt&&(this.xt.size+t.$snapshot_bytes+r>943718.4||this.xt.sessionId!==i)&&(this.xt=this.Tt(),this.xt.sessionId=i,this.xt.windowId=t.$window_id),this.xt.size+=t.$snapshot_bytes,this.xt.data.push(t.$snapshot_data),this.le||this.nt||(this.le=setTimeout((()=>{this.Tt()}),2e3))}ce(t){this._instance.capture("$snapshot",t,{_url:this._instance.requestRouter.endpointFor("api",this.tt),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}get _t(){var t,e,r=null==(t=this.xt)?void 0:t.data[(null==(e=this.xt)?void 0:e.data.length)-1],{sessionStartTimestamp:i}=this.V.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-i:null}ae(){if(!this.xt||0===this.xt.data.length)return this.Ft();for(var t=-1,e=this.xt.data.length-1;e>=0;e--)if(this.xt.data[e].type===sa.Meta){t=e;break}return t>=0?(this.xt.data=this.xt.data.slice(t),this.xt.size=this.xt.data.reduce(((t,e)=>t+Ra(e)),0),this.xt):this.Ft()}Ft(){return this.xt={size:0,data:[],sessionId:this.G,windowId:this.yt},this.xt}ee(t,e){this._instance.register_for_session({$session_recording_start_reason:t}),gh.info(t.replace("_"," "),e),-1===["recording_initialized","session_id_changed"].indexOf(t)&&this.bt(t,e)}fe(t){var e;return 3===t.type&&-1!==wh.indexOf(null==(e=t.data)?void 0:e.source)}he(t){var e=this.fe(t);e||this.nt||t.timestamp-this.rt>this.J&&(this.nt=!0,clearInterval(this.Xt),this.bt("sessionIdle",{eventTimestamp:t.timestamp,lastActivityTimestamp:this.rt,threshold:this.J,bufferLength:this.xt.data.length,bufferSize:this.xt.size}),this.Tt());var r=!1;if(e&&(this.rt=t.timestamp,this.nt)){var i="unknown"===this.nt;this.nt=!1,i||(this.bt("sessionNoLongerIdle",{reason:"user activity",type:t.type}),r=!0)}if(!this.nt){var{windowId:n,sessionId:s}=this.V.checkAndGetSessionAndWindowId(!e,t.timestamp),o=this.G!==s,a=this.yt!==n;this.yt=n,this.G=s,o||a?(this.stop(),this.start("session_id_changed")):r&&this.Zt()}}kt(){var t,e,r,i;null==(t=this._instance)||null==(t=t.persistence)||t.unregister(Ro),null==(e=this._instance)||null==(e=e.persistence)||e.unregister(xo),null==(r=this._instance)||null==(r=r.persistence)||r.unregister(Io),null==(i=this._instance)||null==(i=i.persistence)||i.unregister(Mo)}Ct(t){var e,r=this.G!==t,i=this.Z;if(no(i)){var n=this.Y,s=r||!so(n),o=s?ch(t,i):n;s&&(o?this.ee(ha):gh.warn("Sample rate ("+i+") has determined that this sessionId ("+t+") will not be sent to the server."),this.bt("samplingDecisionMade",{sampleRate:i,isSampled:o})),null==(e=this._instance.persistence)||e.register({[Io]:!!o&&t})}else{var a;null==(a=this._instance.persistence)||a.unregister(Io)}}ie(){0!==this.Dt.L.length&&io(this.lt)&&(this.lt=this._instance.on("eventCaptured",(t=>{try{this.Dt.L.includes(t.event)&&this.te("event")}catch(t){gh.error("Could not activate event trigger",t)}})))}get sdkDebugProperties(){var t,{sessionStartTimestamp:e}=this.V.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this.xt.data.length,$sdk_debug_replay_internal_buffer_size:this.xt.size,$sdk_debug_current_session_duration:this._t,$sdk_debug_session_start:e,$sdk_debug_replay_flushed_size:null==(t=this.St)?void 0:t.currentTrackedSize,$sdk_debug_replay_full_snapshots:this.ht,$snapshot_max_depth_exceeded:this.st}}ne(){var t;if(!this.et){var e,i,n,s={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},o=this._instance.config.session_recording;for(var[a,h]of Object.entries(o||{}))a in s&&("maskInputOptions"===a?s.maskInputOptions=r({password:!0},h):s[a]=h);if(this.Pt&&this.Pt.enabled&&(s.recordCanvas=!0,s.sampling={canvas:this.Pt.fps},s.dataURLOptions={type:"image/webp",quality:this.Pt.quality}),this.jt)s.maskAllInputs=null===(e=this.jt.maskAllInputs)||void 0===e||e,s.maskTextSelector=null!==(i=this.jt.maskTextSelector)&&void 0!==i?i:void 0,s.blockSelector=null!==(n=this.jt.blockSelector)&&void 0!==n?n:void 0;var u=Sh();if(u){this.oe=null!==(t=this.oe)&&void 0!==t?t:new lh(u,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(t,e)=>{var r="Too many mutations on node '"+t+"'. Rate limiting. This could be due to SVG animations or something similar";gh.info(r,{node:e}),this.log(mh+" "+r,"warn")}});var l=this.$t();this.et=u(r({emit:t=>{this.onRRwebEmit(t)},plugins:l},s)),this.rt=Date.now(),this.nt=so(this.nt)?this.nt:"unknown",this.tryAddCustomEvent("$remote_config_received",this.X),this.bt("$session_options",{sessionRecordingOptions:s,activePlugins:l.map((t=>null==t?void 0:t.name))}),this.bt("$posthog_config",{config:this._instance.config})}else gh.error("_startRecorder was called but rrwebRecord is not available. This indicates something has gone wrong.")}}tryAddCustomEvent(t,e){return this.bt(t,e)}}Hs.__PosthogExtensions__=Hs.__PosthogExtensions__||{},Hs.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Ps,getRecordNetworkPlugin:na},Hs.__PosthogExtensions__.rrweb={record:Ss,version:"v2",wasMaxDepthReached:function(){return lt},resetMaxDepthState:function(){lt=!1,ut=!1}},Hs.__PosthogExtensions__.initSessionRecording=t=>new _h(t),Hs.rrweb={record:Ss,version:"v2"},Hs.rrwebConsoleRecord={getRecordConsolePlugin:Ps},Hs.getRecordNetworkPlugin=na}();
2
2
  //# sourceMappingURL=posthog-recorder.js.map