@highlight-run/rrweb 1.2.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/plugins/console-record.js +655 -0
  2. package/dist/plugins/console-record.min.js +1 -1
  3. package/dist/plugins/console-record.min.js.map +1 -1
  4. package/dist/plugins/console-replay.js +293 -0
  5. package/dist/plugins/console-replay.min.js +16 -0
  6. package/dist/plugins/console-replay.min.js.map +1 -0
  7. package/dist/plugins/sequential-id-record.js +33 -0
  8. package/dist/plugins/sequential-id-record.min.js +2 -0
  9. package/dist/plugins/sequential-id-record.min.js.map +1 -0
  10. package/dist/plugins/sequential-id-replay.js +37 -0
  11. package/dist/plugins/sequential-id-replay.min.js +2 -0
  12. package/dist/plugins/sequential-id-replay.min.js.map +1 -0
  13. package/dist/record/rrweb-record-pack.js +747 -0
  14. package/dist/record/rrweb-record-pack.min.js +16 -0
  15. package/dist/record/rrweb-record-pack.min.js.map +1 -0
  16. package/dist/record/rrweb-record.js +3318 -0
  17. package/dist/record/rrweb-record.min.js +16 -0
  18. package/dist/record/rrweb-record.min.js.map +1 -0
  19. package/dist/replay/rrweb-replay-unpack.js +4626 -0
  20. package/dist/replay/rrweb-replay-unpack.min.css +2 -0
  21. package/dist/replay/rrweb-replay-unpack.min.css.map +1 -0
  22. package/dist/replay/rrweb-replay-unpack.min.js +30 -0
  23. package/dist/replay/rrweb-replay-unpack.min.js.map +1 -0
  24. package/dist/replay/rrweb-replay.js +4216 -0
  25. package/dist/replay/rrweb-replay.min.css +2 -0
  26. package/dist/replay/rrweb-replay.min.css.map +1 -0
  27. package/dist/replay/rrweb-replay.min.js +30 -0
  28. package/dist/replay/rrweb-replay.min.js.map +1 -0
  29. package/dist/rrweb-all.js +8708 -0
  30. package/dist/rrweb-all.min.css +2 -0
  31. package/dist/rrweb-all.min.css.map +1 -0
  32. package/dist/rrweb-all.min.js +30 -0
  33. package/dist/rrweb-all.min.js.map +1 -0
  34. package/dist/rrweb.js +7294 -0
  35. package/dist/rrweb.min.css +2 -0
  36. package/dist/rrweb.min.css.map +1 -0
  37. package/dist/rrweb.min.js +2 -2
  38. package/dist/rrweb.min.js.map +1 -1
  39. package/es/rrweb/ext/@xstate/fsm/es/index.js +17 -0
  40. package/es/rrweb/ext/base64-arraybuffer/dist/base64-arraybuffer.es5.js +49 -0
  41. package/es/rrweb/ext/fflate/esm/browser.js +777 -0
  42. package/es/rrweb/ext/mitt/dist/mitt.es.js +63 -0
  43. package/es/rrweb/packages/rrweb/ext/tslib/tslib.es6.js +78 -0
  44. package/es/rrweb/packages/rrweb/src/entries/all.js +13 -0
  45. package/es/rrweb/packages/rrweb/src/index.js +12 -0
  46. package/es/rrweb/packages/rrweb/src/packer/base.js +3 -0
  47. package/es/rrweb/packages/rrweb/src/packer/pack.js +10 -0
  48. package/es/rrweb/packages/rrweb/src/packer/unpack.js +29 -0
  49. package/es/rrweb/packages/rrweb/src/plugins/console/record/error-stack-parser.js +179 -0
  50. package/es/rrweb/packages/rrweb/src/plugins/console/record/index.js +134 -0
  51. package/es/rrweb/packages/rrweb/src/plugins/console/record/stringify.js +141 -0
  52. package/es/rrweb/packages/rrweb/src/plugins/console/replay/index.js +111 -0
  53. package/es/rrweb/packages/rrweb/src/plugins/sequential-id/record/index.js +23 -0
  54. package/es/rrweb/packages/rrweb/src/plugins/sequential-id/replay/index.js +28 -0
  55. package/es/rrweb/packages/rrweb/src/record/iframe-manager.js +32 -0
  56. package/es/rrweb/packages/rrweb/src/record/index.js +381 -0
  57. package/es/rrweb/packages/rrweb/src/record/mutation.js +532 -0
  58. package/es/rrweb/packages/rrweb/src/record/observer.js +665 -0
  59. package/es/rrweb/packages/rrweb/src/record/observers/canvas/2d.js +78 -0
  60. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js +93 -0
  61. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas.js +30 -0
  62. package/es/rrweb/packages/rrweb/src/record/observers/canvas/serialize-args.js +116 -0
  63. package/es/rrweb/packages/rrweb/src/record/observers/canvas/webgl.js +78 -0
  64. package/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js +45 -0
  65. package/es/rrweb/packages/rrweb/src/replay/canvas/2d.js +25 -0
  66. package/es/rrweb/packages/rrweb/src/replay/canvas/index.js +35 -0
  67. package/es/rrweb/packages/rrweb/src/replay/canvas/webgl.js +124 -0
  68. package/es/rrweb/packages/rrweb/src/replay/index.js +1864 -0
  69. package/es/rrweb/packages/rrweb/src/replay/machine.js +321 -0
  70. package/es/rrweb/packages/rrweb/src/replay/smoothscroll.js +221 -0
  71. package/es/rrweb/packages/rrweb/src/replay/styles/inject-style.js +8 -0
  72. package/es/rrweb/packages/rrweb/src/replay/timer.js +96 -0
  73. package/es/rrweb/packages/rrweb/src/replay/virtual-styles.js +121 -0
  74. package/es/rrweb/packages/rrweb/src/types.js +75 -0
  75. package/es/rrweb/packages/rrweb/src/utils.js +509 -0
  76. package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +1697 -0
  77. package/lib/plugins/console-record.js +650 -0
  78. package/lib/plugins/console-replay.js +288 -0
  79. package/lib/plugins/sequential-id-record.js +28 -0
  80. package/lib/plugins/sequential-id-replay.js +32 -0
  81. package/lib/record/rrweb-record-pack.js +742 -0
  82. package/lib/record/rrweb-record.js +3315 -0
  83. package/lib/replay/rrweb-replay-unpack.js +4621 -0
  84. package/lib/replay/rrweb-replay.js +4211 -0
  85. package/lib/rrweb-all.js +8703 -0
  86. package/lib/rrweb.js +7289 -0
  87. package/package.json +41 -43
  88. package/typings/entries/all.d.ts +6 -0
  89. package/{dist → typings}/entries/record-pack.d.ts +0 -0
  90. package/{dist → typings}/entries/replay-unpack.d.ts +0 -0
  91. package/{dist → typings}/index.d.ts +1 -2
  92. package/{dist → typings}/packer/base.d.ts +0 -0
  93. package/{dist → typings}/packer/index.d.ts +0 -0
  94. package/{dist → typings}/packer/pack.d.ts +0 -0
  95. package/{dist → typings}/packer/unpack.d.ts +0 -0
  96. package/{dist → typings}/plugins/console/record/error-stack-parser.d.ts +0 -0
  97. package/{dist → typings}/plugins/console/record/index.d.ts +3 -2
  98. package/{dist → typings}/plugins/console/record/stringify.d.ts +0 -0
  99. package/{dist → typings}/plugins/console/replay/index.d.ts +2 -2
  100. package/{dist → typings}/plugins/sequential-id/record/index.d.ts +0 -0
  101. package/{dist → typings}/plugins/sequential-id/replay/index.d.ts +0 -0
  102. package/{dist → typings}/record/iframe-manager.d.ts +1 -1
  103. package/{dist → typings}/record/index.d.ts +0 -0
  104. package/{dist → typings}/record/mutation.d.ts +5 -8
  105. package/typings/record/observer.d.ts +7 -0
  106. package/{dist → typings}/record/observers/canvas/2d.d.ts +0 -0
  107. package/{dist → typings}/record/observers/canvas/canvas-manager.d.ts +0 -0
  108. package/{dist → typings}/record/observers/canvas/canvas.d.ts +0 -0
  109. package/{dist → typings}/record/observers/canvas/serialize-args.d.ts +1 -1
  110. package/{dist → typings}/record/observers/canvas/webgl.d.ts +0 -0
  111. package/typings/record/observers/canvas/webgl2.d.ts +2 -0
  112. package/typings/record/shadow-dom-manager.d.ts +21 -0
  113. package/{dist → typings}/replay/canvas/2d.d.ts +0 -0
  114. package/{dist → typings}/replay/canvas/index.d.ts +0 -0
  115. package/{dist → typings}/replay/canvas/webgl.d.ts +0 -0
  116. package/{dist → typings}/replay/index.d.ts +1 -0
  117. package/{dist → typings}/replay/machine.d.ts +0 -0
  118. package/{dist → typings}/replay/smoothscroll.d.ts +0 -0
  119. package/{dist → typings}/replay/styles/inject-style.d.ts +0 -0
  120. package/{dist → typings}/replay/timer.d.ts +0 -0
  121. package/{dist → typings}/replay/virtual-styles.d.ts +1 -1
  122. package/{dist → typings}/rrdom/index.d.ts +0 -0
  123. package/{dist → typings}/rrdom/tree-node.d.ts +0 -0
  124. package/{dist → typings}/types.d.ts +7 -8
  125. package/{dist → typings}/utils.d.ts +3 -4
  126. package/CHANGELOG.md +0 -26
  127. package/README.md +0 -124
  128. package/README.zh_CN.md +0 -122
  129. package/dist/entries/all.d.ts +0 -4
  130. package/dist/index.css +0 -82
  131. package/dist/index.css.map +0 -1
  132. package/dist/index.js +0 -3
  133. package/dist/index.js.LICENSE.txt +0 -14
  134. package/dist/index.js.map +0 -1
  135. package/dist/plugins/entries/all.d.ts +0 -4
  136. package/dist/plugins/entries/record-pack.d.ts +0 -2
  137. package/dist/plugins/entries/replay-unpack.d.ts +0 -2
  138. package/dist/plugins/index.d.ts +0 -9
  139. package/dist/plugins/packer/base.d.ts +0 -7
  140. package/dist/plugins/packer/index.d.ts +0 -2
  141. package/dist/plugins/packer/pack.d.ts +0 -2
  142. package/dist/plugins/packer/unpack.d.ts +0 -2
  143. package/dist/plugins/plugins/console/record/error-stack-parser.d.ts +0 -37
  144. package/dist/plugins/plugins/console/record/index.d.ts +0 -41
  145. package/dist/plugins/plugins/console/record/stringify.d.ts +0 -2
  146. package/dist/plugins/plugins/console/replay/index.d.ts +0 -9
  147. package/dist/plugins/plugins/sequential-id/record/index.d.ts +0 -6
  148. package/dist/plugins/plugins/sequential-id/replay/index.d.ts +0 -7
  149. package/dist/plugins/record/iframe-manager.d.ts +0 -13
  150. package/dist/plugins/record/index.d.ts +0 -9
  151. package/dist/plugins/record/mutation.d.ts +0 -45
  152. package/dist/plugins/record/observer.d.ts +0 -11
  153. package/dist/plugins/record/observers/canvas/2d.d.ts +0 -2
  154. package/dist/plugins/record/observers/canvas/canvas-manager.d.ts +0 -32
  155. package/dist/plugins/record/observers/canvas/canvas.d.ts +0 -2
  156. package/dist/plugins/record/observers/canvas/serialize-args.d.ts +0 -6
  157. package/dist/plugins/record/observers/canvas/webgl.d.ts +0 -2
  158. package/dist/plugins/record/shadow-dom-manager.d.ts +0 -34
  159. package/dist/plugins/replay/canvas/2d.d.ts +0 -9
  160. package/dist/plugins/replay/canvas/index.d.ts +0 -9
  161. package/dist/plugins/replay/canvas/webgl.d.ts +0 -11
  162. package/dist/plugins/replay/index.d.ts +0 -82
  163. package/dist/plugins/replay/machine.d.ts +0 -85
  164. package/dist/plugins/replay/smoothscroll.d.ts +0 -1
  165. package/dist/plugins/replay/styles/inject-style.d.ts +0 -2
  166. package/dist/plugins/replay/timer.d.ts +0 -19
  167. package/dist/plugins/replay/virtual-styles.d.ts +0 -43
  168. package/dist/plugins/rrdom/index.d.ts +0 -1
  169. package/dist/plugins/rrdom/tree-node.d.ts +0 -20
  170. package/dist/plugins/snapshot/css.d.ts +0 -92
  171. package/dist/plugins/snapshot/index.d.ts +0 -5
  172. package/dist/plugins/snapshot/rebuild.d.ts +0 -19
  173. package/dist/plugins/snapshot/snapshot.d.ts +0 -49
  174. package/dist/plugins/snapshot/types.d.ts +0 -99
  175. package/dist/plugins/snapshot/utils.d.ts +0 -11
  176. package/dist/plugins/types.d.ts +0 -509
  177. package/dist/plugins/utils.d.ts +0 -71
  178. package/dist/record/observer.d.ts +0 -11
  179. package/dist/record/shadow-dom-manager.d.ts +0 -34
  180. package/dist/snapshot/css.d.ts +0 -92
  181. package/dist/snapshot/index.d.ts +0 -5
  182. package/dist/snapshot/rebuild.d.ts +0 -19
  183. package/dist/snapshot/snapshot.d.ts +0 -49
  184. package/dist/snapshot/types.d.ts +0 -99
  185. package/dist/snapshot/utils.d.ts +0 -11
