@drip-apex/sdk 0.1.0 → 0.2.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 (245) hide show
  1. package/README.md +5 -0
  2. package/dist/bundle-report.json +584 -226
  3. package/dist/define.cjs +123 -0
  4. package/dist/define.cjs.map +7 -0
  5. package/dist/define.mjs +102 -0
  6. package/dist/define.mjs.map +7 -0
  7. package/dist/drip.cjs +19262 -0
  8. package/dist/drip.cjs.map +7 -0
  9. package/dist/drip.debug.js +1 -1
  10. package/dist/drip.debug.js.map +1 -1
  11. package/dist/drip.heatmap.js +1 -1
  12. package/dist/drip.heatmap.js.map +1 -1
  13. package/dist/drip.js +1 -1
  14. package/dist/drip.js.map +1 -1
  15. package/dist/drip.live.js +1 -1
  16. package/dist/drip.live.js.map +1 -1
  17. package/dist/drip.mjs +19246 -0
  18. package/dist/drip.mjs.map +7 -0
  19. package/dist/drip.replay-recorder.js +2 -0
  20. package/dist/drip.replay-recorder.js.map +1 -0
  21. package/dist/editor.js +147 -142
  22. package/dist/editor.js.map +4 -4
  23. package/dist/flags.cjs +1788 -0
  24. package/dist/flags.cjs.map +7 -0
  25. package/dist/flags.mjs +1765 -0
  26. package/dist/flags.mjs.map +7 -0
  27. package/dist/index.mjs +12 -0
  28. package/dist/index.mjs.map +2 -2
  29. package/dist/metafiles/define.cjs.meta.json +28 -0
  30. package/dist/metafiles/define.mjs.meta.json +32 -0
  31. package/dist/metafiles/drip.cjs.meta.json +3193 -0
  32. package/dist/metafiles/drip.debug.meta.json +2859 -574
  33. package/dist/metafiles/drip.heatmap.meta.json +2732 -460
  34. package/dist/metafiles/drip.live.meta.json +2732 -460
  35. package/dist/metafiles/drip.meta.json +2859 -574
  36. package/dist/metafiles/drip.mjs.meta.json +3235 -0
  37. package/dist/metafiles/drip.replay-recorder.meta.json +82 -0
  38. package/dist/metafiles/editor.meta.json +67 -27
  39. package/dist/metafiles/flags.cjs.meta.json +220 -0
  40. package/dist/metafiles/flags.mjs.meta.json +225 -0
  41. package/dist/metafiles/index.meta.json +2717 -491
  42. package/dist/metafiles/index.mjs.meta.json +14 -4
  43. package/dist/react/index.js +16621 -13539
  44. package/dist/react/index.js.map +4 -4
  45. package/dist/sri.json +20 -15
  46. package/dist/types/activation-runtime.d.ts +91 -0
  47. package/dist/types/analytics-runtime.d.ts +166 -0
  48. package/dist/types/antiflicker.d.ts +9 -3
  49. package/dist/types/assignment-cookie-sync.d.ts +31 -0
  50. package/dist/types/assignment-runtime.d.ts +257 -0
  51. package/dist/types/assignment-store.d.ts +4 -8
  52. package/dist/types/bucket.d.ts +1 -2
  53. package/dist/types/compact-store.d.ts +1 -0
  54. package/dist/types/config-runtime.d.ts +313 -0
  55. package/dist/types/consent-evaluation.d.ts +27 -0
  56. package/dist/types/css.d.ts +5 -3
  57. package/dist/types/debug-loader.d.ts +2 -0
  58. package/dist/types/decide-assignments.d.ts +31 -0
  59. package/dist/types/delivery-timing.d.ts +8 -0
  60. package/dist/types/early-interaction-capture.d.ts +79 -0
  61. package/dist/types/early-reassert.d.ts +32 -0
  62. package/dist/types/edge-runtime.d.ts +11 -0
  63. package/dist/types/editor/api.d.ts +3 -0
  64. package/dist/types/editor/controller.d.ts +3 -1
  65. package/dist/types/editor/publication-result.d.ts +11 -0
  66. package/dist/types/editor/types.d.ts +2 -1
  67. package/dist/types/editor/view-kit.d.ts +1 -1
  68. package/dist/types/endpoint.d.ts +8 -0
  69. package/dist/types/exclusion-groups.d.ts +4 -7
  70. package/dist/types/flags.d.ts +2 -0
  71. package/dist/types/goal-eligibility.d.ts +4 -0
  72. package/dist/types/goals.d.ts +10 -1
  73. package/dist/types/guards.d.ts +7 -7
  74. package/dist/types/handover.d.ts +12 -1
  75. package/dist/types/hash.d.ts +8 -4
  76. package/dist/types/hydration.d.ts +2 -1
  77. package/dist/types/index.d.ts +24 -128
  78. package/dist/types/init-test-helpers.d.ts +48 -0
  79. package/dist/types/inline-bootstrap.d.ts +26 -0
  80. package/dist/types/js.d.ts +3 -1
  81. package/dist/types/money.d.ts +12 -0
  82. package/dist/types/mutate.d.ts +45 -6
  83. package/dist/types/performance.d.ts +2 -0
  84. package/dist/types/persistence-decoders.d.ts +12 -0
  85. package/dist/types/public-api.d.ts +209 -0
  86. package/dist/types/qa-assistant-state.d.ts +34 -0
  87. package/dist/types/react/index.d.ts +28 -3
  88. package/dist/types/reassert-sentinel.d.ts +6 -0
  89. package/dist/types/redirect.d.ts +48 -0
  90. package/dist/types/replay-recorder-entry.d.ts +1 -0
  91. package/dist/types/replay-signal-state.d.ts +6 -0
  92. package/dist/types/replay-signals.d.ts +13 -0
  93. package/dist/types/replay.d.ts +110 -0
  94. package/dist/types/router.d.ts +12 -2
  95. package/dist/types/runtime-state.d.ts +166 -0
  96. package/dist/types/sanitize.d.ts +1 -0
  97. package/dist/types/shadow.d.ts +3 -0
  98. package/dist/types/shopify-cart.d.ts +25 -1
  99. package/dist/types/storefront-vitals.d.ts +24 -0
  100. package/dist/types/targeting-diagnostics.d.ts +1 -0
  101. package/dist/types/targeting.d.ts +16 -2
  102. package/dist/types/track.d.ts +15 -1
  103. package/dist/types/types.d.ts +115 -9
  104. package/dist/types/wait.d.ts +14 -1
  105. package/dist/types/weekday-schedule.d.ts +3 -0
  106. package/package.json +17 -8
  107. package/src/activation-runtime.ts +2737 -0
  108. package/src/analytics-runtime.ts +2175 -0
  109. package/src/antiflicker.test.ts +216 -44
  110. package/src/antiflicker.ts +103 -28
  111. package/src/artifact-concurrency.test.ts +1091 -0
  112. package/src/assignment-cookie-sync.test.ts +202 -0
  113. package/src/assignment-cookie-sync.ts +189 -0
  114. package/src/assignment-runtime.ts +3204 -0
  115. package/src/assignment-store.test.ts +56 -0
  116. package/src/assignment-store.ts +7 -38
  117. package/src/bucket.ts +3 -18
  118. package/src/commerce-analytics-lifecycle.test.ts +75 -15
  119. package/src/commerce-config-lifecycle.test.ts +81 -1
  120. package/src/commerce-price-preserve.test.ts +133 -0
  121. package/src/commerce-price.test.ts +97 -0
  122. package/src/commerce-price.ts +74 -20
  123. package/src/commerce-shipping.test.ts +53 -0
  124. package/src/commerce-shipping.ts +5 -11
  125. package/src/compact-store.ts +15 -0
  126. package/src/config-fetch.test.ts +480 -9
  127. package/src/config-runtime.ts +2070 -0
  128. package/src/consent-evaluation-cookiescript.test.ts +50 -0
  129. package/src/consent-evaluation.ts +138 -0
  130. package/src/css.test.ts +30 -0
  131. package/src/css.ts +120 -6
  132. package/src/cwv.test.ts +60 -77
  133. package/src/debug-loader.test.ts +214 -0
  134. package/src/debug-loader.ts +41 -0
  135. package/src/decide-assignments.test.ts +196 -0
  136. package/src/decide-assignments.ts +204 -0
  137. package/src/delivery-timing.test.ts +104 -0
  138. package/src/delivery-timing.ts +89 -0
  139. package/src/early-interaction-capture.test.ts +451 -0
  140. package/src/early-interaction-capture.ts +230 -0
  141. package/src/early-reassert.test.ts +207 -0
  142. package/src/early-reassert.ts +152 -0
  143. package/src/edge-adoption.test.ts +435 -0
  144. package/src/edge-runtime.ts +30 -0
  145. package/src/editor/api.test.ts +109 -0
  146. package/src/editor/api.ts +34 -3
  147. package/src/editor/controller.test.ts +297 -14
  148. package/src/editor/controller.ts +69 -5
  149. package/src/editor/index.test.ts +2 -0
  150. package/src/editor/index.ts +1 -0
  151. package/src/editor/publication-result.ts +58 -0
  152. package/src/editor/types.ts +10 -1
  153. package/src/editor/view-kit.ts +2 -1
  154. package/src/editor/view.test.ts +108 -0
  155. package/src/editor/view.ts +49 -7
  156. package/src/endpoint.test.ts +15 -0
  157. package/src/endpoint.ts +10 -0
  158. package/src/exclusion-groups.ts +8 -18
  159. package/src/flags.test.ts +88 -1
  160. package/src/flags.ts +29 -29
  161. package/src/global-runtime-reconciler.test.ts +271 -0
  162. package/src/goal-eligibility.test.ts +29 -0
  163. package/src/goal-eligibility.ts +17 -0
  164. package/src/goals.test.ts +144 -1
  165. package/src/goals.ts +97 -18
  166. package/src/guards.test.ts +99 -1
  167. package/src/guards.ts +34 -15
  168. package/src/handover-cache-order.test.ts +6 -3
  169. package/src/handover.test.ts +154 -8
  170. package/src/handover.ts +122 -12
  171. package/src/hash.ts +29 -54
  172. package/src/holdout.test.ts +26 -0
  173. package/src/hydration.test.ts +73 -2
  174. package/src/hydration.ts +18 -9
  175. package/src/index.ts +130 -7287
  176. package/src/init-analytics.test.ts +1694 -0
  177. package/src/init-anti-flicker.test.ts +1211 -0
  178. package/src/init-cart-attributes.test.ts +2003 -0
  179. package/src/init-config-resolution.test.ts +999 -0
  180. package/src/init-consent.test.ts +971 -0
  181. package/src/init-empty.test.ts +11 -5406
  182. package/src/init-integrations.test.ts +846 -0
  183. package/src/init-page-activation.test.ts +5064 -0
  184. package/src/init-qa-loading.test.ts +740 -0
  185. package/src/init-redirects.test.ts +2156 -0
  186. package/src/init-test-helpers.ts +287 -0
  187. package/src/inline-bootstrap.test.ts +184 -0
  188. package/src/inline-bootstrap.ts +73 -0
  189. package/src/js.test.ts +51 -1
  190. package/src/js.ts +86 -2
  191. package/src/money.test.ts +55 -1
  192. package/src/money.ts +104 -2
  193. package/src/money.web-parity.contract.test.ts +85 -0
  194. package/src/mutate.test.ts +474 -10
  195. package/src/mutate.ts +739 -230
  196. package/src/page-trigger.test.ts +218 -8
  197. package/src/performance.ts +10 -0
  198. package/src/persistence-decoders.ts +18 -0
  199. package/src/public-api.ts +1828 -0
  200. package/src/qa-assistant-state.test.ts +249 -3
  201. package/src/qa-assistant-state.ts +146 -6
  202. package/src/qa-assistant-view.test.ts +220 -2
  203. package/src/qa-assistant-view.ts +102 -5
  204. package/src/react/index.test.tsx +37 -0
  205. package/src/react/index.tsx +19 -3
  206. package/src/reassert-sentinel.test.ts +155 -1
  207. package/src/reassert-sentinel.ts +168 -8
  208. package/src/redirect.test.ts +541 -0
  209. package/src/redirect.ts +572 -0
  210. package/src/replay-recorder-entry.ts +115 -0
  211. package/src/replay-signal-state.ts +100 -0
  212. package/src/replay-signals.test.ts +249 -0
  213. package/src/replay-signals.ts +151 -0
  214. package/src/replay.test.ts +764 -0
  215. package/src/replay.ts +514 -0
  216. package/src/router.test.ts +61 -2
  217. package/src/router.ts +50 -12
  218. package/src/runtime-state.ts +507 -0
  219. package/src/runtime.test.ts +174 -7
  220. package/src/runtime.ts +88 -14
  221. package/src/sanitize.test.ts +34 -0
  222. package/src/sanitize.ts +23 -12
  223. package/src/shadow.test.ts +187 -0
  224. package/src/shadow.ts +99 -0
  225. package/src/shopify-cart.test.ts +733 -23
  226. package/src/shopify-cart.ts +402 -49
  227. package/src/storefront-vitals.test.ts +217 -0
  228. package/src/storefront-vitals.ts +206 -0
  229. package/src/surface-signals.ts +6 -0
  230. package/src/targeting-conformance.test.ts +9 -0
  231. package/src/targeting-diagnostics.ts +38 -8
  232. package/src/targeting-parity-corpus.json +559 -0
  233. package/src/targeting-parity-corpus.test.ts +18 -0
  234. package/src/targeting.detailed.test.ts +105 -0
  235. package/src/targeting.test.ts +211 -0
  236. package/src/targeting.ts +88 -207
  237. package/src/track.test.ts +147 -0
  238. package/src/track.ts +125 -26
  239. package/src/types.ts +120 -13
  240. package/src/wait.test.ts +23 -0
  241. package/src/wait.ts +129 -13
  242. package/src/weekday-delivery.test.ts +56 -0
  243. package/src/weekday-schedule-parity-corpus.json +92 -0
  244. package/src/weekday-schedule.test.ts +69 -0
  245. package/src/weekday-schedule.ts +20 -0
@@ -0,0 +1,2 @@
1
+ "use strict";(()=>{var e,t,r=Object.defineProperty,s=(e,t,s)=>((e,t,s)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),n=Object.defineProperty,i=(e,t,r)=>((e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),o=((t=o||{})[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),a={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},l={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},u={},h={};var c={};function p(e,t,r){var s;let n=`${e}.${String(r)}`;if(c[n])return c[n].call(t);let i=function(e){if(u[e])return u[e];let t=globalThis[e],r=t.prototype,s=e in a?a[e]:void 0,n=!(!s||!s.every(e=>{var t,s;return!(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)||!s.toString().includes("[native code]"))})),i=e in l?l[e]:void 0,o=!(!i||!i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return u[e]=t.prototype,t.prototype;try{let s=document.createElement("iframe");s.style.display="none",document.body.appendChild(s);let n=s.contentWindow;if(!n)return t.prototype;let i=n[e].prototype;if(!i)return s.remove(),r;let o=navigator.userAgent;return o.includes("Safari")&&!o.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),h[e]=()=>s.remove()):s.remove(),u[e]=i}catch{return r}}(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(c[n]=o,o.call(t)):t[r]}Date.now,/[1-9][0-9]{12}/.test(Date.now().toString());var f=function(e){return p("Node",e,"childNodes")},d=function(e){return p("Node",e,"parentNode")},m=function(e){return p("Node",e,"parentElement")},g=function(e){return p("Node",e,"textContent")},y=function(e){return e&&"shadowRoot"in e?p("Element",e,"shadowRoot"):null};function w(e){return e.nodeType===e.ELEMENT_NODE}function b(e){let t=e&&"host"in e&&"mode"in e&&function(e){return e&&"host"in e?p("ShadowRoot",e,"host"):null}(e)||null;return!(!t||!("shadowRoot"in t)||y(t)!==e)}function v(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function S(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;return!r&&e.ownerNode&&(r=e.ownerNode.baseURI),function(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}(Array.from(t,e=>k(e,r)).join(""))}catch{return null}}function k(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=S(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch{t=e.cssText}return e.styleSheet.href?D(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=function(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}(r)),t?D(r,t):r}}var C=class{constructor(){i(this,"idNodeMap",new Map),i(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?(null==(t=this.getMeta(e))?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function x({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:i}){let o=n||"",a=s&&M(s);return(t[r.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function M(e){return e.toLowerCase()}var O="__rrweb_original__";function I(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?M(t):null}function R(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return s?.[1]??null}var E=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,A=/^(?:[a-z+]+:)?\/\//i,T=/^www\..*/i,L=/^(data:)([^,]*),(.*)/i;function D(e,t){return(e||"").replace(E,(e,r,s,n,i,o)=>{let a=s||i||o,l=r||n||"";if(!a)return e;if(A.test(a)||T.test(a))return`url(${l}${a}${l})`;if(L.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;let u=a.split("#")[0],h=a.substring(u.length),c=t.split("#")[0].split("/"),p=u.split("/");c.pop();for(let e of p)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${h}${l})`})}function P(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}var N=1,F=new RegExp("[^a-z0-9-_:]");function _(){return N++}var U,j,z=/^[^ \t\n\r\u000c]+/,B=/^[, \t\n\r\u000c]+/,W=new WeakMap;function $(e,t){return t&&""!==t.trim()?G(e,t):t}function V(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function G(e,t){let r=W.get(e);if(r||(r=e.createElement("a"),W.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function H(e,t,r,s){return s&&("src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]||"background"===r&&["table","td","th"].includes(t)?$(e,s):"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s,n=e.exec(t.substring(r));return n?(s=n[0],r+=s.length,s):""}let n=[];for(;s(B),!(r>=t.length);){let i=s(z);if(","===i.slice(-1))i=$(e,i.substring(0,i.length-1)),n.push(i);else{let s="";i=$(e,i);let o=!1;for(;;){let e=t.charAt(r);if(""===e){n.push((i+s).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){r+=1,n.push((i+s).trim());break}"("===e&&(o=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?D(s,G(e)):"object"===t&&"data"===r?$(e,s):s)}function J(e,t,r){return["video","audio"].includes(e)&&"autoplay"===t}function q(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&q(d(e),t,r);for(let r=e.classList.length;r--;){let s=e.classList[r];if(t.test(s))return!0}return!!r&&q(d(e),t,r)}function X(e,t,r,s){let n;if(w(e)){if(n=e,!f(n).length)return!1}else{if(null===m(e))return!1;n=m(e)}try{if("string"==typeof t){if(s){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(q(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch{}return!1}function Y(e){return null==e?"":e.toLowerCase()}function Z(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function K(e,t){let{doc:r,mirror:s,blockClass:n,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:u=!1,inlineStylesheet:h=!0,maskInputOptions:c={},maskTextFn:p,maskInputFn:k,slimDOMOptions:C,dataURLOptions:E={},inlineImages:A=!1,recordCanvas:T=!1,onSerialize:L,onIframeLoad:N,iframeLoadTimeout:z=5e3,onStylesheetLoad:B,stylesheetLoadTimeout:W=5e3,keepIframeSrcFn:$=()=>!1,newlyAddedElement:q=!1,cssCaptured:Z=!1}=t,{needsMask:Q}=t,{preserveWhiteSpace:ee=!0}=t;Q||(Q=X(e,a,l,void 0===Q));let te,re=function(e,t){let{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:a,inlineStylesheet:l,maskInputOptions:u={},maskTextFn:h,maskInputFn:c,dataURLOptions:p={},inlineImages:f,recordCanvas:y,keepIframeSrcFn:w,newlyAddedElement:b=!1,cssCaptured:v=!1}=t,k=function(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:o.Document,childNodes:[],compatMode:e.compatMode}:{type:o.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:o.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return function(e,t){let r,{doc:s,blockClass:n,blockSelector:i,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:u,dataURLOptions:h={},inlineImages:c,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:d=!1,rootId:m}=t,g=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){let s=e.classList[r];if(t.test(s))return!0}if(r)return e.matches(r)}catch{}return!1}(e,n,i),y=function(e){if(e instanceof HTMLFormElement)return"form";let t=M(e.tagName);return F.test(t)?"div":t}(e),w={},b=e.attributes.length;for(let t=0;t<b;t++){let r=e.attributes[t];J(y,r.name,r.value)||(w[r.name]=H(s,y,M(r.name),r.value))}if("link"===y&&a){let t=Array.from(s.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=S(t)),r&&(delete w.rel,delete w.href,w._cssText=r)}if("style"===y&&e.sheet){let t=S(e.sheet);t&&(e.childNodes.length>1&&(t=function(e,t){return function(e,t,r=!1){let s=Array.from(t.childNodes),n=[],i=0;if(s.length>1&&e&&"string"==typeof e){let t=P(e,r),o=t.length/e.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&"string"==typeof s[a].textContent){let l=P(s[a].textContent,r),u=100,h=3;for(;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,h),1));h++);for(;h<l.length;h++){let c=l.substring(0,h),p=t.split(c),f=-1;if(2===p.length)f=p[0].length;else if(p.length>2&&""===p[0]&&""!==s[a-1].textContent)f=t.indexOf(c,1);else if(1===p.length){if(c=c.substring(0,c.length-1),p=t.split(c),p.length<=1)return n.push(e),n;h=u+1}else h===l.length-1&&(f=t.indexOf(c));if(p.length>=2&&h>u){let e=s[a-1].textContent;if(e&&"string"==typeof e){let r=P(e).length;f=t.indexOf(c,r)}-1===f&&(f=p[0].length)}if(-1!==f){let a=Math.floor(f/o);for(;a>0&&a<e.length;){if(i+=1,i>50*s.length)return n.push(e),n;let l=P(e.substring(0,a),r);if(l.length===f){n.push(e.substring(0,a)),e=e.substring(a),t=t.substring(f);break}l.length<f?a+=Math.max(1,Math.floor((f-l.length)/o)):a-=Math.max(1,Math.floor((l.length-f)*o))}break}}}}return n.push(e),n}(e,t).join("/* rr_split */")}(t,e)),w._cssText=t)}if(["input","textarea","select"].includes(y)){let t=e.value,r=e.checked;"radio"!==w.type&&"checkbox"!==w.type&&"submit"!==w.type&&"button"!==w.type&&t?w.value=x({element:e,type:I(e),tagName:y,value:t,maskInputOptions:l,maskInputFn:u}):r&&(w.checked=r)}if("option"===y&&(e.selected&&!l.select?w.selected=!0:delete w.selected),"dialog"===y&&e.open&&(w.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),"canvas"===y&&p)if("2d"===e.__context)(function(e){let t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let s=0;s<e.height;s+=50){let n=t.getImageData,i=O in n?n[O]:n;if(new Uint32Array(i.call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){let t=e.toDataURL(h.type,h.quality),r=s.createElement("canvas");r.width=e.width,r.height=e.height,t!==r.toDataURL(h.type,h.quality)&&(w.rr_dataURL=t)}if("img"===y&&c){U||(U=s.createElement("canvas"),j=U.getContext("2d"));let t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{U.width=t.naturalWidth,U.height=t.naturalHeight,j.drawImage(t,0,0),w.rr_dataURL=U.toDataURL(h.type,h.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(n?w.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if(["audio","video"].includes(y)){let t=w;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(d||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),g){let{width:t,height:r}=e.getBoundingClientRect();w={class:w.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"===y&&!f(w.src)&&(e.contentDocument||(w.rr_src=w.src),delete w.src);try{customElements.get(y)&&(r=!0)}catch{}return{type:o.Element,tagName:y,attributes:w,childNodes:[],isSVG:V(e)||void 0,needBlock:g,rootId:m,isCustom:r}}(e,{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:l,maskInputOptions:u,maskInputFn:c,dataURLOptions:p,inlineImages:f,recordCanvas:y,keepIframeSrcFn:w,newlyAddedElement:b,rootId:k});case e.TEXT_NODE:return function(e,t){let{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:i}=t,a=d(e),l=a&&a.tagName,u="",h="STYLE"===l||void 0,c="SCRIPT"===l||void 0;return c?u="SCRIPT_PLACEHOLDER":i||(u=g(e),h&&u&&(u=D(u,G(t.doc)))),!h&&!c&&u&&r&&(u=s?s(u,m(e)):u.replace(/[\S]/g,"*")),{type:o.Text,textContent:u||"",rootId:n}}(e,{doc:r,needsMask:a,maskTextFn:h,rootId:k,cssCaptured:v});case e.CDATA_SECTION_NODE:return{type:o.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:o.Comment,textContent:g(e)||"",rootId:k};default:return!1}}(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:Q,inlineStylesheet:h,maskInputOptions:c,maskTextFn:p,maskInputFn:k,dataURLOptions:E,inlineImages:A,recordCanvas:T,keepIframeSrcFn:$,newlyAddedElement:q,cssCaptured:Z});if(!re)return console.warn(e,"not serialized"),null;te=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===o.Comment)return!0;if(e.type===o.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===R(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Y(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Y(e.attributes.name)||"icon"===Y(e.attributes.rel)||"apple-touch-icon"===Y(e.attributes.rel)||"shortcut icon"===Y(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Y(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Y(e.attributes.property).match(/^(og|twitter|fb):/)||Y(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Y(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Y(e.attributes.name)||"googlebot"===Y(e.attributes.name)||"bingbot"===Y(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Y(e.attributes.name)||"generator"===Y(e.attributes.name)||"framework"===Y(e.attributes.name)||"publisher"===Y(e.attributes.name)||"progid"===Y(e.attributes.name)||Y(e.attributes.property).match(/^article:/)||Y(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Y(e.attributes.name)||"yandex-verification"===Y(e.attributes.name)||"csrf-token"===Y(e.attributes.name)||"p:domain_verify"===Y(e.attributes.name)||"verify-v1"===Y(e.attributes.name)||"verification"===Y(e.attributes.name)||"shopify-checkout-api-token"===Y(e.attributes.name)))return!0}}return!1}(re,C)||!ee&&re.type===o.Text&&!re.textContent.replace(/^\s+|\s+$/gm,"").length?-2:_();let se=Object.assign(re,{id:te});if(s.add(e,se),-2===te)return null;L&&L(e);let ne=!u;if(se.type===o.Element){ne=ne&&!se.needBlock,delete se.needBlock;let t=y(e);t&&v(t)&&(se.isShadowHost=!0)}if((se.type===o.Document||se.type===o.Element)&&ne){C.headWhitespace&&se.type===o.Element&&"head"===se.tagName&&(ee=!1);let t={doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:Q,maskTextClass:a,maskTextSelector:l,skipChild:u,inlineStylesheet:h,maskInputOptions:c,maskTextFn:p,maskInputFn:k,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:T,preserveWhiteSpace:ee,onSerialize:L,onIframeLoad:N,iframeLoadTimeout:z,onStylesheetLoad:B,stylesheetLoadTimeout:W,keepIframeSrcFn:$,cssCaptured:!1};if(se.type!==o.Element||"textarea"!==se.tagName||void 0===se.attributes.value){se.type===o.Element&&void 0!==se.attributes._cssText&&"string"==typeof se.attributes._cssText&&(t.cssCaptured=!0);for(let r of Array.from(f(e))){let e=K(r,t);e&&se.childNodes.push(e)}}let d=null;if(w(e)&&(d=y(e)))for(let e of Array.from(f(d))){let r=K(e,t);r&&(v(d)&&(r.isShadow=!0),se.childNodes.push(r))}}let ie=d(e);return ie&&b(ie)&&v(ie)&&(se.isShadow=!0),se.type===o.Element&&"iframe"===se.tagName&&function(e,t,r){let s=e.contentWindow;if(!s)return;let n,i=!1;try{n=s.document.readyState}catch{return}if("complete"!==n){let s=setTimeout(()=>{i||(t(),i=!0)},r);return void e.addEventListener("load",()=>{clearTimeout(s),i=!0,t()})}let o="about:blank";if(s.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=e.contentDocument;if(t&&N){let r=K(t,{doc:t,mirror:s,blockClass:n,blockSelector:i,needsMask:Q,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:c,maskTextFn:p,maskInputFn:k,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:T,preserveWhiteSpace:ee,onSerialize:L,onIframeLoad:N,iframeLoadTimeout:z,onStylesheetLoad:B,stylesheetLoadTimeout:W,keepIframeSrcFn:$});r&&N(e,r)}},z),se.type===o.Element&&"link"===se.tagName&&"string"==typeof se.attributes.rel&&("stylesheet"===se.attributes.rel||"preload"===se.attributes.rel&&"string"==typeof se.attributes.href&&"css"===R(se.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch{return}if(s)return;let i=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}(e,()=>{if(B){let t=K(e,{doc:r,mirror:s,blockClass:n,blockSelector:i,needsMask:Q,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:h,maskInputOptions:c,maskTextFn:p,maskInputFn:k,slimDOMOptions:C,dataURLOptions:E,inlineImages:A,recordCanvas:T,preserveWhiteSpace:ee,onSerialize:L,onIframeLoad:N,iframeLoadTimeout:z,onStylesheetLoad:B,stylesheetLoadTimeout:W,keepIframeSrcFn:$});t&&B(e,t)}},W),se}new RegExp(/(max|min)-device-(width|height)/.source,"g");var Q,ee,te,re={exports:{}},se=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function ne(){if(te)return ee;te=1;let e=function(){if(Q)return re.exports;Q=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return re.exports=t(),re.exports.createColors=t,re.exports}(),t=se;class r extends Error{constructor(e,t,s,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof t<"u"&&typeof s<"u"&&("number"==typeof t?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let s=this.source;null==r&&(r=e.isColorSupported),t&&r&&(s=t(s));let n,i,o=s.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,o.length),u=String(l).length;if(r){let{bold:t,gray:r,red:s}=e.createColors(!0);n=e=>t(s(e)),i=e=>r(e)}else n=i=e=>e;return o.slice(a,l).map((e,t)=>{let r=a+1+t,s=" "+(" "+r).slice(-u)+" | ";if(r===this.line){let t=i(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(s)+e+"\n "+t+n("^")}return" "+i(s)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return ee=r,r.default=r,ee}var ie,oe,ae,le,ue,he,ce,pe,fe,de,me,ge,ye,we,be,ve,Se,ke,Ce,xe,Me,Oe,Ie,Re,Ee,Ae,Te,Le,De,Pe,Ne,Fe,_e,Ue,je,ze,Be,We,$e,Ve,Ge,He,Je,qe,Xe,Ye,Ze,Ke,Qe,et,tt,rt,st,nt={};function it(){return ie||(ie=1,nt.isClean=Symbol("isClean"),nt.my=Symbol("my")),nt}function ot(){if(ae)return oe;ae=1;let e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(t,r,s){let n;if(s||(s=r),r&&(n=t.raws[r],typeof n<"u"))return n;let i=t.parent;if("before"===s&&(!i||"root"===i.type&&i.first===t||i&&"document"===i.type))return"";if(!i)return e[s];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[s]<"u")return o.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(t,s);{let e="raw"+((a=s)[0].toUpperCase()+a.slice(1));this[e]?n=this[e](o,t):o.walk(e=>{if(n=e.raws[r],typeof n<"u")return!1})}var a;return typeof n>"u"&&(n=e[s]),o.rawCache[s]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&typeof e.raws.after<"u")return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(typeof e.raws.before<"u")return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(typeof e.raws.before<"u")return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(typeof e.raws.between<"u")return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return oe=t,t.default=t,oe}function at(){if(ue)return le;ue=1;let e=ot();function t(t,r){new e(r).stringify(t)}return le=t,t.default=t,le}function lt(){if(ce)return he;ce=1;let{isClean:e,my:t}=it(),r=ne(),s=ot(),n=at();function i(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||"proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>i(e,r)):("object"===o&&null!==n&&(n=i(n)),r[s]=n)}return r}class o{constructor(r={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in r)if("nodes"===e){this.nodes=[];for(let t of r[e])"function"==typeof t.clone?this.append(t.clone()):this.append(t)}else this[e]=r[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=i(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty()),!0)}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new s).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let i=t.get(s.input);null==i&&(i=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:i,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=n){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}}return he=o,o.default=o,he}function ut(){if(fe)return pe;fe=1;let e=lt();class t extends e{constructor(e){e&&typeof e.value<"u"&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return pe=t,t.default=t,pe}function ht(){if(ye)return ge;ye=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=se,{existsSync:r,readFileSync:s}=se,{dirname:n,join:i}=se;class o{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=n(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=n(e),r(e))return this.mapFile=e,s(e,"utf-8").toString().trim()}loadMap(r,s){if(!1===s)return!1;if(s){if("string"==typeof s)return s;if("function"!=typeof s){if(s instanceof e)return t.fromSourceMap(s).toString();if(s instanceof t)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}{let e=s(r);if(e){let t=this.loadFile(e);if(!t)throw new Error("Unable to load previous source map: "+e.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return r&&(e=i(n(r),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ge=o,o.default=o,ge}function ct(){if(be)return we;be=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=se,{fileURLToPath:r,pathToFileURL:s}=se,{isAbsolute:n,resolve:i}=se,{nanoid:o}=me?de:(me=1,de={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}}),a=se,l=ne(),u=ht(),h=Symbol("fromOffsetCache"),c=!(!e||!t),p=!(!i||!n);class f{constructor(e,t={}){if(null===e||typeof e>"u"||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"\ufffe"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!p||/^\w+:\/\//.test(t.from)||n(t.from)?this.file=t.from:this.file=i(t.from)),p&&c){let e=new u(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let i,o,a;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,a=e.col}else o=s.line,a=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let u=this.origin(t,r,o,a);return i=u?new l(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,n.plugin):new l(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:a,line:o},this.css,this.file,n.plugin),i.input={column:r,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(s&&(i.input.url=s(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[h])r=this[h];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[h]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,o){if(!this.map)return!1;let a,l,u=this.map.consumer(),h=u.originalPositionFor({column:t,line:e});if(!h.source)return!1;"number"==typeof i&&(a=u.originalPositionFor({column:o,line:i})),l=n(h.source)?s(h.source):new URL(h.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let c={column:h.column,endColumn:a&&a.column,endLine:a&&a.line,line:h.line,url:l.toString()};if("file:"===l.protocol){if(!r)throw new Error("file: protocol is not available in this PostCSS build");c.file=r(l)}let p=u.sourceContentFor(h.source);return p&&(c.source=p),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return we=f,f.default=f,a&&a.registerInput&&a.registerInput(f),we}function pt(){if(Se)return ve;Se=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=se,{dirname:r,relative:s,resolve:n,sep:i}=se,{pathToFileURL:o}=se,a=ct(),l=!(!e||!t),u=!!(r&&n&&s&&i);return ve=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let s,n=this.toUrl(this.path(t.file)),i=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(s=new e(t.text),s.sourcesContent&&(s.sourcesContent=null)):s=t.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({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 t({file:this.outputFile(),ignoreInvalidMapping:!0});let e,r,s=1,n=1,i="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(o.generated.line=s,o.generated.column=n-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=i,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=t.match(/\n/g),e?(s+=e.length,r=t.lastIndexOf("\n"),n=t.length-r):n+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"!==a.type&&("atrule"!==a.type||a.nodes)||a!==e.last||e.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=s,o.generated.column=n-2,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=n-1,this.map.addMapping(o)))}})}isAnnotation(){return!!this.isInline()||(typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return!(typeof e<"u"&&!0!==e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=r(n(i,this.mapOpts.annotation)));let o=s(i,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function ft(){if(Ce)return ke;Ce=1;let e=lt();class t extends e{constructor(e){super(e),this.type="comment"}}return ke=t,t.default=t,ke}function dt(){if(Me)return xe;Me=1;let e,t,r,s,{isClean:n,my:i}=it(),o=ut(),a=ft(),l=lt();function u(e){return e.map(e=>(e.nodes&&(e.nodes=u(e.nodes)),delete e.source,e))}function h(e){if(e[n]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class c extends l{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",i=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of i)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(s,l){if("string"==typeof s)s=u(e(s).nodes);else if(typeof s>"u")s=[];else if(Array.isArray(s)){s=s.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===s.type&&"document"!==this.type){s=s.nodes.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if(s.type)s=[s];else if(s.prop){if(typeof s.value>"u")throw new Error("Value field is missed in node creation");"string"!=typeof s.value&&(s.value=String(s.value)),s=[new o(s)]}else if(s.selector)s=[new t(s)];else if(s.name)s=[new r(s)];else{if(!s.text)throw new Error("Unknown node type in node creation");s=[new a(s)]}return s.map(e=>(e[i]||c.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[n]&&h(e),typeof e.raws.before>"u"&&l&&typeof l.raws.before<"u"&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=t=>{e=t},c.registerRule=e=>{t=e},c.registerAtRule=e=>{r=e},c.registerRoot=e=>{s=e},xe=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,o.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,s.prototype),e[i]=!0,e.nodes&&e.nodes.forEach(e=>{c.rebuild(e)})},xe}function mt(){if(Ie)return Oe;Ie=1;let e,t,r=dt();class s extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},Oe=s,s.default=s,Oe}function gt(){if(Ee)return Re;Ee=1;let e={};return Re=function(t){e[t]||(e[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}}function yt(){if(Te)return Ae;Te=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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 Ae=e,e.default=e,Ae}function wt(){if(De)return Le;De=1;let e=yt();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let s=new e(t,r);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return Le=t,t.default=t,Le}function bt(){if(_e)return Fe;_e=1;let e=dt();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Fe=t,t.default=t,e.registerAtRule(t),Fe}function vt(){if(je)return Ue;je=1;let e,t,r=dt();class s extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},Ue=s,s.default=s,r.registerRoot(s),Ue}function St(){if(Be)return ze;Be=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",u=!1;for(let r of e)u?u=!1:"\\"===r?u=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==n&&s.push(n.trim()),n="",i=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};return ze=e,e.default=e,ze}function kt(){if($e)return We;$e=1;let e=dt(),t=St();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return We=r,r.default=r,e.registerRule(r),We}function Ct(){if(Je)return He;Je=1;let e=dt(),t=function(){if(Ge)return Ve;Ge=1;let e=ut(),t=function(){if(Ne)return Pe;Ne=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,r=/.[\r\n"'(/\\]/,s=/[\da-f]/i;return Pe=function(n,i={}){let o,a,l,u,h,c,p,f,d,m,g=n.css.valueOf(),y=i.ignoreErrors,w=g.length,b=0,v=[],S=[];function k(e){throw n.error("Unclosed "+e,b)}return{back:function(e){S.push(e)},endOfFile:function(){return 0===S.length&&b>=w},nextToken:function(n){if(S.length)return S.pop();if(b>=w)return;let i=!!n&&n.ignoreUnclosed;switch(o=g.charCodeAt(b),o){case 10:case 32:case 9:case 13:case 12:a=b;do{a+=1,o=g.charCodeAt(a)}while(32===o||10===o||9===o||13===o||12===o);m=["space",g.slice(b,a)],b=a-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(o);m=[e,e,b];break}case 40:if(f=v.length?v.pop()[1]:"",d=g.charCodeAt(b+1),"url"===f&&39!==d&&34!==d&&32!==d&&10!==d&&9!==d&&12!==d&&13!==d){a=b;do{if(c=!1,a=g.indexOf(")",a+1),-1===a){if(y||i){a=b;break}k("bracket")}for(p=a;92===g.charCodeAt(p-1);)p-=1,c=!c}while(c);m=["brackets",g.slice(b,a+1),b,a],b=a}else a=g.indexOf(")",b+1),u=g.slice(b,a+1),-1===a||r.test(u)?m=["(","(",b]:(m=["brackets",u,b,a],b=a);break;case 39:case 34:l=39===o?"'":'"',a=b;do{if(c=!1,a=g.indexOf(l,a+1),-1===a){if(y||i){a=b+1;break}k("string")}for(p=a;92===g.charCodeAt(p-1);)p-=1,c=!c}while(c);m=["string",g.slice(b,a+1),b,a],b=a;break;case 64:e.lastIndex=b+1,e.test(g),a=0===e.lastIndex?g.length-1:e.lastIndex-2,m=["at-word",g.slice(b,a+1),b,a],b=a;break;case 92:for(a=b,h=!0;92===g.charCodeAt(a+1);)a+=1,h=!h;if(o=g.charCodeAt(a+1),h&&47!==o&&32!==o&&10!==o&&9!==o&&13!==o&&12!==o&&(a+=1,s.test(g.charAt(a)))){for(;s.test(g.charAt(a+1));)a+=1;32===g.charCodeAt(a+1)&&(a+=1)}m=["word",g.slice(b,a+1),b,a],b=a;break;default:47===o&&42===g.charCodeAt(b+1)?(a=g.indexOf("*/",b+2)+1,0===a&&(y||i?a=g.length:k("comment")),m=["comment",g.slice(b,a+1),b,a],b=a):(t.lastIndex=b+1,t.test(g),a=0===t.lastIndex?g.length-1:t.lastIndex-2,m=["word",g.slice(b,a+1),b,a],v.push(m),b=a)}return b++,m},position:function(){return b}}}}(),r=ft(),s=bt(),n=vt(),i=kt(),o={empty:!0,space:!0};return Ve=class{constructor(e){this.input=e,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new s;t.name=e[1].slice(1),""===t.name&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,n,i,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(r=(e=this.tokenizer.nextToken())[0],"("===r||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(l.length>0){for(i=l.length-1,n=l[i];n&&"space"===n[0];)n=l[--i];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return i}this.doubleColon(t)}s=t}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let s=new e;this.init(s,t[0][2]);let n,i=t[t.length-1];for(";"===i[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;s.prop+=t.shift()[1]}for(s.raws.between="";t.length;){if(n=t.shift(),":"===n[0]){s.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1]}("_"===s.prop[0]||"*"===s.prop[0])&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o,a=[];for(;t.length&&(o=t[0][0],"space"===o||"comment"===o);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(n=t[e],"!important"===n[1].toLowerCase()){s.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(s.raws.important=r);break}if("important"===n[1].toLowerCase()){let r=t.slice(0),n="";for(let t=e;t>0;t--){let e=r[t][0];if(0===n.trim().indexOf("!")&&"space"!==e)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(s.important=!0,s.raws.important=n,t=r)}if("space"!==n[0]&&"comment"!==n[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),r),s.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new i;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),i.push("("===r?")":"]");else if(o&&s&&"{"===r)n||(n=l),i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&s){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,i,a,l,u=r.length,h="",c=!0;for(let e=0;e<u;e+=1)n=r[e],i=n[0],"space"!==i||e!==u-1||s?"comment"===i?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",o[l]||o[a]||","===h.slice(-1)?c=!1:h+=n[1]):h+=n[1]:c=!1;if(!c){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:h}}e[t]=h}rule(e){e.pop();let t=new i;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}}(),r=ct();function s(e,s){let n=new r(e,s),i=new t(n);try{i.parse()}catch(e){throw e}return i.root}return He=s,s.default=s,e.registerParse(s),He}function xt(){if(Xe)return qe;Xe=1;let{isClean:e,my:t}=it(),r=pt(),s=at(),n=dt(),i=mt(),o=(gt(),wt()),a=Ct(),l=vt(),u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},c={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function d(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function m(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>m(e)),t}let g={};class y{constructor(e,r,s){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof y||r instanceof o)i=m(r.root),r.map&&(typeof s.map>"u"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=a;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{i=e(r,s)}catch(e){this.processed=!0,this.error=e}i&&!i[t]&&n.rebuild(i)}else i=m(r);this.result=new o(e,i,s),this.helpers={...g,postcss:g,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!h[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!c[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(p(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[d(t)];for(;r.length>0;){let e=this.visitTick(r);if(p(e))try{await e}catch(e){let t=r[r.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return p(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=s;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(p(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:s,visitors:n}=r;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void t.pop();if(n.length>0&&r.visitorIndex<n.length){let[e,t]=n[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===n.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(s.toProxy(),this.helpers)}catch(e){throw this.handleError(e,s)}}if(0!==r.iterator){let n,i=r.iterator;for(;n=s.nodes[s.indexes[i]];)if(s.indexes[i]+=1,!n[e])return n[e]=!0,void t.push(d(n));r.iterator=0,delete s.indexes[i]}let i=r.events;for(;r.eventIndex<i.length;){let t=i[r.eventIndex];if(r.eventIndex+=1,0===t)return void(s.nodes&&s.nodes.length&&(s[e]=!0,r.iterator=s.getIterator()));if(this.listeners[t])return void(r.visitors=this.listeners[t])}t.pop()}walkSync(t){t[e]=!0;let r=f(t);for(let s of r)if(0===s)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[s];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return y.registerPostcss=e=>{g=e},qe=y,y.default=y,l.registerLazyResult(y),i.registerLazyResult(y),qe}var Mt=function(){if(st)return rt;st=1;let e=ne(),t=ut(),r=xt(),s=dt(),n=function(){if(Qe)return Ke;Qe=1;let e=function(){if(Ze)return Ye;Ze=1;let e=pt(),t=at(),r=(gt(),Ct()),s=wt();class n{constructor(r,n,i){n=n.toString(),this.stringified=!1,this._processor=r,this._css=n,this._opts=i,this._map=void 0;let o,a=t;this.result=new s(this._processor,o,this._opts),this.result.css=n;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let u=new e(a,o,this._opts,n);if(u.isMap()){let[e,t]=u.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}return Ye=n,n.default=n,Ye}(),t=xt(),r=mt(),s=vt();class n{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");return t}process(r,s={}){return this.plugins.length||s.parser||s.stringifier||s.syntax?new t(this,r,s):new e(this,r,s)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return Ke=n,n.default=n,s.registerProcessor(n),r.registerProcessor(n),Ke}(),i=at(),o=function(){if(tt)return et;tt=1;let e=ut(),t=ht(),r=ft(),s=bt(),n=ct(),i=vt(),o=kt();function a(l,u){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:h,...c}=l;if(h){u=[];for(let e of h){let r={...e,__proto__:n.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),u.push(r)}}if(c.nodes&&(c.nodes=l.nodes.map(e=>a(e,u))),c.source){let{inputId:e,...t}=c.source;c.source=t,null!=e&&(c.source.input=u[e])}if("root"===c.type)return new i(c);if("decl"===c.type)return new e(c);if("rule"===c.type)return new o(c);if("comment"===c.type)return new r(c);if("atrule"===c.type)return new s(c);throw new Error("Unknown node type: "+l.type)}return et=a,a.default=a,et}(),a=mt(),l=yt(),u=ft(),h=bt(),c=wt(),p=ct(),f=Ct(),d=St(),m=kt(),g=vt(),y=lt();function w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new n(e)}return w.plugin=function(e,t){let r,s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": \u91cc\u9762 postcss.plugin \u88ab\u5f03\u7528. \u8fc1\u79fb\u6307\u5357:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=(new n).version,i}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return w([i(r)]).process(e,t)},i},w.stringify=i,w.parse=f,w.fromJSON=o,w.list=d,w.comment=e=>new u(e),w.atRule=e=>new h(e),w.decl=e=>new t(e),w.rule=e=>new m(e),w.root=e=>new g(e),w.document=e=>new a(e),w.CssSyntaxError=e,w.Declaration=t,w.Container=s,w.Processor=n,w.Document=a,w.Comment=u,w.Warning=l,w.AtRule=h,w.Result=c,w.Input=p,w.Rule=m,w.Root=g,w.Node=y,r.registerPostcss(w),rt=w,w.default=w,rt}(),Ot=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Mt);Ot.stringify,Ot.fromJSON,Ot.plugin,Ot.parse,Ot.list,Ot.document,Ot.comment,Ot.atRule,Ot.rule,Ot.decl,Ot.root,Ot.CssSyntaxError,Ot.Declaration,Ot.Container,Ot.Processor,Ot.Document,Ot.Comment,Ot.Warning,Ot.AtRule,Ot.Result,Ot.Input,Ot.Rule,Ot.Root,Ot.Node;var It=Object.defineProperty,Rt=(e,t,r)=>((e,t,r)=>t in e?It(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);Date.now().toString();var Et,At,Tt,Lt={exports:{}},Dt=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function Pt(){if(Tt)return At;Tt=1;let e=function(){if(Et)return Lt.exports;Et=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Lt.exports=t(),Lt.exports.createColors=t,Lt.exports}(),t=Dt;class r extends Error{constructor(e,t,s,n,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),typeof t<"u"&&typeof s<"u"&&("number"==typeof t?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let s=this.source;null==r&&(r=e.isColorSupported),t&&r&&(s=t(s));let n,i,o=s.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,o.length),u=String(l).length;if(r){let{bold:t,gray:r,red:s}=e.createColors(!0);n=e=>t(s(e)),i=e=>r(e)}else n=i=e=>e;return o.slice(a,l).map((e,t)=>{let r=a+1+t,s=" "+(" "+r).slice(-u)+" | ";if(r===this.line){let t=i(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(s)+e+"\n "+t+n("^")}return" "+i(s)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return At=r,r.default=r,At}var Nt,Ft,_t,Ut,jt,zt,Bt,Wt,$t,Vt,Gt,Ht,Jt,qt,Xt,Yt,Zt,Kt,Qt,er,tr,rr,sr,nr,ir,or,ar,lr,ur,hr,cr,pr,fr,dr,mr,gr,yr,wr,br,vr,Sr,kr,Cr,xr,Mr,Or,Ir,Rr,Er,Ar,Tr,Lr,Dr,Pr={};function Nr(){return Nt||(Nt=1,Pr.isClean=Symbol("isClean"),Pr.my=Symbol("my")),Pr}function Fr(){if(_t)return Ft;_t=1;let e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(t,r,s){let n;if(s||(s=r),r&&(n=t.raws[r],typeof n<"u"))return n;let i=t.parent;if("before"===s&&(!i||"root"===i.type&&i.first===t||i&&"document"===i.type))return"";if(!i)return e[s];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[s]<"u")return o.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(t,s);{let e="raw"+((a=s)[0].toUpperCase()+a.slice(1));this[e]?n=this[e](o,t):o.walk(e=>{if(n=e.raws[r],typeof n<"u")return!1})}var a;return typeof n>"u"&&(n=e[s]),o.rawCache[s]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&typeof e.raws.after<"u")return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(typeof e.raws.before<"u")return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(typeof e.raws.before<"u")return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(typeof e.raws.between<"u")return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before<"u"){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return Ft=t,t.default=t,Ft}function _r(){if(jt)return Ut;jt=1;let e=Fr();function t(t,r){new e(r).stringify(t)}return Ut=t,t.default=t,Ut}function Ur(){if(Bt)return zt;Bt=1;let{isClean:e,my:t}=Nr(),r=Pt(),s=Fr(),n=_r();function i(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s)||"proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>i(e,r)):("object"===o&&null!==n&&(n=i(n)),r[s]=n)}return r}class o{constructor(r={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in r)if("nodes"===e){this.nodes=[];for(let t of r[e])"function"==typeof t.clone?this.append(t.clone()):this.append(t)}else this[e]=r[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=i(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty()),!0)}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new s).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let i=t.get(s.input);null==i&&(i=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:i,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=n){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}}return zt=o,o.default=o,zt}function jr(){if($t)return Wt;$t=1;let e=Ur();class t extends e{constructor(e){e&&typeof e.value<"u"&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return Wt=t,t.default=t,Wt}function zr(){if(Jt)return Ht;Jt=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Dt,{existsSync:r,readFileSync:s}=Dt,{dirname:n,join:i}=Dt;class o{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=n(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=n(e),r(e))return this.mapFile=e,s(e,"utf-8").toString().trim()}loadMap(r,s){if(!1===s)return!1;if(s){if("string"==typeof s)return s;if("function"!=typeof s){if(s instanceof e)return t.fromSourceMap(s).toString();if(s instanceof t)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}{let e=s(r);if(e){let t=this.loadFile(e);if(!t)throw new Error("Unable to load previous source map: "+e.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return r&&(e=i(n(r),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Ht=o,o.default=o,Ht}function Br(){if(Xt)return qt;Xt=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Dt,{fileURLToPath:r,pathToFileURL:s}=Dt,{isAbsolute:n,resolve:i}=Dt,{nanoid:o}=Gt?Vt:(Gt=1,Vt={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}}),a=Dt,l=Pt(),u=zr(),h=Symbol("fromOffsetCache"),c=!(!e||!t),p=!(!i||!n);class f{constructor(e,t={}){if(null===e||typeof e>"u"||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"\ufffe"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!p||/^\w+:\/\//.test(t.from)||n(t.from)?this.file=t.from:this.file=i(t.from)),p&&c){let e=new u(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let i,o,a;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,a=e.col}else o=s.line,a=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let u=this.origin(t,r,o,a);return i=u?new l(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,n.plugin):new l(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:a,line:o},this.css,this.file,n.plugin),i.input={column:r,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(s&&(i.input.url=s(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[h])r=this[h];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let s=0,n=e.length;s<n;s++)r[s]=t,t+=e[s].length+1;this[h]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,n=r.length-2;for(;s<n;)if(t=s+(n-s>>1),e<r[t])n=t-1;else{if(!(e>=r[t+1])){s=t;break}s=t+1}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:i(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,o){if(!this.map)return!1;let a,l,u=this.map.consumer(),h=u.originalPositionFor({column:t,line:e});if(!h.source)return!1;"number"==typeof i&&(a=u.originalPositionFor({column:o,line:i})),l=n(h.source)?s(h.source):new URL(h.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let c={column:h.column,endColumn:a&&a.column,endLine:a&&a.line,line:h.line,url:l.toString()};if("file:"===l.protocol){if(!r)throw new Error("file: protocol is not available in this PostCSS build");c.file=r(l)}let p=u.sourceContentFor(h.source);return p&&(c.source=p),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return qt=f,f.default=f,a&&a.registerInput&&a.registerInput(f),qt}function Wr(){if(Zt)return Yt;Zt=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Dt,{dirname:r,relative:s,resolve:n,sep:i}=Dt,{pathToFileURL:o}=Dt,a=Br(),l=!(!e||!t),u=!!(r&&n&&s&&i);return Yt=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let s,n=this.toUrl(this.path(t.file)),i=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(s=new e(t.text),s.sourcesContent&&(s.sourcesContent=null)):s=t.consumer(),this.map.applySourceMap(s,n,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({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 t({file:this.outputFile(),ignoreInvalidMapping:!0});let e,r,s=1,n=1,i="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(o.generated.line=s,o.generated.column=n-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=i,o.original.line=1,o.original.column=0,this.map.addMapping(o))),e=t.match(/\n/g),e?(s+=e.length,r=t.lastIndexOf("\n"),n=t.length-r):n+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"!==a.type&&("atrule"!==a.type||a.nodes)||a!==e.last||e.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=s,o.generated.column=n-2,this.map.addMapping(o)):(o.source=i,o.original.line=1,o.original.column=0,o.generated.line=s,o.generated.column=n-1,this.map.addMapping(o)))}})}isAnnotation(){return!!this.isInline()||(typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return!(typeof e<"u"&&!0!==e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(i=r(n(i,this.mapOpts.annotation)));let o=s(i,e);return this.memoizedPaths.set(e,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(o){let t=o(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function $r(){if(Qt)return Kt;Qt=1;let e=Ur();class t extends e{constructor(e){super(e),this.type="comment"}}return Kt=t,t.default=t,Kt}function Vr(){if(tr)return er;tr=1;let e,t,r,s,{isClean:n,my:i}=Nr(),o=jr(),a=$r(),l=Ur();function u(e){return e.map(e=>(e.nodes&&(e.nodes=u(e.nodes)),delete e.source,e))}function h(e){if(e[n]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class c extends l{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],s<r&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=0===s&&"prepend",i=this.normalize(t,this.proxyOf.nodes[s],n).reverse();s=this.index(e);for(let e of i)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s<=r&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(s,l){if("string"==typeof s)s=u(e(s).nodes);else if(typeof s>"u")s=[];else if(Array.isArray(s)){s=s.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===s.type&&"document"!==this.type){s=s.nodes.slice(0);for(let e of s)e.parent&&e.parent.removeChild(e,"ignore")}else if(s.type)s=[s];else if(s.prop){if(typeof s.value>"u")throw new Error("Value field is missed in node creation");"string"!=typeof s.value&&(s.value=String(s.value)),s=[new o(s)]}else if(s.selector)s=[new t(s)];else if(s.name)s=[new r(s)];else{if(!s.text)throw new Error("Unknown node type in node creation");s=[new a(s)]}return s.map(e=>(e[i]||c.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[n]&&h(e),typeof e.raws.before>"u"&&l&&typeof l.raws.before<"u"&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=t=>{e=t},c.registerRule=e=>{t=e},c.registerAtRule=e=>{r=e},c.registerRoot=e=>{s=e},er=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,o.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,s.prototype),e[i]=!0,e.nodes&&e.nodes.forEach(e=>{c.rebuild(e)})},er}function Gr(){if(sr)return rr;sr=1;let e,t,r=Vr();class s extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},rr=s,s.default=s,rr}function Hr(){if(ir)return nr;ir=1;let e={};return nr=function(t){e[t]||(e[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))}}function Jr(){if(ar)return or;ar=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}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 or=e,e.default=e,or}function qr(){if(ur)return lr;ur=1;let e=Jr();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let s=new e(t,r);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return lr=t,t.default=t,lr}function Xr(){if(fr)return pr;fr=1;let e=Vr();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return pr=t,t.default=t,e.registerAtRule(t),pr}function Yr(){if(mr)return dr;mr=1;let e,t,r=Vr();class s extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return s.registerLazyResult=t=>{e=t},s.registerProcessor=e=>{t=e},dr=s,s.default=s,r.registerRoot(s),dr}function Zr(){if(yr)return gr;yr=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,r){let s=[],n="",i=!1,o=0,a=!1,l="",u=!1;for(let r of e)u?u=!1:"\\"===r?u=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(i=!0),i?(""!==n&&s.push(n.trim()),n="",i=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};return gr=e,e.default=e,gr}function Kr(){if(br)return wr;br=1;let e=Vr(),t=Zr();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return wr=r,r.default=r,e.registerRule(r),wr}function Qr(){if(Cr)return kr;Cr=1;let e=Vr(),t=function(){if(Sr)return vr;Sr=1;let e=jr(),t=function(){if(cr)return hr;cr=1;let e=/[\t\n\f\r "#'()/;[\\\]{}]/g,t=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,r=/.[\r\n"'(/\\]/,s=/[\da-f]/i;return hr=function(n,i={}){let o,a,l,u,h,c,p,f,d,m,g=n.css.valueOf(),y=i.ignoreErrors,w=g.length,b=0,v=[],S=[];function k(e){throw n.error("Unclosed "+e,b)}return{back:function(e){S.push(e)},endOfFile:function(){return 0===S.length&&b>=w},nextToken:function(n){if(S.length)return S.pop();if(b>=w)return;let i=!!n&&n.ignoreUnclosed;switch(o=g.charCodeAt(b),o){case 10:case 32:case 9:case 13:case 12:a=b;do{a+=1,o=g.charCodeAt(a)}while(32===o||10===o||9===o||13===o||12===o);m=["space",g.slice(b,a)],b=a-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(o);m=[e,e,b];break}case 40:if(f=v.length?v.pop()[1]:"",d=g.charCodeAt(b+1),"url"===f&&39!==d&&34!==d&&32!==d&&10!==d&&9!==d&&12!==d&&13!==d){a=b;do{if(c=!1,a=g.indexOf(")",a+1),-1===a){if(y||i){a=b;break}k("bracket")}for(p=a;92===g.charCodeAt(p-1);)p-=1,c=!c}while(c);m=["brackets",g.slice(b,a+1),b,a],b=a}else a=g.indexOf(")",b+1),u=g.slice(b,a+1),-1===a||r.test(u)?m=["(","(",b]:(m=["brackets",u,b,a],b=a);break;case 39:case 34:l=39===o?"'":'"',a=b;do{if(c=!1,a=g.indexOf(l,a+1),-1===a){if(y||i){a=b+1;break}k("string")}for(p=a;92===g.charCodeAt(p-1);)p-=1,c=!c}while(c);m=["string",g.slice(b,a+1),b,a],b=a;break;case 64:e.lastIndex=b+1,e.test(g),a=0===e.lastIndex?g.length-1:e.lastIndex-2,m=["at-word",g.slice(b,a+1),b,a],b=a;break;case 92:for(a=b,h=!0;92===g.charCodeAt(a+1);)a+=1,h=!h;if(o=g.charCodeAt(a+1),h&&47!==o&&32!==o&&10!==o&&9!==o&&13!==o&&12!==o&&(a+=1,s.test(g.charAt(a)))){for(;s.test(g.charAt(a+1));)a+=1;32===g.charCodeAt(a+1)&&(a+=1)}m=["word",g.slice(b,a+1),b,a],b=a;break;default:47===o&&42===g.charCodeAt(b+1)?(a=g.indexOf("*/",b+2)+1,0===a&&(y||i?a=g.length:k("comment")),m=["comment",g.slice(b,a+1),b,a],b=a):(t.lastIndex=b+1,t.test(g),a=0===t.lastIndex?g.length-1:t.lastIndex-2,m=["word",g.slice(b,a+1),b,a],v.push(m),b=a)}return b++,m},position:function(){return b}}}}(),r=$r(),s=Xr(),n=Yr(),i=Kr(),o={empty:!0,space:!0};return vr=class{constructor(e){this.input=e,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new s;t.name=e[1].slice(1),""===t.name&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,n,i,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(r=(e=this.tokenizer.nextToken())[0],"("===r||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(l.length>0){for(i=l.length-1,n=l[i];n&&"space"===n[0];)n=l[--i];n&&(t.source.end=this.getPosition(n[3]||n[2]),t.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,s=0;for(let n=t-1;n>=0&&(r=e[n],"space"===r[0]||(s+=1,2!==s));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,s,n=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(n+=1),")"===r&&(n-=1),0===n&&":"===r){if(s){if("word"===s[0]&&"progid"===s[1])continue;return i}this.doubleColon(t)}s=t}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let s=new e;this.init(s,t[0][2]);let n,i=t[t.length-1];for(";"===i[0]&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(t)),s.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;s.prop+=t.shift()[1]}for(s.raws.between="";t.length;){if(n=t.shift(),":"===n[0]){s.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1]}("_"===s.prop[0]||"*"===s.prop[0])&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o,a=[];for(;t.length&&(o=t[0][0],"space"===o||"comment"===o);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(n=t[e],"!important"===n[1].toLowerCase()){s.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(s.raws.important=r);break}if("important"===n[1].toLowerCase()){let r=t.slice(0),n="";for(let t=e;t>0;t--){let e=r[t][0];if(0===n.trim().indexOf("!")&&"space"!==e)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(s.important=!0,s.raws.important=n,t=r)}if("space"!==n[0]&&"comment"!==n[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(s,"value",a.concat(t),r),s.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new i;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)n||(n=l),i.push("("===r?")":"]");else if(o&&s&&"{"===r)n||(n=l),i.push("}");else if(0===i.length){if(";"===r){if(s)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(s=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&s){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,i,a,l,u=r.length,h="",c=!0;for(let e=0;e<u;e+=1)n=r[e],i=n[0],"space"!==i||e!==u-1||s?"comment"===i?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",o[l]||o[a]||","===h.slice(-1)?c=!1:h+=n[1]):h+=n[1]:c=!1;if(!c){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:h}}e[t]=h}rule(e){e.pop();let t=new i;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}}(),r=Br();function s(e,s){let n=new r(e,s),i=new t(n);try{i.parse()}catch(e){throw e}return i.root}return kr=s,s.default=s,e.registerParse(s),kr}function es(){if(Mr)return xr;Mr=1;let{isClean:e,my:t}=Nr(),r=Wr(),s=_r(),n=Vr(),i=Gr(),o=(Hr(),qr()),a=Qr(),l=Yr(),u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},c={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function d(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function m(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>m(e)),t}let g={};class y{constructor(e,r,s){let i;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof y||r instanceof o)i=m(r.root),r.map&&(typeof s.map>"u"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=a;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{i=e(r,s)}catch(e){this.processed=!0,this.error=e}i&&!i[t]&&n.rebuild(i)}else i=m(r);this.result=new o(e,i,s),this.helpers={...g,postcss:g,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!h[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!c[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(p(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[d(t)];for(;r.length>0;){let e=this.visitTick(r);if(p(e))try{await e}catch(e){let t=r[r.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return p(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=s;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new r(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(p(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:s,visitors:n}=r;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void t.pop();if(n.length>0&&r.visitorIndex<n.length){let[e,t]=n[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===n.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(s.toProxy(),this.helpers)}catch(e){throw this.handleError(e,s)}}if(0!==r.iterator){let n,i=r.iterator;for(;n=s.nodes[s.indexes[i]];)if(s.indexes[i]+=1,!n[e])return n[e]=!0,void t.push(d(n));r.iterator=0,delete s.indexes[i]}let i=r.events;for(;r.eventIndex<i.length;){let t=i[r.eventIndex];if(r.eventIndex+=1,0===t)return void(s.nodes&&s.nodes.length&&(s[e]=!0,r.iterator=s.getIterator()));if(this.listeners[t])return void(r.visitors=this.listeners[t])}t.pop()}walkSync(t){t[e]=!0;let r=f(t);for(let s of r)if(0===s)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[s];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return y.registerPostcss=e=>{g=e},xr=y,y.default=y,l.registerLazyResult(y),i.registerLazyResult(y),xr}var ts=function(){if(Dr)return Lr;Dr=1;let e=Pt(),t=jr(),r=es(),s=Vr(),n=function(){if(Er)return Rr;Er=1;let e=function(){if(Ir)return Or;Ir=1;let e=Wr(),t=_r(),r=(Hr(),Qr()),s=qr();class n{constructor(r,n,i){n=n.toString(),this.stringified=!1,this._processor=r,this._css=n,this._opts=i,this._map=void 0;let o,a=t;this.result=new s(this._processor,o,this._opts),this.result.css=n;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let u=new e(a,o,this._opts,n);if(u.isMap()){let[e,t]=u.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=r;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}return Or=n,n.default=n,Or}(),t=es(),r=Gr(),s=Yr();class n{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");return t}process(r,s={}){return this.plugins.length||s.parser||s.stringifier||s.syntax?new t(this,r,s):new e(this,r,s)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return Rr=n,n.default=n,s.registerProcessor(n),r.registerProcessor(n),Rr}(),i=_r(),o=function(){if(Tr)return Ar;Tr=1;let e=jr(),t=zr(),r=$r(),s=Xr(),n=Br(),i=Yr(),o=Kr();function a(l,u){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:h,...c}=l;if(h){u=[];for(let e of h){let r={...e,__proto__:n.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),u.push(r)}}if(c.nodes&&(c.nodes=l.nodes.map(e=>a(e,u))),c.source){let{inputId:e,...t}=c.source;c.source=t,null!=e&&(c.source.input=u[e])}if("root"===c.type)return new i(c);if("decl"===c.type)return new e(c);if("rule"===c.type)return new o(c);if("comment"===c.type)return new r(c);if("atrule"===c.type)return new s(c);throw new Error("Unknown node type: "+l.type)}return Ar=a,a.default=a,Ar}(),a=Gr(),l=Jr(),u=$r(),h=Xr(),c=qr(),p=Br(),f=Qr(),d=Zr(),m=Kr(),g=Yr(),y=Ur();function w(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new n(e)}return w.plugin=function(e,t){let r,s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": \u91cc\u9762 postcss.plugin \u88ab\u5f03\u7528. \u8fc1\u79fb\u6307\u5357:\nhttps://www.w3ctech.com/topic/2226"));let i=t(...r);return i.postcssPlugin=e,i.postcssVersion=(new n).version,i}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return w([i(r)]).process(e,t)},i},w.stringify=i,w.parse=f,w.fromJSON=o,w.list=d,w.comment=e=>new u(e),w.atRule=e=>new h(e),w.decl=e=>new t(e),w.rule=e=>new m(e),w.root=e=>new g(e),w.document=e=>new a(e),w.CssSyntaxError=e,w.Declaration=t,w.Container=s,w.Processor=n,w.Document=a,w.Comment=u,w.Warning=l,w.AtRule=h,w.Result=c,w.Input=p,w.Rule=m,w.Root=g,w.Node=y,r.registerPostcss(w),Lr=w,w.default=w,Lr}(),rs=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(ts);rs.stringify,rs.fromJSON,rs.plugin,rs.parse,rs.list,rs.document,rs.comment,rs.atRule,rs.rule,rs.decl,rs.root,rs.CssSyntaxError,rs.Declaration,rs.Container,rs.Processor,rs.Document,rs.Comment,rs.Warning,rs.AtRule,rs.Result,rs.Input,rs.Rule,rs.Root,rs.Node;var ss=class e{constructor(...e){Rt(this,"parentElement",null),Rt(this,"parentNode",null),Rt(this,"ownerDocument"),Rt(this,"firstChild",null),Rt(this,"lastChild",null),Rt(this,"previousSibling",null),Rt(this,"nextSibling",null),Rt(this,"ELEMENT_NODE",1),Rt(this,"TEXT_NODE",3),Rt(this,"nodeType"),Rt(this,"nodeName"),Rt(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))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(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},ns={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},is={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},os={},as={};function ls(e){if(os[e])return os[e];let t=globalThis[e],r=t.prototype,s=e in ns?ns[e]:void 0,n=!(!s||!s.every(e=>{var t,s;return!(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)||!s.toString().includes("[native code]"))})),i=e in is?is[e]:void 0,o=!(!i||!i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return os[e]=t.prototype,t.prototype;try{let s=document.createElement("iframe");s.style.display="none",document.body.appendChild(s);let n=s.contentWindow;if(!n)return t.prototype;let i=n[e].prototype;if(!i)return s.remove(),r;let o=navigator.userAgent;return o.includes("Safari")&&!o.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),as[e]=()=>s.remove()):s.remove(),os[e]=i}catch{return r}}var us={};function hs(e,t,r){var s;let n=`${e}.${String(r)}`;if(us[n])return us[n].call(t);let i=ls(e),o=null==(s=Object.getOwnPropertyDescriptor(i,r))?void 0:s.get;return o?(us[n]=o,o.call(t)):t[r]}var cs={};function ps(e,t,r){let s=`${e}.${String(r)}`;if(cs[s])return cs[s].bind(t);let n=ls(e)[r];return"function"!=typeof n?t[r]:(cs[s]=n,n.bind(t))}var fs=Date.now;function ds(e,t,r){try{if(!(t in e))return()=>{};let s=e[t],n=r(s);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=n,()=>{e[t]=s}}catch{return()=>{}}}/[1-9][0-9]{12}/.test(Date.now().toString())||(fs=()=>(new Date).getTime());var ms=function(e){return hs("Node",e,"ownerDocument")},gs=function(e){return hs("Node",e,"childNodes")},ys=function(e){return hs("Node",e,"parentNode")},ws=function(e){return hs("Node",e,"parentElement")},bs=function(e){return hs("Node",e,"textContent")},vs=function(e,t){return ps("Node",e,"contains")(t)},Ss=function(e){return ps("Node",e,"getRootNode")()},ks=function(e){return e&&"host"in e?hs("ShadowRoot",e,"host"):null},Cs=function(e){return e&&"shadowRoot"in e?hs("Element",e,"shadowRoot"):null};function xs(e,t,r=document){let s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}var Ms="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.",Os={map:{},getId:()=>(console.error(Ms),-1),getNode:()=>(console.error(Ms),null),removeNodeFromMap(){console.error(Ms)},has:()=>(console.error(Ms),!1),reset(){console.error(Ms)}};function Is(e,t,r={}){let s=null,n=0;return function(...i){let o=Date.now();!n&&!1===r.leading&&(n=o);let a=t-(o-n),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),n=o,e.apply(l,i)):!s&&!1!==r.trailing&&(s=setTimeout(()=>{n=!1===r.leading?0:Date.now(),s=null,e.apply(l,i)},a))}}function Rs(e,t,r,s,n=window){let i=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,s?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>Rs(e,t,i||{},!0)}function Es(e){var t,r,s,n;let i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||i?.body&&(null==(t=ws(i.body))?void 0:t.scrollLeft)||(null==(r=i?.body)?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:i?.documentElement.scrollTop||i?.body&&(null==(s=ws(i.body))?void 0:s.scrollTop)||(null==(n=i?.body)?void 0:n.scrollTop)||0}}function As(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ts(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ls(e){return e?e.nodeType===e.ELEMENT_NODE?e:ws(e):null}function Ds(e,t,r,s){if(!e)return!1;let n=Ls(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t)||s&&null!==n.closest("."+t))return!0}else if(q(n,t,s))return!0}catch{}return!(!r||!(n.matches(r)||s&&null!==n.closest(r)))}function Ps(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function Ns(e,t){if(b(e))return!1;let r=t.getId(e);if(!t.has(r))return!0;let s=ys(e);return(!s||s.nodeType!==e.DOCUMENT_NODE)&&(!s||Ns(s,t))}function Fs(e){return!!e.changedTouches}function _s(e,t){return!("IFRAME"!==e.nodeName||!t.getMeta(e))}function Us(e,t){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!t.getMeta(e))}function js(e){return!!e&&(e instanceof ss&&"shadowRoot"in e?!!e.shadowRoot:!!Cs(e))}typeof window<"u"&&window.Proxy&&window.Reflect&&(Os=new Proxy(Os,{get:(e,t,r)=>("map"===t&&console.error(Ms),Reflect.get(e,t,r))}));var zs=class{constructor(){s(this,"id",1),s(this,"styleIDMap",new WeakMap),s(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Bs(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Ss(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ks(Ss(e))&&(r=ks(Ss(e))),r}function Ws(e){let t=ms(e);return!!t&&(vs(t,e)||function(e){let t=ms(e);if(!t)return!1;let r=function(e){let t,r=e;for(;t=Bs(r);)r=t;return r}(e);return vs(t,r)}(e))}var $s=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))($s||{}),Vs=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Vs||{}),Gs=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Gs||{}),Hs=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Hs||{}),Js=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Js||{}),qs=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(qs||{}),Xs=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Xs||{});function Ys(e){return"__ln"in e}var Zs,Ks=class{constructor(){s(this,"length",0),s(this,"head",null),s(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ys(e.previousSibling)){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Ys(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},Qs=(e,t)=>`${e}@${t}`,en=class{constructor(){s(this,"frozen",!1),s(this,"locked",!1),s(this,"texts",[]),s(this,"attributes",[]),s(this,"attributeMap",new WeakMap),s(this,"removes",[]),s(this,"mapRemoves",[]),s(this,"movedMap",{}),s(this,"addedSet",new Set),s(this,"movedSet",new Set),s(this,"droppedSet",new Set),s(this,"removesSubTreeCache",new Set),s(this,"mutationCb"),s(this,"blockClass"),s(this,"blockSelector"),s(this,"maskTextClass"),s(this,"maskTextSelector"),s(this,"inlineStylesheet"),s(this,"maskInputOptions"),s(this,"maskTextFn"),s(this,"maskInputFn"),s(this,"keepIframeSrcFn"),s(this,"recordCanvas"),s(this,"inlineImages"),s(this,"slimDOMOptions"),s(this,"dataURLOptions"),s(this,"doc"),s(this,"mirror"),s(this,"iframeManager"),s(this,"stylesheetManager"),s(this,"shadowDomManager"),s(this,"canvasManager"),s(this,"processedNodeManager"),s(this,"unattachedDoc"),s(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),s(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new Ks,s=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},n=n=>{let i=ys(n);if(!i||!Ws(n))return;let o=!1;if(n.nodeType===Node.TEXT_NODE){let e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(o=!0)}let a=b(i)?this.mirror.getId(Bs(n)):this.mirror.getId(i),l=s(n);if(-1===a||-1===l)return r.addNode(n);let u=K(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{_s(e,this.mirror)&&this.iframeManager.addIframe(e),Us(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),js(n)&&this.shadowDomManager.addShadowRoot(Cs(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});u&&(e.push({parentId:a,nextId:l,node:u}),t.add(u.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)rn(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(ys(e))||n(e);for(let e of this.addedSet)!sn(this.droppedSet,e)&&!rn(this.removesSubTreeCache,e,this.mirror)||sn(this.movedSet,e)?n(e):this.droppedSet.add(e);let i=null;for(;r.length;){let e=null;if(i){let t=this.mirror.getId(ys(i.value)),r=s(i.value);-1!==t&&-1!==r&&(e=i)}if(!e){let t=r.tail;for(;t;){let r=t;if(t=t.previous,r){let t=this.mirror.getId(ys(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{let t=r.value,s=ys(t);if(s&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let t=ks(s);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}i=e.previous,r.removeNode(e.value),n(e.value)}let o={texts:this.texts.map(e=>{let t=e.node,r=ys(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let r=JSON.stringify(e.styleDiff),s=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+s).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.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(o))}),s(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(gs(e),e=>bs(e)||"").join("");t.attributes.value=x({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:I(e),value:r,maskInputFn:this.maskInputFn})}),s(this,"processMutation",e=>{if(!Ps(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=bs(e.target);!Ds(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:X(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ls(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){let e=I(t);s=x({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(Ds(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(s)){if(t.contentDocument)return;r="rr_src"}if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!J(t.tagName,r))if(n.attributes[r]=H(this.doc,M(t.tagName),M(r),s),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(let e of Array.from(t.style)){let s=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);s!==r.style.getPropertyValue(e)||i!==r.style.getPropertyPriority(e)?n.styleDiff[e]=""===i?s:[s,i]:n._unchangedStyles[e]=[s,i]}for(let e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(n.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":if(Ds(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),s=b(e.target)?this.mirror.getId(ks(e.target)):this.mirror.getId(e.target);Ds(e.target,this.blockClass,this.blockSelector,!1)||Ps(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(tn(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Ns(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Qs(r,s)]?tn(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!(!b(e.target)||!v(e.target))||void 0}),function(e,t){let r=[e];for(;r.length;){let e=r.pop();t.has(e)||(t.add(e),gs(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),s(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Ps(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Qs(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ds(e,this.blockClass,this.blockSelector,!1)||(gs(e).forEach(e=>this.genAdds(e)),js(e)&&gs(Cs(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function tn(e,t){e.delete(t),gs(t).forEach(t=>tn(e,t))}function rn(e,t,r){return 0!==e.size&&function(e,t){let r=ys(t);return!!r&&e.has(r)}(e,t)}function sn(e,t){return 0!==e.size&&nn(e,t)}function nn(e,t){let r=ys(t);return!!r&&(!!e.has(r)||nn(e,r))}var on=e=>Zs?(...t)=>{try{return e(...t)}catch(e){if(Zs&&!0===Zs(e))return;throw e}}:e,an=[];function ln(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function un(e,t){let r=new en;an.push(r),r.init(e);let[s,n]=[ls("MutationObserver").constructor,as.MutationObserver??(()=>{})],i=new s(on(r.processMutations.bind(r)));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[i,n]}function hn({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:i}){return xs("scroll",on(Is(on(i=>{let o=ln(i);if(!o||Ds(o,s,n,!0))return;let a=r.getId(o);if(o===t&&t.defaultView){let r=Es(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),i.scroll||100)),t)}var cn=["INPUT","TEXTAREA","SELECT"],pn=new WeakMap;function fn(e){return function e(t,r){if(yn("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||yn("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||yn("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||yn("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){let s=Array.from(t.parentRule.cssRules).indexOf(t);return r.unshift(s),e(t.parentRule,r)}if(t.parentStyleSheet){let e=Array.from(t.parentStyleSheet.cssRules).indexOf(t);r.unshift(e)}return r}(e,[])}function dn(e,t,r){let s,n;return e?(e.ownerNode?s=t.getId(e.ownerNode):n=r.getId(e),{styleId:n,id:s}):{}}function mn({mirror:e,stylesheetManager:t},r){var s,n,i;let o=null;o="#document"===r.nodeName?e.getId(r):e.getId(ks(r));let a="#document"===r.nodeName?null==(s=r.defaultView)?void 0:s.Document:null==(i=null==(n=r.ownerDocument)?void 0:n.defaultView)?void 0:i.ShadowRoot,l=a?.prototype?Object.getOwnPropertyDescriptor(a?.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;let s=null==(r=l.set)?void 0:r.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch{}return s}}),on(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function gn(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};!function(e,t){let{mutationCb:r,mousemoveCb:s,mouseInteractionCb:n,scrollCb:i,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:h,canvasMutationCb:c,fontCb:p,selectionCb:f,customElementCb:d}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),s(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),u(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),h(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),c(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),f(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),d(...e)}}(e,t);let s,n=()=>{};e.recordDOM&&([s,n]=un(e,e.doc));let i=function({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(!1===t.mousemove)return()=>{};let n,i="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a=[],l=Is(on(t=>{let r=Date.now()-n;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],n=null}),o),u=on(Is(on(e=>{let t=ln(e),{clientX:r,clientY:i}=Fs(e)?e.changedTouches[0]:e;n||(n=fs()),a.push({x:r,y:i,id:s.getId(t),timeOffset:fs()-n}),l(typeof DragEvent<"u"&&e instanceof DragEvent?Vs.Drag:e instanceof MouseEvent?Vs.MouseMove:Vs.TouchMove)}),i,{trailing:!1})),h=[xs("mousemove",u,r),xs("touchmove",u,r),xs("drag",u,r)];return on(()=>{h.forEach(e=>e())})}(e),o=function({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,sampling:i}){if(!1===i.mouseInteraction)return()=>{};let o=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[],l=null;return Object.keys(Gs).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=M(i),u=(t=>i=>{let o=ln(i);if(Ds(o,s,n,!0))return;let a=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=Hs.Mouse;break;case"touch":a=Hs.Touch;break;case"pen":a=Hs.Pen}a===Hs.Touch?Gs[t]===Gs.MouseDown?u="TouchStart":Gs[t]===Gs.MouseUp&&(u="TouchEnd"):Hs.Pen}else Fs(i)&&(a=Hs.Touch);null!==a?(l=a,(u.startsWith("Touch")&&a===Hs.Touch||u.startsWith("Mouse")&&a===Hs.Mouse)&&(a=null)):Gs[t]===Gs.Click&&(a=l,l=null);let h=Fs(i)?i.changedTouches[0]:i;if(!h)return;let c=r.getId(o),{clientX:p,clientY:f}=h;on(e)({type:Gs[u],id:c,x:p,y:f,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(Gs[i]){case Gs.MouseDown:case Gs.MouseUp:o=o.replace("mouse","pointer");break;case Gs.TouchStart:case Gs.TouchEnd:return}a.push(xs(o,u,t))}),on(()=>{a.forEach(e=>e())})}(e),a=hn(e),l=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return xs("resize",on(Is(on(()=>{let t=As(),n=Ts();(r!==t||s!==n)&&(e({width:Number(n),height:Number(t)}),r=t,s=n)}),200)),t)}(e,{win:r}),u=function({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:n,ignoreClass:i,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:h}){function c(e){let r=ln(e),u=e.isTrusted,c=r&&r.tagName;if(r&&"OPTION"===c&&(r=ws(r)),!r||!c||cn.indexOf(c)<0||Ds(r,s,n,!0)||r.classList.contains(i)||o&&r.matches(o))return;let f=r.value,d=!1,m=I(r)||"";"radio"===m||"checkbox"===m?d=r.checked:(a[c.toLowerCase()]||a[m])&&(f=x({element:r,maskInputOptions:a,tagName:c,type:m,value:f,maskInputFn:l})),p(r,h?{text:f,isChecked:d,userTriggered:u}:{text:f,isChecked:d});let g=r.name;"radio"===m&&g&&d&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==r){let t=e.value;p(e,h?{text:t,isChecked:!d,userTriggered:!1}:{text:t,isChecked:!d})}})}function p(t,s){let n=pn.get(t);if(!n||n.text!==s.text||n.isChecked!==s.isChecked){pn.set(t,s);let n=r.getId(t);on(e)({...s,id:n})}}let f=("last"===u.input?["change"]:["input","change"]).map(e=>xs(e,on(c),t)),d=t.defaultView;if(!d)return()=>{f.forEach(e=>e())};let m=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),g=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&f.push(...g.map(e=>Rs(e[0],e[1],{set(){on(c)({target:this,isTrusted:!1})}},!1,d))),on(()=>{f.forEach(e=>e())})}(e),h=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:n,doc:i}){let o=on(i=>Is(on(n=>{let o=ln(n);if(!o||Ds(o,t,r,!0))return;let{currentTime:a,volume:l,muted:u,playbackRate:h,loop:c}=o;e({type:i,id:s.getId(o),currentTime:a,volume:l,muted:u,playbackRate:h,loop:c})}),n.media||500)),a=[xs("play",o(qs.Play),i),xs("pause",o(qs.Pause),i),xs("seeked",o(qs.Seeked),i),xs("volumechange",o(qs.VolumeChange),i),xs("ratechange",o(qs.RateChange),i)];return on(()=>{a.forEach(e=>e())})}(e),c=()=>{},p=()=>{},f=()=>{},d=()=>{};e.recordDOM&&(c=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};let n=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:on((s,n,i)=>{let[o,a]=i,{id:l,styleId:u}=dn(n,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:o,index:a}]}),s.apply(n,i)})}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){let n=`${e} { ${t} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};let i,o,a=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:on((s,n,i)=>{let[o]=i,{id:a,styleId:l}=dn(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),s.apply(n,i)})}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:on((s,n,i)=>{let[o]=i,{id:a,styleId:l}=dn(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),s.apply(n,i)})})),s.CSSStyleSheet.prototype.replaceSync&&(o=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:on((s,n,i)=>{let[o]=i,{id:a,styleId:l}=dn(n,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),s.apply(n,i)})}));let l={};wn("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(wn("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),wn("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),wn("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));let u={};return Object.entries(l).forEach(([s,n])=>{u[s]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(u[s].insertRule,{apply:on((s,n,i)=>{let[o,a]=i,{id:l,styleId:u}=dn(n.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:o,index:[...fn(n),a||0]}]}),s.apply(n,i)})}),n.prototype.deleteRule=new Proxy(u[s].deleteRule,{apply:on((s,n,i)=>{let[o]=i,{id:a,styleId:l}=dn(n.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...fn(n),o]}]}),s.apply(n,i)})})}),on(()=>{s.CSSStyleSheet.prototype.insertRule=n,s.CSSStyleSheet.prototype.deleteRule=a,i&&(s.CSSStyleSheet.prototype.replace=i),o&&(s.CSSStyleSheet.prototype.replaceSync=o),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:r}),p=mn(e,e.doc),f=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:n}){let i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:on((n,o,a)=>{var l;let[u,h,c]=a;if(r.has(u))return i.apply(o,[u,h,c]);let{id:p,styleId:f}=dn(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(p&&-1!==p||f&&-1!==f)&&e({id:p,styleId:f,set:{property:u,value:h,priority:c},index:fn(o.parentRule)}),n.apply(o,a)})});let o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:on((n,i,a)=>{var l;let[u]=a;if(r.has(u))return o.apply(i,[u]);let{id:h,styleId:c}=dn(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(h&&-1!==h||c&&-1!==c)&&e({id:h,styleId:c,remove:{property:u},index:fn(i.parentRule)}),n.apply(i,a)})}),on(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:r}),e.collectFonts&&(d=function({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let s=[],n=new WeakMap,i=r.FontFace;r.FontFace=function(e,t,r){let s=new i(e,t,r);return n.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};let o=ds(t.fonts,"add",function(t){return function(r){return setTimeout(on(()=>{let t=n.get(r);t&&(e(t),n.delete(r))}),0),t.apply(this,[r])}});return s.push(()=>{r.FontFace=i}),s.push(o),on(()=>{s.forEach(e=>e())})}(e)));let m=function(e){let{doc:t,mirror:r,blockClass:s,blockSelector:n,selectionCb:i}=e,o=!0,a=on(()=>{let e=t.getSelection();if(!e||o&&e?.isCollapsed)return;o=e.isCollapsed||!1;let a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let i=e.getRangeAt(t),{startContainer:o,startOffset:l,endContainer:u,endOffset:h}=i;Ds(o,s,n,!0)||Ds(u,s,n,!0)||a.push({start:r.getId(o),startOffset:l,end:r.getId(u),endOffset:h})}i({ranges:a})});return a(),xs("selectionchange",a)}(e),g=function({doc:e,customElementCb:t}){let r=e.defaultView;return r&&r.customElements?ds(r.customElements,"define",function(e){return function(r,s,n){try{t({define:{name:r}})}catch{console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,s,n])}}):()=>{}}(e),y=[];for(let t of e.plugins)y.push(t.observer(t.callback,r,t.options));return on(()=>{an.forEach(e=>e.reset()),s?.disconnect(),n(),i(),o(),a(),l(),u(),h(),c(),p(),f(),d(),m(),g(),y.forEach(e=>e())})}function yn(e){return typeof window[e]<"u"}function wn(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var bn=class{constructor(e){s(this,"iframeIdToRemoteIdMap",new WeakMap),s(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){let n=r||this.getIdToRemoteIdMap(e),i=s||this.getRemoteIdToIdMap(e),o=n.get(t);return o||(o=this.generateIdFn(),n.set(t,o),i.set(o,t)),o}getIds(e,t){let r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,s))}getRemoteId(e,t,r){let s=r||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:s.get(t)||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},vn=class{constructor(e){s(this,"iframes",new WeakMap),s(this,"crossOriginIframeMap",new WeakMap),s(this,"crossOriginIframeMirror",new bn(_)),s(this,"crossOriginIframeStyleMirror"),s(this,"crossOriginIframeRootIdMap",new WeakMap),s(this,"mirror"),s(this,"mutationCb"),s(this,"wrappedEmit"),s(this,"loadListener"),s(this,"stylesheetManager"),s(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new bn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(s=this.loadListener)||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin||!e.source)return;let r=this.crossOriginIframeMap.get(e.source);if(!r)return;let s=this.transformCrossOriginEvent(r,t.data.event);s&&this.wrappedEmit(s,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case $s.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:$s.IncrementalSnapshot,data:{source:Vs.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case $s.Meta:case $s.Load:case $s.DomContentLoaded:return!1;case $s.Plugin:return t;case $s.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case $s.IncrementalSnapshot:switch(t.data.source){case Vs.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Vs.Drag:case Vs.TouchMove:case Vs.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Vs.ViewportResize:return!1;case Vs.MediaInteraction:case Vs.MouseInteraction:case Vs.Scroll:case Vs.CanvasMutation:case Vs.Input:return this.replaceIds(t.data,e,["id"]),t;case Vs.StyleSheetRule:case Vs.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Vs.Font:return t;case Vs.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Vs.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(let n of s)!Array.isArray(t[n])&&"number"!=typeof t[n]||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==Xs.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},Sn=class{constructor(e){s(this,"shadowDoms",new WeakSet),s(this,"mutationCb"),s(this,"scrollCb"),s(this,"bypassOptions"),s(this,"mirror"),s(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!v(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let[r]=un({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(hn({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(ks(e))),this.restoreHandlers.push(mn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(ds(e.prototype,"attachShadow",function(e){return function(s){let n=e.call(this,s),i=Cs(this);return i&&Ws(this)&&r.addShadowRoot(i,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},kn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(xn=0;xn<64;xn++)Cn[kn.charCodeAt(xn)]=xn;var xn,Mn=new Map,On=(e,t,r)=>{if(!e||!En(e,t)&&"object"!=typeof e)return;let s=function(e,t){let r=Mn.get(e);return r||(r=new Map,Mn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),n=s.indexOf(e);return-1===n&&(n=s.length,s.push(e)),n};function In(e,t,r){if(e instanceof Array)return e.map(e=>In(e,t,r));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let t=e.constructor.name,r=function(e){var t,r=new Uint8Array(e),s=r.length,n="";for(t=0;t<s;t+=3)n+=kn[r[t]>>2],n+=kn[(3&r[t])<<4|r[t+1]>>4],n+=kn[(15&r[t+1])<<2|r[t+2]>>6],n+=kn[63&r[t+2]];return s%3==2?n=n.substring(0,n.length-1)+"=":s%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e);return{rr_type:t,base64:r}}if(e instanceof DataView)return{rr_type:e.constructor.name,args:[In(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}return e instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:e.toDataURL()}:e instanceof ImageData?{rr_type:e.constructor.name,args:[In(e.data,t,r),e.width,e.height]}:En(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:On(e,t,r)}:e}var Rn=(e,t,r)=>e.map(e=>In(e,t,r)),En=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]).find(r=>e instanceof t[r]);function An(e,t,r,s){let n=[];try{let i=ds(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...i){if(!Ds(this,t,r,!0)){let e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){let e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...i])}});n.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function Tn(e,t,r,s,n,i){let o=[],a=Object.getOwnPropertyNames(e);for(let l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;let a=ds(e,l,function(e){return function(...o){let a=e.apply(this,o);if(On(a,i,this),"tagName"in this.canvas&&!Ds(this.canvas,s,n,!0)){let e=Rn(o,i,this),s={type:t,property:l,args:e};r(this.canvas,s)}return a}});o.push(a)}catch{let s=Rs(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(s)}return o}var Ln='(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',Dn=typeof self<"u"&&self.Blob&&new Blob([Ln],{type:"text/javascript;charset=utf-8"});function Pn(e){let t;try{if(t=Dn&&(self.URL||self.webkitURL).createObjectURL(Dn),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Ln),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Nn,Fn,_n,Un=class{constructor(e){s(this,"pendingCanvasMutations",new Map),s(this,"rafStamps",{latestId:0,invokeId:null}),s(this,"mirror"),s(this,"mutationCb"),s(this,"resetObservers"),s(this,"frozen",!1),s(this,"locked",!1),s(this,"processMutation",(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});let{sampling:t="all",win:r,blockClass:n,blockSelector:i,recordCanvas:o,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,n,i),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,i,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,n){let i=An(t,r,s,!0),o=new Map,a=new Pn;a.onmessage=e=>{let{id:t}=e.data;if(o.set(t,!1),!("base64"in e.data))return;let{base64:r,type:s,width:n,height:i}=e.data;this.mutationCb({id:t,type:Js["2D"],commands:[{property:"clearRect",args:[0,0,n,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},0,0]}]})};let l,u=1e3/e,h=0,c=e=>{h&&e-h<u||(h=e,(()=>{let e=[];return t.document.querySelectorAll("canvas").forEach(t=>{Ds(t,r,s,!0)||e.push(t)}),e})().forEach(async e=>{var t;let r=this.mirror.getId(e);if(o.get(r)||0===e.width||0===e.height)return;if(o.set(r,!0),["webgl","webgl2"].includes(e.__context)){let r=e.getContext(e.__context);!1===(null==(t=r?.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}let s=await createImageBitmap(e);a.postMessage({id:r,bitmap:s,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[s])})),l=requestAnimationFrame(c)};l=requestAnimationFrame(c),this.resetObservers=()=>{i(),cancelAnimationFrame(l)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let s=An(e,t,r,!1),n=function(e,t,r,s){let n=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let o of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;let i=ds(t.CanvasRenderingContext2D.prototype,o,function(n){return function(...i){return Ds(this.canvas,r,s,!0)||setTimeout(()=>{let r=Rn(i,t,this);e(this.canvas,{type:Js["2D"],property:o,args:r})},0),n.apply(this,i)}});n.push(i)}catch{let r=Rs(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:Js["2D"],property:o,args:[t],setter:!0})}});n.push(r)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),i=function(e,t,r,s){let n=[];return typeof t.WebGLRenderingContext<"u"&&n.push(...Tn(t.WebGLRenderingContext.prototype,Js.WebGL,e,r,s,t)),typeof t.WebGL2RenderingContext<"u"&&n.push(...Tn(t.WebGL2RenderingContext.prototype,Js.WebGL2,e,r,s,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;let s=r.map(e=>{let{type:t,...r}=e;return r}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}},jn=class{constructor(e){s(this,"trackedLinkElements",new WeakSet),s(this,"mutationCb"),s(this,"adoptedStyleSheetCb"),s(this,"styleMirror",new zs),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let r={id:t,styleIds:[]},s=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),s.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:k(e,t.href),index:r}))})),r.styleIds.push(e)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},zn=class{constructor(){s(this,"nodeMap",new WeakMap),s(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},Bn=!1;try{if(2!==Array.from([1],e=>2*e)[0]){let t=document.createElement("iframe");document.body.appendChild(t),Array.from=(null==(e=t.contentWindow)?void 0:e.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}var Wn,$n=new C;function Vn(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:n="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:h=!0,maskAllInputs:c,maskInputOptions:p,slimDOMOptions:f,maskInputFn:d,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:v,recordDOM:S=!0,recordCanvas:k=!1,recordCrossOriginIframes:x=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:I=!1,inlineImages:R=!1,plugins:E,keepIframeSrcFn:A=()=>!1,ignoreCSSAttributes:T=new Set([]),errorHandler:L}=e;!function(e){Zs=e}(L);let D=!x||window.parent===window,P=!1;if(!D)try{window.parent.document&&(P=!1)}catch{P=!0}if(D&&!t)throw new Error("emit function is required");if(!D&&!P)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),$n.reset();let N=!0===c?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==p?p:{password:!0},F=Z(f);!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let _,U=0,j=e=>{for(let t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!P&&(e=y(e)),e};Nn=(e,n)=>{var i;let o=e;if(o.timestamp=fs(),null!=(i=an[0])&&i.isFrozen()&&o.type!==$s.FullSnapshot&&!(o.type===$s.IncrementalSnapshot&&o.data.source===Vs.Mutation)&&an.forEach(e=>e.unfreeze()),D)t?.(j(o),n);else if(P){let e={type:"rrweb",event:j(o),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(o.type===$s.FullSnapshot)_=o,U=0;else if(o.type===$s.IncrementalSnapshot){if(o.data.source===Vs.Mutation&&o.data.isAttachIframe)return;U++;let e=s&&U>=s,t=r&&o.timestamp-_.timestamp>r;(e||t)&&Fn(!0)}};let z=e=>{Nn({type:$s.IncrementalSnapshot,data:{source:Vs.Mutation,...e}})},B=e=>Nn({type:$s.IncrementalSnapshot,data:{source:Vs.Scroll,...e}}),W=e=>Nn({type:$s.IncrementalSnapshot,data:{source:Vs.CanvasMutation,...e}}),$=new jn({mutationCb:z,adoptedStyleSheetCb:e=>Nn({type:$s.IncrementalSnapshot,data:{source:Vs.AdoptedStyleSheet,...e}})}),V=new vn({mirror:$n,mutationCb:z,stylesheetManager:$,recordCrossOriginIframes:x,wrappedEmit:Nn});for(let e of E||[])e.getMirror&&e.getMirror({nodeMirror:$n,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});let G=new zn;_n=new Un({recordCanvas:k,mutationCb:W,win:window,blockClass:n,blockSelector:i,mirror:$n,sampling:w.canvas,dataURLOptions:b});let H=new Sn({mutationCb:z,scrollCb:B,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:u,inlineStylesheet:h,maskInputOptions:N,dataURLOptions:b,maskTextFn:m,maskInputFn:d,recordCanvas:k,inlineImages:R,sampling:w,slimDOMOptions:F,iframeManager:V,stylesheetManager:$,canvasManager:_n,keepIframeSrcFn:A,processedNodeManager:G},mirror:$n});Fn=(e=!1)=>{if(!S)return;Nn({type:$s.Meta,data:{href:window.location.href,width:Ts(),height:As()}},e),$.reset(),H.init(),an.forEach(e=>e.lock());let t=function(e,t){let{mirror:r=new C,blockClass:s="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:c,maskInputFn:p,slimDOM:f=!1,dataURLOptions:d,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S=()=>!1}=t;return K(e,{doc:e,mirror:r,blockClass:s,blockSelector:n,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===h?{password:!0}:h,maskTextFn:c,maskInputFn:p,slimDOMOptions:Z(f),dataURLOptions:d,inlineImages:l,recordCanvas:u,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:$n,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:u,inlineStylesheet:h,maskAllInputs:N,maskTextFn:m,maskInputFn:d,slimDOM:F,dataURLOptions:b,recordCanvas:k,inlineImages:R,onSerialize:e=>{_s(e,$n)&&V.addIframe(e),Us(e,$n)&&$.trackLinkElement(e),js(e)&&H.addShadowRoot(Cs(e),document)},onIframeLoad:(e,t)=>{V.attachIframe(e,t),H.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{$.attachLinkElement(e,t)},keepIframeSrcFn:A});if(!t)return console.warn("Failed to snapshot the document");Nn({type:$s.FullSnapshot,data:{node:t,initialOffset:Es(window)}},e),an.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&$.adoptStyleSheets(document.adoptedStyleSheets,$n.getId(document))};try{let e=[],t=e=>{var t;return on(gn)({mutationCb:z,mousemoveCb:(e,t)=>Nn({type:$s.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Nn({type:$s.IncrementalSnapshot,data:{source:Vs.MouseInteraction,...e}}),scrollCb:B,viewportResizeCb:e=>Nn({type:$s.IncrementalSnapshot,data:{source:Vs.ViewportResize,...e}}),inputCb:e=>Nn({type:$s.IncrementalSnapshot,data:{source:Vs.Input,...e}}),mediaInteractionCb:e=>Nn({type:$s.IncrementalSnapshot,data:{source:Vs.MediaInteraction,...e}}),styleSheetRuleCb:e=>Nn({type:$s.IncrementalSnapshot,data:{source:Vs.StyleSheetRule,...e}}),styleDeclarationCb:e=>Nn({type:$s.IncrementalSnapshot,data:{source:Vs.StyleDeclaration,...e}}),canvasMutationCb:W,fontCb:e=>Nn({type:$s.IncrementalSnapshot,data:{source:Vs.Font,...e}}),selectionCb:e=>{Nn({type:$s.IncrementalSnapshot,data:{source:Vs.Selection,...e}})},customElementCb:e=>{Nn({type:$s.IncrementalSnapshot,data:{source:Vs.CustomElement,...e}})},blockClass:n,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:u,maskInputOptions:N,inlineStylesheet:h,sampling:w,recordDOM:S,recordCanvas:k,inlineImages:R,userTriggeredOnInput:O,collectFonts:I,doc:e,maskInputFn:d,maskTextFn:m,keepIframeSrcFn:A,blockSelector:i,slimDOMOptions:F,dataURLOptions:b,mirror:$n,iframeManager:V,stylesheetManager:$,shadowDomManager:H,processedNodeManager:G,canvasManager:_n,ignoreCSSAttributes:T,plugins:(null==(t=E?.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>Nn({type:$s.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};V.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});let r=()=>{Fn(),e.push(t(document)),Bn=!0};return["interactive","complete"].includes(document.readyState)?r():(e.push(xs("DOMContentLoaded",()=>{Nn({type:$s.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&r()})),e.push(xs("load",()=>{Nn({type:$s.Load,data:{}}),"load"===M&&r()},window))),()=>{e.forEach(e=>{try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),G.destroy(),Bn=!1,Zs=void 0}}catch(e){console.warn(e)}}Vn.addCustomEvent=(e,t)=>{if(!Bn)throw new Error("please add custom event after start recording");Nn({type:$s.Custom,data:{tag:e,payload:t}})},Vn.freezePage=()=>{an.forEach(e=>e.freeze())},Vn.takeFullSnapshot=e=>{if(!Bn)throw new Error("please take full snapshot after start recording");Fn(e)},Vn.mirror=$n,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Wn||(Wn={}));var{addCustomEvent:Gn}=Vn,{freezePage:Hn}=Vn,{takeFullSnapshot:Jn}=Vn,qn={},Xn=Uint8Array,Yn=Uint16Array,Zn=Int32Array,Kn=new Xn([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]),Qn=new Xn([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]),ei=new Xn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ti=function(e,t){for(var r=new Yn(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];var n=new Zn(r[30]);for(s=1;s<30;++s)for(var i=r[s];i<r[s+1];++i)n[i]=i-r[s]<<5|s;return{b:r,r:n}},ri=ti(Kn,2),si=ri.b,ni=ri.r;si[28]=258,ni[258]=28;var ii=ti(Qn,0),oi=(ii.b,ii.r),ai=new Yn(32768);for(pi=0;pi<32768;++pi)li=(61680&(li=(52428&(li=(43690&pi)>>1|(21845&pi)<<1))>>2|(13107&li)<<2))>>4|(3855&li)<<4,ai[pi]=((65280&li)>>8|(255&li)<<8)>>1;var li,ui=function(e,t,r){for(var s=e.length,n=0,i=new Yn(t);n<s;++n)e[n]&&++i[e[n]-1];var o,a=new Yn(t);for(n=1;n<t;++n)a[n]=a[n-1]+i[n-1]<<1;if(r){o=new Yn(1<<t);var l=15-t;for(n=0;n<s;++n)if(e[n])for(var u=n<<4|e[n],h=t-e[n],c=a[e[n]-1]++<<h,p=c|(1<<h)-1;c<=p;++c)o[ai[c]>>l]=u}else for(o=new Yn(s),n=0;n<s;++n)e[n]&&(o[n]=ai[a[e[n]-1]++]>>15-e[n]);return o},hi=new Xn(288);for(pi=0;pi<144;++pi)hi[pi]=8;for(pi=144;pi<256;++pi)hi[pi]=9;for(pi=256;pi<280;++pi)hi[pi]=7;for(pi=280;pi<288;++pi)hi[pi]=8;var ci=new Xn(32);for(pi=0;pi<32;++pi)ci[pi]=5;var pi,fi=ui(hi,9,0),di=ui(ci,5,0),mi=function(e){return(e+7)/8|0},gi=function(e,t,r){return(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length),new Xn(e.subarray(t,r))},yi=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],wi=function(e,t,r){var s=new Error(t||yi[e]);if(s.code=e,Error.captureStackTrace&&Error.captureStackTrace(s,wi),!r)throw s;return s},bi=function(e,t,r){r<<=7&t;var s=t/8|0;e[s]|=r,e[s+1]|=r>>8},vi=function(e,t,r){r<<=7&t;var s=t/8|0;e[s]|=r,e[s+1]|=r>>8,e[s+2]|=r>>16},Si=function(e,t){for(var r=[],s=0;s<e.length;++s)e[s]&&r.push({s:s,f:e[s]});var n=r.length,i=r.slice();if(!n)return{t:Ri,l:0};if(1==n){var o=new Xn(r[0].s+1);return o[r[0].s]=1,{t:o,l:1}}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var a=r[0],l=r[1],u=0,h=1,c=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};h!=n-1;)a=r[r[u].f<r[c].f?u++:c++],l=r[u!=h&&r[u].f<r[c].f?u++:c++],r[h++]={s:-1,f:a.f+l.f,l:a,r:l};var p=i[0].s;for(s=1;s<n;++s)i[s].s>p&&(p=i[s].s);var f=new Yn(p+1),d=ki(r[h-1],f,0);if(d>t){s=0;var m=0,g=d-t,y=1<<g;for(i.sort(function(e,t){return f[t.s]-f[e.s]||e.f-t.f});s<n;++s){var w=i[s].s;if(!(f[w]>t))break;m+=y-(1<<d-f[w]),f[w]=t}for(m>>=g;m>0;){var b=i[s].s;f[b]<t?m-=1<<t-f[b]++-1:++s}for(;s>=0&&m;--s){var v=i[s].s;f[v]==t&&(--f[v],++m)}d=t}return{t:new Xn(f),l:d}},ki=function(e,t,r){return-1==e.s?Math.max(ki(e.l,t,r+1),ki(e.r,t,r+1)):t[e.s]=r},Ci=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Yn(++t),s=0,n=e[0],i=1,o=function(e){r[s++]=e},a=1;a<=t;++a)if(e[a]==n&&a!=t)++i;else{if(!n&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(n),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(n);i=1,n=e[a]}return{c:r.subarray(0,s),n:t}},xi=function(e,t){for(var r=0,s=0;s<t.length;++s)r+=e[s]*t[s];return r},Mi=function(e,t,r){var s=r.length,n=mi(t+2);e[n]=255&s,e[n+1]=s>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var i=0;i<s;++i)e[n+i+4]=r[i];return 8*(n+4+s)},Oi=function(e,t,r,s,n,i,o,a,l,u,h){bi(t,h++,r),++n[256];for(var c=Si(n,15),p=c.t,f=c.l,d=Si(i,15),m=d.t,g=d.l,y=Ci(p),w=y.c,b=y.n,v=Ci(m),S=v.c,k=v.n,C=new Yn(19),x=0;x<w.length;++x)++C[31&w[x]];for(x=0;x<S.length;++x)++C[31&S[x]];for(var M=Si(C,7),O=M.t,I=M.l,R=19;R>4&&!O[ei[R-1]];--R);var E,A,T,L,D=u+5<<3,P=xi(n,hi)+xi(i,ci)+o,N=xi(n,p)+xi(i,m)+o+14+3*R+xi(C,O)+2*C[16]+3*C[17]+7*C[18];if(l>=0&&D<=P&&D<=N)return Mi(t,h,e.subarray(l,l+u));if(bi(t,h,1+(N<P)),h+=2,N<P){E=ui(p,f,0),A=p,T=ui(m,g,0),L=m;var F=ui(O,I,0);for(bi(t,h,b-257),bi(t,h+5,k-1),bi(t,h+10,R-4),h+=14,x=0;x<R;++x)bi(t,h+3*x,O[ei[x]]);h+=3*R;for(var _=[w,S],U=0;U<2;++U){var j=_[U];for(x=0;x<j.length;++x){var z=31&j[x];bi(t,h,F[z]),h+=O[z],z>15&&(bi(t,h,j[x]>>5&127),h+=j[x]>>12)}}}else E=fi,A=hi,T=di,L=ci;for(x=0;x<a;++x){var B=s[x];if(B>255){vi(t,h,E[257+(z=B>>18&31)]),h+=A[z+257],z>7&&(bi(t,h,B>>23&31),h+=Kn[z]);var W=31&B;vi(t,h,T[W]),h+=L[W],W>3&&(vi(t,h,B>>5&8191),h+=Qn[W])}else vi(t,h,E[B]),h+=A[B]}return vi(t,h,E[256]),h+A[256]},Ii=new Zn([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ri=new Xn(0),Ei=function(e,t,r,s,n,i){var o=i.z||e.length,a=new Xn(s+o+5*(1+Math.ceil(o/7e3))+n),l=a.subarray(s,a.length-n),u=i.l,h=7&(i.r||0);if(t){h&&(l[0]=i.r>>3);for(var c=Ii[t-1],p=c>>13,f=8191&c,d=(1<<r)-1,m=i.p||new Yn(32768),g=i.h||new Yn(d+1),y=Math.ceil(r/3),w=2*y,b=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<w)&d},v=new Zn(25e3),S=new Yn(288),k=new Yn(32),C=0,x=0,M=i.i||0,O=0,I=i.w||0,R=0;M+2<o;++M){var E=b(M),A=32767&M,T=g[E];if(m[A]=T,g[E]=A,I<=M){var L=o-M;if((C>7e3||O>24576)&&(L>423||!u)){h=Oi(e,l,0,v,S,k,x,O,R,M-R,h),O=C=x=0,R=M;for(var D=0;D<286;++D)S[D]=0;for(D=0;D<30;++D)k[D]=0}var P=2,N=0,F=f,_=A-T&32767;if(L>2&&E==b(M-_))for(var U=Math.min(p,L)-1,j=Math.min(32767,M),z=Math.min(258,L);_<=j&&--F&&A!=T;){if(e[M+P]==e[M+P-_]){for(var B=0;B<z&&e[M+B]==e[M+B-_];++B);if(B>P){if(P=B,N=_,B>U)break;var W=Math.min(_,B-2),$=0;for(D=0;D<W;++D){var V=M-_+D&32767,G=V-m[V]&32767;G>$&&($=G,T=V)}}}_+=(A=T)-(T=m[A])&32767}if(N){v[O++]=268435456|ni[P]<<18|oi[N];var H=31&ni[P],J=31&oi[N];x+=Kn[H]+Qn[J],++S[257+H],++k[J],I=M+P,++C}else v[O++]=e[M],++S[e[M]]}}for(M=Math.max(M,I);M<o;++M)v[O++]=e[M],++S[e[M]];h=Oi(e,l,u,v,S,k,x,O,R,M-R,h),u||(i.r=7&h|l[h/8|0]<<3,h-=7,i.h=g,i.p=m,i.i=M,i.w=I)}else{for(M=i.w||0;M<o+u;M+=65535){var q=M+65535;q>=o&&(l[h/8|0]=u,q=o),h=Mi(l,h+1,e.subarray(M,q))}i.i=o}return gi(a,0,s+mi(h)+n)},Ai=function(e,t,r,s,n){if(!n&&(n={l:1},t.dictionary)){var i=t.dictionary.subarray(-32768),o=new Xn(i.length+e.length);o.set(i),o.set(e,i.length),e=o,n.w=i.length}return Ei(e,null==t.level?6:t.level,null==t.mem?n.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,r,s,n)},Ti=function(e,t,r){for(var s=e(),n=e.toString(),i=n.slice(n.indexOf("[")+1,n.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o<s.length;++o){var a=s[o],l=i[o];if("function"==typeof a){t+=";"+l+"=";var u=a.toString();if(a.prototype)if(-1!=u.indexOf("[native code]")){var h=u.indexOf(" ",8)+1;t+=u.slice(h,u.indexOf("(",h))}else for(var c in t+=u,a.prototype)t+=";"+l+".prototype."+c+"="+a.prototype[c].toString();else t+=u}else r[l]=a}return t},Li=[],Di=function(){return[Xn,Yn,Zn,Kn,Qn,ei,ni,oi,fi,hi,di,ci,ai,Ii,Ri,ui,bi,vi,Si,ki,Ci,xi,Mi,Oi,mi,gi,Ei,Ai,Fi,Pi]},Pi=function(e){return postMessage(e,[e.buffer])};function Ni(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&wi(7),function(e,t,r,s,n,i){var o=function(e,t,r,s){if(!Li[0]){for(var n="",i={},o=e.length-1,a=0;a<o;++a)n=Ti(e[a],n,i);Li[0]={c:Ti(e[o],n,i),e:i}}var l=function(e,t){var r={};for(var s in e)r[s]=e[s];for(var s in t)r[s]=t[s];return r}({},Li[0].e);return function(e,t,r,s,n){var i=new Worker(qn[0]||(qn[0]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return i.onmessage=function(e){var t=e.data,r=t.$e$;if(r){var s=new Error(r[0]);s.code=r[1],s.stack=r[2],n(s,null)}else n(null,t)},i.postMessage(r,s),i}(Li[0].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+function(e){return Pi(Fi(e.data[0],e.data[1]))}.toString()+"}",0,l,function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t}(l),s)}(r,0,0,function(e,t){o.terminate(),i(e,t)});return o.postMessage([e,t],t.consume?[e.buffer]:[]),function(){o.terminate()}}(e,t,[Di],0,0,r)}function Fi(e,t){return Ai(e,t||{},0,0)}var _i=typeof TextDecoder<"u"&&new TextDecoder;try{_i.decode(Ri,{stream:!0})}catch{}function Ui(e){return"number"==typeof e&&Number.isFinite(e)}function ji(e){if(!Array.isArray(e))return[];let t=[];for(let r of e){if(!r||"object"!=typeof r||Array.isArray(r))continue;let e=r;if(!Ui(e.ts)||!Ui(e.x)||!Ui(e.y)||"string"!=typeof e.selector)continue;let s=e.selector.trim();if(!s||s.length>500)continue;let n=e.mut_ms;if((void 0===n||!(!Ui(n)||n<0||n>3e3))&&(t.push({ts:e.ts,selector:s,x:Math.round(e.x),y:Math.round(e.y),...void 0===n?{}:{mut_ms:n}}),t.length>=100))break}return t}function zi(e){if(!Array.isArray(e))return[];let t=[];for(let r of e){if(!r||"object"!=typeof r||Array.isArray(r))continue;let e=r;if(!Ui(e.ts)||"string"!=typeof e.url)continue;let s=e.url.trim();if(s&&!(s.length>2e3)&&(t.push({ts:e.ts,url:s}),t.length>=50))break}return t}function Bi(e){if(!Array.isArray(e))return[];let t=[];for(let r of e){if(!r||"object"!=typeof r||Array.isArray(r))continue;let e=r;if(!Ui(e.ts)||"string"!=typeof e.message)continue;let s=e.message.trim();if(s&&(t.push({ts:e.ts,message:s.slice(0,200)}),t.length>=20))break}return t}function Wi(e){if(!Array.isArray(e))return[];let t=new Set,r=[];for(let s of e){if(!s||"object"!=typeof s||Array.isArray(s))continue;let e=s;if(!Ui(e.ts)||"string"!=typeof e.selector)continue;let n=e.selector.trim();if(!(!n||n.length>500||t.has(n))&&(t.add(n),r.push({ts:e.ts,selector:n}),r.length>=20))break}return r}function $i(e){let t=Ui(e?.scroll_max_pct)?Math.max(0,Math.min(100,e.scroll_max_pct)):0;return{clicks:ji(e?.clicks),nav:zi(e?.nav),errors:Bi(e?.errors),form_focus:Wi(e?.form_focus),form_submit:Wi(e?.form_submit),scroll_max_pct:t}}function Vi(e){let t=[],r=e;for(;r&&r!==document.documentElement&&t.length<4;){let e=r.tagName.toLowerCase(),s=r.id&&/^[A-Za-z][\w-]{0,80}$/.test(r.id)?`#${r.id}`:"";if(s){t.unshift(`${e}${s}`);break}let n=["data-testid","data-test","data-drip-id"].map(e=>({name:e,value:r?.getAttribute(e)})).find(({value:e})=>e&&/^[\w-]{1,80}$/.test(e));if(n?.value){t.unshift(`${e}[${n.name}="${n.value}"]`);break}let i=1,o=r.previousElementSibling;for(;o;)o.tagName===r.tagName&&(i+=1),o=o.previousElementSibling;t.unshift(`${e}:nth-of-type(${i})`),r=r.parentElement}return t.join(" > ").slice(0,500)}function Gi(e){return e?"form"===e.tagName.toLowerCase()?e:e.closest("form"):null}function Hi(e,t=Date.now()){let r=$i(e),s=typeof location<"u"?location.href:"",n=r.nav[r.nav.length-1]?.url??"";s&&s!==n&&r.nav.length<50&&r.nav.push({ts:t,url:s.slice(0,2e3)});let i=s||n,o=new Set(r.form_focus.map(e=>e.selector)),a=new Set(r.form_submit.map(e=>e.selector)),l=(e,t=Date.now())=>{let s=Gi(e),n=s?Vi(s):"";n&&!a.has(n)&&r.form_submit.length<20&&(a.add(n),r.form_submit.push({ts:t,selector:n}))};return{accept:(e,t)=>{let s="number"==typeof e.timestamp?e.timestamp:Date.now(),n=typeof location<"u"?location.href:"";if(n&&n!==i&&(i=n,r.nav.length<50&&r.nav.push({ts:s,url:n.slice(0,2e3)})),4===e.type&&"string"==typeof e.data?.href&&e.data.href!==i&&(i=e.data.href,r.nav.length<50&&r.nav.push({ts:s,url:e.data.href.slice(0,2e3)})),3===e.type){if(0===e.data?.source){for(let e of r.clicks){let t=s-e.ts;t>=0&&t<=3e3&&void 0===e.mut_ms&&(e.mut_ms=t)}return}if(3===e.data?.source){if(1!==e.data.id)return;let t="number"==typeof e.data.y?e.data.y:window.scrollY,s=Math.max(1,document.body?.scrollHeight??0,document.documentElement?.scrollHeight??0);return void(r.scroll_max_pct=Math.max(r.scroll_max_pct,Math.max(0,Math.min(100,Math.round((t+Math.max(1,window.innerHeight))/s*100)))))}if(2===e.data?.source&&t)if(2===e.data.type){if(r.clicks.length>=100)return;let n={ts:s,selector:Vi(t),x:Math.round("number"==typeof e.data.x?e.data.x:0),y:Math.round("number"==typeof e.data.y?e.data.y:0)};r.clicks.push(n),function(e){if(!e)return!1;let t=e.closest("button,input");if(!t)return!1;let r=t.tagName.toLowerCase();return"button"===r?"submit"===(t.getAttribute("type")||"submit").toLowerCase():"input"===r&&"submit"===t.getAttribute("type")?.toLowerCase()}(t)&&l(t,s)}else if(5===e.data.type){let e=Gi(t);if(!e||r.form_focus.length>=20)return;let n=Vi(e);o.has(n)||(o.add(n),r.form_focus.push({ts:s,selector:n}))}}},error(e,t=Date.now()){r.errors.length<20&&r.errors.push({ts:t,message:e.slice(0,200)})},snapshot:(e=Date.now())=>$i(r),submit:l}}var Ji=["[data-drip-replay-block]","iframe[src*='payment' i]","iframe[name*='payment' i]","iframe[src*='checkout' i]",".StripeElement","[data-stripe]"].join(","),qi=["[data-drip-replay-mask]","[data-email]","[data-phone]","[data-address]",".customer-email",".customer-phone",".customer-address","[class*='personal-info' i]"].join(","),Xi=Hi(),Yi={version:"2.1.1",takeSignals:()=>Xi.snapshot(),compressSync:e=>Fi(e),async compress(e){try{return await new Promise((t,r)=>{try{Ni(e,(e,s)=>{e?r(e):t(s)})}catch(e){r(e)}})}catch{return Fi(e)}},start({emit:e,signalState:t}){Xi=Hi(t);let r=Vn({emit(t){let r=t;Xi.accept(r,function(e){let t=e.data;if(!t||"object"!=typeof t||Array.isArray(t))return null;let r=t.id;if("number"!=typeof r)return null;let s=Vn.mirror.getNode(r);return s instanceof Element?s:s?.parentElement??null}(r)),e({event:r})},maskAllInputs:!0,slimDOMOptions:"all",blockSelector:Ji,maskTextSelector:qi,sampling:{mousemove:50,scroll:150,media:800,input:"last"},recordCanvas:!1,collectFonts:!1,inlineStylesheet:!0}),s=e=>{Xi.error(e.message||"Window error")},n=e=>{Xi.error(function(e){if(e instanceof Error)return e.message||e.name;if("string"==typeof e)return e;try{return JSON.stringify(e)||"Unhandled rejection"}catch{return"Unhandled rejection"}}(e.reason))},i=e=>{Xi.submit(e.target instanceof Element?e.target:null)};return window.addEventListener("error",s),window.addEventListener("unhandledrejection",n),window.addEventListener("submit",i,{capture:!0,passive:!0}),()=>{window.removeEventListener("error",s),window.removeEventListener("unhandledrejection",n),window.removeEventListener("submit",i,{capture:!0}),r?.()}}};globalThis.__dripReplayRecorder=Yi})();
2
+ //# sourceMappingURL=drip.replay-recorder.js.map