package/dist/rrweb.min.js CHANGED
@@ -12,7 +12,7 @@ var rrweb=function(e){"use strict";
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var t,r,n,o,i,a,s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function l(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function c(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function u(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}function d(e,t,r){void 0===r&&(r=document);var n={capture:!0,passive:!0};return r.addEventListener(e,t,n),function(){return r.removeEventListener(e,t,n)}}function p(){return{map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}}}e.EventType=void 0,(t=e.EventType||(e.EventType={}))[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",e.IncrementalSource=void 0,(r=e.IncrementalSource||(e.IncrementalSource={}))[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",e.MouseInteractions=void 0,(n=e.MouseInteractions||(e.MouseInteractions={}))[n.MouseUp=0]="MouseUp",n[n.MouseDown=1]="MouseDown",n[n.Click=2]="Click",n[n.ContextMenu=3]="ContextMenu",n[n.DblClick=4]="DblClick",n[n.Focus=5]="Focus",n[n.Blur=6]="Blur",n[n.TouchStart=7]="TouchStart",n[n.TouchMove_Departed=8]="TouchMove_Departed",n[n.TouchEnd=9]="TouchEnd",n[n.TouchCancel=10]="TouchCancel",function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(o||(o={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange"}(i||(i={})),e.ReplayerEvents=void 0,(a=e.ReplayerEvents||(e.ReplayerEvents={})).Start="start",a.Pause="pause",a.Resume="resume",a.Resize="resize",a.Finish="finish",a.FullsnapshotRebuilded="fullsnapshot-rebuilded",a.LoadStylesheetStart="load-stylesheet-start",a.LoadStylesheetEnd="load-stylesheet-end",a.SkipStart="skip-start",a.SkipEnd="skip-end",a.MouseInteraction="mouse-interaction",a.EventCast="event-cast",a.CustomEvent="custom-event",a.Flush="flush",a.StateChange="state-change",a.PlayBack="play-back";var f="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.";function h(e,t,r){void 0===r&&(r={});var n=null,o=0;return function(i){var a=Date.now();o||!1!==r.leading||(o=a);var s=t-(a-o),l=this,c=arguments;s<=0||s>t?(n&&(clearTimeout(n),n=null),o=a,e.apply(l,c)):n||!1===r.trailing||(n=setTimeout((function(){o=!1===r.leading?0:Date.now(),n=null,e.apply(l,c)}),s))}}function m(e,t,r,n,o){void 0===o&&(o=window);var i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set:function(e){var t=this;setTimeout((function(){r.set.call(t,e)}),0),i&&i.set&&i.set.call(this,e)}}),function(){return m(e,t,i||{},!0)}}function v(e,t,r){try{if(!(t in e))return function(){};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,function(){e[t]=n}}catch(e){return function(){}}}function y(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function g(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}e.mirror={map:{},getId:function(){return console.error(f),-1},getNode:function(){return console.error(f),null},removeNodeFromMap:function(){console.error(f)},has:function(){return console.error(f),!1},reset:function(){console.error(f)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(e.mirror=new Proxy(e.mirror,{get:function(e,t,r){return"map"===t&&console.error(f),Reflect.get(e,t,r)}}));var b=function(e){try{if(e instanceof HTMLElement)return"CANVAS"===e.tagName}catch(e){return!1}return!1};function S(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var r=!1;if("string"==typeof t){if(void 0!==e.closest)return null!==e.closest("."+t);r=e.classList.contains(t)}else e.classList.forEach((function(e){t.test(e)&&(r=!0)}));return r||S(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,S(e.parentNode,t)}function T(e){return"__sn"in e&&e.__sn.id===j}function x(e,t){if(L(e))return!1;var r=t.getId(e);return!t.has(r)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||x(e.parentNode,t))}function w(e){return Boolean(e.changedTouches)}function E(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}var I=function(){function t(){this.reset()}return t.prototype.add=function(e){var t=this.indexes.get(e.parentId),r={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(r.parent=t,t.children[r.id]=r):this.tree[r.id]=r,this.indexes.set(r.id,r)},t.prototype.remove=function(e,t){var r=this,n=this.indexes.get(e.parentId),o=this.indexes.get(e.id),i=function(e){r.removeIdSet.add(e);var n=t.getNode(e);null==n||n.childNodes.forEach((function(e){"__sn"in e&&i(e.__sn.id)}))},a=function(t){r.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var n=r.indexes.get(t.id);if(n){var o=n.parent;o&&(delete n.parent,delete o.children[n.id],r.indexes.delete(e.id))}};o?n?(delete o.parent,delete n.children[o.id],this.indexes.delete(e.id),a(o)):(delete this.tree[o.id],this.indexes.delete(o.id),a(o)):(this.removeNodeMutations.push(e),i(e.id))},t.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},t.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},t.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},t.prototype.input=function(e){this.inputMap.set(e.id,e)},t.prototype.flush=function(){var t,r,n,o,i=this,a=this.tree,s=this.removeNodeMutations,c=this.textMutations,u=this.attributeMutations,d={source:e.IncrementalSource.Mutation,removes:s,texts:c,attributes:u,adds:[]},p=function(e,t){t&&i.removeIdSet.add(e.id),d.texts=d.texts.concat(t?[]:e.texts).filter((function(e){return!i.removeIdSet.has(e.id)})),d.attributes=d.attributes.concat(t?[]:e.attributes).filter((function(e){return!i.removeIdSet.has(e.id)})),i.removeIdSet.has(e.id)||i.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return p(e,!0)})):(d.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return p(e,!1)})))};Object.values(a).forEach((function(e){return p(e,!1)}));try{for(var f=l(this.scrollMap.keys()),h=f.next();!h.done;h=f.next()){var m=h.value;this.removeIdSet.has(m)&&this.scrollMap.delete(m)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(t)throw t.error}}try{for(var v=l(this.inputMap.keys()),y=v.next();!y.done;y=v.next()){m=y.value;this.removeIdSet.has(m)&&this.inputMap.delete(m)}}catch(e){n={error:e}}finally{try{y&&!y.done&&(o=v.return)&&o.call(v)}finally{if(n)throw n.error}}var g=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:d,scrollMap:g,inputMap:b}},t.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},t.prototype.idRemoved=function(e){return this.removeIdSet.has(e)},t}();function C(e){var t,r,n={},o=function(e,t){var r={value:e,parent:t,children:[]};return n[e.node.id]=r,r},i=[];try{for(var a=l(e),s=a.next();!s.done;s=a.next()){var c=s.value,u=c.nextId,d=c.parentId;if(u&&u in n){var p=n[u];if(p.parent){var f=p.parent.children.indexOf(p);p.parent.children.splice(f,0,o(c,p.parent))}else{f=i.indexOf(p);i.splice(f,0,o(c,null))}}else if(d in n){var h=n[d];h.children.push(o(c,h))}else i.push(o(c,null))}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return i}function k(e,t){t(e.value);for(var r=e.children.length-1;r>=0;r--)k(e.children[r],t)}function M(e){return"__sn"in e&&(e.__sn.type===O.Element&&"iframe"===e.__sn.tagName)}function N(e,t){var r,n,o=null===(n=null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===n?void 0:n.frameElement;if(!o||o===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var i=o.getBoundingClientRect(),a=N(o,t),s=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function R(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}function _(e){return e=(null==(e=e.replace(/[^ -~]+/g,""))?void 0:e.split(" ").map((function(e){return Math.random().toString(20).substr(2,e.length)})).join(" "))||""}var O,A=Object.freeze({__proto__:null,on:d,createMirror:p,get _mirror(){return e.mirror},throttle:h,hookSetter:m,patch:v,getWindowHeight:y,getWindowWidth:g,isCanvasNode:b,isBlocked:S,isIgnored:T,isAncestorRemoved:x,isTouchEvent:w,polyfill:E,TreeIndex:I,queueToResolveTrees:C,iterateResolveTree:k,isIframeINode:M,getBaseDimension:N,hasShadowRoot:R,obfuscateText:_});function D(e){return e.nodeType===e.ELEMENT_NODE}function L(e){var t,r=null===(t=e)||void 0===t?void 0:t.host;return Boolean(r&&r.shadowRoot&&r.shadowRoot===e)}function F(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[r.toLowerCase()]||t[n])&&(a=i?i(a):"*".repeat(a.length)),a}!function(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"}(O||(O={}));var P=1,W=new RegExp("[^a-z0-9-_:]"),j=-2;function z(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(B).join(""):null}catch(e){return null}}function B(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=z(e.styleSheet)||t}catch(e){}return t}var V=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,U=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,G=/^(data:)([^,]*),(.*)/i;function H(e,t){return(e||"").replace(V,(function(e,r,n,o,i,a){var s,c,u,d=n||i||a,p=r||o||"";if(!d)return e;if(!U.test(d))return"url("+p+d+p+")";if(G.test(d))return"url("+p+d+p+")";if("/"===d[0])return"url("+p+(((u=t).indexOf("//")>-1?u.split("/").slice(0,3).join("/"):u.split("/")[0]).split("?")[0]+d)+p+")";var f=t.split("/"),h=d.split("/");f.pop();try{for(var m=l(h),v=m.next();!v.done;v=m.next()){var y=v.value;"."!==y&&(".."===y?f.pop():f.push(y))}}catch(e){s={error:e}}finally{try{v&&!v.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}return"url("+p+f.join("/")+p+")"}))}var Y=/^[^ \t\n\r\u000c]+/,X=/^[, \t\n\r\u000c]+/;function q(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function Q(){var e=document.createElement("a");return e.href="",e.href}function $(e,t,r,n){return"src"===r||"href"===r&&n||"xlink:href"===r&&n&&"#"!==n[0]?q(e,n):"background"!==r||!n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r&&n?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,o=e.exec(t.substring(r));return o?(n=o[0],r+=n.length,n):""}for(var o=[];n(X),!(r>=t.length);){var i=n(Y);if(","===i.slice(-1))i=q(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=q(e,i);for(var s=!1;;){var l=t.charAt(r);if(""===l){o.push((i+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){r+=1,o.push((i+a).trim());break}"("===l&&(s=!0)}a+=l,r+=1}}}return o.join(", ")}(e,n):"style"===r&&n?H(n,Q()):"object"===t&&"data"===r&&n?q(e,n):n:q(e,n)}function K(e,t,r){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else e.classList.forEach((function(e){if(t.test(e))return!0}));return!(!r||!e.matches(r))||K(e.parentNode,t,r)}return e.nodeType,e.TEXT_NODE,K(e.parentNode,t,r)}function J(e,t){var r,n,o,i,a,s,c=t.doc,u=t.blockClass,d=t.blockSelector,p=t.maskTextClass,f=t.maskTextSelector,h=t.inlineStylesheet,m=t.maskInputOptions,v=void 0===m?{}:m,y=t.maskTextFn,g=t.maskInputFn,b=t.recordCanvas,S=t.keepIframeSrcFn,T=t.enableStrictPrivacy;if(c.__sn){var x=c.__sn.id;i=1===x?void 0:x}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:O.Document,childNodes:[],compatMode:e.compatMode,rootId:i}:{type:O.Document,childNodes:[],rootId:i};case e.DOCUMENT_TYPE_NODE:return{type:O.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:i};case e.ELEMENT_NODE:var w=function(e,t,r){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=0;n<e.classList.length;n++){var o=e.classList[n];if(t.test(o))return!0}return!!r&&e.matches(r)}(e,u,d),E=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return W.test(t)?"div":t}(e),I={};try{for(var C=l(Array.from(e.attributes)),k=C.next();!k.done;k=C.next()){var M=k.value,N=M.name,R=M.value;I[N]=$(c,E,N,R)}}catch(e){r={error:e}}finally{try{k&&!k.done&&(n=C.return)&&n.call(C)}finally{if(r)throw r.error}}if("link"===E&&h){var A,D=Array.from(c.styleSheets).find((function(t){return t.href===e.href}));(A=z(D))&&(delete I.rel,delete I.href,I._cssText=H(A,D.href))}if("style"===E&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(A=z(e.sheet))&&(I._cssText=H(A,Q()));if("input"===E||"textarea"===E||"select"===E){R=e.value;"radio"!==I.type&&"checkbox"!==I.type&&"submit"!==I.type&&"button"!==I.type&&R?"password"===I.type?I.value="*".repeat(R.length):I.value=F({type:I.type,tagName:E,value:R,maskInputOptions:v,maskInputFn:g}):e.checked&&(I.checked=e.checked)}if("option"===E&&(e.selected&&!v.select?I.selected=!0:delete I.selected),"canvas"===E&&b)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var o=t.getImageData,i="__rrweb_original__"in o?o.__rrweb_original__:o;if(new Uint32Array(i.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(I.rr_dataURL=e.toDataURL());else if(!("__context"in e)){var L=e.toDataURL(),P=document.createElement("canvas");P.width=e.width,P.height=e.height,L!==P.toDataURL()&&(I.rr_dataURL=L)}if("audio"!==E&&"video"!==E||(I.rr_mediaState=e.paused?"paused":"played",I.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(I.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(I.rr_scrollTop=e.scrollTop),w||"img"===E&&T){var j=e.getBoundingClientRect(),B=j.width,V=j.height;I={class:I.class,rr_width:B+"px",rr_height:V+"px"},w=!0}return"iframe"!==E||S(I.src)||(e.contentDocument||(I.rr_src=I.src),delete I.src),{type:O.Element,tagName:E,attributes:I,childNodes:[],isSVG:(s=e,Boolean("svg"===s.tagName||s.ownerSVGElement)||void 0),needBlock:w,rootId:i};case e.TEXT_NODE:var U=e.parentNode&&e.parentNode.tagName,G=e.textContent,Y="STYLE"===U||void 0,X="SCRIPT"===U||void 0,q=!1;if(Y&&G){try{e.nextSibling||e.previousSibling||(null===(o=e.parentNode.sheet)||void 0===o?void 0:o.cssRules)&&(G=(a=e.parentNode.sheet).cssRules?Array.from(a.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(e){}G=H(G,Q()),q=!0}if(X?(G="SCRIPT_PLACEHOLDER",q=!0):"NOSCRIPT"===U&&(G="",q=!0),!Y&&!X&&K(e,p,f)&&G&&(G=y?y(G):G.replace(/[\S]/g,"*")),T&&!q&&U)!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(U)&&G&&(G=_(G));return{type:O.Text,textContent:G||"",isStyle:Y,rootId:i};case e.CDATA_SECTION_NODE:return{type:O.CDATA,textContent:"",rootId:i};case e.COMMENT_NODE:return{type:O.Comment,textContent:e.textContent||"",rootId:i};default:return!1}}function Z(e){return void 0===e?"":e.toLowerCase()}function ee(e,t){var r,n,o,i,a,s=t.doc,c=t.map,u=t.blockClass,d=t.blockSelector,p=t.maskTextClass,f=t.maskTextSelector,h=t.skipChild,m=void 0!==h&&h,v=t.inlineStylesheet,y=void 0===v||v,g=t.maskInputOptions,b=void 0===g?{}:g,S=t.maskTextFn,T=t.maskInputFn,x=t.slimDOMOptions,w=t.recordCanvas,E=void 0!==w&&w,I=t.onSerialize,C=t.onIframeLoad,k=t.iframeLoadTimeout,M=void 0===k?5e3:k,N=t.keepIframeSrcFn,R=void 0===N?function(){return!1}:N,_=t.enableStrictPrivacy,A=t.preserveWhiteSpace,F=void 0===A||A,W=J(e,{doc:s,blockClass:u,blockSelector:d,maskTextClass:p,maskTextSelector:f,inlineStylesheet:y,maskInputOptions:b,maskTextFn:S,maskInputFn:T,recordCanvas:E,keepIframeSrcFn:R,enableStrictPrivacy:_});if(!W)return console.warn(e,"not serialized"),null;a="__sn"in e?e.__sn.id:!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||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Z(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Z(e.attributes.name)||"icon"===Z(e.attributes.rel)||"apple-touch-icon"===Z(e.attributes.rel)||"shortcut icon"===Z(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Z(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Z(e.attributes.property).match(/^(og|twitter|fb):/)||Z(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Z(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Z(e.attributes.name)||"googlebot"===Z(e.attributes.name)||"bingbot"===Z(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Z(e.attributes.name)||"generator"===Z(e.attributes.name)||"framework"===Z(e.attributes.name)||"publisher"===Z(e.attributes.name)||"progid"===Z(e.attributes.name)||Z(e.attributes.property).match(/^article:/)||Z(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Z(e.attributes.name)||"yandex-verification"===Z(e.attributes.name)||"csrf-token"===Z(e.attributes.name)||"p:domain_verify"===Z(e.attributes.name)||"verify-v1"===Z(e.attributes.name)||"verification"===Z(e.attributes.name)||"shopify-checkout-api-token"===Z(e.attributes.name)))return!0}}return!1}(W,x)&&(F||W.type!==O.Text||W.isStyle||W.textContent.replace(/^\s+|\s+$/gm,"").length)?P++:j;var z=Object.assign(W,{id:a});if(e.__sn=z,a===j)return null;c[a]=e,I&&I(e);var B=!m;if(z.type===O.Element){if(B=B&&!z.needBlock,z.needBlock&&"img"===z.tagName){var V=e.cloneNode();V.src="",c[a]=V}delete z.needBlock}if((z.type===O.Document||z.type===O.Element)&&B){x.headWhitespace&&W.type===O.Element&&"head"===W.tagName&&(F=!1);var U={doc:s,map:c,blockClass:u,blockSelector:d,maskTextClass:p,maskTextSelector:f,skipChild:m,inlineStylesheet:y,maskInputOptions:b,maskTextFn:S,maskInputFn:T,slimDOMOptions:x,recordCanvas:E,preserveWhiteSpace:F,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:M,keepIframeSrcFn:R,enableStrictPrivacy:_};try{for(var G=l(Array.from(e.childNodes)),H=G.next();!H.done;H=G.next()){(q=ee(H.value,U))&&z.childNodes.push(q)}}catch(e){r={error:e}}finally{try{H&&!H.done&&(n=G.return)&&n.call(G)}finally{if(r)throw r.error}}if(D(e)&&e.shadowRoot){z.isShadowHost=!0;try{for(var Y=l(Array.from(e.shadowRoot.childNodes)),X=Y.next();!X.done;X=Y.next()){var q;(q=ee(X.value,U))&&(q.isShadow=!0,z.childNodes.push(q))}}catch(e){o={error:e}}finally{try{X&&!X.done&&(i=Y.return)&&i.call(Y)}finally{if(o)throw o.error}}}}return e.parentNode&&L(e.parentNode)&&(z.isShadow=!0),z.type===O.Element&&"iframe"===z.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var o,i=!1;try{o=n.document.readyState}catch(e){return}if("complete"===o){"about:blank"===n.location.href&&"about:blank"!==e.src&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var a=setTimeout((function(){i||(t(),i=!0)}),r);e.addEventListener("load",(function(){clearTimeout(a),i=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&C){var r=ee(t,{doc:t,map:c,blockClass:u,blockSelector:d,maskTextClass:p,maskTextSelector:f,skipChild:!1,inlineStylesheet:y,maskInputOptions:b,maskTextFn:S,maskInputFn:T,slimDOMOptions:x,recordCanvas:E,preserveWhiteSpace:F,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:M,keepIframeSrcFn:R,enableStrictPrivacy:_});r&&C(e,r)}}),M),z}var te=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function re(e,t){void 0===t&&(t={});var r=1,n=1;function o(e){var t=e.match(/\n/g);t&&(r+=t.length);var o=e.lastIndexOf("\n");n=-1===o?n+e.length:e.length-o}function i(){var e={line:r,column:n};return function(t){return t.position=new a(e),h(),t}}var a=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};a.prototype.content=e;var s=[];function c(o){var i=new Error(t.source+":"+r+":"+n+": "+o);if(i.reason=o,i.filename=t.source,i.line=r,i.column=n,i.source=e,!t.silent)throw i;s.push(i)}function u(){return f(/^{\s*/)}function d(){return f(/^}/)}function p(){var t,r=[];for(h(),m(r);e.length&&"}"!==e.charAt(0)&&(t=C()||k());)!1!==t&&(r.push(t),m(r));return r}function f(t){var r=t.exec(e);if(r){var n=r[0];return o(n),e=e.slice(n.length),r}}function h(){f(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=v();)!1!==t&&e.push(t),t=v();return e}function v(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return c("End of comment missing");var a=e.slice(2,r-2);return n+=2,o(a),e=e.slice(r),n+=2,t({type:"comment",comment:a})}}function y(){var e=f(/^([^{]+)/);if(e)return ne(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function g(){var e=i(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=ne(t[0]);if(!f(/^:\s*/))return c("property missing ':'");var n=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:r.replace(te,""),value:n?ne(n[0]).replace(te,""):""});return f(/^[;\s]*/),o}}function b(){var e,t=[];if(!u())return c("missing '{'");for(m(t);e=g();)!1!==e&&(t.push(e),m(t)),e=g();return d()?t:c("missing '}'")}function S(){for(var e,t=[],r=i();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:b()})}var T,x=I("import"),w=I("charset"),E=I("namespace");function I(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=i(),n=f(t);if(n){var o={type:e};return o[e]=n[1].trim(),r(o)}}}function C(){if("@"===e[0])return function(){var e=i(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=f(/^([-\w]+)\s*/)))return c("@keyframes missing name");var n,o=t[1];if(!u())return c("@keyframes missing '{'");for(var a=m();n=S();)a.push(n),a=a.concat(m());return d()?e({type:"keyframes",name:o,vendor:r,keyframes:a}):c("@keyframes missing '}'")}}()||function(){var e=i(),t=f(/^@media *([^{]+)/);if(t){var r=ne(t[1]);if(!u())return c("@media missing '{'");var n=m().concat(p());return d()?e({type:"media",media:r,rules:n}):c("@media missing '}'")}}()||function(){var e=i(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:ne(t[1]),media:ne(t[2])})}()||function(){var e=i(),t=f(/^@supports *([^{]+)/);if(t){var r=ne(t[1]);if(!u())return c("@supports missing '{'");var n=m().concat(p());return d()?e({type:"supports",supports:r,rules:n}):c("@supports missing '}'")}}()||x()||w()||E()||function(){var e=i(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var r=ne(t[1]),n=ne(t[2]);if(!u())return c("@document missing '{'");var o=m().concat(p());return d()?e({type:"document",document:n,vendor:r,rules:o}):c("@document missing '}'")}}()||function(){var e=i();if(f(/^@page */)){var t=y()||[];if(!u())return c("@page missing '{'");for(var r,n=m();r=g();)n.push(r),n=n.concat(m());return d()?e({type:"page",selectors:t,declarations:n}):c("@page missing '}'")}}()||function(){var e=i();if(f(/^@host\s*/)){if(!u())return c("@host missing '{'");var t=m().concat(p());return d()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=i();if(f(/^@font-face\s*/)){if(!u())return c("@font-face missing '{'");for(var t,r=m();t=g();)r.push(t),r=r.concat(m());return d()?e({type:"font-face",declarations:r}):c("@font-face missing '}'")}}()}function k(){var e=i(),t=y();return t?(m(),e({type:"rule",selectors:t,declarations:b()})):c("selector missing")}return function e(t,r){var n,o,i=t&&"string"==typeof t.type,a=i?t:r;try{for(var s=l(Object.keys(t)),c=s.next();!c.done;c=s.next()){var u=c.value,d=t[u];Array.isArray(d)?d.forEach((function(t){e(t,a)})):d&&"object"==typeof d&&e(d,a)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}i&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:r||null});return t}((T=p(),{type:"stylesheet",stylesheet:{source:t.source,rules:T,parsingErrors:s}}))}function ne(e){return e?e.replace(/^\s+|\s+$/g,""):""}var oe={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var ie=/([^\\]):hover/,ae=new RegExp(ie.source,"g");function se(e,t){var r;if(!(null===(r=window.HIG_CONFIGURATION)||void 0===r?void 0:r.enableOnHoverClass))return e;var n=null==t?void 0:t.stylesWithHoverClass.get(e);if(n)return n;var o=re(e,{silent:!0});if(!o.stylesheet)return e;var i=[];if(o.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){ie.test(e)&&i.push(e)}))})),0===i.length)return e;var a=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),s=e.replace(a,(function(e){var t=e.replace(ae,"$1.\\:hover");return e+", "+t}));return null==t||t.stylesWithHoverClass.set(e,s),s}function le(){return{stylesWithHoverClass:new Map}}function ce(e,t){var r=t.doc,n=t.hackCss,o=t.cache;switch(e.type){case O.Document:return r.implementation.createDocument(null,"",null);case O.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case O.Element:var i,a=function(e){var t=oe[e.tagName]?oe[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);i=e.isSVG?r.createElementNS("http://www.w3.org/2000/svg",a):r.createElement(a);var s=function(t){var s,c;if(!e.attributes.hasOwnProperty(t))return"continue";var u=e.attributes[t];if("option"===a&&"selected"===t&&!1===u)return"continue";if(u="boolean"==typeof u||"number"==typeof u?"":u,t.startsWith("rr_")){if("canvas"===a&&"rr_dataURL"===t){var d=document.createElement("img");d.src=u,d.onload=function(){var e=i.getContext("2d");e&&e.drawImage(d,0,0,d.width,d.height)}}if("rr_width"===t&&(i.style.width=u),"rr_height"===t&&(i.style.height=u),"rr_mediaCurrentTime"===t&&(i.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(u){case"played":i.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":i.pause()}}else{var p="textarea"===a&&"value"===t,f="style"===a&&"_cssText"===t;if(f&&n&&"string"==typeof(u=se(u,o))){for(var h=/url\(\"https:\/\/\S*(.eot|.woff2|.ttf|.woff)\S*\"\)/gm,m=void 0,v=[];null!==(m=h.exec(u));)m.index===h.lastIndex&&h.lastIndex++,m.forEach((function(e,t){if(0===t){var r=e.slice(5,e.length-2);v.push({originalUrl:r,proxyUrl:r.replace(r,"https://replay-cors-proxy.highlightrun.workers.dev?url="+r)})}}));v.forEach((function(e){u=u.replace(e.originalUrl,e.proxyUrl)}))}if(p||f){var y=r.createTextNode(u);try{for(var g=(s=void 0,l(Array.from(i.childNodes))),b=g.next();!b.done;b=g.next()){var S=b.value;S.nodeType===i.TEXT_NODE&&i.removeChild(S)}}catch(e){s={error:e}}finally{try{b&&!b.done&&(c=g.return)&&c.call(g)}finally{if(s)throw s.error}}return i.appendChild(y),"continue"}try{if(e.isSVG&&"xlink:href"===t)i.setAttributeNS("http://www.w3.org/1999/xlink",t,u);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))i.setAttribute("_"+t,u);else{if("meta"===a&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===t)return i.setAttribute("csp-content",u),"continue";"link"===a&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===a&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")||i.setAttribute(t,u)}}catch(e){}}};for(var c in e.attributes)s(c);if(e.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i;case O.Text:return r.createTextNode(e.isStyle&&n?se(e.textContent,o):e.textContent);case O.CDATA:return r.createCDATASection(e.textContent);case O.Comment:return r.createComment(e.textContent);default:return null}}function ue(e,t){var r,n,o=t.doc,i=t.map,a=t.skipChild,s=void 0!==a&&a,c=t.hackCss,u=void 0===c||c,d=t.afterAppend,p=t.cache,f=ce(e,{doc:o,hackCss:u,cache:p});if(!f)return null;if(e.rootId&&console.assert(i[e.rootId]===o,"Target document should has the same root id."),e.type===O.Document&&(o.close(),o.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==O.DocumentType&&(e.childNodes[0].type===O.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?o.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):o.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),f=o),f.__sn=e,i[e.id]=f,(e.type===O.Document||e.type===O.Element)&&!s)try{for(var h=l(e.childNodes),m=h.next();!m.done;m=h.next()){var v=m.value,y=ue(v,{doc:o,map:i,skipChild:!1,hackCss:u,afterAppend:d,cache:p});y?(v.isShadow&&D(f)&&f.shadowRoot?f.shadowRoot.appendChild(y):f.appendChild(y),d&&d(y)):console.warn("Failed to rebuild",v)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}return f}function de(e,t){var r=t.doc,n=t.onVisit,o=t.hackCss,i={},a=ue(e,{doc:r,map:i,skipChild:!1,hackCss:void 0===o||o,afterAppend:t.afterAppend,cache:t.cache});return function(e,t){for(var r in e)e[r]&&(n=e[r],t(n));var n}(i,(function(e){n&&n(e),function(e){var t=e.__sn;if(t.type===O.Element){var r=e;for(var n in t.attributes)if(t.attributes.hasOwnProperty(n)&&n.startsWith("rr_")){var o=t.attributes[n];"rr_scrollLeft"===n&&(r.scrollLeft=o),"rr_scrollTop"===n&&(r.scrollTop=o)}}}(e)})),[a,i]}function pe(e){return"__ln"in e}var fe=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&pe(e.previousSibling)){var r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&pe(e.nextSibling)&&e.nextSibling.__ln.previous){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;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),he=function(e,t){return e+"@"+t};function me(e){return"__sn"in e}var ve=function(){function e(){var e=this;this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,r,n,o;if(!e.frozen&&!e.locked){for(var i=[],a=new fe,s=function(t){for(var r=t,n=j;n===j;)n=(r=r&&r.nextSibling)&&e.mirror.getId(r);return n},c=function(t){var r,n=t.getRootNode?null===(r=t.getRootNode())||void 0===r?void 0:r.host:null,o=!(e.doc.contains(t)||n instanceof Node&&e.doc.contains(n));if(t.parentNode&&!o){var l=L(t.parentNode)?e.mirror.getId(n):e.mirror.getId(t.parentNode),c=s(t);if(-1===l||-1===c)return a.addNode(t);var u=ee(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,enableStrictPrivacy:e.enableStrictPrivacy,onSerialize:function(r){M(r)&&e.iframeManager.addIframe(r),R(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,r){e.iframeManager.attachIframe(t,r)}});u&&i.push({parentId:l,nextId:c,node:u})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var u=l(e.movedSet),d=u.next();!d.done;d=u.next()){var p=d.value;ge(e.removes,p,e.mirror)&&!e.movedSet.has(p.parentNode)||c(p)}}catch(e){t={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}try{for(var f=l(e.addedSet),h=f.next();!h.done;h=f.next()){p=h.value;be(e.droppedSet,p)||ge(e.removes,p,e.mirror)?be(e.movedSet,p)?c(p):e.droppedSet.add(p):c(p)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}for(var m=null;a.length;){var v=null;if(m){var y=e.mirror.getId(m.value.parentNode),g=s(m.value);-1!==y&&-1!==g&&(v=m)}if(!v)for(var b=a.length-1;b>=0;b--){var S=a.get(b);if(S){y=e.mirror.getId(S.value.parentNode),g=s(S.value);if(-1!==y&&-1!==g){v=S;break}}}if(!v){for(;a.head;)a.removeNode(a.head.value);break}m=v.previous,a.removeNode(v.value),c(v.value)}var T={texts:e.texts.map((function(t){var r=t.value;return e.enableStrictPrivacy&&r&&(r=_(r)),{id:e.mirror.getId(t.node),value:r}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:i};(T.texts.length||T.attributes.length||T.removes.length||T.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.emissionCallback(T))}},this.processMutation=function(t){var r,n,o,i;if(!T(t.target))switch(t.type){case"characterData":var a=t.target.textContent;S(t.target,e.blockClass)||a===t.oldValue||e.texts.push({value:K(t.target,e.maskTextClass,e.maskTextSelector)&&a?e.maskTextFn?e.maskTextFn(a):a.replace(/[\S]/g,"*"):a,node:t.target});break;case"attributes":var s=t.target;a=t.target.getAttribute(t.attributeName);if("value"===t.attributeName&&(a=F({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:a,maskInputFn:e.maskInputFn})),S(t.target,e.blockClass)||a===t.oldValue)return;var c=e.attributes.find((function(e){return e.node===t.target}));if(c||(c={node:t.target,attributes:{}},e.attributes.push(c)),"INPUT"===t.target.tagName){var u=t.target;if("password"===u.type){c.attributes.value="*".repeat(u.value.length);break}}if("style"===t.attributeName){var d=e.doc.createElement("span");t.oldValue&&d.setAttribute("style",t.oldValue),void 0!==c.attributes.style&&null!==c.attributes.style||(c.attributes.style={});var p=c.attributes.style;try{for(var f=l(Array.from(s.style)),h=f.next();!h.done;h=f.next()){var m=h.value,v=s.style.getPropertyValue(m),y=s.style.getPropertyPriority(m);v===d.style.getPropertyValue(m)&&y===d.style.getPropertyPriority(m)||(p[m]=""===y?v:[v,y])}}catch(e){r={error:e}}finally{try{h&&!h.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}try{for(var g=l(Array.from(d.style)),b=g.next();!b.done;b=g.next()){m=b.value;""===s.style.getPropertyValue(m)&&(p[m]=!1)}}catch(e){o={error:e}}finally{try{b&&!b.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}}else c.attributes[t.attributeName]=$(e.doc,t.target.tagName,t.attributeName,a);break;case"childList":t.addedNodes.forEach((function(r){return e.genAdds(r,t.target)})),t.removedNodes.forEach((function(r){var n=e.mirror.getId(r),o=L(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);S(t.target,e.blockClass)||T(r)||(e.addedSet.has(r)?(ye(e.addedSet,r),e.droppedSet.add(r)):e.addedSet.has(t.target)&&-1===n||x(t.target,e.mirror)||(e.movedSet.has(r)&&e.movedMap[he(n,o)]?ye(e.movedSet,r):e.removes.push({parentId:o,id:n,isShadow:!!L(t.target)||void 0})),e.mapRemoves.push(r))}))}},this.genAdds=function(t,r){if(!r||!S(r,e.blockClass)){if(me(t)){if(T(t))return;e.movedSet.add(t);var n=null;r&&me(r)&&(n=r.__sn.id),n&&(e.movedMap[he(t.__sn.id,n)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);S(t,e.blockClass)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,r,n,o,i,a,s,l,c,u,d,p,f,h,m,v){this.blockClass=t,this.blockSelector=r,this.maskTextClass=n,this.maskTextSelector=o,this.inlineStylesheet=i,this.maskInputOptions=a,this.maskTextFn=s,this.maskInputFn=l,this.recordCanvas=c,this.slimDOMOptions=u,this.enableStrictPrivacy=v,this.emissionCallback=e,this.doc=d,this.mirror=p,this.iframeManager=f,this.shadowDomManager=h,this.canvasManager=m},e.prototype.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},e.prototype.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0,this.canvasManager.lock()},e.prototype.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},e.prototype.reset=function(){this.canvasManager.reset()},e}();function ye(e,t){e.delete(t),t.childNodes.forEach((function(t){return ye(e,t)}))}function ge(e,t,r){var n=t.parentNode;if(!n)return!1;var o=r.getId(n);return!!e.some((function(e){return e.id===o}))||ge(e,n,r)}function be(e,t){var r=t.parentNode;return!!r&&(!!e.has(r)||be(e,r))}var Se=[],Te="undefined"!=typeof CSSGroupingRule,xe="undefined"!=typeof CSSMediaRule,we="undefined"!=typeof CSSSupportsRule,Ee="undefined"!=typeof CSSConditionRule;function Ie(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function Ce(e,t,r,n,o,i,a,s,l,c,u,d,p,f,h,m,v,y){var g,b,S,T=new ve;Se.push(T),T.init(e,r,n,o,i,a,s,l,c,u,d,t,p,f,h,m,y);var x=window.MutationObserver||window.__rrMutationObserver,w=null===(S=null===(b=null===(g=window)||void 0===g?void 0:g.Zone)||void 0===b?void 0:b.__symbol__)||void 0===S?void 0:S.call(b,"MutationObserver");w&&window[w]&&(x=window[w]);var E=new x(T.processMutations.bind(T));return E.observe(v,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),E}function ke(t,r,n,o,i){if(!1===i.mouseInteraction)return function(){};var a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,s=[];return Object.keys(e.MouseInteractions).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]})).forEach((function(i){var a=i.toLowerCase(),l=function(r){return function(i){var a=Ie(i);if(!S(a,o)&&!b(a)){var s=w(i)?i.changedTouches[0]:i;if(s){var l=n.getId(a),c=s.clientX,u=s.clientY;t({type:e.MouseInteractions[r],id:l,x:c,y:u})}}}}(i);s.push(d(a,l,r))})),function(){s.forEach((function(e){return e()}))}}function Me(e,t,r,n,o){return d("scroll",h((function(o){var i=Ie(o);if(i&&!S(i,n)){var a=r.getId(i);if(i===t){var s=t.scrollingElement||t.documentElement;e({id:a,x:s.scrollLeft,y:s.scrollTop})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})}}),o.scroll||100),t)}function Ne(e,t){var r=s({},e);return t||delete r.userTriggered,r}var Re=["INPUT","TEXTAREA","SELECT"],_e=new WeakMap;function Oe(e){return function(e,t){if(Te&&e.parentRule instanceof CSSGroupingRule||xe&&e.parentRule instanceof CSSMediaRule||we&&e.parentRule instanceof CSSSupportsRule||Ee&&e.parentRule instanceof CSSConditionRule){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else{r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function Ae(t,r){var n,o;void 0===r&&(r={});var i=t.doc.defaultView;if(!i)return function(){};!function(e,t){var r=e.mutationCb,n=e.mousemoveCb,o=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.styleDeclarationCb,p=e.canvasMutationCb,f=e.fontCb;e.mutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mutation&&t.mutation.apply(t,u(e)),r.apply(void 0,u(e))},e.mousemoveCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mousemove&&t.mousemove.apply(t,u(e)),n.apply(void 0,u(e))},e.mouseInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mouseInteraction&&t.mouseInteraction.apply(t,u(e)),o.apply(void 0,u(e))},e.scrollCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.scroll&&t.scroll.apply(t,u(e)),i.apply(void 0,u(e))},e.viewportResizeCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.viewportResize&&t.viewportResize.apply(t,u(e)),a.apply(void 0,u(e))},e.inputCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.input&&t.input.apply(t,u(e)),s.apply(void 0,u(e))},e.mediaInteractionCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mediaInteaction&&t.mediaInteaction.apply(t,u(e)),l.apply(void 0,u(e))},e.styleSheetRuleCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.styleSheetRule&&t.styleSheetRule.apply(t,u(e)),c.apply(void 0,u(e))},e.styleDeclarationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.styleDeclaration&&t.styleDeclaration.apply(t,u(e)),d.apply(void 0,u(e))},e.canvasMutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.canvasMutation&&t.canvasMutation.apply(t,u(e)),p.apply(void 0,u(e))},e.fontCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.font&&t.font.apply(t,u(e)),f.apply(void 0,u(e))}}(t,r);var a,p,f,b=Ce(t.mutationCb,t.doc,t.blockClass,t.blockSelector,t.maskTextClass,t.maskTextSelector,t.inlineStylesheet,t.maskInputOptions,t.maskTextFn,t.maskInputFn,t.recordCanvas,t.slimDOMOptions,t.mirror,t.iframeManager,t.shadowDomManager,t.canvasManager,t.doc,t.enableStrictPrivacy),T=function(t,r,n,o){if(!1===r.mousemove)return function(){};var i,a="number"==typeof r.mousemove?r.mousemove:50,s="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,l=[],c=h((function(e){var r=Date.now()-i;t(l.map((function(e){return e.timeOffset-=r,e})),e),l=[],i=null}),s),u=h((function(t){var r=Ie(t),n=w(t)?t.changedTouches[0]:t,a=n.clientX,s=n.clientY;i||(i=Date.now()),l.push({x:a,y:s,id:o.getId(r),timeOffset:Date.now()-i}),c("undefined"!=typeof DragEvent&&t instanceof DragEvent?e.IncrementalSource.Drag:t instanceof MouseEvent?e.IncrementalSource.MouseMove:e.IncrementalSource.TouchMove)}),a,{trailing:!1}),p=[d("mousemove",u,n),d("touchmove",u,n),d("drag",u,n)];return function(){p.forEach((function(e){return e()}))}}(t.mousemoveCb,t.sampling,t.doc,t.mirror),x=ke(t.mouseInteractionCb,t.doc,t.mirror,t.blockClass,t.sampling),E=Me(t.scrollCb,t.doc,t.mirror,t.blockClass,t.sampling),I=(a=t.viewportResizeCb,p=-1,f=-1,d("resize",h((function(){var e=y(),t=g();p===e&&f===t||(a({width:Number(t),height:Number(e)}),p=e,f=t)}),200),window)),C=function(e,t,r,n,o,i,a,l,c){function p(e){var r=Ie(e),s=e.isTrusted;if(r&&"OPTION"===r.tagName&&(r=r.parentElement),r&&r.tagName&&!(Re.indexOf(r.tagName)<0)&&!S(r,n)){var l=r.type;if(!r.classList.contains(o)){var u=r.value,d=!1;"radio"===l||"checkbox"===l?d=r.checked:(i[r.tagName.toLowerCase()]||i[l])&&(u=F({maskInputOptions:i,tagName:r.tagName,type:l,value:u,maskInputFn:a})),f(r,Ne({text:u,isChecked:d,userTriggered:s},c));var p=r.name;"radio"===l&&p&&d&&t.querySelectorAll('input[type="radio"][name="'+p+'"]').forEach((function(e){e!==r&&f(e,Ne({text:e.value,isChecked:!d,userTriggered:!1},c))}))}}}function f(t,n){var o=_e.get(t);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){_e.set(t,n);var i=r.getId(t);e(s(s({},n),{id:i}))}}var h=("last"===l.input?["change"]:["input","change"]).map((function(e){return d(e,p,t)})),v=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),y=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return v&&v.set&&h.push.apply(h,u(y.map((function(e){return m(e[0],e[1],{set:function(){p({target:this})}})})))),function(){h.forEach((function(e){return e()}))}}(t.inputCb,t.doc,t.mirror,t.blockClass,t.ignoreClass,t.maskInputOptions,t.maskInputFn,t.sampling,t.userTriggeredOnInput),k=function(e,t,r,n){var o=function(o){return h((function(n){var i=Ie(n);if(i&&!S(i,t)){var a=i,s=a.currentTime,l=a.volume,c=a.muted;e({type:o,id:r.getId(i),currentTime:s,volume:l,muted:c})}}),n.media||500)},i=[d("play",o(0)),d("pause",o(1)),d("seeked",o(2)),d("volumechange",o(3))];return function(){i.forEach((function(e){return e()}))}}(t.mediaInteractionCb,t.blockClass,t.mirror,t.sampling),M=function(e,t,r){var n=t.CSSStyleSheet.prototype.insertRule;t.CSSStyleSheet.prototype.insertRule=function(t,o){var i=r.getId(this.ownerNode);return-1!==i&&e({id:i,adds:[{rule:t,index:o}]}),n.apply(this,arguments)};var o=t.CSSStyleSheet.prototype.deleteRule;t.CSSStyleSheet.prototype.deleteRule=function(t){var n=r.getId(this.ownerNode);return-1!==n&&e({id:n,removes:[{index:t}]}),o.apply(this,arguments)};var i={};Te?i.CSSGroupingRule=t.CSSGroupingRule:(xe&&(i.CSSMediaRule=t.CSSMediaRule),Ee&&(i.CSSConditionRule=t.CSSConditionRule),we&&(i.CSSSupportsRule=t.CSSSupportsRule));var a={};return Object.entries(i).forEach((function(t){var n=c(t,2),o=n[0],i=n[1];a[o]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(t,n){var i=r.getId(this.parentStyleSheet.ownerNode);return-1!==i&&e({id:i,adds:[{rule:t,index:u(Oe(this),[n||0])}]}),a[o].insertRule.apply(this,arguments)},i.prototype.deleteRule=function(t){var n=r.getId(this.parentStyleSheet.ownerNode);return-1!==n&&e({id:n,removes:[{index:u(Oe(this),[t])}]}),a[o].deleteRule.apply(this,arguments)}})),function(){t.CSSStyleSheet.prototype.insertRule=n,t.CSSStyleSheet.prototype.deleteRule=o,Object.entries(i).forEach((function(e){var t=c(e,2),r=t[0],n=t[1];n.prototype.insertRule=a[r].insertRule,n.prototype.deleteRule=a[r].deleteRule}))}}(t.styleSheetRuleCb,i,t.mirror),N=function(e,t,r){var n=t.CSSStyleDeclaration.prototype.setProperty;t.CSSStyleDeclaration.prototype.setProperty=function(t,o,i){var a,s,l=r.getId(null===(s=null===(a=this.parentRule)||void 0===a?void 0:a.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==l&&e({id:l,set:{property:t,value:o,priority:i},index:Oe(this.parentRule)}),n.apply(this,arguments)};var o=t.CSSStyleDeclaration.prototype.removeProperty;return t.CSSStyleDeclaration.prototype.removeProperty=function(t){var n,i,a=r.getId(null===(i=null===(n=this.parentRule)||void 0===n?void 0:n.parentStyleSheet)||void 0===i?void 0:i.ownerNode);return-1!==a&&e({id:a,remove:{property:t},index:Oe(this.parentRule)}),o.apply(this,arguments)},function(){t.CSSStyleDeclaration.prototype.setProperty=n,t.CSSStyleDeclaration.prototype.removeProperty=o}}(t.styleDeclarationCb,i,t.mirror),R=t.collectFonts?function(e,t){var r=t.defaultView;if(!r)return function(){};var n=[],o=new WeakMap,i=r.FontFace;r.FontFace=function(e,t,r){var n=new i(e,t,r);return o.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var a=v(t.fonts,"add",(function(t){return function(r){return setTimeout((function(){var t=o.get(r);t&&(e(t),o.delete(r))}),0),t.apply(this,[r])}}));return n.push((function(){r.FontFace=i})),n.push(a),function(){n.forEach((function(e){return e()}))}}(t.fontCb,t.doc):function(){},_=[];try{for(var O=l(t.plugins),A=O.next();!A.done;A=O.next()){var D=A.value;_.push(D.observer(D.callback,i,D.options))}}catch(e){n={error:e}}finally{try{A&&!A.done&&(o=O.return)&&o.call(O)}finally{if(n)throw n.error}}return function(){Se.forEach((function(e){return e.reset()})),b.disconnect(),T(),x(),E(),I(),C(),k(),M(),N(),R(),_.forEach((function(e){return e()}))}}var De=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var r;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(r=this.loadListener)||void 0===r||r.call(this,e)},e}(),Le=function(){function e(e){this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror}return e.prototype.addShadowRoot=function(e,t){Ce(this.mutationCb,t,this.bypassOptions.blockClass,this.bypassOptions.blockSelector,this.bypassOptions.maskTextClass,this.bypassOptions.maskTextSelector,this.bypassOptions.inlineStylesheet,this.bypassOptions.maskInputOptions,this.bypassOptions.maskTextFn,this.bypassOptions.maskInputFn,this.bypassOptions.recordCanvas,this.bypassOptions.slimDOMOptions,this.mirror,this.bypassOptions.iframeManager,this,this.bypassOptions.canvasManager,e,this.bypassOptions.enableStrictPrivacy),Me(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();for(var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pe="undefined"==typeof Uint8Array?[]:new Uint8Array(256),We=0;We<Fe.length;We++)Pe[Fe.charCodeAt(We)]=We;var je=new Map;var ze=function(e,t,r){if(e&&(Ue(e,t)||"object"==typeof e)){var n=function(e,t){var r=je.get(e);return r||(r=new Map,je.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),o=n.indexOf(e);return-1===o&&(o=n.length,n.push(e)),o}};function Be(e,t,r){return e instanceof Array?e.map((function(e){return Be(e,t,r)})):null===e?e: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?{rr_type:e.constructor.name,args:[Object.values(e)]}:e instanceof ArrayBuffer?{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),n=r.length,o="";for(t=0;t<n;t+=3)o+=Fe[r[t]>>2],o+=Fe[(3&r[t])<<4|r[t+1]>>4],o+=Fe[(15&r[t+1])<<2|r[t+2]>>6],o+=Fe[63&r[t+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)}:e instanceof DataView?{rr_type:e.constructor.name,args:[Be(e.buffer,t,r),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?{rr_type:e.constructor.name,src:e.src}:e instanceof ImageData?{rr_type:e.constructor.name,args:[Be(e.data,t,r),e.width,e.height]}:Ue(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:ze(e,t,r)}:e}var Ve=function(e,t,r){return u(e).map((function(e){return Be(e,t,r)}))},Ue=function(e,t){var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(r.find((function(r){return e instanceof t[r]})))};function Ge(e,t,r,n,o,i){var a,s,c=[],d=Object.getOwnPropertyNames(e),p=function(a){try{if("function"!=typeof e[a])return"continue";var s=v(e,a,(function(s){return function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];var d=s.apply(this,l);if(ze(d,i,e),!S(this.canvas,n)){o.getId(this.canvas);var p=Ve(u(l),i,e),f={type:t,property:a,args:p};r(this.canvas,f)}return d}}));c.push(s)}catch(n){var l=m(e,a,{set:function(e){r(this.canvas,{type:t,property:a,args:[e],setter:!0})}});c.push(l)}};try{for(var f=l(d),h=f.next();!h.done;h=f.next()){p(h.value)}}catch(e){a={error:e}}finally{try{h&&!h.done&&(s=f.return)&&s.call(f)}finally{if(a)throw a.error}}return c}var He,Ye,Xe=function(){function e(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(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)},this.mutationCb=e.mutationCb,this.mirror=e.mirror,!0===e.recordCanvas&&this.initCanvasMutationObserver(e.win,e.blockClass)}return e.prototype.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1},e.prototype.initCanvasMutationObserver=function(e,t){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=function(e,t){var r=[];try{var n=v(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return S(this,t)||"__context"in this||(this.__context=r),e.apply(this,u([r],n))}}));r.push(n)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){r.forEach((function(e){return e()}))}}(e,t),n=function(e,t,r,n){var i,a,s=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),d=function(n){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[n])return"continue";var i=v(t.CanvasRenderingContext2D.prototype,n,(function(t){return function(){for(var i=this,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return S(this.canvas,r)||setTimeout((function(){var t=u(a);if("drawImage"===n&&t[0]&&t[0]instanceof HTMLCanvasElement){var r=t[0],s=r.getContext("2d"),l=null==s?void 0:s.getImageData(0,0,r.width,r.height),c=null==l?void 0:l.data;t[0]=JSON.stringify(c)}e(i.canvas,{type:o["2D"],property:n,args:t})}),0),t.apply(this,a)}}));s.push(i)}catch(r){var a=m(t.CanvasRenderingContext2D.prototype,n,{set:function(t){e(this.canvas,{type:o["2D"],property:n,args:[t],setter:!0})}});s.push(a)}};try{for(var p=l(c),f=p.next();!f.done;f=p.next()){d(f.value)}}catch(e){i={error:e}}finally{try{f&&!f.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}return function(){s.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror),i=function(e,t,r,n){var i=[];return i.push.apply(i,u(Ge(t.WebGLRenderingContext.prototype,o.WebGL,e,r,n,t))),void 0!==t.WebGL2RenderingContext&&i.push.apply(i,u(Ge(t.WebGL2RenderingContext.prototype,o.WebGL2,e,r,n,t))),function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror);this.resetObservers=function(){r(),n(),i()}},e.prototype.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.startRAFTimestamping=function(){var e=this,t=function(r){e.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)},e.prototype.flushPendingCanvasMutations=function(){var e=this;this.pendingCanvasMutations.forEach((function(t,r){var n=e.mirror.getId(r);e.flushPendingCanvasMutationFor(r,n)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.flushPendingCanvasMutationFor=function(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var n=r.map((function(e){return e.type,function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["type"])})),o=r[0].type;this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}},e}();function qe(e){return s(s({},e),{timestamp:Date.now()})}var Qe={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function $e(t){void 0===t&&(t={});var r=t.emit,n=t.checkoutEveryNms,o=t.checkoutEveryNth,i=t.blockClass,a=void 0===i?"highlight-block":i,u=t.blockSelector,p=void 0===u?null:u,f=t.ignoreClass,h=void 0===f?"highlight-ignore":f,m=t.maskTextClass,v=void 0===m?"highlight-mask":m,b=t.maskTextSelector,S=void 0===b?null:b,T=t.inlineStylesheet,x=void 0===T||T,w=t.maskAllInputs,I=t.maskInputOptions,C=t.slimDOMOptions,k=t.maskInputFn,N=t.maskTextFn,_=t.hooks,O=t.packFn,A=t.sampling,D=void 0===A?{}:A,L=t.mousemoveWait,F=t.recordCanvas,P=void 0!==F&&F,W=t.userTriggeredOnInput,j=void 0!==W&&W,z=t.collectFonts,B=void 0!==z&&z,V=t.plugins,U=t.keepIframeSrcFn,G=void 0===U?function(){return!1}:U,H=t.enableStrictPrivacy,Y=void 0!==H&&H;if(!r)throw new Error("emit function is required");void 0!==L&&void 0===D.mousemove&&(D.mousemove=L);var X,q=!0===w?{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!==I?I:{password:!0},Q=!0===C||"all"===C?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===C,headMetaDescKeywords:"all"===C}:C||{};E();var $=0;He=function(t,i){var a;if(!(null===(a=Se[0])||void 0===a?void 0:a.isFrozen())||t.type===e.EventType.FullSnapshot||t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.Mutation||Se.forEach((function(e){return e.unfreeze()})),r(function(e){var t,r;try{for(var n=l(V||[]),o=n.next();!o.done;o=n.next()){var i=o.value;i.eventProcessor&&(e=i.eventProcessor(e))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return O&&(e=O(e)),e}(t),i),t.type===e.EventType.FullSnapshot)X=t,$=0;else if(t.type===e.EventType.IncrementalSnapshot){if(t.data.source===e.IncrementalSource.Mutation&&t.data.isAttachIframe)return;$++;var s=o&&$>=o,c=n&&t.timestamp-X.timestamp>n;(s||c)&&Ye(!0)}};var K=function(t){He(qe({type:e.EventType.IncrementalSnapshot,data:s({source:e.IncrementalSource.Mutation},t)}))},J=function(t){return He(qe({type:e.EventType.IncrementalSnapshot,data:s({source:e.IncrementalSource.Scroll},t)}))},Z=function(t){return He(qe({type:e.EventType.IncrementalSnapshot,data:s({source:e.IncrementalSource.CanvasMutation},t)}))},te=new De({mutationCb:K}),re=new Xe({recordCanvas:P,mutationCb:Z,win:window,blockClass:a,mirror:Qe}),ne=new Le({mutationCb:K,scrollCb:J,bypassOptions:{blockClass:a,blockSelector:p,maskTextClass:v,maskTextSelector:S,inlineStylesheet:x,maskInputOptions:q,maskTextFn:N,maskInputFn:k,recordCanvas:P,sampling:D,slimDOMOptions:Q,iframeManager:te,canvasManager:re,enableStrictPrivacy:Y},mirror:Qe});Ye=function(t){var r,n,o,i;void 0===t&&(t=!1),He(qe({type:e.EventType.Meta,data:{href:window.location.href,width:g(),height:y()}}),t),Se.forEach((function(e){return e.lock()}));var s=c(function(e,t){var r=t||{},n=r.blockClass,o=void 0===n?"highlight-block":n,i=r.blockSelector,a=void 0===i?null:i,s=r.maskTextClass,l=void 0===s?"highlight-mask":s,c=r.maskTextSelector,u=void 0===c?null:c,d=r.inlineStylesheet,p=void 0===d||d,f=r.recordCanvas,h=void 0!==f&&f,m=r.maskAllInputs,v=void 0!==m&&m,y=r.maskTextFn,g=r.maskInputFn,b=r.slimDOM,S=void 0!==b&&b,T=r.preserveWhiteSpace,x=r.onSerialize,w=r.onIframeLoad,E=r.iframeLoadTimeout,I=r.keepIframeSrcFn,C=void 0===I?function(){return!1}:I,k=r.enableStrictPrivacy,M={};return[ee(e,{doc:e,map:M,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:!0===v?{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===v?{password:!0}:v,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===S||"all"===S?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===S,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===S?{}:S,recordCanvas:h,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:w,iframeLoadTimeout:E,keepIframeSrcFn:C,enableStrictPrivacy:void 0!==k&&k}),M]}(document,{blockClass:a,blockSelector:p,maskTextClass:v,maskTextSelector:S,inlineStylesheet:x,maskAllInputs:q,maskTextFn:N,slimDOM:Q,recordCanvas:P,enableStrictPrivacy:Y,onSerialize:function(e){M(e)&&te.addIframe(e),R(e)&&ne.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){te.attachIframe(e,t)},keepIframeSrcFn:G}),2),l=s[0],u=s[1];if(!l)return console.warn("Failed to snapshot the document");Qe.map=u,He(qe({type:e.EventType.FullSnapshot,data:{node:l,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(i=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===i?void 0:i.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),Se.forEach((function(e){return e.unlock()}))};try{var oe=[];oe.push(d("DOMContentLoaded",(function(){He(qe({type:e.EventType.DomContentLoaded,data:{}}))})));var ie=function(t){var r;return Ae({mutationCb:K,mousemoveCb:function(t,r){return He(qe({type:e.EventType.IncrementalSnapshot,data:{source:r,positions:t}}))},mouseInteractionCb:function(t){return He(qe({type:e.EventType.IncrementalSnapshot,data:s({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:J,viewportResizeCb:function(t){return He(qe({type:e.EventType.IncrementalSnapshot,data:s({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return He(qe({type:e.EventType.IncrementalSnapshot,data:s({source:e.IncrementalSource.Input},t)}))},mediaInteractionCb:function(t){return He(qe({type:e.EventType.IncrementalSnapshot,data:s({source:e.IncrementalSource.MediaInteraction},t)}))},styleSheetRuleCb:function(t){return He(qe({type:e.EventType.IncrementalSnapshot,data:s({source:e.IncrementalSource.StyleSheetRule},t)}))},styleDeclarationCb:function(t){return He(qe({type:e.EventType.IncrementalSnapshot,data:s({source:e.IncrementalSource.StyleDeclaration},t)}))},canvasMutationCb:Z,fontCb:function(t){return He(qe({type:e.EventType.IncrementalSnapshot,data:s({source:e.IncrementalSource.Font},t)}))},blockClass:a,ignoreClass:h,maskTextClass:v,maskTextSelector:S,maskInputOptions:q,inlineStylesheet:x,sampling:D,recordCanvas:P,userTriggeredOnInput:j,collectFonts:B,doc:t,maskInputFn:k,maskTextFn:N,blockSelector:p,slimDOMOptions:Q,mirror:Qe,iframeManager:te,shadowDomManager:ne,canvasManager:re,plugins:(null===(r=null==V?void 0:V.filter((function(e){return e.observer})))||void 0===r?void 0:r.map((function(t){return{observer:t.observer,options:t.options,callback:function(r){return He(qe({type:e.EventType.Plugin,data:{plugin:t.name,payload:r}}))}}})))||[],enableStrictPrivacy:Y},_)};te.addLoadListener((function(e){oe.push(ie(e.contentDocument))}));var ae=function(){Ye(),oe.push(ie(document))};return"interactive"===document.readyState||"complete"===document.readyState?ae():oe.push(d("load",(function(){He(qe({type:e.EventType.Load,data:{}})),ae()}),window)),function(){oe.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}function Ke(e){return e=e||Object.create(null),{on:function(t,r){(e[t]||(e[t]=[])).push(r)},off:function(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit:function(t,r){(e[t]||[]).slice().map((function(e){e(r)})),(e["*"]||[]).slice().map((function(e){e(t,r)}))}}}$e.addCustomEvent=function(t,r){He&&He(qe({type:e.EventType.Custom,data:{tag:t,payload:r}}))},$e.freezePage=function(){Se.forEach((function(e){return e.freeze()}))},$e.takeFullSnapshot=function(e){if(!Ye)throw new Error("please take full snapshot after start recording");Ye(e)},$e.mirror=Qe;var Je=Object.freeze({__proto__:null,default:Ke});function Ze(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var r,n=e.HTMLElement||e.Element,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||s,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(r=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},n.prototype.scroll=n.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var r=p(this),n=r.getBoundingClientRect(),i=this.getBoundingClientRect();r!==t.body?(h.call(this,r,r.scrollLeft+i.left-n.left,r.scrollTop+i.top-n.top),"fixed"!==e.getComputedStyle(r).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,r){var n=e.getComputedStyle(t,null)["overflow"+r];return"auto"===n||"scroll"===n}function d(e){var t=c(e,"Y")&&u(e,"Y"),r=c(e,"X")&&u(e,"X");return t||r}function p(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function f(t){var r,n,o,a,s=(i()-t.startTime)/468;a=s=s>1?1:s,r=.5*(1-Math.cos(Math.PI*a)),n=t.startX+(t.x-t.startX)*r,o=t.startY+(t.y-t.startY)*r,t.method.call(t.scrollable,n,o),n===t.x&&o===t.y||e.requestAnimationFrame(f.bind(e,t))}function h(r,n,a){var l,c,u,d,p=i();r===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=o.scroll):(l=r,c=r.scrollLeft,u=r.scrollTop,d=s),f({scrollable:l,method:d,startTime:p,startX:c,startY:u,x:n,y:a})}}var et,tt=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.replaceActions=function(e){var t;this.actions.length=0,(t=this.actions).splice.apply(t,u([0,0],e))},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,r=this;this.raf=requestAnimationFrame((function n(){var o=performance.now();for(r.timeOffset+=(o-e)*r.speed,e=o;t.length;){var i=t[0];if(!(r.timeOffset>=i.delay))break;t.shift(),i.doAction()}(t.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(n))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,r=this.actions.length-1;t<=r;){var n=Math.floor((t+r)/2);if(this.actions[n].delay<e.delay)t=n+1;else{if(!(this.actions[n].delay>e.delay))return n+1;r=n-1}}return t},e}();function rt(t,r){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var n=t.data.positions[0].timeOffset,o=t.timestamp+n;return t.delay=o-r,o-r}return t.delay=t.timestamp-r,t.delay}
15
+ ***************************************************************************** */var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function i(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function a(e){return e.nodeType===e.ELEMENT_NODE}function s(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)}function l(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(a=i?i(a):"*".repeat(a.length)),a}!function(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"}(t||(t={}));var c="__rrweb_original__";function u(e){return e=(null==(e=e.replace(/[^ -~]+/g,""))?void 0:e.split(" ").map((function(e){return Math.random().toString(20).substr(2,e.length)})).join(" "))||""}var d,p,f=1,h=new RegExp("[^a-z0-9-_:]");function m(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(v).join(""):null}catch(e){return null}}function v(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=m(e.styleSheet)||t}catch(e){}return t}var y=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,g=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,b=/^(data:)([^,]*),(.*)/i;function S(e,t){return(e||"").replace(y,(function(e,n,r,o,i,a){var s,l=r||i||a,c=n||o||"";if(!l)return e;if(!g.test(l))return"url("+c+l+c+")";if(b.test(l))return"url("+c+l+c+")";if("/"===l[0])return"url("+c+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+l)+c+")";var u=t.split("/"),d=l.split("/");u.pop();for(var p=0,f=d;p<f.length;p++){var h=f[p];"."!==h&&(".."===h?u.pop():u.push(h))}return"url("+c+u.join("/")+c+")"}))}var T=/^[^ \t\n\r\u000c]+/,w=/^[, \t\n\r\u000c]+/;function x(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function E(){var e=document.createElement("a");return e.href="",e.href}function I(e,t,n,r){return"src"===n||"href"===n&&r||"xlink:href"===n&&r&&"#"!==r[0]?x(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(w),!(n>=t.length);){var i=r(T);if(","===i.slice(-1))i=x(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=x(e,i);for(var s=!1;;){var l=t.charAt(n);if(""===l){o.push((i+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){n+=1,o.push((i+a).trim());break}"("===l&&(s=!0)}a+=l,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?S(r,E()):"object"===t&&"data"===n&&r?x(e,r):r:x(e,r)}function C(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!(!n||!e.matches(n))||C(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,C(e.parentNode,t,n)}function M(e,n){var r,o,i,a,s=n.doc,f=n.blockClass,v=n.blockSelector,y=n.maskTextClass,g=n.maskTextSelector,b=n.inlineStylesheet,T=n.maskInputOptions,w=void 0===T?{}:T,x=n.maskTextFn,M=n.maskInputFn,k=n.dataURLOptions,N=void 0===k?{}:k,R=n.inlineImages,_=n.recordCanvas,A=n.keepIframeSrcFn,O=n.enableStrictPrivacy;if(s.__sn){var D=s.__sn.id;o=1===D?void 0:D}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:t.Document,childNodes:[],compatMode:e.compatMode,rootId:o}:{type:t.Document,childNodes:[],rootId:o};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:o};case e.ELEMENT_NODE:for(var L=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!!n&&e.matches(n)}(e,f,v),P=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return h.test(t)?"div":t}(e),F={},W=0,j=Array.from(e.attributes);W<j.length;W++){var U=j[W],z=U.name,B=U.value;F[z]=I(s,P,z,B)}if("link"===P&&b){var V=Array.from(s.styleSheets).find((function(t){return t.href===e.href})),H=null;V&&(H=m(V)),H&&(delete F.rel,delete F.href,F._cssText=S(H,V.href))}if("style"===P&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(H=m(e.sheet))&&(F._cssText=S(H,E()));if("input"===P||"textarea"===P||"select"===P){B=e.value;"radio"!==F.type&&"checkbox"!==F.type&&"submit"!==F.type&&"button"!==F.type&&B?F.value=l({type:F.type,tagName:P,value:B,maskInputOptions:w,maskInputFn:M}):e.checked&&(F.checked=e.checked)}if("option"===P&&(e.selected&&!w.select?F.selected=!0:delete F.selected),"canvas"===P&&_)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var o=t.getImageData,i=c in o?o.__rrweb_original__:o;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(F.rr_dataURL=e.toDataURL(N.type,N.quality));else if(!("__context"in e)){var G=e.toDataURL(N.type,N.quality),Y=document.createElement("canvas");Y.width=e.width,Y.height=e.height,G!==Y.toDataURL(N.type,N.quality)&&(F.rr_dataURL=G)}if("img"===P&&R){d||(d=s.createElement("canvas"),p=d.getContext("2d"));var X=e,q=X.crossOrigin;X.crossOrigin="anonymous";var Q=function(){try{d.width=X.naturalWidth,d.height=X.naturalHeight,p.drawImage(X,0,0),F.rr_dataURL=d.toDataURL(N.type,N.quality)}catch(e){console.warn("Cannot inline img src="+X.currentSrc+"! Error: "+e)}q?F.crossOrigin=q:delete F.crossOrigin};X.complete&&0!==X.naturalWidth?Q():X.onload=Q}if("audio"!==P&&"video"!==P||(F.rr_mediaState=e.paused?"paused":"played",F.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(F.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(F.rr_scrollTop=e.scrollTop),L||"img"===P&&O){var $=e.getBoundingClientRect(),K=$.width,J=$.height;F={class:F.class,rr_width:K+"px",rr_height:J+"px"},L=!0}return"iframe"!==P||A(F.src)||(e.contentDocument||(F.rr_src=F.src),delete F.src),{type:t.Element,tagName:P,attributes:F,childNodes:[],isSVG:(a=e,Boolean("svg"===a.tagName||a.ownerSVGElement)||void 0),needBlock:L,rootId:o};case e.TEXT_NODE:var Z=e.parentNode&&e.parentNode.tagName,ee=e.textContent,te="STYLE"===Z||void 0,ne="SCRIPT"===Z||void 0,re=!1;if(te&&ee){try{e.nextSibling||e.previousSibling||(null===(r=e.parentNode.sheet)||void 0===r?void 0:r.cssRules)&&(ee=(i=e.parentNode.sheet).cssRules?Array.from(i.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}ee=S(ee,E()),re=!0}if(ne?(ee="SCRIPT_PLACEHOLDER",re=!0):"NOSCRIPT"===Z&&(ee="",re=!0),!te&&!ne&&C(e,y,g)&&ee&&(ee=x?x(ee):ee.replace(/[\S]/g,"*")),O&&!re&&Z)!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(Z)&&ee&&(ee=u(ee));return{type:t.Text,textContent:ee||"",isStyle:te,rootId:o};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:"",rootId:o};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||"",rootId:o};default:return!1}}function k(e){return void 0===e?"":e.toLowerCase()}function N(e,n){var r,o=n.doc,i=n.map,l=n.blockClass,c=n.blockSelector,u=n.maskTextClass,d=n.maskTextSelector,p=n.skipChild,h=void 0!==p&&p,m=n.inlineStylesheet,v=void 0===m||m,y=n.maskInputOptions,g=void 0===y?{}:y,b=n.maskTextFn,S=n.maskInputFn,T=n.slimDOMOptions,w=n.dataURLOptions,x=void 0===w?{}:w,E=n.inlineImages,I=void 0!==E&&E,C=n.recordCanvas,R=void 0!==C&&C,_=n.onSerialize,A=n.onIframeLoad,O=n.iframeLoadTimeout,D=void 0===O?5e3:O,L=n.keepIframeSrcFn,P=void 0===L?function(){return!1}:L,F=n.enableStrictPrivacy,W=n.preserveWhiteSpace,j=void 0===W||W,U=M(e,{doc:o,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:d,inlineStylesheet:v,maskInputOptions:g,maskTextFn:b,maskInputFn:S,dataURLOptions:x,inlineImages:I,recordCanvas:R,keepIframeSrcFn:P,enableStrictPrivacy:F});if(!U)return console.warn(e,"not serialized"),null;r="__sn"in e?e.__sn.id:!function(e,n){if(n.comment&&e.type===t.Comment)return!0;if(e.type===t.Element){if(n.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(n.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(k(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===k(e.attributes.name)||"icon"===k(e.attributes.rel)||"apple-touch-icon"===k(e.attributes.rel)||"shortcut icon"===k(e.attributes.rel))))return!0;if("meta"===e.tagName){if(n.headMetaDescKeywords&&k(e.attributes.name).match(/^description|keywords$/))return!0;if(n.headMetaSocial&&(k(e.attributes.property).match(/^(og|twitter|fb):/)||k(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===k(e.attributes.name)))return!0;if(n.headMetaRobots&&("robots"===k(e.attributes.name)||"googlebot"===k(e.attributes.name)||"bingbot"===k(e.attributes.name)))return!0;if(n.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(n.headMetaAuthorship&&("author"===k(e.attributes.name)||"generator"===k(e.attributes.name)||"framework"===k(e.attributes.name)||"publisher"===k(e.attributes.name)||"progid"===k(e.attributes.name)||k(e.attributes.property).match(/^article:/)||k(e.attributes.property).match(/^product:/)))return!0;if(n.headMetaVerification&&("google-site-verification"===k(e.attributes.name)||"yandex-verification"===k(e.attributes.name)||"csrf-token"===k(e.attributes.name)||"p:domain_verify"===k(e.attributes.name)||"verify-v1"===k(e.attributes.name)||"verification"===k(e.attributes.name)||"shopify-checkout-api-token"===k(e.attributes.name)))return!0}}return!1}(U,T)&&(j||U.type!==t.Text||U.isStyle||U.textContent.replace(/^\s+|\s+$/gm,"").length)?f++:-2;var z=Object.assign(U,{id:r});if(e.__sn=z,-2===r)return null;i[r]=e,_&&_(e);var B=!h;if(z.type===t.Element){if(B=B&&!z.needBlock,z.needBlock&&"img"===z.tagName){var V=e.cloneNode();V.src="",i[r]=V}delete z.needBlock,e.shadowRoot&&(z.isShadowHost=!0)}if((z.type===t.Document||z.type===t.Element)&&B){T.headWhitespace&&U.type===t.Element&&"head"===U.tagName&&(j=!1);for(var H={doc:o,map:i,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:d,skipChild:h,inlineStylesheet:v,maskInputOptions:g,maskTextFn:b,maskInputFn:S,slimDOMOptions:T,dataURLOptions:x,inlineImages:I,recordCanvas:R,preserveWhiteSpace:j,onSerialize:_,onIframeLoad:A,iframeLoadTimeout:D,keepIframeSrcFn:P,enableStrictPrivacy:F},G=0,Y=Array.from(e.childNodes);G<Y.length;G++){(Q=N(Y[G],H))&&z.childNodes.push(Q)}if(a(e)&&e.shadowRoot)for(var X=0,q=Array.from(e.shadowRoot.childNodes);X<q.length;X++){var Q;(Q=N(q[X],H))&&(Q.isShadow=!0,z.childNodes.push(Q))}}return e.parentNode&&s(e.parentNode)&&(z.isShadow=!0),z.type===t.Element&&"iframe"===z.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){var a="about:blank";r.location.href===a&&e.src!==a&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var s=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),i=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&A){var n=N(t,{doc:t,map:i,blockClass:l,blockSelector:c,maskTextClass:u,maskTextSelector:d,skipChild:!1,inlineStylesheet:v,maskInputOptions:g,maskTextFn:b,maskInputFn:S,slimDOMOptions:T,dataURLOptions:x,inlineImages:I,recordCanvas:R,preserveWhiteSpace:j,onSerialize:_,onIframeLoad:A,iframeLoadTimeout:D,keepIframeSrcFn:P,enableStrictPrivacy:F});n&&A(e,n)}}),D),z}var R=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function _(e,t){void 0===t&&(t={});var n=1,r=1;function o(e){var t=e.match(/\n/g);t&&(n+=t.length);var o=e.lastIndexOf("\n");r=-1===o?r+e.length:e.length-o}function i(){var e={line:n,column:r};return function(t){return t.position=new a(e),f(),t}}var a=function(e){this.start=e,this.end={line:n,column:r},this.source=t.source};a.prototype.content=e;var s=[];function l(o){var i=new Error(t.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=t.source,i.line=n,i.column=r,i.source=e,!t.silent)throw i;s.push(i)}function c(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,n=[];for(f(),h(n);e.length&&"}"!==e.charAt(0)&&(t=I()||C());)!1!==t&&(n.push(t),h(n));return n}function p(t){var n=t.exec(e);if(n){var r=n[0];return o(r),e=e.slice(r.length),n}}function f(){p(/^\s*/)}function h(e){var t;for(void 0===e&&(e=[]);t=m();)!1!==t&&e.push(t),t=m();return e}function m(){var t=i();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return l("End of comment missing");var a=e.slice(2,n-2);return r+=2,o(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function v(){var e=p(/^([^{]+)/);if(e)return A(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"‌")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function y(){var e=i(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=A(t[0]);if(!p(/^:\s*/))return l("property missing ':'");var r=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),o=e({type:"declaration",property:n.replace(R,""),value:r?A(r[0]).replace(R,""):""});return p(/^[;\s]*/),o}}function g(){var e,t=[];if(!c())return l("missing '{'");for(h(t);e=y();)!1!==e&&(t.push(e),h(t)),e=y();return u()?t:l("missing '}'")}function b(){for(var e,t=[],n=i();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:g()})}var S,T=E("import"),w=E("charset"),x=E("namespace");function E(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=i(),r=p(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function I(){if("@"===e[0])return function(){var e=i(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return l("@keyframes missing name");var r,o=t[1];if(!c())return l("@keyframes missing '{'");for(var a=h();r=b();)a.push(r),a=a.concat(h());return u()?e({type:"keyframes",name:o,vendor:n,keyframes:a}):l("@keyframes missing '}'")}}()||function(){var e=i(),t=p(/^@media *([^{]+)/);if(t){var n=A(t[1]);if(!c())return l("@media missing '{'");var r=h().concat(d());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=i(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:A(t[1]),media:A(t[2])})}()||function(){var e=i(),t=p(/^@supports *([^{]+)/);if(t){var n=A(t[1]);if(!c())return l("@supports missing '{'");var r=h().concat(d());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||T()||w()||x()||function(){var e=i(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=A(t[1]),r=A(t[2]);if(!c())return l("@document missing '{'");var o=h().concat(d());return u()?e({type:"document",document:r,vendor:n,rules:o}):l("@document missing '}'")}}()||function(){var e=i();if(p(/^@page */)){var t=v()||[];if(!c())return l("@page missing '{'");for(var n,r=h();n=y();)r.push(n),r=r.concat(h());return u()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=i();if(p(/^@host\s*/)){if(!c())return l("@host missing '{'");var t=h().concat(d());return u()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=i();if(p(/^@font-face\s*/)){if(!c())return l("@font-face missing '{'");for(var t,n=h();t=y();)n.push(t),n=n.concat(h());return u()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}function C(){var e=i(),t=v();return t?(h(),e({type:"rule",selectors:t,declarations:g()})):l("selector missing")}return O((S=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:S,parsingErrors:s}}))}function A(e){return e?e.replace(/^\s+|\s+$/g,""):""}function O(e,t){for(var n=e&&"string"==typeof e.type,r=n?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=e[i[o]];Array.isArray(a)?a.forEach((function(e){O(e,r)})):a&&"object"==typeof a&&O(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var D={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var L,P,F,W,j,U,z=/([^\\]):hover/,B=new RegExp(z.source,"g");function V(e,t){var n;if(!(null===(n=window.HIG_CONFIGURATION)||void 0===n?void 0:n.enableOnHoverClass))return e;var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var o=_(e,{silent:!0});if(!o.stylesheet)return e;var i=[];if(o.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){z.test(e)&&i.push(e)}))})),0===i.length)return e;var a=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),s=e.replace(a,(function(e){var t=e.replace(B,"$1.\\:hover");return e+", "+t}));return null==t||t.stylesWithHoverClass.set(e,s),s}function H(){return{stylesWithHoverClass:new Map}}function G(e,n){var r=n.doc,o=n.hackCss,i=n.cache;switch(e.type){case t.Document:return r.implementation.createDocument(null,"",null);case t.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case t.Element:var a,s=function(e){var t=D[e.tagName]?D[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);a=e.isSVG?r.createElementNS("http://www.w3.org/2000/svg",s):r.createElement(s);var l=function(t){if(!e.attributes.hasOwnProperty(t))return"continue";var n=e.attributes[t];if("option"===s&&"selected"===t&&!1===n)return"continue";if(n="boolean"==typeof n||"number"==typeof n?"":n,t.startsWith("rr_")){if("canvas"===s&&"rr_dataURL"===t){var l=document.createElement("img");l.src=n,l.onload=function(){var e=a.getContext("2d");e&&e.drawImage(l,0,0,l.width,l.height)}}else if("img"===s&&"rr_dataURL"===t){var c=a;c.currentSrc.startsWith("data:")||(c.setAttribute("rrweb-original-src",e.attributes.src),c.src=n)}if("rr_width"===t)a.style.width=n;else if("rr_height"===t)a.style.height=n;else if("rr_mediaCurrentTime"===t)a.currentTime=e.attributes.rr_mediaCurrentTime;else if("rr_mediaState"===t)switch(n){case"played":a.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":a.pause()}}else{var u="textarea"===s&&"value"===t,d="style"===s&&"_cssText"===t;if(d&&o&&"string"==typeof(n=V(n,i))){for(var p=/url\(\"https:\/\/\S*(.eot|.woff2|.ttf|.woff)\S*\"\)/gm,f=void 0,h=[];null!==(f=p.exec(n));)f.index===p.lastIndex&&p.lastIndex++,f.forEach((function(e,t){if(0===t){var n=e.slice(5,e.length-2);h.push({originalUrl:n,proxyUrl:n.replace(n,"https://replay-cors-proxy.highlightrun.workers.dev?url="+n)})}}));h.forEach((function(e){n=n.replace(e.originalUrl,e.proxyUrl)}))}if(u||d){for(var m=r.createTextNode(n),v=0,y=Array.from(a.childNodes);v<y.length;v++){var g=y[v];g.nodeType===a.TEXT_NODE&&a.removeChild(g)}return a.appendChild(m),"continue"}try{if(e.isSVG&&"xlink:href"===t)a.setAttributeNS("http://www.w3.org/1999/xlink",t,n);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))a.setAttribute("_"+t,n);else{if("meta"===s&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===t)return a.setAttribute("csp-content",n),"continue";"link"===s&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===s&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")||("img"===s&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(t,n))}}catch(e){}}};for(var c in e.attributes)l(c);if(e.isShadowHost)if(a.shadowRoot)for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);else a.attachShadow({mode:"open"});return a;case t.Text:return r.createTextNode(e.isStyle&&o?V(e.textContent,i):e.textContent);case t.CDATA:return r.createCDATASection(e.textContent);case t.Comment:return r.createComment(e.textContent);default:return null}}function Y(e,n){var r=n.doc,o=n.map,i=n.skipChild,s=void 0!==i&&i,l=n.hackCss,c=void 0===l||l,u=n.afterAppend,d=n.cache,p=G(e,{doc:r,hackCss:c,cache:d});if(!p)return null;if(e.rootId&&console.assert(o[e.rootId]===r,"Target document should has the same root id."),e.type===t.Document&&(r.close(),r.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==t.DocumentType&&(e.childNodes[0].type===t.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),p=r),p.__sn=e,o[e.id]=p,(e.type===t.Document||e.type===t.Element)&&!s)for(var f=0,h=e.childNodes;f<h.length;f++){var m=h[f],v=Y(m,{doc:r,map:o,skipChild:!1,hackCss:c,afterAppend:u,cache:d});v?(m.isShadow&&a(p)&&p.shadowRoot?p.shadowRoot.appendChild(v):p.appendChild(v),u&&u(v)):console.warn("Failed to rebuild",m)}return p}function X(e,n){var r=n.doc,o=n.onVisit,i=n.hackCss,a={},s=Y(e,{doc:r,map:a,skipChild:!1,hackCss:void 0===i||i,afterAppend:n.afterAppend,cache:n.cache});return function(e,t){for(var n in e)e[n]&&(r=e[n],t(r));var r}(a,(function(e){o&&o(e),function(e){var n=e.__sn;if(n.type===t.Element){var r=e;for(var o in n.attributes)if(n.attributes.hasOwnProperty(o)&&o.startsWith("rr_")){var i=n.attributes[o];"rr_scrollLeft"===o&&(r.scrollLeft=i),"rr_scrollTop"===o&&(r.scrollTop=i)}}}(e)})),[s,a]}function q(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}function Q(){return{map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}}}e.EventType=void 0,(L=e.EventType||(e.EventType={}))[L.DomContentLoaded=0]="DomContentLoaded",L[L.Load=1]="Load",L[L.FullSnapshot=2]="FullSnapshot",L[L.IncrementalSnapshot=3]="IncrementalSnapshot",L[L.Meta=4]="Meta",L[L.Custom=5]="Custom",L[L.Plugin=6]="Plugin",e.IncrementalSource=void 0,(P=e.IncrementalSource||(e.IncrementalSource={}))[P.Mutation=0]="Mutation",P[P.MouseMove=1]="MouseMove",P[P.MouseInteraction=2]="MouseInteraction",P[P.Scroll=3]="Scroll",P[P.ViewportResize=4]="ViewportResize",P[P.Input=5]="Input",P[P.TouchMove=6]="TouchMove",P[P.MediaInteraction=7]="MediaInteraction",P[P.StyleSheetRule=8]="StyleSheetRule",P[P.CanvasMutation=9]="CanvasMutation",P[P.Font=10]="Font",P[P.Log=11]="Log",P[P.Drag=12]="Drag",P[P.StyleDeclaration=13]="StyleDeclaration",e.MouseInteractions=void 0,(F=e.MouseInteractions||(e.MouseInteractions={}))[F.MouseUp=0]="MouseUp",F[F.MouseDown=1]="MouseDown",F[F.Click=2]="Click",F[F.ContextMenu=3]="ContextMenu",F[F.DblClick=4]="DblClick",F[F.Focus=5]="Focus",F[F.Blur=6]="Blur",F[F.TouchStart=7]="TouchStart",F[F.TouchMove_Departed=8]="TouchMove_Departed",F[F.TouchEnd=9]="TouchEnd",F[F.TouchCancel=10]="TouchCancel",function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(W||(W={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange"}(j||(j={})),e.ReplayerEvents=void 0,(U=e.ReplayerEvents||(e.ReplayerEvents={})).Start="start",U.Pause="pause",U.Resume="resume",U.Resize="resize",U.Finish="finish",U.FullsnapshotRebuilded="fullsnapshot-rebuilded",U.LoadStylesheetStart="load-stylesheet-start",U.LoadStylesheetEnd="load-stylesheet-end",U.SkipStart="skip-start",U.SkipEnd="skip-end",U.MouseInteraction="mouse-interaction",U.EventCast="event-cast",U.CustomEvent="custom-event",U.Flush="flush",U.StateChange="state-change",U.PlayBack="play-back";var $="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.";function K(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),l=this,c=arguments;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(l,c)):r||!1===n.trailing||(r=setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(l,c)}),s))}}function J(e,t,n,r,o){void 0===o&&(o=window);var i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),i&&i.set&&i.set.call(this,e)}}),function(){return J(e,t,i||{},!0)}}function Z(e,t,n){try{if(!(t in e))return function(){};var r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,function(){e[t]=r}}catch(e){return function(){}}}function ee(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function te(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}e.mirror={map:{},getId:function(){return console.error($),-1},getNode:function(){return console.error($),null},removeNodeFromMap:function(){console.error($)},has:function(){return console.error($),!1},reset:function(){console.error($)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(e.mirror=new Proxy(e.mirror,{get:function(e,t,n){return"map"===t&&console.error($),Reflect.get(e,t,n)}}));var ne=function(e){try{if(e instanceof HTMLElement)return"CANVAS"===e.tagName}catch(e){return!1}return!1};function re(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;if("string"==typeof t){if(void 0!==e.closest)return null!==e.closest("."+t);n=e.classList.contains(t)}else e.classList.forEach((function(e){t.test(e)&&(n=!0)}));return n||re(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,re(e.parentNode,t)}function oe(e){return"__sn"in e&&-2===e.__sn.id}function ie(e,t){if(s(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||ie(e.parentNode,t))}function ae(e){return Boolean(e.changedTouches)}function se(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}var le=function(){function t(){this.reset()}return t.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},t.prototype.remove=function(e,t){var n=this,r=this.indexes.get(e.parentId),o=this.indexes.get(e.id),i=function(e){n.removeIdSet.add(e);var r=t.getNode(e);null==r||r.childNodes.forEach((function(e){"__sn"in e&&i(e.__sn.id)}))},a=function(t){n.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var r=n.indexes.get(t.id);if(r){var o=r.parent;o&&(delete r.parent,delete o.children[r.id],n.indexes.delete(e.id))}};o?r?(delete o.parent,delete r.children[o.id],this.indexes.delete(e.id),a(o)):(delete this.tree[o.id],this.indexes.delete(o.id),a(o)):(this.removeNodeMutations.push(e),i(e.id))},t.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},t.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},t.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},t.prototype.input=function(e){this.inputMap.set(e.id,e)},t.prototype.flush=function(){var t,n,o,i,a=this,s=this,l=s.tree,c=s.removeNodeMutations,u=s.textMutations,d=s.attributeMutations,p={source:e.IncrementalSource.Mutation,removes:c,texts:u,attributes:d,adds:[]},f=function(e,t){t&&a.removeIdSet.add(e.id),p.texts=p.texts.concat(t?[]:e.texts).filter((function(e){return!a.removeIdSet.has(e.id)})),p.attributes=p.attributes.concat(t?[]:e.attributes).filter((function(e){return!a.removeIdSet.has(e.id)})),a.removeIdSet.has(e.id)||a.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(p.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(l).forEach((function(e){return f(e,!1)}));try{for(var h=r(this.scrollMap.keys()),m=h.next();!m.done;m=h.next()){var v=m.value;this.removeIdSet.has(v)&&this.scrollMap.delete(v)}}catch(e){t={error:e}}finally{try{m&&!m.done&&(n=h.return)&&n.call(h)}finally{if(t)throw t.error}}try{for(var y=r(this.inputMap.keys()),g=y.next();!g.done;g=y.next()){v=g.value;this.removeIdSet.has(v)&&this.inputMap.delete(v)}}catch(e){o={error:e}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(o)throw o.error}}var b=new Map(this.scrollMap),S=new Map(this.inputMap);return this.reset(),{mutationData:p,scrollMap:b,inputMap:S}},t.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},t.prototype.idRemoved=function(e){return this.removeIdSet.has(e)},t}();function ce(e){var t,n,o={},i=function(e,t){var n={value:e,parent:t,children:[]};return o[e.node.id]=n,n},a=[];try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var c=l.value,u=c.nextId,d=c.parentId;if(u&&u in o){var p=o[u];if(p.parent){var f=p.parent.children.indexOf(p);p.parent.children.splice(f,0,i(c,p.parent))}else{f=a.indexOf(p);a.splice(f,0,i(c,null))}}else if(d in o){var h=o[d];h.children.push(i(c,h))}else a.push(i(c,null))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a}function ue(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)ue(e.children[n],t)}function de(e){return"__sn"in e&&(e.__sn.type===t.Element&&"iframe"===e.__sn.tagName)}function pe(e,t){var n,r,o=null===(r=null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.frameElement;if(!o||o===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var i=o.getBoundingClientRect(),a=pe(o,t),s=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function fe(e){return Boolean(null==e?void 0:e.shadowRoot)}var he=Object.freeze({__proto__:null,on:q,createMirror:Q,get _mirror(){return e.mirror},throttle:K,hookSetter:J,patch:Z,getWindowHeight:ee,getWindowWidth:te,isCanvasNode:ne,isBlocked:re,isIgnored:oe,isAncestorRemoved:ie,isTouchEvent:ae,polyfill:se,TreeIndex:le,queueToResolveTrees:ce,iterateResolveTree:ue,isIframeINode:de,getBaseDimension:pe,hasShadowRoot:fe});function me(e){return"__ln"in e}var ve=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&me(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&me(e.nextSibling)&&e.nextSibling.__ln.previous){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),ye=function(e,t){return"".concat(e,"@").concat(t)};function ge(e){return"__sn"in e}var be=function(){function e(){var e=this;this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,n,o,i;if(!e.frozen&&!e.locked){for(var a=[],l=new ve,c=function(t){for(var n=t,r=-2;-2===r;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return r},d=function(t){for(var n,r,o,i,u,d=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,p=d;null===(o=null===(r=null==p?void 0:p.getRootNode)||void 0===r?void 0:r.call(p))||void 0===o?void 0:o.host;)p=(null===(u=null===(i=null==p?void 0:p.getRootNode)||void 0===i?void 0:i.call(p))||void 0===u?void 0:u.host)||null;var f=!(e.doc.contains(t)||null!==p&&e.doc.contains(p));if(t.parentNode&&!f){var h=s(t.parentNode)?e.mirror.getId(d):e.mirror.getId(t.parentNode),m=c(t);if(-1===h||-1===m)return l.addNode(t);var v=N(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,inlineImages:e.inlineImages,enableStrictPrivacy:e.enableStrictPrivacy,onSerialize:function(n){de(n)&&e.iframeManager.addIframe(n),fe(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n),e.shadowDomManager.observeAttachShadow(t)}});v&&a.push({parentId:h,nextId:m,node:v})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var p=r(e.movedSet),f=p.next();!f.done;f=p.next()){var h=f.value;Te(e.removes,h,e.mirror)&&!e.movedSet.has(h.parentNode)||d(h)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{for(var m=r(e.addedSet),v=m.next();!v.done;v=m.next()){h=v.value;we(e.droppedSet,h)||Te(e.removes,h,e.mirror)?we(e.movedSet,h)?d(h):e.droppedSet.add(h):d(h)}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}for(var y=null;l.length;){var g=null;if(y){var b=e.mirror.getId(y.value.parentNode),S=c(y.value);-1!==b&&-1!==S&&(g=y)}if(!g)for(var T=l.length-1;T>=0;T--){var w=l.get(T);if(w){b=e.mirror.getId(w.value.parentNode),S=c(w.value);if(-1!==b&&-1!==S){g=w;break}}}if(!g){for(;l.head;)l.removeNode(l.head.value);break}y=g.previous,l.removeNode(g.value),d(g.value)}var x={texts:e.texts.map((function(t){var n=t.value;return e.enableStrictPrivacy&&n&&(n=u(n)),{id:e.mirror.getId(t.node),value:n}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:a};(x.texts.length||x.attributes.length||x.removes.length||x.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.mutationCb(x))}},this.processMutation=function(t){var n,o,i,a;if(!oe(t.target))switch(t.type){case"characterData":var c=t.target.textContent;re(t.target,e.blockClass)||c===t.oldValue||e.texts.push({value:C(t.target,e.maskTextClass,e.maskTextSelector)&&c?e.maskTextFn?e.maskTextFn(c):c.replace(/[\S]/g,"*"):c,node:t.target});break;case"attributes":var u=t.target;c=t.target.getAttribute(t.attributeName);if("value"===t.attributeName&&(c=l({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:c,maskInputFn:e.maskInputFn})),re(t.target,e.blockClass)||c===t.oldValue)return;var d=e.attributes.find((function(e){return e.node===t.target}));if(d||(d={node:t.target,attributes:{}},e.attributes.push(d)),"style"===t.attributeName){var p=e.doc.createElement("span");t.oldValue&&p.setAttribute("style",t.oldValue),void 0!==d.attributes.style&&null!==d.attributes.style||(d.attributes.style={});var f=d.attributes.style;try{for(var h=r(Array.from(u.style)),m=h.next();!m.done;m=h.next()){var v=m.value,y=u.style.getPropertyValue(v),g=u.style.getPropertyPriority(v);y===p.style.getPropertyValue(v)&&g===p.style.getPropertyPriority(v)||(f[v]=""===g?y:[y,g])}}catch(e){n={error:e}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}try{for(var b=r(Array.from(p.style)),S=b.next();!S.done;S=b.next()){v=S.value;""===u.style.getPropertyValue(v)&&(f[v]=!1)}}catch(e){i={error:e}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}}else{if("INPUT"===t.target.tagName){var T=t.target;if("password"===T.type){d.attributes.value="*".repeat(T.value.length);break}}d.attributes[t.attributeName]=I(e.doc,t.target.tagName,t.attributeName,c)}break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var r=e.mirror.getId(n),o=s(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);re(t.target,e.blockClass)||oe(n)||(e.addedSet.has(n)?(Se(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||ie(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[ye(r,o)]?Se(e.movedSet,n):e.removes.push({parentId:o,id:r,isShadow:!!s(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!n||!re(n,e.blockClass)){if(ge(t)){if(oe(t))return;e.movedSet.add(t);var r=null;n&&ge(n)&&(r=n.__sn.id),r&&(e.movedMap[ye(t.__sn.id,r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);re(t,e.blockClass)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach((function(n){t[n]=e[n]}))},e.prototype.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},e.prototype.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0,this.canvasManager.lock()},e.prototype.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},e.prototype.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},e}();function Se(e,t){e.delete(t),t.childNodes.forEach((function(t){return Se(e,t)}))}function Te(e,t,n){var r=t.parentNode;if(!r)return!1;var o=n.getId(r);return!!e.some((function(e){return e.id===o}))||Te(e,r,n)}function we(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||we(e,n))}var xe=[],Ee="undefined"!=typeof CSSGroupingRule,Ie="undefined"!=typeof CSSMediaRule,Ce="undefined"!=typeof CSSSupportsRule,Me="undefined"!=typeof CSSConditionRule;function ke(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function Ne(e,t){var n,r,o=new be;xe.push(o),o.init(e);var i=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);var s=new i(o.processMutations.bind(o));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Re(t){var n=t.mouseInteractionCb,r=t.doc,o=t.mirror,i=t.blockClass,a=t.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,l=[];return Object.keys(e.MouseInteractions).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(t){var a=t.toLowerCase(),s=function(t){return function(r){var a=ke(r);if(!re(a,i)&&!ne(a)){var s=ae(r)?r.changedTouches[0]:r;if(s){var l=o.getId(a),c=s.clientX,u=s.clientY;n({type:e.MouseInteractions[t],id:l,x:c,y:u})}}}}(t);l.push(q(a,s,r))})),function(){l.forEach((function(e){return e()}))}}function _e(e){var t=e.scrollCb,n=e.doc,r=e.mirror,o=e.blockClass;return q("scroll",K((function(e){var i=ke(e);if(i&&!re(i,o)){var a=r.getId(i);if(i===n){var s=n.scrollingElement||n.documentElement;t({id:a,x:s.scrollLeft,y:s.scrollTop})}else t({id:a,x:i.scrollLeft,y:i.scrollTop})}}),e.sampling.scroll||100),n)}function Ae(e,t){var r=n({},e);return t||delete r.userTriggered,r}var Oe=["INPUT","TEXTAREA","SELECT"],De=new WeakMap;function Le(e){return function(e,t){if(Ee&&e.parentRule instanceof CSSGroupingRule||Ie&&e.parentRule instanceof CSSMediaRule||Ce&&e.parentRule instanceof CSSSupportsRule||Me&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else{n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Pe(t,a){var s,c;void 0===a&&(a={});var u=t.doc.defaultView;if(!u)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,a=e.mouseInteractionCb,s=e.scrollCb,l=e.viewportResizeCb,c=e.inputCb,u=e.mediaInteractionCb,d=e.styleSheetRuleCb,p=e.styleDeclarationCb,f=e.canvasMutationCb,h=e.fontCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,i([],o(e),!1)),n.apply(void 0,i([],o(e),!1))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,i([],o(e),!1)),r.apply(void 0,i([],o(e),!1))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,i([],o(e),!1)),a.apply(void 0,i([],o(e),!1))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,i([],o(e),!1)),s.apply(void 0,i([],o(e),!1))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,i([],o(e),!1)),l.apply(void 0,i([],o(e),!1))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,i([],o(e),!1)),c.apply(void 0,i([],o(e),!1))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,i([],o(e),!1)),u.apply(void 0,i([],o(e),!1))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,i([],o(e),!1)),d.apply(void 0,i([],o(e),!1))},e.styleDeclarationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleDeclaration&&t.styleDeclaration.apply(t,i([],o(e),!1)),p.apply(void 0,i([],o(e),!1))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,i([],o(e),!1)),f.apply(void 0,i([],o(e),!1))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,i([],o(e),!1)),h.apply(void 0,i([],o(e),!1))}}(t,a);var d=Ne(t,t.doc),p=function(t){var n=t.mousemoveCb,r=t.sampling,o=t.doc,i=t.mirror;if(!1===r.mousemove)return function(){};var a,s="number"==typeof r.mousemove?r.mousemove:50,l="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,c=[],u=K((function(e){var t=Date.now()-a;n(c.map((function(e){return e.timeOffset-=t,e})),e),c=[],a=null}),l),d=K((function(t){var n=ke(t),r=ae(t)?t.changedTouches[0]:t,o=r.clientX,s=r.clientY;a||(a=Date.now()),c.push({x:o,y:s,id:i.getId(n),timeOffset:Date.now()-a}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?e.IncrementalSource.Drag:t instanceof MouseEvent?e.IncrementalSource.MouseMove:e.IncrementalSource.TouchMove)}),s,{trailing:!1}),p=[q("mousemove",d,o),q("touchmove",d,o),q("drag",d,o)];return function(){p.forEach((function(e){return e()}))}}(t),f=Re(t),h=_e(t),m=function(e){var t=e.viewportResizeCb,n=-1,r=-1;return q("resize",K((function(){var e=ee(),o=te();n===e&&r===o||(t({width:Number(o),height:Number(e)}),n=e,r=o)}),200),window)}(t),v=function(e){var t=e.inputCb,r=e.doc,a=e.mirror,s=e.blockClass,c=e.ignoreClass,u=e.maskInputOptions,d=e.maskInputFn,p=e.sampling,f=e.userTriggeredOnInput;function h(e){var t=ke(e),n=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(Oe.indexOf(t.tagName)<0)&&!re(t,s)){var o=t.type;if(!t.classList.contains(c)){var i=t.value,a=!1;"radio"===o||"checkbox"===o?a=t.checked:(u[t.tagName.toLowerCase()]||u[o])&&(i=l({maskInputOptions:u,tagName:t.tagName,type:o,value:i,maskInputFn:d})),m(t,Ae({text:i,isChecked:a,userTriggered:n},f));var p=t.name;"radio"===o&&p&&a&&r.querySelectorAll('input[type="radio"][name="'.concat(p,'"]')).forEach((function(e){e!==t&&m(e,Ae({text:e.value,isChecked:!a,userTriggered:!1},f))}))}}}function m(e,r){var o=De.get(e);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){De.set(e,r);var i=a.getId(e);t(n(n({},r),{id:i}))}}var v=("last"===p.input?["change"]:["input","change"]).map((function(e){return q(e,h,r)})),y=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),g=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return y&&y.set&&v.push.apply(v,i([],o(g.map((function(e){return J(e[0],e[1],{set:function(){h({target:this})}})}))),!1)),function(){v.forEach((function(e){return e()}))}}(t),y=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.mirror,o=e.sampling,i=function(e){return K((function(o){var i=ke(o);if(i&&!re(i,n)){var a=i,s=a.currentTime,l=a.volume,c=a.muted;t({type:e,id:r.getId(i),currentTime:s,volume:l,muted:c})}}),o.media||500)},a=[q("play",i(0)),q("pause",i(1)),q("seeked",i(2)),q("volumechange",i(3))];return function(){a.forEach((function(e){return e()}))}}(t),g=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,a=t.win,s=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=function(e,t){var o=r.getId(this.ownerNode);return-1!==o&&n({id:o,adds:[{rule:e,index:t}]}),s.apply(this,arguments)};var l=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=function(e){var t=r.getId(this.ownerNode);return-1!==t&&n({id:t,removes:[{index:e}]}),l.apply(this,arguments)};var c={};Ee?c.CSSGroupingRule=a.CSSGroupingRule:(Ie&&(c.CSSMediaRule=a.CSSMediaRule),Me&&(c.CSSConditionRule=a.CSSConditionRule),Ce&&(c.CSSSupportsRule=a.CSSSupportsRule));var u={};return Object.entries(c).forEach((function(e){var t=o(e,2),a=t[0],s=t[1];u[a]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=function(e,t){var s=r.getId(this.parentStyleSheet.ownerNode);return-1!==s&&n({id:s,adds:[{rule:e,index:i(i([],o(Le(this)),!1),[t||0],!1)}]}),u[a].insertRule.apply(this,arguments)},s.prototype.deleteRule=function(e){var t=r.getId(this.parentStyleSheet.ownerNode);return-1!==t&&n({id:t,removes:[{index:i(i([],o(Le(this)),!1),[e],!1)}]}),u[a].deleteRule.apply(this,arguments)}})),function(){a.CSSStyleSheet.prototype.insertRule=s,a.CSSStyleSheet.prototype.deleteRule=l,Object.entries(c).forEach((function(e){var t=o(e,2),n=t[0],r=t[1];r.prototype.insertRule=u[n].insertRule,r.prototype.deleteRule=u[n].deleteRule}))}}(t,{win:u}),b=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,o=t.win,i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(e,t,o){var a,s,l=r.getId(null===(s=null===(a=this.parentRule)||void 0===a?void 0:a.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==l&&n({id:l,set:{property:e,value:t,priority:o},index:Le(this.parentRule)}),i.apply(this,arguments)};var a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(e){var t,o,i=r.getId(null===(o=null===(t=this.parentRule)||void 0===t?void 0:t.parentStyleSheet)||void 0===o?void 0:o.ownerNode);return-1!==i&&n({id:i,remove:{property:e},index:Le(this.parentRule)}),a.apply(this,arguments)},function(){o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a}}(t,{win:u}),S=t.collectFonts?function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var o=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=Z(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=i.get(n);e&&(t(e),i.delete(n))}),0),e.apply(this,[n])}}));return o.push((function(){r.FontFace=a})),o.push(s),function(){o.forEach((function(e){return e()}))}}(t):function(){},T=[];try{for(var w=r(t.plugins),x=w.next();!x.done;x=w.next()){var E=x.value;T.push(E.observer(E.callback,u,E.options))}}catch(e){s={error:e}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}return function(){xe.forEach((function(e){return e.reset()})),d.disconnect(),p(),f(),h(),m(),v(),y(),g(),b(),S(),T.forEach((function(e){return e()}))}}var Fe=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)},e}(),We=function(){function e(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;var t=this;this.restorePatches.push(Z(HTMLElement.prototype,"attachShadow",(function(e){return function(){var n=e.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),n}})))}return e.prototype.addShadowRoot=function(e,t){Ne(n(n({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),_e(n(n({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))},e.prototype.observeAttachShadow=function(e){if(e.contentWindow){var t=this;this.restorePatches.push(Z(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(){var r=n.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),r}})))}},e.prototype.reset=function(){this.restorePatches.forEach((function(e){return e()}))},e}();for(var je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ue="undefined"==typeof Uint8Array?[]:new Uint8Array(256),ze=0;ze<je.length;ze++)Ue[je.charCodeAt(ze)]=ze;var Be=new Map;var Ve=function(e,t,n){if(e&&(Ye(e,t)||"object"==typeof e)){var r=function(e,t){var n=Be.get(e);return n||(n=new Map,Be.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o}};function He(e,t,n){return e instanceof Array?e.map((function(e){return He(e,t,n)})):null===e?e: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?{rr_type:e.constructor.name,args:[Object.values(e)]}:e instanceof ArrayBuffer?{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=je[n[t]>>2],o+=je[(3&n[t])<<4|n[t+1]>>4],o+=je[(15&n[t+1])<<2|n[t+2]>>6],o+=je[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)}:e instanceof DataView?{rr_type:e.constructor.name,args:[He(e.buffer,t,n),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?{rr_type:e.constructor.name,src:e.src}:e instanceof ImageData?{rr_type:e.constructor.name,args:[He(e.data,t,n),e.width,e.height]}:Ye(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:Ve(e,t,n)}:e}var Ge=function(e,t,n){return i([],o(e),!1).map((function(e){return He(e,t,n)}))},Ye=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function Xe(e,t,n,a,s,l){var c,u,d=[],p=Object.getOwnPropertyNames(e),f=function(r){try{if("function"!=typeof e[r])return"continue";var c=Z(e,r,(function(c){return function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];var p=c.apply(this,u);if(Ve(p,l,e),!re(this.canvas,a)){s.getId(this.canvas);var f=Ge(i([],o(u),!1),l,e),h={type:t,property:r,args:f};n(this.canvas,h)}return p}}));d.push(c)}catch(o){var u=J(e,r,{set:function(e){n(this.canvas,{type:t,property:r,args:[e],setter:!0})}});d.push(u)}};try{for(var h=r(p),m=h.next();!m.done;m=h.next()){f(m.value)}}catch(e){c={error:e}}finally{try{m&&!m.done&&(u=h.return)&&u.call(h)}finally{if(c)throw c.error}}return d}var qe,Qe,$e=function(){function e(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(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)},this.mutationCb=e.mutationCb,this.mirror=e.mirror,!0===e.recordCanvas&&this.initCanvasMutationObserver(e.win,e.blockClass)}return e.prototype.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1},e.prototype.initCanvasMutationObserver=function(e,t){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=function(e,t){var n=[];try{var r=Z(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return re(this,t)||"__context"in this||(this.__context=n),e.apply(this,i([n],o(r),!1))}}));n.push(r)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){n.forEach((function(e){return e()}))}}(e,t),a=function(e,t,n,a){var s,l,c=[],u=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),d=function(r){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[r])return"continue";var a=Z(t.CanvasRenderingContext2D.prototype,r,(function(t){return function(){for(var a=this,s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return re(this.canvas,n)||setTimeout((function(){var t=i([],o(s),!1);if("drawImage"===r&&t[0]&&t[0]instanceof HTMLCanvasElement){var n=t[0],l=n.getContext("2d"),c=null==l?void 0:l.getImageData(0,0,n.width,n.height),u=null==c?void 0:c.data;t[0]=JSON.stringify(u)}e(a.canvas,{type:W["2D"],property:r,args:t})}),0),t.apply(this,s)}}));c.push(a)}catch(n){var s=J(t.CanvasRenderingContext2D.prototype,r,{set:function(t){e(this.canvas,{type:W["2D"],property:r,args:[t],setter:!0})}});c.push(s)}};try{for(var p=r(u),f=p.next();!f.done;f=p.next())d(f.value)}catch(e){s={error:e}}finally{try{f&&!f.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}return function(){c.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror),s=function(e,t,n,r){var a=[];return a.push.apply(a,i([],o(Xe(t.WebGLRenderingContext.prototype,W.WebGL,e,n,r,t)),!1)),void 0!==t.WebGL2RenderingContext&&a.push.apply(a,i([],o(Xe(t.WebGL2RenderingContext.prototype,W.WebGL2,e,n,r,t)),!1)),function(){a.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror);this.resetObservers=function(){n(),a(),s()}},e.prototype.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.startRAFTimestamping=function(){var e=this,t=function(n){e.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)},e.prototype.flushPendingCanvasMutations=function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.flushPendingCanvasMutationFor=function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){return e.type,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["type"])})),o=n[0].type;this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}},e}();function Ke(e){return n(n({},e),{timestamp:Date.now()})}var Je={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function Ze(t){void 0===t&&(t={});var i=t.emit,a=t.checkoutEveryNms,s=t.checkoutEveryNth,l=t.blockClass,c=void 0===l?"highlight-block":l,u=t.blockSelector,d=void 0===u?null:u,p=t.ignoreClass,f=void 0===p?"highlight-ignore":p,h=t.maskTextClass,m=void 0===h?"highlight-mask":h,v=t.maskTextSelector,y=void 0===v?null:v,g=t.inlineStylesheet,b=void 0===g||g,S=t.maskAllInputs,T=t.maskInputOptions,w=t.slimDOMOptions,x=t.maskInputFn,E=t.maskTextFn,I=t.hooks,C=t.packFn,M=t.sampling,k=void 0===M?{}:M,R=t.mousemoveWait,_=t.recordCanvas,A=void 0!==_&&_,O=t.userTriggeredOnInput,D=void 0!==O&&O,L=t.collectFonts,P=void 0!==L&&L,F=t.inlineImages,W=void 0!==F&&F,j=t.plugins,U=t.keepIframeSrcFn,z=void 0===U?function(){return!1}:U,B=t.enableStrictPrivacy,V=void 0!==B&&B;if(!i)throw new Error("emit function is required");void 0!==R&&void 0===k.mousemove&&(k.mousemove=R);var H,G=!0===S?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==T?T:{password:!0},Y=!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===w,headMetaDescKeywords:"all"===w}:w||{};se();var X=0;qe=function(t,n){var o;if(!(null===(o=xe[0])||void 0===o?void 0:o.isFrozen())||t.type===e.EventType.FullSnapshot||t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.Mutation||xe.forEach((function(e){return e.unfreeze()})),i(function(e){var t,n;try{for(var o=r(j||[]),i=o.next();!i.done;i=o.next()){var a=i.value;a.eventProcessor&&(e=a.eventProcessor(e))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return C&&(e=C(e)),e}(t),n),t.type===e.EventType.FullSnapshot)H=t,X=0;else if(t.type===e.EventType.IncrementalSnapshot){if(t.data.source===e.IncrementalSource.Mutation&&t.data.isAttachIframe)return;X++;var l=s&&X>=s,c=a&&t.timestamp-H.timestamp>a;(l||c)&&Qe(!0)}};var Q=function(t){qe(Ke({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Mutation},t)}))},$=function(t){return qe(Ke({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Scroll},t)}))},K=function(t){return qe(Ke({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.CanvasMutation},t)}))},J=new Fe({mutationCb:Q}),Z=new $e({recordCanvas:A,mutationCb:K,win:window,blockClass:c,mirror:Je}),ne=new We({mutationCb:Q,scrollCb:$,bypassOptions:{blockClass:c,blockSelector:d,maskTextClass:m,maskTextSelector:y,inlineStylesheet:b,maskInputOptions:G,maskTextFn:E,maskInputFn:x,recordCanvas:A,inlineImages:W,sampling:k,slimDOMOptions:Y,iframeManager:J,canvasManager:Z,enableStrictPrivacy:V},mirror:Je});Qe=function(t){var n,r,i,a;void 0===t&&(t=!1),qe(Ke({type:e.EventType.Meta,data:{href:window.location.href,width:te(),height:ee()}}),t),xe.forEach((function(e){return e.lock()}));var s=o(function(e,t){var n=t||{},r=n.blockClass,o=void 0===r?"highlight-block":r,i=n.blockSelector,a=void 0===i?null:i,s=n.maskTextClass,l=void 0===s?"highlight-mask":s,c=n.maskTextSelector,u=void 0===c?null:c,d=n.inlineStylesheet,p=void 0===d||d,f=n.inlineImages,h=void 0!==f&&f,m=n.recordCanvas,v=void 0!==m&&m,y=n.maskAllInputs,g=void 0!==y&&y,b=n.maskTextFn,S=n.maskInputFn,T=n.slimDOM,w=void 0!==T&&T,x=n.dataURLOptions,E=n.preserveWhiteSpace,I=n.onSerialize,C=n.onIframeLoad,M=n.iframeLoadTimeout,k=n.keepIframeSrcFn,R=void 0===k?function(){return!1}:k,_=n.enableStrictPrivacy,A={};return[N(e,{doc:e,map:A,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:!0===g?{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===g?{password:!0}:g,maskTextFn:b,maskInputFn:S,slimDOMOptions:!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===w,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===w?{}:w,dataURLOptions:x,inlineImages:h,recordCanvas:v,preserveWhiteSpace:E,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:M,keepIframeSrcFn:R,enableStrictPrivacy:void 0!==_&&_}),A]}(document,{blockClass:c,blockSelector:d,maskTextClass:m,maskTextSelector:y,inlineStylesheet:b,maskAllInputs:G,maskTextFn:E,slimDOM:Y,recordCanvas:A,inlineImages:W,enableStrictPrivacy:V,onSerialize:function(e){de(e)&&J.addIframe(e),fe(e)&&ne.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){J.attachIframe(e,t),ne.observeAttachShadow(e)},keepIframeSrcFn:z}),2),l=s[0],u=s[1];if(!l)return console.warn("Failed to snapshot the document");Je.map=u,qe(Ke({type:e.EventType.FullSnapshot,data:{node:l,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(r=null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.parentElement)||void 0===r?void 0:r.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(i=null===document||void 0===document?void 0:document.body)||void 0===i?void 0:i.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),xe.forEach((function(e){return e.unlock()}))};try{var re=[];re.push(q("DOMContentLoaded",(function(){qe(Ke({type:e.EventType.DomContentLoaded,data:{}}))})));var oe=function(t){var r;return Pe({mutationCb:Q,mousemoveCb:function(t,n){return qe(Ke({type:e.EventType.IncrementalSnapshot,data:{source:n,positions:t}}))},mouseInteractionCb:function(t){return qe(Ke({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MouseInteraction},t)}))},scrollCb:$,viewportResizeCb:function(t){return qe(Ke({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.ViewportResize},t)}))},inputCb:function(t){return qe(Ke({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Input},t)}))},mediaInteractionCb:function(t){return qe(Ke({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.MediaInteraction},t)}))},styleSheetRuleCb:function(t){return qe(Ke({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.StyleSheetRule},t)}))},styleDeclarationCb:function(t){return qe(Ke({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.StyleDeclaration},t)}))},canvasMutationCb:K,fontCb:function(t){return qe(Ke({type:e.EventType.IncrementalSnapshot,data:n({source:e.IncrementalSource.Font},t)}))},blockClass:c,ignoreClass:f,maskTextClass:m,maskTextSelector:y,maskInputOptions:G,inlineStylesheet:b,sampling:k,recordCanvas:A,inlineImages:W,userTriggeredOnInput:D,collectFonts:P,doc:t,maskInputFn:x,maskTextFn:E,blockSelector:d,slimDOMOptions:Y,mirror:Je,iframeManager:J,shadowDomManager:ne,canvasManager:Z,enableStrictPrivacy:V,plugins:(null===(r=null==j?void 0:j.filter((function(e){return e.observer})))||void 0===r?void 0:r.map((function(t){return{observer:t.observer,options:t.options,callback:function(n){return qe(Ke({type:e.EventType.Plugin,data:{plugin:t.name,payload:n}}))}}})))||[]},I)};J.addLoadListener((function(e){re.push(oe(e.contentDocument))}));var ie=function(){Qe(),re.push(oe(document))};return"interactive"===document.readyState||"complete"===document.readyState?ie():re.push(q("load",(function(){qe(Ke({type:e.EventType.Load,data:{}})),ie()}),window)),function(){re.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}function et(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}Ze.addCustomEvent=function(t,n){qe&&qe(Ke({type:e.EventType.Custom,data:{tag:t,payload:n}}))},Ze.freezePage=function(){xe.forEach((function(e){return e.freeze()}))},Ze.takeFullSnapshot=function(e){if(!Qe)throw new Error("please take full snapshot after start recording");Qe(e)},Ze.mirror=Je;var tt=Object.freeze({__proto__:null,default:et});function nt(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=p(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=c(e,"Y")&&u(e,"Y"),n=c(e,"X")&&u(e,"X");return t||n}function p(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function f(t){var n,r,o,a,s=(i()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(f.bind(e,t))}function h(n,r,a){var l,c,u,d,p=i();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=o.scroll):(l=n,c=n.scrollLeft,u=n.scrollTop,d=s),f({scrollable:l,method:d,startTime:p,startX:c,startY:u,x:r,y:a})}}var rt,ot=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.replaceActions=function(e){var t;this.actions.length=0,(t=this.actions).splice.apply(t,i([0,0],o(e),!1))},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,n=this;this.raf=requestAnimationFrame((function r(){var o=performance.now();for(n.timeOffset+=(o-e)*n.speed,e=o;t.length;){var i=t[0];if(!(n.timeOffset>=i.delay))break;t.shift(),i.doAction()}(t.length>0||n.liveMode)&&(n.raf=requestAnimationFrame(r))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r+1;n=r-1}}return t},e}();function it(t,n){if(t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove){var r=t.data.positions[0].timeOffset,o=t.timestamp+r;return t.delay=o-n,o-n}return t.delay=t.timestamp-n,t.delay}
16
16
  /*! *****************************************************************************
17
17
  Copyright (c) Microsoft Corporation.
18
18
 
@@ -26,5 +26,5 @@ var rrweb=function(e){"use strict";
26
26
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
27
27
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
28
28
  PERFORMANCE OF THIS SOFTWARE.
29
- ***************************************************************************** */function nt(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(et||(et={}));var ot={type:"xstate.init"};function it(e){return void 0===e?[]:[].concat(e)}function at(e){return{type:"xstate.assign",assignment:e}}function st(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function lt(e){return function(t){return e===t}}function ct(e){return"string"==typeof e?{type:e}:e}function ut(e,t){return{value:e,context:t,actions:[],changed:!1,matches:lt(e)}}function dt(e,t,r){var n=t,o=!1;return[e.filter((function(e){if("xstate.assign"===e.type){o=!0;var t=Object.assign({},n);return"function"==typeof e.assignment?t=e.assignment(n,r):Object.keys(e.assignment).forEach((function(o){t[o]="function"==typeof e.assignment[o]?e.assignment[o](n,r):e.assignment[o]})),n=t,!1}return!0})),n,o]}function pt(e,t){void 0===t&&(t={});var r=nt(dt(it(e.states[e.initial].entry).map((function(e){return st(e,t.actions)})),e.context,ot),2),n=r[0],o=r[1],i={config:e,_options:t,initialState:{value:e.initial,actions:n,context:o,matches:lt(e.initial)},transition:function(t,r){var n,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=ct(r),u=e.states[s];if(u.on){var d=it(u.on[c.type]);try{for(var p=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),f=p.next();!f.done;f=p.next()){var h=f.value;if(void 0===h)return ut(s,l);var m="string"==typeof h?{target:h}:h,v=m.target,y=m.actions,g=void 0===y?[]:y,b=m.cond,S=void 0===v;if((void 0===b?function(){return!0}:b)(l,c)){var T=e.states[null!=v?v:s],x=nt(dt((S?it(g):[].concat(u.exit,g,T.entry).filter((function(e){return e}))).map((function(e){return st(e,i._options.actions)})),l,c),3),w=x[0],E=x[1],I=x[2],C=null!=v?v:s;return{value:C,context:E,actions:w,changed:v!==s||w.length>0||I,matches:lt(C)}}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}}return ut(s,l)}};return i}var ft=function(e,t){return e.actions.forEach((function(r){var n=r.exec;return n&&n(e.context,t)}))};function ht(e){var t=e.initialState,r=et.NotStarted,n=new Set,o={_machine:e,send:function(o){r===et.Running&&(t=e.transition(t,o),ft(t,ct(o)),n.forEach((function(e){return e(t)})))},subscribe:function(e){return n.add(e),e(t),{unsubscribe:function(){return n.delete(e)}}},start:function(n){if(n){var i="object"==typeof n?n:{context:e.config.context,value:n};t={value:i.value,actions:[],context:i.context,matches:lt(i.value)}}return r=et.Running,ft(t,ot),o},stop:function(){return r=et.Stopped,n.clear(),o},get state(){return t},get status(){return r}};return o}function mt(t,r){var n=r.getCastFn,o=r.applyEventsSynchronously,i=r.emitter;return ht(pt({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]},REPLACE_EVENTS:{target:"playing",actions:["replaceEvents"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]},REPLACE_EVENTS:{target:"paused",actions:["replaceEvents"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:at({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:at((function(e,t){var r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),s(s({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})})),play:function(t){var r,a,s,c,u,d=t.timer,p=t.events,f=t.baselineTime,h=t.lastPlayedEvent;d.clear();try{for(var m=l(p),v=m.next();!v.done;v=m.next()){rt(v.value,f)}}catch(e){r={error:e}}finally{try{v&&!v.done&&(a=m.return)&&a.call(m)}finally{if(r)throw r.error}}var y=function(t,r){for(var n=t.length-1;n>=0;n--){var o=t[n];if(o.type===e.EventType.Meta&&o.timestamp<=r)return t.slice(n)}return t}(p,f),g=null==h?void 0:h.timestamp;(null==h?void 0:h.type)===e.EventType.IncrementalSnapshot&&h.data.source===e.IncrementalSource.MouseMove&&(g=h.timestamp+(null===(u=h.data.positions[0])||void 0===u?void 0:u.timeOffset)),f<(g||0)&&i.emit(e.ReplayerEvents.PlayBack);var b=new Array,S=new Array,T=function(e){if(g&&g<f&&(e.timestamp<=g||e===h))return"continue";if(e.timestamp<f)b.push(e);else{var t=n(e,!1);S.push({doAction:function(){t()},delay:e.delay})}};try{for(var x=l(y),w=x.next();!w.done;w=x.next()){T(w.value)}}catch(e){s={error:e}}finally{try{w&&!w.done&&(c=x.return)&&c.call(x)}finally{if(s)throw s.error}}o(b),i.emit(e.ReplayerEvents.Flush),d.addActions(S),d.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:at((function(e){return s(s({},e),{lastPlayedEvent:null})})),startLive:at({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),replaceEvents:at((function(e,t){var r,o,i=e.events,a=e.timer,c=e.baselineTime;if("REPLACE_EVENTS"===t.type){var u=t.payload.events;i.length=0;var d=[],p=function(e){if(rt(e,c),i.push(e),e.timestamp>=a.timeOffset+c){var t=n(e,!1);d.push({doAction:function(){t()},delay:e.delay})}};try{for(var f=l(u),h=f.next();!h.done;h=f.next()){p(h.value)}}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=f.return)&&o.call(f)}finally{if(r)throw r.error}}a.isActive()&&a.replaceActions(d)}return s(s({},e),{events:i})})),addEvent:at((function(e,t){var r=e.baselineTime,o=e.timer,i=e.events;if("ADD_EVENT"===t.type){var a=t.payload.event;rt(a,r);var l=i.length-1;if(!i[l]||i[l].timestamp<=a.timestamp)i.push(a);else{for(var c=-1,u=0;u<=l;){var d=Math.floor((u+l)/2);i[d].timestamp<=a.timestamp?u=d+1:l=d-1}-1===c&&(c=u),i.splice(c,0,a)}var p=a.timestamp<r,f=n(a,p);p?f():o.isActive()&&o.addAction({doAction:function(){f()},delay:a.delay})}return s(s({},e),{events:i})}))}}))}var vt;function yt(e,t){var r=e[t[0]];return 1===t.length?r:yt(r.cssRules[t[1]].cssRules,t.slice(2))}function gt(e){var t=u(e),r=t.pop();return{positions:t,index:r}}function bt(e,t){var r=t.sheet;r&&e.forEach((function(e){if(e.type===vt.Insert)try{if(Array.isArray(e.index)){var n=gt(e.index),o=n.positions,i=n.index;yt(r.cssRules,o).insertRule(e.cssText,i)}else r.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===vt.Remove)try{if(Array.isArray(e.index)){var a=gt(e.index);o=a.positions,i=a.index;yt(r.cssRules,o).deleteRule(i||0)}else r.deleteRule(e.index)}catch(e){}else if(e.type===vt.Snapshot)!function(e,t){var r;try{var n=Array.from((null===(r=t.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText})),o=Object.entries(n).reverse(),i=n.length;o.forEach((function(r){var n,o=c(r,2),a=o[0],s=o[1],l=e.indexOf(s);if(-1===l||l>i)try{null===(n=t.sheet)||void 0===n||n.deleteRule(Number(a))}catch(e){}i=l})),e.forEach((function(e,r){var n,o,i;try{(null===(o=null===(n=t.sheet)||void 0===n?void 0:n.cssRules[r])||void 0===o?void 0:o.cssText)!==e&&(null===(i=t.sheet)||void 0===i||i.insertRule(e,r))}catch(e){}}))}catch(e){}}(e.cssTexts,t);else if(e.type===vt.SetProperty){yt(r.cssRules,e.index).style.setProperty(e.property,e.value,e.priority)}else if(e.type===vt.RemoveProperty){yt(r.cssRules,e.index).style.removeProperty(e.property)}}))}!function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"}(vt||(vt={}));var St=new Map;function Tt(e,t){var r=St.get(e);return r||(r=new Map,St.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var xt=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function wt(e,t){return function(r){if(r&&"object"==typeof r&&"rr_type"in r){if("index"in r){var n=r.rr_type,o=r.index;return Tt(t,n)[o]}if("args"in r){var i=r.rr_type,a=r.args,s=window[i];return new(s.bind.apply(s,u([void 0],a.map(wt(e,t)))))}if("base64"in r)return function(e){var t,r,n,o,i,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c=new ArrayBuffer(a),u=new Uint8Array(c);for(t=0;t<s;t+=4)r=Pe[e.charCodeAt(t)],n=Pe[e.charCodeAt(t+1)],o=Pe[e.charCodeAt(t+2)],i=Pe[e.charCodeAt(t+3)],u[l++]=r<<2|n>>4,u[l++]=(15&n)<<4|o>>2,u[l++]=(3&o)<<6|63&i;return c}(r.base64);if("src"in r){var l=e.get(r.src);if(l)return l;var c=new Image;return c.src=r.src,e.set(r.src,c),c}}else if(Array.isArray(r))return r.map(wt(e,t));return r}}function Et(e){var t=e.mutation,r=e.target,n=e.type,i=e.imageMap,a=e.errorHandler;try{var s=function(e,t){try{return t===o.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(e){return null}}(r,n);if(!s)return;if(t.setter)return void(s[t.property]=t.args[0]);var l=s[t.property],c=t.args.map(wt(i,s));!function(e,t){if(null==t?void 0:t.constructor){var r=t.constructor.name;if(xt.includes(r)){var n=Tt(e,r);n.includes(t)||n.push(t)}}}(s,l.apply(s,c))}catch(e){a(t,e)}}var It=Ke||Je,Ct={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function kt(t){return t.type==e.EventType.IncrementalSnapshot&&(t.data.source==e.IncrementalSource.TouchMove||t.data.source==e.IncrementalSource.MouseInteraction&&t.data.type==e.MouseInteractions.TouchStart)}var Mt=function(){function t(t,r){var n=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=It(),this.activityIntervals=[],this.legacy_missingNodeRetryMap={},this.cache=le(),this.imageMap=new Map,this.mirror={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,r=e.__sn&&e.__sn.id;delete this.map[r],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}},this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(null==r?void 0:r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");var o={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"highlight-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Ct,inactiveThreshold:.02,inactiveSkipTime:2e3};this.config=Object.assign({},o,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(e.ReplayerEvents.Resize,this.handleResize),this.setupDom(),this.treeIndex=new I,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(e.ReplayerEvents.Flush,(function(){var e,t,r,o,i,a,s=n.treeIndex.flush(),c=s.scrollMap,u=s.inputMap;n.fragmentParentMap.forEach((function(e,t){return n.restoreRealParent(t,e)}));try{for(var d=l(n.virtualStyleRulesMap.keys()),p=d.next();!p.done;p=d.next()){var f=p.value;n.restoreNodeSheet(f)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}n.fragmentParentMap.clear(),n.elementStateMap.clear(),n.virtualStyleRulesMap.clear();try{for(var h=l(c.values()),m=h.next();!m.done;m=h.next()){var v=m.value;n.applyScroll(v,!0)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}try{for(var y=l(u.values()),g=y.next();!g.done;g=y.next()){v=g.value;n.applyInput(v)}}catch(e){i={error:e}}finally{try{g&&!g.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}})),this.emitter.on(e.ReplayerEvents.PlayBack,(function(){n.firstFullSnapshot=null,n.mirror.reset()}));var i=new tt([],(null==r?void 0:r.speed)||o.speed);this.service=mt({events:t.map((function(e){return r&&r.unpackFn?r.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(t){n.emitter.emit(e.ReplayerEvents.StateChange,{player:t})})),this.speedService=ht(pt({id:"speed",context:{normalSpeed:-1,timer:i},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:at({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(t){n.emitter.emit(e.ReplayerEvents.StateChange,{speed:t})}));var a=this.service.state.context.events.find((function(t){return t.type===e.EventType.Meta})),s=this.service.state.context.events.find((function(t){return t.type===e.EventType.FullSnapshot}));if(a){var c=a.data,u=c.width,d=c.height;setTimeout((function(){n.emitter.emit(e.ReplayerEvents.Resize,{width:u,height:d})}),0)}s&&setTimeout((function(){n.firstFullSnapshot||(n.firstFullSnapshot=s,n.rebuildFullSnapshot(s),n.iframe.contentWindow.scrollTo(s.data.initialOffset))}),1),this.service.state.context.events.find(kt)&&this.mouse.classList.add("touch-device")}return Object.defineProperty(t.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),t.prototype.on=function(e,t){return this.emitter.on(e,t),this},t.prototype.off=function(e,t){return this.emitter.off(e,t),this},t.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(r){t.config[r]=e[r]})),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))},t.prototype.getActivityIntervals=function(){var e=this;if(0==this.activityIntervals.length){for(var t=[],r=this.getMetaData(),n=u([{timestamp:r.startTime}],this.service.state.context.events.filter((function(t){return e.isUserInteraction(t)})),[{timestamp:r.endTime}]),o=1;o<n.length;o++){var i=n[o-1],a=n[o];a.timestamp-i.timestamp>1e4?t.push({startTime:i.timestamp,endTime:a.timestamp,duration:a.timestamp-i.timestamp,active:!1}):t.push({startTime:i.timestamp,endTime:a.timestamp,duration:a.timestamp-i.timestamp,active:!0})}var s=[],l=t[0];for(o=1;o<t.length;o++)t[o].active!=t[o-1].active&&(s.push({startTime:l.startTime,endTime:t[o-1].endTime,duration:t[o-1].endTime-l.startTime,active:t[o-1].active}),l=t[o]);l&&t.length>0&&s.push({startTime:l.startTime,endTime:t[t.length-1].endTime,duration:t[t.length-1].endTime-l.startTime,active:t[t.length-1].active}),l=s[0];for(o=1;o<s.length;o++)(!s[o].active&&s[o].duration>this.config.inactiveThreshold*r.totalTime||!s[o-1].active&&s[o-1].duration>this.config.inactiveThreshold*r.totalTime)&&(this.activityIntervals.push({startTime:l.startTime,endTime:s[o-1].endTime,duration:s[o-1].endTime-l.startTime,active:s[o-1].active}),l=s[o]);l&&s.length>0&&this.activityIntervals.push({startTime:l.startTime,endTime:s[s.length-1].endTime,duration:s[s.length-1].endTime-l.startTime,active:s[s.length-1].active})}return this.activityIntervals},t.prototype.getMetaData=function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}},t.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},t.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},t.prototype.getMirror=function(){return this.mirror},t.prototype.play=function(t){var r;void 0===t&&(t=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null===(r=this.iframe.contentDocument)||void 0===r||r.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.Start),this.handleInactivity(this.getMetaData().startTime+t,!0)},t.prototype.pause=function(t){var r;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null===(r=this.iframe.contentDocument)||void 0===r||r.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.Pause)},t.prototype.resume=function(t){void 0===t&&(t=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(e.ReplayerEvents.Resume)},t.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},t.prototype.addEvent=function(e){var t=this,r=this.config.unpackFn?this.config.unpackFn(e):e;kt(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:r}})}))},t.prototype.replaceEvents=function(e){var t,r;try{for(var n=l(e),o=n.next();!o.done;o=n.next()){if(kt(o.value)){this.mouse.classList.add("touch-device");break}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}this.service.send({type:"REPLACE_EVENTS",payload:{events:e}})},t.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},t.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},t.prototype.resetCache=function(){this.cache=le()},t.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Ze(this.iframe.contentWindow,this.iframe.contentDocument),E(this.iframe.contentWindow))},t.prototype.handleResize=function(e){var t,r;this.iframe.style.display="inherit";try{for(var n=l([this.mouseTail,this.iframe]),o=n.next();!o.done;o=n.next()){var i=o.value;i&&(i.setAttribute("width",String(e.width)),i.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},t.prototype.applyEventsSynchronously=function(t){var r,n;try{for(var o=l(t),i=o.next();!i.done;i=o.next()){var a=i.value;switch(a.type){case e.EventType.DomContentLoaded:case e.EventType.Load:case e.EventType.Custom:continue;case e.EventType.FullSnapshot:case e.EventType.Meta:case e.EventType.Plugin:break;case e.EventType.IncrementalSnapshot:switch(a.data.source){case e.IncrementalSource.MediaInteraction:continue}}this.getCastFn(a,!0)()}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null,!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null},t.prototype.getCastFn=function(t,r){var n,o=this;switch(void 0===r&&(r=!1),t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Custom:n=function(){o.emitter.emit(e.ReplayerEvents.CustomEvent,t)};break;case e.EventType.Meta:n=function(){return o.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:n=function(){if(o.firstFullSnapshot){if(o.firstFullSnapshot===t)return void(o.firstFullSnapshot=!0)}else o.firstFullSnapshot=!0;o.rebuildFullSnapshot(t,r),o.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:n=function(){var n,i;if(o.applyIncremental(t,r),!r&&(o.handleInactivity(t.timestamp),t===o.nextUserInteractionEvent&&(o.nextUserInteractionEvent=null,o.backToNormal()),o.config.skipInactive&&!o.nextUserInteractionEvent)){try{for(var a=l(o.service.state.context.events),s=a.next();!s.done;s=a.next()){var c=s.value;if(!(c.timestamp<=t.timestamp)&&o.isUserInteraction(c)){c.delay-t.delay>1e4*o.speedService.state.context.timer.speed&&(o.nextUserInteractionEvent=c);break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}if(o.nextUserInteractionEvent){var u=o.nextUserInteractionEvent.delay-t.delay,d={speed:Math.min(Math.round(u/2e3),o.config.maxSpeed)};o.speedService.send({type:"FAST_FORWARD",payload:d}),o.emitter.emit(e.ReplayerEvents.SkipStart,d)}}}}return function(){var i,a;n&&n();try{for(var s=l(o.config.plugins||[]),c=s.next();!c.done;c=s.next()){c.value.handler(t,r,{replayer:o})}}catch(e){i={error:e}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}o.service.send({type:"CAST_EVENT",payload:{event:t}});var u=o.service.state.context.events.length-1;if(t===o.service.state.context.events[u]){var d=function(){u<o.service.state.context.events.length-1||(o.backToNormal(),o.service.send("END"),o.emitter.emit(e.ReplayerEvents.Finish))};t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove&&t.data.positions.length?setTimeout((function(){d()}),Math.max(0,50-t.data.positions[0].timeOffset)):d()}o.emitter.emit(e.ReplayerEvents.EventCast,t)}},t.prototype.handleInactivity=function(t,r){var n,o;if((t===this.inactiveEndTimestamp||r)&&(this.inactiveEndTimestamp=null,this.backToNormal()),this.config.skipInactive&&!this.inactiveEndTimestamp){try{for(var i=l(this.getActivityIntervals()),a=i.next();!a.done;a=i.next()){var s=a.value;if(t>=s.startTime&&t<s.endTime&&!s.active){this.inactiveEndTimestamp=s.endTime;break}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}if(this.inactiveEndTimestamp){var c=this.inactiveEndTimestamp-t,u={speed:c/36e5*this.config.inactiveSkipTime<1e3?c/1e3:Math.round(Math.max(c,36e5)/this.config.inactiveSkipTime)};this.speedService.send({type:"FAST_FORWARD",payload:u}),this.emitter.emit(e.ReplayerEvents.SkipStart,u)}}},t.prototype.rebuildFullSnapshot=function(t,r){var n,o,i=this;if(void 0===r&&(r=!1),!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var a=[];this.mirror.map=de(t.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)},cache:this.cache})[1];var s=function(e,t){c.attachDocumentToIframe(e,t),c.newDocumentQueue=c.newDocumentQueue.filter((function(t){return t!==e}))},c=this;try{for(var u=l(a),d=u.next();!d.done;d=u.next()){var p=d.value;s(p.mutationInQueue,p.builtNode)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}var f=this.iframe.contentDocument,h=f.documentElement,m=f.head;this.insertStyleRules(h,m),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},t.prototype.insertStyleRules=function(e,t){var r=document.createElement("style");e.insertBefore(r,t);var n,o=(n=this.config.blockClass,["noscript { display: none !important; }","."+n+" { background: currentColor; border-radius: 5px; }","."+n+":hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}"]).concat(this.config.insertStyleRules);this.config.pauseAnimation&&o.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }");for(var i=0;i<o.length;i++)r.sheet.insertRule(o[i],i)},t.prototype.attachDocumentToIframe=function(e,t){var r,n,o=this,i=[];if(!t.contentDocument)for(var a=t.parentNode;a;){if(this.fragmentParentMap.has(a)){var s=a,c=this.fragmentParentMap.get(s);this.restoreRealParent(s,c);break}a=a.parentNode}ue(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){if(o.collectIframeAndAttachDocument(i,e),e.__sn.type===O.Element&&"HTML"===e.__sn.tagName.toUpperCase()){var r=t.contentDocument,n=r.documentElement,a=r.head;o.insertStyleRules(n,a)}},cache:this.cache});var u=function(e,t){d.attachDocumentToIframe(e,t),d.newDocumentQueue=d.newDocumentQueue.filter((function(t){return t!==e}))},d=this;try{for(var p=l(i),f=p.next();!f.done;f=p.next()){var h=f.value;u(h.mutationInQueue,h.builtNode)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}},t.prototype.collectIframeAndAttachDocument=function(e,t){if(M(t)){var r=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));r&&e.push({mutationInQueue:r,builtNode:t})}},t.prototype.waitForStylesheetLoad=function(){var t,r=this,n=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.head;if(n){var o,i=new Set,a=this.service.state,s=function(){a=r.service.state};this.emitter.on(e.ReplayerEvents.Start,s),this.emitter.on(e.ReplayerEvents.Pause,s);var l=function(){r.emitter.off(e.ReplayerEvents.Start,s),r.emitter.off(e.ReplayerEvents.Pause,s)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(t){t.sheet||(i.add(t),t.addEventListener("load",(function(){i.delete(t),0===i.size&&-1!==o&&(a.matches("playing")&&r.play(r.getCurrentTime()),r.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),o&&clearTimeout(o),l())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),o=setTimeout((function(){a.matches("playing")&&r.play(r.getCurrentTime()),o=-1,l()}),this.config.loadTimeout))}},t.prototype.hasImageArg=function(e){var t,r;try{for(var n=l(e),o=n.next();!o.done;o=n.next()){var i=o.value;if(i&&"object"==typeof i)if("rr_type"in i&&"args"in i){if(this.hasImageArg(i.args))return!0}else{if("rr_type"in i&&"HTMLImageElement"===i.rr_type)return!0;if(i instanceof Array&&this.hasImageArg(i))return!0}else;}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return!1},t.prototype.getImageArgs=function(e){var t,r,n=[];try{for(var o=l(e),i=o.next();!i.done;i=o.next()){var a=i.value;a&&"object"==typeof a&&("rr_type"in a&&"args"in a?n.push.apply(n,u(this.getImageArgs(a.args))):"rr_type"in a&&"HTMLImageElement"===a.rr_type?n.push(a.src):a instanceof Array&&n.push.apply(n,u(this.getImageArgs(a))))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},t.prototype.preloadAllImages=function(){var t,r,n=this;this.service.state;var o=function(){n.service.state};this.emitter.on(e.ReplayerEvents.Start,o),this.emitter.on(e.ReplayerEvents.Pause,o);var i=function(t){t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.CanvasMutation&&("commands"in t.data?t.data.commands.forEach((function(e){return n.preloadImages(e,t)})):a.preloadImages(t.data,t))},a=this;try{for(var s=l(this.service.state.context.events),c=s.next();!c.done;c=s.next()){i(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}},t.prototype.preloadImages=function(e,t){var r=this;if("drawImage"!==e.property||"string"!=typeof e.args[0]||this.imageMap.has(t))this.hasImageArg(e.args)&&this.getImageArgs(e.args).forEach((function(e){var t=new Image;t.src=e,r.imageMap.set(e,t)}));else{var n=document.createElement("canvas"),o=n.getContext("2d"),i=null==o?void 0:o.createImageData(n.width,n.height);null==i||i.data,JSON.parse(e.args[0]),null==o||o.putImageData(i,0,0)}},t.prototype.applyIncremental=function(t,r){var n,i,a=this,l=t.data;switch(l.source){case e.IncrementalSource.Mutation:r&&(l.adds.forEach((function(e){return a.treeIndex.add(e)})),l.texts.forEach((function(e){return a.treeIndex.text(e)})),l.attributes.forEach((function(e){return a.treeIndex.attribute(e)})),l.removes.forEach((function(e){return a.treeIndex.remove(e,a.mirror)})));try{this.applyMutation(l,r)}catch(e){this.warn("Exception in mutation "+(e.message||e),l)}break;case e.IncrementalSource.Drag:case e.IncrementalSource.TouchMove:case e.IncrementalSource.MouseMove:if(r){var c=l.positions[l.positions.length-1];this.mousePos={x:c.x,y:c.y,id:c.id,debugData:l}}else l.positions.forEach((function(e){var n={doAction:function(){a.moveAndHover(e.x,e.y,e.id,r,l)},delay:e.timeOffset+t.timestamp-a.service.state.context.baselineTime};a.timer.addAction(n)})),this.timer.addAction({doAction:function(){},delay:t.delay-(null===(n=l.positions[0])||void 0===n?void 0:n.timeOffset)});break;case e.IncrementalSource.MouseInteraction:if(-1===l.id)break;var u=new Event(e.MouseInteractions[l.type].toLowerCase());if(!(T=this.mirror.getNode(l.id)))return this.debugNodeNotFound(l,l.id);this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:l.type,target:T});var d=this.config.triggerFocus;switch(l.type){case e.MouseInteractions.Blur:"blur"in T&&T.blur();break;case e.MouseInteractions.Focus:d&&T.focus&&T.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:r?(l.type===e.MouseInteractions.TouchStart?this.touchActive=!0:l.type===e.MouseInteractions.TouchEnd&&(this.touchActive=!1),this.mousePos={x:l.x,y:l.y,id:l.id,debugData:l}):(l.type===e.MouseInteractions.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(l.x,l.y,l.id,r,l),l.type===e.MouseInteractions.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):l.type===e.MouseInteractions.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):l.type===e.MouseInteractions.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case e.MouseInteractions.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:T.dispatchEvent(u)}break;case e.IncrementalSource.Scroll:if(-1===l.id)break;if(r){this.treeIndex.scroll(l);break}this.applyScroll(l,!1);break;case e.IncrementalSource.ViewportResize:this.emitter.emit(e.ReplayerEvents.Resize,{width:l.width,height:l.height});break;case e.IncrementalSource.Input:if(-1===l.id)break;if(r){this.treeIndex.input(l);break}this.applyInput(l);break;case e.IncrementalSource.MediaInteraction:if(!(T=this.mirror.getNode(l.id)))return this.debugNodeNotFound(l,l.id);var p=T;try{l.currentTime&&(p.currentTime=l.currentTime),l.volume&&(p.volume=l.volume),l.muted&&(p.muted=l.muted),1===l.type&&p.pause(),0===l.type&&p.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case e.IncrementalSource.StyleSheetRule:if(!(T=this.mirror.getNode(l.id)))return this.debugNodeNotFound(l,l.id);var f,h=T,m=T.parentNode,v=this.fragmentParentMap.has(m),y=v?null:h.sheet;y||(this.virtualStyleRulesMap.has(T)?f=this.virtualStyleRulesMap.get(T):(f=[],this.virtualStyleRulesMap.set(T,f))),l.adds&&l.adds.forEach((function(e){var t=e.rule,r=e.index;if(y)try{if(Array.isArray(r)){var n=gt(r),o=n.positions,i=n.index;yt(y.cssRules,o).insertRule(t,i)}else{i=void 0===r?void 0:Math.min(r,y.cssRules.length);y.insertRule(t,i)}}catch(e){}else null==f||f.push({cssText:t,index:r,type:vt.Insert})})),l.removes&&l.removes.forEach((function(e){var t=e.index;if(v)null==f||f.push({index:t,type:vt.Remove});else try{if(Array.isArray(t)){var r=gt(t),n=r.positions,o=r.index;yt(y.cssRules,n).deleteRule(o||0)}else null==y||y.deleteRule(t)}catch(e){}}));break;case e.IncrementalSource.StyleDeclaration:if(!(T=this.mirror.getNode(l.id)))return this.debugNodeNotFound(l,l.id);h=T;var g=T.parentNode,b=this.fragmentParentMap.has(g)?null:h.sheet,S=[];if(b||(this.virtualStyleRulesMap.has(T)?S=this.virtualStyleRulesMap.get(T):(S=[],this.virtualStyleRulesMap.set(T,S))),l.set)if(b)yt(b.rules,l.index).style.setProperty(l.set.property,l.set.value,l.set.priority);else S.push(s({type:vt.SetProperty,index:l.index},l.set));if(l.remove)if(b)yt(b.rules,l.index).style.removeProperty(l.remove.property);else S.push(s({type:vt.RemoveProperty,index:l.index},l.remove));break;case e.IncrementalSource.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var T;if(!(T=this.mirror.getNode(l.id)))return this.debugNodeNotFound(l,l.id);!function(e){var t=e.event,r=e.mutation,n=e.target,i=e.imageMap,a=e.errorHandler;try{var s="commands"in r?r.commands:[r];[o.WebGL,o.WebGL2].includes(r.type)?s.forEach((function(e){Et({mutation:e,type:r.type,target:n,imageMap:i,errorHandler:a})})):s.forEach((function(e){!function(e){var t=e.event,r=e.mutation,n=e.target,o=e.imageMap,i=e.errorHandler;try{var a=n.getContext("2d");if(r.setter)return void(a[r.property]=r.args[0]);var s=a[r.property];if("drawImage"===r.property&&"string"==typeof r.args[0]){var l=o.get(t);r.args[0]=l,s.apply(a,r.args)}else s.apply(a,r.args)}catch(e){i(r,e)}}({event:t,mutation:e,target:n,imageMap:i,errorHandler:a})}))}catch(e){a(r,e)}}({event:t,mutation:l,target:T,imageMap:this.imageMap,errorHandler:this.warnCanvasMutationFailed.bind(this)});break;case e.IncrementalSource.Font:try{var x=new FontFace(l.family,l.buffer?new Uint8Array(JSON.parse(l.fontSource)):l.fontSource,l.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(x)}catch(e){this.config.showWarning&&console.warn(e)}}},t.prototype.applyMutation=function(e,t){var r,n,o=this;e.removes.forEach((function(t){var r=o.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.parentId})))return;return o.warnNodeNotFound(e,t.id)}o.virtualStyleRulesMap.has(r)&&o.virtualStyleRulesMap.delete(r);var n=o.mirror.getNode(t.parentId);if(!n)return o.warnNodeNotFound(e,t.parentId);if(t.isShadow&&R(n)&&(n=n.shadowRoot),o.mirror.removeNodeFromMap(r),n){var i=null,a="__sn"in n?o.fragmentParentMap.get(n):void 0;a&&a.contains(r)?n=a:o.fragmentParentMap.has(r)&&(i=o.fragmentParentMap.get(r),o.fragmentParentMap.delete(r),r=i);try{n.removeChild(r)}catch(t){if(!(t instanceof DOMException))throw t;o.warn("parent could not remove child in mutation",n,a,r,i,e)}}}));var i=s({},this.legacy_missingNodeRetryMap),a=[],c=function(e){var r,n,s,c;if(!o.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var u=o.mirror.getNode(e.parentId);if(!u)return e.node.type===O.Document?o.newDocumentQueue.push(e):a.push(e);var d=null;o.iframe.contentDocument.contains?d=o.iframe.contentDocument.contains(u):o.iframe.contentDocument.body.contains&&(d=o.iframe.contentDocument.body.contains(u));var p=(null===(c=(s=u).getElementsByTagName)||void 0===c?void 0:c.call(s,"iframe").length)>0;if(t&&d&&!M(u)&&!p){var f=document.createDocumentFragment();for(o.mirror.map[e.parentId]=f,o.fragmentParentMap.set(f,u),o.storeState(u);u.firstChild;)f.appendChild(u.firstChild);u=f}e.node.isShadow&&R(u)&&(u=u.shadowRoot);var h=null,m=null;if(e.previousId&&(h=o.mirror.getNode(e.previousId)),e.nextId&&(m=o.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=o.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return a.push(e);if(!e.node.rootId||o.mirror.getNode(e.node.rootId)){var v=e.node.rootId?o.mirror.getNode(e.node.rootId):o.iframe.contentDocument;if(M(u))o.attachDocumentToIframe(e,u);else{var y=ue(e.node,{doc:v,map:o.mirror.map,skipChild:!0,hackCss:!0,cache:o.cache});if(-1!==e.previousId&&-1!==e.nextId){if("__sn"in u&&u.__sn.type===O.Element&&"textarea"===u.__sn.tagName&&e.node.type===O.Text)try{for(var g=l(Array.from(u.childNodes)),b=g.next();!b.done;b=g.next()){var S=b.value;S.nodeType===u.TEXT_NODE&&u.removeChild(S)}}catch(e){r={error:e}}finally{try{b&&!b.done&&(n=g.return)&&n.call(g)}finally{if(r)throw r.error}}if(h&&h.nextSibling&&h.nextSibling.parentNode)u.insertBefore(y,h.nextSibling);else if(m&&m.parentNode)u.contains(m)?u.insertBefore(y,m):u.insertBefore(y,null);else{if(u===v)for(;v.firstChild;)v.removeChild(v.firstChild);u.appendChild(y)}if(M(y)){var T=o.newDocumentQueue.find((function(e){return e.parentId===y.__sn.id}));T&&(o.attachDocumentToIframe(T,y),o.newDocumentQueue=o.newDocumentQueue.filter((function(e){return e!==T})))}(e.previousId||e.nextId)&&o.legacy_resolveMissingNode(i,u,y,e)}else i[e.node.id]={node:y,mutation:e}}}};e.adds.forEach((function(e){c(e)}));for(var u=Date.now();a.length;){var d=C(a);if(a.length=0,Date.now()-u>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}try{for(var p=(r=void 0,l(d)),f=p.next();!f.done;f=p.next()){var h=f.value;this.mirror.getNode(h.value.parentId)?k(h,(function(e){c(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",h)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),e.texts.forEach((function(t){var r=o.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return o.warnNodeNotFound(e,t.id)}o.fragmentParentMap.has(r)&&(r=o.fragmentParentMap.get(r)),r.textContent=t.value})),e.attributes.forEach((function(t){var r=o.mirror.getNode(t.id);if(!r){if(e.removes.find((function(e){return e.id===t.id})))return;return o.warnNodeNotFound(e,t.id)}for(var n in o.fragmentParentMap.has(r)&&(r=o.fragmentParentMap.get(r)),t.attributes)if("string"==typeof n){var i=t.attributes[n];if(null===i)r.removeAttribute(n);else if("string"==typeof i)try{r.setAttribute(n,i)}catch(e){o.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===n){var a=i,s=r;for(var l in a)if(!1===a[l])s.style.removeProperty(l);else if(a[l]instanceof Array){var c=a[l];s.style.setProperty(l,c[0],c[1])}else{var u=a[l];s.style.setProperty(l,u)}}}}))},t.prototype.applyScroll=function(e,t){var r=this.mirror.getNode(e.id);if(!r)return this.debugNodeNotFound(e,e.id);if(r===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(r.__sn.type===O.Document)r.defaultView.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{r.scrollTop=e.y,r.scrollLeft=e.x}catch(e){}},t.prototype.applyInput=function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},t.prototype.legacy_resolveMissingNode=function(e,t,r,n){var o=n.previousId,i=n.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,r),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,r.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},t.prototype.moveAndHover=function(e,t,r,n,o){var i=this.mirror.getNode(r);if(!i)return this.debugNodeNotFound(o,r);var a=N(i,this.iframe),s=e*a.absoluteScale+a.x,l=t*a.absoluteScale+a.y;this.mouse.style.left=s+"px",this.mouse.style.top=l+"px",n||this.drawMouseTail({x:s,y:l}),this.hoverElements(i)},t.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var r=!0===this.config.mouseTail?Ct:Object.assign({},Ct,this.config.mouseTail),n=r.lineCap,o=r.lineWidth,i=r.strokeStyle,a=r.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=o,e.lineCap=n,e.strokeStyle=i,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}},t.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var r=e;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement},t.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},t.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(e.ReplayerEvents.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},t.prototype.restoreRealParent=function(e,t){this.mirror.map[t.__sn.id]=t,t.__sn.type===O.Element&&"textarea"===t.__sn.tagName&&e.textContent&&(t.value=e.textContent),t.appendChild(e),this.restoreState(t)},t.prototype.storeState=function(e){var t,r;if(e&&e.nodeType===e.ELEMENT_NODE){var n=e;(n.scrollLeft||n.scrollTop)&&this.elementStateMap.set(e,{scroll:[n.scrollLeft,n.scrollTop]}),"STYLE"===n.tagName&&function(e,t){var r;try{var n=Array.from((null===(r=e.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:vt.Snapshot,cssTexts:n}])}catch(e){}}(n,this.virtualStyleRulesMap);var o=n.children;try{for(var i=l(Array.from(o)),a=i.next();!a.done;a=i.next()){var s=a.value;this.storeState(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}},t.prototype.restoreState=function(e){var t,r;if(e.nodeType===e.ELEMENT_NODE){var n=e;if(this.elementStateMap.has(e)){var o=this.elementStateMap.get(e);o.scroll&&(n.scrollLeft=o.scroll[0],n.scrollTop=o.scroll[1]),this.elementStateMap.delete(e)}var i=n.children;try{for(var a=l(Array.from(i)),s=a.next();!s.done;s=a.next()){var c=s.value;this.restoreState(c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}},t.prototype.restoreNodeSheet=function(e){var t=this.virtualStyleRulesMap.get(e);"STYLE"===e.nodeName&&(t&&bt(t,e))},t.prototype.warnNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.warn("Node with id '"+t+"' was previously removed. ",e):this.warn("Node with id '"+t+"' not found. ",e)},t.prototype.warnCanvasMutationFailed=function(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)},t.prototype.debugNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.debug("[replayer]","Node with id '"+t+"' was previously removed. ",e):this.debug("[replayer]","Node with id '"+t+"' not found. ",e)},t.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,u(["[replayer]"],e))},t.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,u(["[replayer]"],e))},t}(),Nt={key:"_sid"},Rt=$e.addCustomEvent,_t=$e.freezePage;return e.Replayer=Mt,e.addCustomEvent=Rt,e.freezePage=_t,e.getRecordSequentialIdPlugin=function(e){var t=e?Object.assign({},Nt,e):Nt,r=0;return{name:"rrweb/sequential-id@1",eventProcessor:function(e){var n;return Object.assign(e,((n={})[t.key]=++r,n)),e},options:t}},e.record=$e,e.utils=A,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
29
+ ***************************************************************************** */function at(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(rt||(rt={}));var st={type:"xstate.init"};function lt(e){return void 0===e?[]:[].concat(e)}function ct(e){return{type:"xstate.assign",assignment:e}}function ut(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function dt(e){return function(t){return e===t}}function pt(e){return"string"==typeof e?{type:e}:e}function ft(e,t){return{value:e,context:t,actions:[],changed:!1,matches:dt(e)}}function ht(e,t,n){var r=t,o=!1;return[e.filter((function(e){if("xstate.assign"===e.type){o=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(o){t[o]="function"==typeof e.assignment[o]?e.assignment[o](r,n):e.assignment[o]})),r=t,!1}return!0})),r,o]}function mt(e,t){void 0===t&&(t={});var n=at(ht(lt(e.states[e.initial].entry).map((function(e){return ut(e,t.actions)})),e.context,st),2),r=n[0],o=n[1],i={config:e,_options:t,initialState:{value:e.initial,actions:r,context:o,matches:dt(e.initial)},transition:function(t,n){var r,o,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,l=a.context,c=pt(n),u=e.states[s];if(u.on){var d=lt(u.on[c.type]);try{for(var p=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),f=p.next();!f.done;f=p.next()){var h=f.value;if(void 0===h)return ft(s,l);var m="string"==typeof h?{target:h}:h,v=m.target,y=m.actions,g=void 0===y?[]:y,b=m.cond,S=void 0===b?function(){return!0}:b,T=void 0===v,w=null!=v?v:s,x=e.states[w];if(S(l,c)){var E=at(ht((T?lt(g):[].concat(u.exit,g,x.entry).filter((function(e){return e}))).map((function(e){return ut(e,i._options.actions)})),l,c),3),I=E[0],C=E[1],M=E[2],k=null!=v?v:s;return{value:k,context:C,actions:I,changed:v!==s||I.length>0||M,matches:dt(k)}}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(r)throw r.error}}}return ft(s,l)}};return i}var vt=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function yt(e){var t=e.initialState,n=rt.NotStarted,r=new Set,o={_machine:e,send:function(o){n===rt.Running&&(t=e.transition(t,o),vt(t,pt(o)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var i="object"==typeof r?r:{context:e.config.context,value:r};t={value:i.value,actions:[],context:i.context,matches:dt(i.value)}}return n=rt.Running,vt(t,st),o},stop:function(){return n=rt.Stopped,r.clear(),o},get state(){return t},get status(){return n}};return o}function gt(t,o){var i=o.getCastFn,a=o.applyEventsSynchronously,s=o.emitter;return yt(mt({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]},REPLACE_EVENTS:{target:"playing",actions:["replaceEvents"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]},REPLACE_EVENTS:{target:"paused",actions:["replaceEvents"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ct({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:ct((function(e,t){var r=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(r=t.payload.timeOffset),n(n({},e),{timeOffset:r,baselineTime:e.events[0].timestamp+r})})),play:function(t){var n,o,l,c,u,d=t.timer,p=t.events,f=t.baselineTime,h=t.lastPlayedEvent;d.clear();try{for(var m=r(p),v=m.next();!v.done;v=m.next()){it(v.value,f)}}catch(e){n={error:e}}finally{try{v&&!v.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}var y=function(t,n){for(var r=t.length-1;r>=0;r--){var o=t[r];if(o.type===e.EventType.Meta&&o.timestamp<=n)return t.slice(r)}return t}(p,f),g=null==h?void 0:h.timestamp;(null==h?void 0:h.type)===e.EventType.IncrementalSnapshot&&h.data.source===e.IncrementalSource.MouseMove&&(g=h.timestamp+(null===(u=h.data.positions[0])||void 0===u?void 0:u.timeOffset)),f<(g||0)&&s.emit(e.ReplayerEvents.PlayBack);var b=new Array,S=new Array,T=function(e){if(g&&g<f&&(e.timestamp<=g||e===h))return"continue";if(e.timestamp<f)b.push(e);else{var t=i(e,!1);S.push({doAction:function(){t()},delay:e.delay})}};try{for(var w=r(y),x=w.next();!x.done;x=w.next()){T(x.value)}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}a(b),s.emit(e.ReplayerEvents.Flush),d.addActions(S),d.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:ct((function(e){return n(n({},e),{lastPlayedEvent:null})})),startLive:ct({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),replaceEvents:ct((function(e,t){var o,a,s=e.events,l=e.timer,c=e.baselineTime;if("REPLACE_EVENTS"===t.type){var u=t.payload.events;s.length=0;var d=[],p=function(e){if(it(e,c),s.push(e),e.timestamp>=l.timeOffset+c){var t=i(e,!1);d.push({doAction:function(){t()},delay:e.delay})}};try{for(var f=r(u),h=f.next();!h.done;h=f.next()){p(h.value)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}l.isActive()&&l.replaceActions(d)}return n(n({},e),{events:s})})),addEvent:ct((function(e,t){var r=e.baselineTime,o=e.timer,a=e.events;if("ADD_EVENT"===t.type){var s=t.payload.event;it(s,r);var l=a.length-1;if(!a[l]||a[l].timestamp<=s.timestamp)a.push(s);else{for(var c=-1,u=0;u<=l;){var d=Math.floor((u+l)/2);a[d].timestamp<=s.timestamp?u=d+1:l=d-1}-1===c&&(c=u),a.splice(c,0,s)}var p=s.timestamp<r,f=i(s,p);p?f():o.isActive()&&o.addAction({doAction:function(){f()},delay:s.delay})}return n(n({},e),{events:a})}))}}))}var bt;function St(e,t){var n=e[t[0]];return 1===t.length?n:St(n.cssRules[t[1]].cssRules,t.slice(2))}function Tt(e){var t=i([],o(e),!1),n=t.pop();return{positions:t,index:n}}function wt(e,t){var n=t.sheet;n&&e.forEach((function(e){if(e.type===bt.Insert)try{if(Array.isArray(e.index)){var r=Tt(e.index),i=r.positions,a=r.index;St(n.cssRules,i).insertRule(e.cssText,a)}else n.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===bt.Remove)try{if(Array.isArray(e.index)){var s=Tt(e.index);i=s.positions,a=s.index;St(n.cssRules,i).deleteRule(a||0)}else n.deleteRule(e.index)}catch(e){}else if(e.type===bt.Snapshot)!function(e,t){var n;try{var r=Array.from((null===(n=t.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText})),i=Object.entries(r).reverse(),a=r.length;i.forEach((function(n){var r,i=o(n,2),s=i[0],l=i[1],c=e.indexOf(l);if(-1===c||c>a)try{null===(r=t.sheet)||void 0===r||r.deleteRule(Number(s))}catch(e){}a=c})),e.forEach((function(e,n){var r,o,i;try{(null===(o=null===(r=t.sheet)||void 0===r?void 0:r.cssRules[n])||void 0===o?void 0:o.cssText)!==e&&(null===(i=t.sheet)||void 0===i||i.insertRule(e,n))}catch(e){}}))}catch(e){}}(e.cssTexts,t);else if(e.type===bt.SetProperty){St(n.cssRules,e.index).style.setProperty(e.property,e.value,e.priority)}else if(e.type===bt.RemoveProperty){St(n.cssRules,e.index).style.removeProperty(e.property)}}))}!function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"}(bt||(bt={}));var xt=new Map;function Et(e,t){var n=xt.get(e);return n||(n=new Map,xt.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var It=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ct(e,t){return function(n){if(n&&"object"==typeof n&&"rr_type"in n){if("index"in n){var r=n.rr_type,a=n.index;return Et(t,r)[a]}if("args"in n){var s=n.rr_type,l=n.args,c=window[s];return new(c.bind.apply(c,i([void 0],o(l.map(Ct(e,t))),!1)))}if("base64"in n)return function(e){var t,n,r,o,i,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c=new ArrayBuffer(a),u=new Uint8Array(c);for(t=0;t<s;t+=4)n=Ue[e.charCodeAt(t)],r=Ue[e.charCodeAt(t+1)],o=Ue[e.charCodeAt(t+2)],i=Ue[e.charCodeAt(t+3)],u[l++]=n<<2|r>>4,u[l++]=(15&r)<<4|o>>2,u[l++]=(3&o)<<6|63&i;return c}(n.base64);if("src"in n){var u=e.get(n.src);if(u)return u;var d=new Image;return d.src=n.src,e.set(n.src,d),d}}else if(Array.isArray(n))return n.map(Ct(e,t));return n}}function Mt(e){var t=e.mutation,n=e.target,r=e.type,o=e.imageMap,i=e.errorHandler;try{var a=function(e,t){try{return t===W.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(e){return null}}(n,r);if(!a)return;if(t.setter)return void(a[t.property]=t.args[0]);var s=a[t.property],l=t.args.map(Ct(o,a));!function(e,t){if(null==t?void 0:t.constructor){var n=t.constructor.name;if(It.includes(n)){var r=Et(e,n);r.includes(t)||r.push(t)}}}(a,s.apply(a,l))}catch(e){i(t,e)}}var kt=36e5,Nt=et||tt,Rt="[replayer]",_t={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function At(t){return t.type==e.EventType.IncrementalSnapshot&&(t.data.source==e.IncrementalSource.TouchMove||t.data.source==e.IncrementalSource.MouseInteraction&&t.data.type==e.MouseInteractions.TouchStart)}var Ot=function(){function a(t,n){var o=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=Nt(),this.activityIntervals=[],this.legacy_missingNodeRetryMap={},this.cache=H(),this.imageMap=new Map,this.mirror={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}},this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(null==n?void 0:n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"highlight-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:_t,inactiveThreshold:.02,inactiveSkipTime:2e3};this.config=Object.assign({},i,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(e.ReplayerEvents.Resize,this.handleResize),this.setupDom(),this.treeIndex=new le,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(e.ReplayerEvents.Flush,(function(){var e,t,n,i,a,s,l,c,u=o.treeIndex.flush(),d=u.scrollMap,p=u.inputMap,f=u.mutationData;o.fragmentParentMap.forEach((function(e,t){return o.restoreRealParent(t,e)}));try{for(var h=r(f.texts),m=h.next();!m.done;m=h.next()){var v=m.value;o.applyText(v,f)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}try{for(var y=r(o.virtualStyleRulesMap.keys()),g=y.next();!g.done;g=y.next()){var b=g.value;o.restoreNodeSheet(b)}}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(n)throw n.error}}o.fragmentParentMap.clear(),o.elementStateMap.clear(),o.virtualStyleRulesMap.clear();try{for(var S=r(d.values()),T=S.next();!T.done;T=S.next()){v=T.value;o.applyScroll(v,!0)}}catch(e){a={error:e}}finally{try{T&&!T.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}try{for(var w=r(p.values()),x=w.next();!x.done;x=w.next()){v=x.value;o.applyInput(v)}}catch(e){l={error:e}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}})),this.emitter.on(e.ReplayerEvents.PlayBack,(function(){o.firstFullSnapshot=null,o.mirror.reset()}));var a=new ot([],(null==n?void 0:n.speed)||i.speed);this.service=gt({events:t.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(t){o.emitter.emit(e.ReplayerEvents.StateChange,{player:t})})),this.speedService=yt(mt({id:"speed",context:{normalSpeed:-1,timer:a},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:ct({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(t){o.emitter.emit(e.ReplayerEvents.StateChange,{speed:t})}));var s=this.service.state.context.events.find((function(t){return t.type===e.EventType.Meta})),l=this.service.state.context.events.find((function(t){return t.type===e.EventType.FullSnapshot}));if(s){var c=s.data,u=c.width,d=c.height;setTimeout((function(){o.emitter.emit(e.ReplayerEvents.Resize,{width:u,height:d})}),0)}l&&setTimeout((function(){o.firstFullSnapshot||(o.firstFullSnapshot=l,o.rebuildFullSnapshot(l),o.iframe.contentWindow.scrollTo(l.data.initialOffset))}),1),this.service.state.context.events.find(At)&&this.mouse.classList.add("touch-device")}return Object.defineProperty(a.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),a.prototype.on=function(e,t){return this.emitter.on(e,t),this},a.prototype.off=function(e,t){return this.emitter.off(e,t),this},a.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))},a.prototype.getActivityIntervals=function(){var e=this;if(0==this.activityIntervals.length){for(var t=[],n=this.getMetaData(),r=i(i([{timestamp:n.startTime}],o(this.service.state.context.events.filter((function(t){return e.isUserInteraction(t)}))),!1),[{timestamp:n.endTime}],!1),a=1;a<r.length;a++){var s=r[a-1],l=r[a];l.timestamp-s.timestamp>1e4?t.push({startTime:s.timestamp,endTime:l.timestamp,duration:l.timestamp-s.timestamp,active:!1}):t.push({startTime:s.timestamp,endTime:l.timestamp,duration:l.timestamp-s.timestamp,active:!0})}var c=[],u=t[0];for(a=1;a<t.length;a++)t[a].active!=t[a-1].active&&(c.push({startTime:u.startTime,endTime:t[a-1].endTime,duration:t[a-1].endTime-u.startTime,active:t[a-1].active}),u=t[a]);u&&t.length>0&&c.push({startTime:u.startTime,endTime:t[t.length-1].endTime,duration:t[t.length-1].endTime-u.startTime,active:t[t.length-1].active}),u=c[0];for(a=1;a<c.length;a++)(!c[a].active&&c[a].duration>this.config.inactiveThreshold*n.totalTime||!c[a-1].active&&c[a-1].duration>this.config.inactiveThreshold*n.totalTime)&&(this.activityIntervals.push({startTime:u.startTime,endTime:c[a-1].endTime,duration:c[a-1].endTime-u.startTime,active:c[a-1].active}),u=c[a]);u&&c.length>0&&this.activityIntervals.push({startTime:u.startTime,endTime:c[c.length-1].endTime,duration:c[c.length-1].endTime-u.startTime,active:c[c.length-1].active})}return this.activityIntervals},a.prototype.getMetaData=function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}},a.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},a.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},a.prototype.getMirror=function(){return this.mirror},a.prototype.play=function(t){var n;void 0===t&&(t=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null===(n=this.iframe.contentDocument)||void 0===n||n.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.Start),this.handleInactivity(this.getMetaData().startTime+t,!0)},a.prototype.pause=function(t){var n;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null===(n=this.iframe.contentDocument)||void 0===n||n.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.Pause)},a.prototype.resume=function(t){void 0===t&&(t=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(e.ReplayerEvents.Resume)},a.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},a.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;At(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},a.prototype.replaceEvents=function(e){var t,n;try{for(var o=r(e),i=o.next();!i.done;i=o.next()){if(At(i.value)){this.mouse.classList.add("touch-device");break}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}this.service.send({type:"REPLACE_EVENTS",payload:{events:e}})},a.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},a.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},a.prototype.resetCache=function(){this.cache=H()},a.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(nt(this.iframe.contentWindow,this.iframe.contentDocument),se(this.iframe.contentWindow))},a.prototype.handleResize=function(e){var t,n;this.iframe.style.display="inherit";try{for(var o=r([this.mouseTail,this.iframe]),i=o.next();!i.done;i=o.next()){var a=i.value;a&&(a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}},a.prototype.applyEventsSynchronously=function(t){var n,o;try{for(var i=r(t),a=i.next();!a.done;a=i.next()){var s=a.value;switch(s.type){case e.EventType.DomContentLoaded:case e.EventType.Load:case e.EventType.Custom:continue;case e.EventType.FullSnapshot:case e.EventType.Meta:case e.EventType.Plugin:break;case e.EventType.IncrementalSnapshot:switch(s.data.source){case e.IncrementalSource.MediaInteraction:continue}}this.getCastFn(s,!0)()}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null,!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null},a.prototype.getCastFn=function(t,n){var o,i=this;switch(void 0===n&&(n=!1),t.type){case e.EventType.DomContentLoaded:case e.EventType.Load:break;case e.EventType.Custom:o=function(){i.emitter.emit(e.ReplayerEvents.CustomEvent,t)};break;case e.EventType.Meta:o=function(){return i.emitter.emit(e.ReplayerEvents.Resize,{width:t.data.width,height:t.data.height})};break;case e.EventType.FullSnapshot:o=function(){if(i.firstFullSnapshot){if(i.firstFullSnapshot===t)return void(i.firstFullSnapshot=!0)}else i.firstFullSnapshot=!0;i.rebuildFullSnapshot(t,n),i.iframe.contentWindow.scrollTo(t.data.initialOffset)};break;case e.EventType.IncrementalSnapshot:o=function(){var o,a;if(i.applyIncremental(t,n),!n&&(i.handleInactivity(t.timestamp),t===i.nextUserInteractionEvent&&(i.nextUserInteractionEvent=null,i.backToNormal()),i.config.skipInactive&&!i.nextUserInteractionEvent)){try{for(var s=r(i.service.state.context.events),l=s.next();!l.done;l=s.next()){var c=l.value;if(!(c.timestamp<=t.timestamp)&&i.isUserInteraction(c)){c.delay-t.delay>1e4*i.speedService.state.context.timer.speed&&(i.nextUserInteractionEvent=c);break}}}catch(e){o={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}if(i.nextUserInteractionEvent){var u=i.nextUserInteractionEvent.delay-t.delay,d={speed:Math.min(Math.round(u/2e3),i.config.maxSpeed)};i.speedService.send({type:"FAST_FORWARD",payload:d}),i.emitter.emit(e.ReplayerEvents.SkipStart,d)}}}}return function(){var a,s;o&&o();try{for(var l=r(i.config.plugins||[]),c=l.next();!c.done;c=l.next()){c.value.handler(t,n,{replayer:i})}}catch(e){a={error:e}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}i.service.send({type:"CAST_EVENT",payload:{event:t}});var u=i.service.state.context.events.length-1;if(t===i.service.state.context.events[u]){var d=function(){u<i.service.state.context.events.length-1||(i.backToNormal(),i.service.send("END"),i.emitter.emit(e.ReplayerEvents.Finish))};t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.MouseMove&&t.data.positions.length?setTimeout((function(){d()}),Math.max(0,50-t.data.positions[0].timeOffset)):d()}i.emitter.emit(e.ReplayerEvents.EventCast,t)}},a.prototype.handleInactivity=function(t,n){var o,i;if((t===this.inactiveEndTimestamp||n)&&(this.inactiveEndTimestamp=null,this.backToNormal()),this.config.skipInactive&&!this.inactiveEndTimestamp){try{for(var a=r(this.getActivityIntervals()),s=a.next();!s.done;s=a.next()){var l=s.value;if(t>=l.startTime&&t<l.endTime&&!l.active){this.inactiveEndTimestamp=l.endTime;break}}}catch(e){o={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}if(this.inactiveEndTimestamp){var c=this.inactiveEndTimestamp-t,u={speed:c/kt*this.config.inactiveSkipTime<1e3?c/1e3:Math.round(Math.max(c,kt)/this.config.inactiveSkipTime)};this.speedService.send({type:"FAST_FORWARD",payload:u}),this.emitter.emit(e.ReplayerEvents.SkipStart,u)}}},a.prototype.rebuildFullSnapshot=function(t,n){var o,i,a=this;if(void 0===n&&(n=!1),!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var s=[];this.mirror.map=X(t.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){a.collectIframeAndAttachDocument(s,e)},cache:this.cache})[1];var l=function(e,t){c.attachDocumentToIframe(e,t),c.newDocumentQueue=c.newDocumentQueue.filter((function(t){return t!==e}))},c=this;try{for(var u=r(s),d=u.next();!d.done;d=u.next()){var p=d.value;l(p.mutationInQueue,p.builtNode)}}catch(e){o={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}var f=this.iframe.contentDocument,h=f.documentElement,m=f.head;this.insertStyleRules(h,m),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(e.ReplayerEvents.FullsnapshotRebuilded,t),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},a.prototype.insertStyleRules=function(e,t){var n=document.createElement("style");e.insertBefore(n,t);var r,o=(r=this.config.blockClass,[".".concat(r," { background: currentColor }"),"noscript { display: none !important; }",".".concat(r," { background: currentColor; border-radius: 5px; }"),".".concat(r,":hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}")]).concat(this.config.insertStyleRules);this.config.pauseAnimation&&o.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }");for(var i=0;i<o.length;i++)n.sheet.insertRule(o[i],i)},a.prototype.attachDocumentToIframe=function(e,n){var o,i,a=this,s=[];if(!n.contentDocument)for(var l=n.parentNode;l;){if(this.fragmentParentMap.has(l)){var c=l,u=this.fragmentParentMap.get(c);this.restoreRealParent(c,u);break}l=l.parentNode}Y(e.node,{doc:n.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){if(a.collectIframeAndAttachDocument(s,e),e.__sn.type===t.Element&&"HTML"===e.__sn.tagName.toUpperCase()){var r=n.contentDocument,o=r.documentElement,i=r.head;a.insertStyleRules(o,i)}},cache:this.cache});var d=function(e,t){p.attachDocumentToIframe(e,t),p.newDocumentQueue=p.newDocumentQueue.filter((function(t){return t!==e}))},p=this;try{for(var f=r(s),h=f.next();!h.done;h=f.next()){var m=h.value;d(m.mutationInQueue,m.builtNode)}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}},a.prototype.collectIframeAndAttachDocument=function(e,t){if(de(t)){var n=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));n&&e.push({mutationInQueue:n,builtNode:t})}},a.prototype.waitForStylesheetLoad=function(){var t,n=this,r=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.head;if(r){var o,i=new Set,a=this.service.state,s=function(){a=n.service.state};this.emitter.on(e.ReplayerEvents.Start,s),this.emitter.on(e.ReplayerEvents.Pause,s);var l=function(){n.emitter.off(e.ReplayerEvents.Start,s),n.emitter.off(e.ReplayerEvents.Pause,s)};r.querySelectorAll('link[rel="stylesheet"]').forEach((function(t){t.sheet||(i.add(t),t.addEventListener("load",(function(){i.delete(t),0===i.size&&-1!==o&&(a.matches("playing")&&n.play(n.getCurrentTime()),n.emitter.emit(e.ReplayerEvents.LoadStylesheetEnd),o&&clearTimeout(o),l())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(e.ReplayerEvents.LoadStylesheetStart),o=setTimeout((function(){a.matches("playing")&&n.play(n.getCurrentTime()),o=-1,l()}),this.config.loadTimeout))}},a.prototype.hasImageArg=function(e){var t,n;try{for(var o=r(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(a&&"object"==typeof a)if("rr_type"in a&&"args"in a){if(this.hasImageArg(a.args))return!0}else{if("rr_type"in a&&"HTMLImageElement"===a.rr_type)return!0;if(a instanceof Array&&this.hasImageArg(a))return!0}else;}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!1},a.prototype.getImageArgs=function(e){var t,n,a=[];try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var c=l.value;c&&"object"==typeof c&&("rr_type"in c&&"args"in c?a.push.apply(a,i([],o(this.getImageArgs(c.args)),!1)):"rr_type"in c&&"HTMLImageElement"===c.rr_type?a.push(c.src):c instanceof Array&&a.push.apply(a,i([],o(this.getImageArgs(c)),!1)))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a},a.prototype.preloadAllImages=function(){var t,n,o=this;this.service.state;var i=function(){o.service.state};this.emitter.on(e.ReplayerEvents.Start,i),this.emitter.on(e.ReplayerEvents.Pause,i);var a=function(t){t.type===e.EventType.IncrementalSnapshot&&t.data.source===e.IncrementalSource.CanvasMutation&&("commands"in t.data?t.data.commands.forEach((function(e){return o.preloadImages(e,t)})):s.preloadImages(t.data,t))},s=this;try{for(var l=r(this.service.state.context.events),c=l.next();!c.done;c=l.next()){a(c.value)}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}},a.prototype.preloadImages=function(e,t){var n=this;if("drawImage"!==e.property||"string"!=typeof e.args[0]||this.imageMap.has(t))this.hasImageArg(e.args)&&this.getImageArgs(e.args).forEach((function(e){var t=new Image;t.src=e,n.imageMap.set(e,t)}));else{var r=document.createElement("canvas"),o=r.getContext("2d"),i=null==o?void 0:o.createImageData(r.width,r.height);null==i||i.data,JSON.parse(e.args[0]),null==o||o.putImageData(i,0,0)}},a.prototype.applyIncremental=function(t,r){var o,i,a=this,s=t.data;switch(s.source){case e.IncrementalSource.Mutation:r&&(s.adds.forEach((function(e){return a.treeIndex.add(e)})),s.texts.forEach((function(e){var t=a.mirror.getNode(e.id),n=null==t?void 0:t.parentNode;n&&a.virtualStyleRulesMap.has(n)&&a.virtualStyleRulesMap.delete(n),a.treeIndex.text(e)})),s.attributes.forEach((function(e){return a.treeIndex.attribute(e)})),s.removes.forEach((function(e){return a.treeIndex.remove(e,a.mirror)})));try{this.applyMutation(s,r)}catch(e){this.warn("Exception in mutation ".concat(e.message||e),s)}break;case e.IncrementalSource.Drag:case e.IncrementalSource.TouchMove:case e.IncrementalSource.MouseMove:if(r){var l=s.positions[s.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:s}}else s.positions.forEach((function(e){var n={doAction:function(){a.moveAndHover(e.x,e.y,e.id,r,s)},delay:e.timeOffset+t.timestamp-a.service.state.context.baselineTime};a.timer.addAction(n)})),this.timer.addAction({doAction:function(){},delay:t.delay-(null===(o=s.positions[0])||void 0===o?void 0:o.timeOffset)});break;case e.IncrementalSource.MouseInteraction:if(-1===s.id)break;var c=new Event(e.MouseInteractions[s.type].toLowerCase());if(!(S=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);this.emitter.emit(e.ReplayerEvents.MouseInteraction,{type:s.type,target:S});var u=this.config.triggerFocus;switch(s.type){case e.MouseInteractions.Blur:"blur"in S&&S.blur();break;case e.MouseInteractions.Focus:u&&S.focus&&S.focus({preventScroll:!0});break;case e.MouseInteractions.Click:case e.MouseInteractions.TouchStart:case e.MouseInteractions.TouchEnd:r?(s.type===e.MouseInteractions.TouchStart?this.touchActive=!0:s.type===e.MouseInteractions.TouchEnd&&(this.touchActive=!1),this.mousePos={x:s.x,y:s.y,id:s.id,debugData:s}):(s.type===e.MouseInteractions.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(s.x,s.y,s.id,r,s),s.type===e.MouseInteractions.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):s.type===e.MouseInteractions.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):s.type===e.MouseInteractions.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case e.MouseInteractions.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:S.dispatchEvent(c)}break;case e.IncrementalSource.Scroll:if(-1===s.id)break;if(r){this.treeIndex.scroll(s);break}this.applyScroll(s,!1);break;case e.IncrementalSource.ViewportResize:this.emitter.emit(e.ReplayerEvents.Resize,{width:s.width,height:s.height});break;case e.IncrementalSource.Input:if(-1===s.id)break;if(r){this.treeIndex.input(s);break}this.applyInput(s);break;case e.IncrementalSource.MediaInteraction:if(!(S=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);var d=S;try{s.currentTime&&(d.currentTime=s.currentTime),s.volume&&(d.volume=s.volume),s.muted&&(d.muted=s.muted),1===s.type&&d.pause(),0===s.type&&d.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: ".concat(e.message||e))}break;case e.IncrementalSource.StyleSheetRule:if(!(S=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);var p,f=S,h=S.parentNode,m=this.fragmentParentMap.has(h),v=m?null:f.sheet;v||(this.virtualStyleRulesMap.has(S)?p=this.virtualStyleRulesMap.get(S):(p=[],this.virtualStyleRulesMap.set(S,p))),s.adds&&s.adds.forEach((function(e){var t=e.rule,n=e.index;if(v)try{if(Array.isArray(n)){var r=Tt(n),o=r.positions,i=r.index;St(v.cssRules,o).insertRule(t,i)}else{i=void 0===n?void 0:Math.min(n,v.cssRules.length);v.insertRule(t,i)}}catch(e){}else null==p||p.push({cssText:t,index:n,type:bt.Insert})})),s.removes&&s.removes.forEach((function(e){var t=e.index;if(m)null==p||p.push({index:t,type:bt.Remove});else try{if(Array.isArray(t)){var n=Tt(t),r=n.positions,o=n.index;St(v.cssRules,r).deleteRule(o||0)}else null==v||v.deleteRule(t)}catch(e){}}));break;case e.IncrementalSource.StyleDeclaration:if(!(S=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);f=S;var y=S.parentNode,g=this.fragmentParentMap.has(y)?null:f.sheet,b=[];if(g||(this.virtualStyleRulesMap.has(S)?b=this.virtualStyleRulesMap.get(S):(b=[],this.virtualStyleRulesMap.set(S,b))),s.set)if(g)St(g.rules,s.index).style.setProperty(s.set.property,s.set.value,s.set.priority);else b.push(n({type:bt.SetProperty,index:s.index},s.set));if(s.remove)if(g)St(g.rules,s.index).style.removeProperty(s.remove.property);else b.push(n({type:bt.RemoveProperty,index:s.index},s.remove));break;case e.IncrementalSource.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var S;if(!(S=this.mirror.getNode(s.id)))return this.debugNodeNotFound(s,s.id);!function(e){var t=e.event,n=e.mutation,r=e.target,o=e.imageMap,i=e.errorHandler;try{var a="commands"in n?n.commands:[n];[W.WebGL,W.WebGL2].includes(n.type)?a.forEach((function(e){Mt({mutation:e,type:n.type,target:r,imageMap:o,errorHandler:i})})):a.forEach((function(e){!function(e){var t=e.event,n=e.mutation,r=e.target,o=e.imageMap,i=e.errorHandler;try{var a=r.getContext("2d");if(n.setter)return void(a[n.property]=n.args[0]);var s=a[n.property];if("drawImage"===n.property&&"string"==typeof n.args[0]){var l=o.get(t);n.args[0]=l,s.apply(a,n.args)}else s.apply(a,n.args)}catch(e){i(n,e)}}({event:t,mutation:e,target:r,imageMap:o,errorHandler:i})}))}catch(e){i(n,e)}}({event:t,mutation:s,target:S,imageMap:this.imageMap,errorHandler:this.warnCanvasMutationFailed.bind(this)});break;case e.IncrementalSource.Font:try{var T=new FontFace(s.family,s.buffer?new Uint8Array(JSON.parse(s.fontSource)):s.fontSource,s.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(T)}catch(e){this.config.showWarning&&console.warn(e)}}},a.prototype.applyMutation=function(e,o){var i,a,s=this;e.removes.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.parentId})))return;return s.warnNodeNotFound(e,t.id)}s.virtualStyleRulesMap.has(n)&&s.virtualStyleRulesMap.delete(n);var r=s.mirror.getNode(t.parentId);if(!r)return s.warnNodeNotFound(e,t.parentId);if(t.isShadow&&fe(r)&&(r=r.shadowRoot),s.mirror.removeNodeFromMap(n),r){var o=null,i="__sn"in r?s.fragmentParentMap.get(r):void 0;i&&i.contains(n)?r=i:s.fragmentParentMap.has(n)&&(o=s.fragmentParentMap.get(n),s.fragmentParentMap.delete(n),n=o);try{r.removeChild(n)}catch(t){if(!(t instanceof DOMException))throw t;s.warn("parent could not remove child in mutation",r,i,n,o,e)}}}));var l=n({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var n,i,a,u;if(!s.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var d=s.mirror.getNode(e.parentId);if(!d)return e.node.type===t.Document?s.newDocumentQueue.push(e):c.push(e);var p=null;s.iframe.contentDocument.contains?p=s.iframe.contentDocument.contains(d):s.iframe.contentDocument.body.contains&&(p=s.iframe.contentDocument.body.contains(d));var f=(null===(u=(a=d).getElementsByTagName)||void 0===u?void 0:u.call(a,"iframe").length)>0;if(o&&p&&!de(d)&&!f){var h=document.createDocumentFragment();for(s.mirror.map[e.parentId]=h,s.fragmentParentMap.set(h,d),s.storeState(d);d.firstChild;)h.appendChild(d.firstChild);d=h}e.node.isShadow&&(fe(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);var m=null,v=null;if(e.previousId&&(m=s.mirror.getNode(e.previousId)),e.nextId&&(v=s.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=s.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return c.push(e);if(!e.node.rootId||s.mirror.getNode(e.node.rootId)){var y=e.node.rootId?s.mirror.getNode(e.node.rootId):s.iframe.contentDocument;if(de(d))s.attachDocumentToIframe(e,d);else{var g=Y(e.node,{doc:y,map:s.mirror.map,skipChild:!0,hackCss:!0,cache:s.cache});if(-1!==e.previousId&&-1!==e.nextId){if("__sn"in d&&d.__sn.type===t.Element&&"textarea"===d.__sn.tagName&&e.node.type===t.Text)try{for(var b=r(Array.from(d.childNodes)),S=b.next();!S.done;S=b.next()){var T=S.value;T.nodeType===d.TEXT_NODE&&d.removeChild(T)}}catch(e){n={error:e}}finally{try{S&&!S.done&&(i=b.return)&&i.call(b)}finally{if(n)throw n.error}}if(m&&m.nextSibling&&m.nextSibling.parentNode)d.insertBefore(g,m.nextSibling);else if(v&&v.parentNode)d.contains(v)?d.insertBefore(g,v):d.insertBefore(g,null);else{if(d===y)for(;y.firstChild;)y.removeChild(y.firstChild);d.appendChild(g)}if(de(g)){var w=s.newDocumentQueue.find((function(e){return e.parentId===g.__sn.id}));w&&(s.attachDocumentToIframe(w,g),s.newDocumentQueue=s.newDocumentQueue.filter((function(e){return e!==w})))}(e.previousId||e.nextId)&&s.legacy_resolveMissingNode(l,d,g,e)}else l[e.node.id]={node:g,mutation:e}}}};e.adds.forEach((function(e){u(e)}));for(var d=Date.now();c.length;){var p=ce(c);if(c.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}try{for(var f=(i=void 0,r(p)),h=f.next();!h.done;h=f.next()){var m=h.value;this.mirror.getNode(m.value.parentId)?ue(m,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",m)}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}s.fragmentParentMap.has(n)&&(n=s.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=s.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return s.warnNodeNotFound(e,t.id)}for(var r in s.fragmentParentMap.has(n)&&(n=s.fragmentParentMap.get(n)),t.attributes)if("string"==typeof r){var o=t.attributes[r];if(null===o)n.removeAttribute(r);else if("string"==typeof o)try{n.setAttribute(r,o)}catch(e){s.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===r){var i=o,a=n;for(var l in i)if(!1===i[l])a.style.removeProperty(l);else if(i[l]instanceof Array){var c=i[l];a.style.setProperty(l,c[0],c[1])}else{var u=i[l];a.style.setProperty(l,u)}}}}))},a.prototype.applyScroll=function(e,n){var r=this.mirror.getNode(e.id);if(!r)return this.debugNodeNotFound(e,e.id);if(r===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:n?"auto":"smooth"});else if(r.__sn.type===t.Document)r.defaultView.scrollTo({top:e.y,left:e.x,behavior:n?"auto":"smooth"});else try{r.scrollTop=e.y,r.scrollLeft=e.x}catch(e){}},a.prototype.applyInput=function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}},a.prototype.applyText=function(e,t){var n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(t,e.id);try{n.textContent=e.value}catch(e){}},a.prototype.legacy_resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,n.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},a.prototype.moveAndHover=function(e,t,n,r,o){var i=this.mirror.getNode(n);if(!i)return this.debugNodeNotFound(o,n);var a=pe(i,this.iframe),s=e*a.absoluteScale+a.x,l=t*a.absoluteScale+a.y;this.mouse.style.left="".concat(s,"px"),this.mouse.style.top="".concat(l,"px"),r||this.drawMouseTail({x:s,y:l}),this.hoverElements(i)},a.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?_t:Object.assign({},_t,this.config.mouseTail),r=n.lineCap,o=n.lineWidth,i=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=o,e.lineCap=r,e.strokeStyle=i,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}},a.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},a.prototype.isUserInteraction=function(t){return t.type===e.EventType.IncrementalSnapshot&&(t.data.source>e.IncrementalSource.Mutation&&t.data.source<=e.IncrementalSource.Input)},a.prototype.backToNormal=function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(e.ReplayerEvents.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},a.prototype.restoreRealParent=function(e,n){this.mirror.map[n.__sn.id]=n,n.__sn.type===t.Element&&"textarea"===n.__sn.tagName&&e.textContent&&(n.value=e.textContent),n.appendChild(e),this.restoreState(n)},a.prototype.storeState=function(e){var t,n;if(e&&e.nodeType===e.ELEMENT_NODE){var o=e;(o.scrollLeft||o.scrollTop)&&this.elementStateMap.set(e,{scroll:[o.scrollLeft,o.scrollTop]}),"STYLE"===o.tagName&&function(e,t){var n;try{var r=Array.from((null===(n=e.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:bt.Snapshot,cssTexts:r}])}catch(e){}}(o,this.virtualStyleRulesMap);var i=o.children;try{for(var a=r(Array.from(i)),s=a.next();!s.done;s=a.next()){var l=s.value;this.storeState(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}},a.prototype.restoreState=function(e){var t,n;if(e.nodeType===e.ELEMENT_NODE){var o=e;if(this.elementStateMap.has(e)){var i=this.elementStateMap.get(e);i.scroll&&(o.scrollLeft=i.scroll[0],o.scrollTop=i.scroll[1]),this.elementStateMap.delete(e)}var a=o.children;try{for(var s=r(Array.from(a)),l=s.next();!l.done;l=s.next()){var c=l.value;this.restoreState(c)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},a.prototype.restoreNodeSheet=function(e){var t=this.virtualStyleRulesMap.get(e);"STYLE"===e.nodeName&&(t&&wt(t,e))},a.prototype.warnNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.warn("Node with id '".concat(t,"' was previously removed. "),e):this.warn("Node with id '".concat(t,"' not found. "),e)},a.prototype.warnCanvasMutationFailed=function(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)},a.prototype.debugNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.debug(Rt,"Node with id '".concat(t,"' was previously removed. "),e):this.debug(Rt,"Node with id '".concat(t,"' not found. "),e)},a.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,i([Rt],o(e),!1))},a.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,i([Rt],o(e),!1))},a}(),Dt=Ze.addCustomEvent,Lt=Ze.freezePage;return e.Replayer=Ot,e.addCustomEvent=Dt,e.freezePage=Lt,e.record=Ze,e.utils=he,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
30
30
  //# sourceMappingURL=rrweb.min.js.map