@highlight-run/rrweb 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/plugins/console-record.js +12 -454
- package/dist/plugins/console-record.min.js.map +1 -1
- package/dist/plugins/console-replay.js +4 -164
- package/dist/plugins/console-replay.min.js.map +1 -1
- package/dist/plugins/sequential-id-record.js +1 -30
- package/dist/plugins/sequential-id-replay.js +1 -33
- package/dist/record/rrweb-record-pack.js +3 -664
- package/dist/record/rrweb-record-pack.min.js.map +1 -1
- package/dist/record/rrweb-record.js +4 -3202
- package/dist/record/rrweb-record.min.js +3 -3
- package/dist/record/rrweb-record.min.js.map +1 -1
- package/dist/replay/rrweb-replay-unpack.css +1 -0
- package/dist/replay/rrweb-replay-unpack.js +5 -4914
- package/dist/replay/rrweb-replay-unpack.min.css +2 -0
- package/dist/replay/rrweb-replay-unpack.min.css.map +1 -0
- package/dist/replay/rrweb-replay-unpack.min.js +1 -1
- package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
- package/dist/replay/rrweb-replay.css +1 -0
- package/dist/replay/rrweb-replay.js +5 -4506
- package/dist/replay/rrweb-replay.min.css +2 -0
- package/dist/replay/rrweb-replay.min.css.map +1 -0
- package/dist/replay/rrweb-replay.min.js +1 -1
- package/dist/replay/rrweb-replay.min.js.map +1 -1
- package/dist/rrweb-all.css +1 -0
- package/dist/rrweb-all.js +16 -8877
- package/dist/rrweb-all.min.css +2 -0
- package/dist/rrweb-all.min.css.map +1 -0
- package/dist/rrweb-all.min.js +1 -1
- package/dist/rrweb-all.min.js.map +1 -1
- package/dist/rrweb.css +1 -0
- package/dist/rrweb.js +6 -7546
- package/dist/rrweb.min.css +2 -0
- package/dist/rrweb.min.css.map +1 -0
- package/dist/rrweb.min.js +1 -1
- package/dist/rrweb.min.js.map +1 -1
- package/es/rrweb/all.css +1 -0
- package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +1 -1
- package/lib/replay/rrweb-replay-unpack.css +1 -0
- package/lib/replay/rrweb-replay-unpack.js +1 -1
- package/lib/replay/rrweb-replay.css +1 -0
- package/lib/replay/rrweb-replay.js +1 -1
- package/lib/rrweb-all.css +1 -0
- package/lib/rrweb-all.js +1 -1
- package/lib/rrweb.css +1 -0
- package/lib/rrweb.js +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:left .05s linear,top .05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjcgNSAxOCAxOCIgaGVpZ2h0PSIzMDAiIHdpZHRoPSIzMDAiPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik04LjIgMjAuOXYtMTZsMTEuNiAxMS42SDEzbC0uNC4xeiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0xNy4zIDIxLjZsLTMuNiAxLjVMOSAxMmwzLjctMS41eiIvPjxwYXRoIGQ9Ik0xMS4wMyAxNC4yOTNsMS44NDUtLjc3NCAzLjA5NiA3LjM3Ni0xLjg0NC43NzV6Ii8+PHBhdGggZD0iTTkuMiA3LjN2MTEuMmwzLTIuOS40LS4xaDQuOHoiLz48L3N2Zz4=");border-color:transparent}.replayer-mouse:after{background:transparent}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse.touch-device{background-image:none;width:70px;height:70px;border-radius:100%;margin-left:-37px;margin-top:-37px;border:4px solid rgba(73,80,246,0);transition:left 0s linear,top 0s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device.touch-active{border-color:#4950f6;transition:left .25s linear,top .25s linear,border-color .2s ease-in-out}.replayer-mouse.touch-device:after{opacity:0}.replayer-mouse.touch-device.active:after{animation:touch-click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;background:transparent}75%{width:24px;height:24px;opacity:.8;background:#dc2626}to{background:transparent}}@keyframes touch-click{0%{opacity:0;width:20px;height:20px}50%{opacity:.5;width:10px;height:10px}}
|
|
2
|
+
/*# sourceMappingURL=rrweb-replay.min.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["style.css"],"names":[],"mappings":"AAAA,kBACE,iBACF,CACA,gBACE,iBAAkB,CAClB,UAAW,CACX,WAAY,CACZ,2CAA+C,CAC/C,uBAAwB,CACxB,uBAAkC,CAClC,2BAA4B,CAC5B,0cAAuzB,CACvzB,wBACF,CAEA,sBACE,sBACF,CAEA,6BACE,iCACF,CACA,6BACE,qBAAsB,CACtB,UAAW,CACX,WAAY,CAGZ,kBAAmB,CACnB,iBAAkB,CAClB,gBAAiB,CACjB,kCAAkC,CAClC,oEACF,CACA,0CACE,oBAAkC,CAClC,wEACF,CACA,mCACE,SACF,CACA,0CACE,uCACF,CACA,qBACE,iBAAkB,CAClB,mBACF,CAEA,iBACE,GACE,UAAY,CACZ,UAAW,CACX,WAAY,CACZ,sBACF,CACA,IACE,UAAW,CACX,WAAY,CACZ,UAAY,CACZ,kBACF,CACA,GACE,sBACF,CACF,CAEA,uBACE,GACE,SAAU,CACV,UAAW,CACX,WACF,CACA,IACE,UAAY,CACZ,UAAW,CACX,WACF,CACF","file":"rrweb-replay.min.css","sourcesContent":[".replayer-wrapper {\n position: relative;\n}\n.replayer-mouse {\n position: absolute;\n width: 20px;\n height: 20px;\n transition: left 0.05s linear, top 0.05s linear;\n background-size: contain;\n background-position: center center;\n background-repeat: no-repeat;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iNyA1IDE4IDE4IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyOCAyOCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgaGVpZ2h0PSIzMDBweCIgd2lkdGg9IjMwMHB4Ij4NCjxwb2x5Z29uIGZpbGw9IiNGRkZGRkYiIHBvaW50cz0iOC4yLDIwLjkgOC4yLDQuOSAxOS44LDE2LjUgMTMsMTYuNSAxMi42LDE2LjYgIi8+DQo8cG9seWdvbiBmaWxsPSIjRkZGRkZGIiBwb2ludHM9IjE3LjMsMjEuNiAxMy43LDIzLjEgOSwxMiAxMi43LDEwLjUgIi8+DQo8cmVjdCB4PSIxMi41IiB5PSIxMy42IiB0cmFuc2Zvcm09Im1hdHJpeCgwLjkyMjEgLTAuMzg3MSAwLjM4NzEgMC45MjIxIC01Ljc2MDUgNi41OTA5KSIgd2lkdGg9IjIiIGhlaWdodD0iOCIvPg0KPHBvbHlnb24gcG9pbnRzPSI5LjIsNy4zIDkuMiwxOC41IDEyLjIsMTUuNiAxMi42LDE1LjUgMTcuNCwxNS41ICIvPg0KPC9zdmc+DQo=');\n border-color: transparent; /* otherwise we transition from black when .touch-device class is added */\n}\n\n.replayer-mouse::after {\n background: transparent;\n}\n\n.replayer-mouse.active::after {\n animation: click 0.2s ease-in-out 1;\n}\n.replayer-mouse.touch-device {\n background-image: none; /* there's no passive cursor on touch-only screens */\n width: 70px;\n height: 70px;\n border-width: 4px;\n border-style: solid;\n border-radius: 100%;\n margin-left: -37px;\n margin-top: -37px;\n border-color: rgba(73, 80, 246, 0);\n transition: left 0s linear, top 0s linear, border-color 0.2s ease-in-out;\n}\n.replayer-mouse.touch-device.touch-active {\n border-color: rgba(73, 80, 246, 1);\n transition: left 0.25s linear, top 0.25s linear, border-color 0.2s ease-in-out;\n}\n.replayer-mouse.touch-device::after {\n opacity: 0; /* there's no passive cursor on touch-only screens */\n}\n.replayer-mouse.touch-device.active::after {\n animation: touch-click 0.2s ease-in-out 1;\n}\n.replayer-mouse-tail {\n position: absolute;\n pointer-events: none;\n}\n\n@keyframes click {\n 0% {\n opacity: 0.3;\n width: 20px;\n height: 20px;\n background: transparent;\n }\n 75% {\n width: 24px;\n height: 24px;\n opacity: 0.8;\n background: #dc2626;\n }\n 100% {\n background: transparent;\n }\n}\n\n@keyframes touch-click {\n 0% {\n opacity: 0;\n width: 20px;\n height: 20px;\n }\n 50% {\n opacity: 0.5;\n width: 10px;\n height: 10px;\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var rrwebReplay=function(ue){"use strict";var I;(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"})(I||(I={}));function vt(e){return e.nodeType===e.ELEMENT_NODE}var Se=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var r;if(!t)return-1;var i=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return i??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var r=this,i=this.getId(t);this.idNodeMap.delete(i),t.childNodes&&t.childNodes.forEach(function(n){return r.removeNodeFromMap(n)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,r){var i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)},e.prototype.replace=function(t,r){this.idNodeMap.set(t,r)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Tt(){return new Se}var Re=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function Nt(e,t){t===void 0&&(t={});var r=1,i=1;function n(y){var p=y.match(/\n/g);p&&(r+=p.length);var b=y.lastIndexOf(`
|
|
2
|
-
`);i=b===-1?i+y.length:y.length-b}function s(){var y={line:r,column:i};return function(p){return p.position=new a(y),T(),p}}var a=function(){function y(p){this.start=p,this.end={line:r,column:i},this.source=t.source}return y}();a.prototype.content=e;var l=[];function u(y){var p=new Error(t.source+":"+r+":"+i+": "+y);if(p.reason=y,p.filename=t.source,p.line=r,p.column=i,p.source=e,t.silent)l.push(p);else throw p}function o(){var y=m();return{type:"stylesheet",stylesheet:{source:t.source,rules:y,parsingErrors:l}}}function c(){return f(/^{\s*/)}function d(){return f(/^}/)}function m(){var y,p=[];for(T(),g(p);e.length&&e.charAt(0)!=="}"&&(y=O()||te());)y!==!1&&(p.push(y),g(p));return p}function f(y){var p=y.exec(e);if(p){var b=p[0];return n(b),e=e.slice(b.length),p}}function T(){f(/^\s*/)}function g(y){y===void 0&&(y=[]);for(var p;p=E();)p!==!1&&y.push(p),p=E();return y}function E(){var y=s();if(!(e.charAt(0)!=="/"||e.charAt(1)!=="*")){for(var p=2;e.charAt(p)!==""&&(e.charAt(p)!=="*"||e.charAt(p+1)!=="/");)++p;if(p+=2,e.charAt(p-1)==="")return u("End of comment missing");var b=e.slice(2,p-2);return i+=2,n(b),e=e.slice(p),i+=2,y({type:"comment",comment:b})}}function h(){var y=f(/^([^{]+)/);if(y)return $(y[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(p){return p.replace(/,/g,"\u200C")}).split(/\s*(?![^(]*\)),\s*/).map(function(p){return p.replace(/\u200C/g,",")})}function v(){var y=s(),p=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(p){var b=$(p[0]);if(!f(/^:\s*/))return u("property missing ':'");var S=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),P=y({type:"declaration",property:b.replace(Re,""),value:S?$(S[0]).replace(Re,""):""});return f(/^[;\s]*/),P}}function w(){var y=[];if(!c())return u("missing '{'");g(y);for(var p;p=v();)p!==!1&&(y.push(p),g(y)),p=v();return d()?y:u("missing '}'")}function R(){for(var y,p=[],b=s();y=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)p.push(y[1]),f(/^,\s*/);if(p.length)return b({type:"keyframe",values:p,declarations:w()})}function L(){var y=s(),p=f(/^@([-\w]+)?keyframes\s*/);if(p){var b=p[1];if(p=f(/^([-\w]+)\s*/),!p)return u("@keyframes missing name");var S=p[1];if(!c())return u("@keyframes missing '{'");for(var P,le=g();P=R();)le.push(P),le=le.concat(g());return d()?y({type:"keyframes",name:S,vendor:b,keyframes:le}):u("@keyframes missing '}'")}}function k(){var y=s(),p=f(/^@supports *([^{]+)/);if(p){var b=$(p[1]);if(!c())return u("@supports missing '{'");var S=g().concat(m());return d()?y({type:"supports",supports:b,rules:S}):u("@supports missing '}'")}}function A(){var y=s(),p=f(/^@host\s*/);if(p){if(!c())return u("@host missing '{'");var b=g().concat(m());return d()?y({type:"host",rules:b}):u("@host missing '}'")}}function G(){var y=s(),p=f(/^@media *([^{]+)/);if(p){var b=$(p[1]);if(!c())return u("@media missing '{'");var S=g().concat(m());return d()?y({type:"media",media:b,rules:S}):u("@media missing '}'")}}function W(){var y=s(),p=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(p)return y({type:"custom-media",name:$(p[1]),media:$(p[2])})}function De(){var y=s(),p=f(/^@page */);if(p){var b=h()||[];if(!c())return u("@page missing '{'");for(var S=g(),P;P=v();)S.push(P),S=S.concat(g());return d()?y({type:"page",selectors:b,declarations:S}):u("@page missing '}'")}}function Me(){var y=s(),p=f(/^@([-\w]+)?document *([^{]+)/);if(p){var b=$(p[1]),S=$(p[2]);if(!c())return u("@document missing '{'");var P=g().concat(m());return d()?y({type:"document",document:S,vendor:b,rules:P}):u("@document missing '}'")}}function ee(){var y=s(),p=f(/^@font-face\s*/);if(p){if(!c())return u("@font-face missing '{'");for(var b=g(),S;S=v();)b.push(S),b=b.concat(g());return d()?y({type:"font-face",declarations:b}):u("@font-face missing '}'")}}var ce=Q("import"),xe=Q("charset"),Ce=Q("namespace");function Q(y){var p=new RegExp("^@"+y+"\\s*([^;]+);");return function(){var b=s(),S=f(p);if(S){var P={type:y};return P[y]=S[1].trim(),b(P)}}}function O(){if(e[0]==="@")return L()||G()||W()||k()||ce()||xe()||Ce()||Me()||De()||A()||ee()}function te(){var y=s(),p=h();return p?(g(),y({type:"rule",selectors:p,declarations:w()})):u("selector missing")}return de(o())}function $(e){return e?e.replace(/^\s+|\s+$/g,""):""}function de(e,t){for(var r=e&&typeof e.type=="string",i=r?e:t,n=0,s=Object.keys(e);n<s.length;n++){var a=s[n],l=e[a];Array.isArray(l)?l.forEach(function(u){de(u,i)}):l&&typeof l=="object"&&de(l,i)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Ae={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Et(e){var t=Ae[e.tagName]?Ae[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function wt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Ie=/([^\\]):hover/,bt=new RegExp(Ie.source,"g");function Oe(e,t){var r;if(!(!((r=window.HIG_CONFIGURATION)===null||r===void 0)&&r.enableOnHoverClass))return e;var i=t?.stylesWithHoverClass.get(e);if(i)return i;var n=Nt(e,{silent:!0});if(!n.stylesheet)return e;var s=[];if(n.stylesheet.rules.forEach(function(u){"selectors"in u&&(u.selectors||[]).forEach(function(o){Ie.test(o)&&s.push(o)})}),s.length===0)return e;var a=new RegExp(s.filter(function(u,o){return s.indexOf(u)===o}).sort(function(u,o){return o.length-u.length}).map(function(u){return wt(u)}).join("|"),"g"),l=e.replace(a,function(u){var o=u.replace(bt,"$1.\\:hover");return u+", "+o});return t?.stylesWithHoverClass.set(e,l),l}function ke(){var e=new Map;return{stylesWithHoverClass:e}}function Dt(e,t){var r=t.doc,i=t.hackCss,n=t.cache;switch(e.type){case I.Document:return r.implementation.createDocument(null,"",null);case I.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case I.Element:var s=Et(e),a;e.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",s):a=r.createElement(s);var l=function(o){if(!e.attributes.hasOwnProperty(o))return"continue";var c=e.attributes[o];if(s==="option"&&o==="selected"&&c===!1)return"continue";if(c=typeof c=="boolean"||typeof c=="number"?"":c,o.startsWith("rr_")){if(s==="canvas"&&o==="rr_dataURL"){var d=document.createElement("img");d.src=c,d.onload=function(){var A=a.getContext("2d");A&&A.drawImage(d,0,0,d.width,d.height)}}else if(s==="img"&&o==="rr_dataURL"){var m=a;m.currentSrc.startsWith("data:")||(m.setAttribute("rrweb-original-src",e.attributes.src),m.src=c)}if(o==="rr_width")a.style.width=c;else if(o==="rr_height")a.style.height=c;else if(o==="rr_mediaCurrentTime")a.currentTime=e.attributes.rr_mediaCurrentTime;else if(o==="rr_mediaState")switch(c){case"played":a.play().catch(function(A){return console.warn("media playback error",A)});break;case"paused":a.pause();break}}else{var f=s==="textarea"&&o==="value",T=s==="style"&&o==="_cssText";if(T&&i&&(c=Oe(c,n),typeof c=="string")){for(var g=/url\(\"https:\/\/\S*(.eot|.woff2|.ttf|.woff)\S*\"\)/gm,E=void 0,h=[],v="https://replay-cors-proxy.highlightrun.workers.dev";(E=g.exec(c))!==null;)E.index===g.lastIndex&&g.lastIndex++,E.forEach(function(A,G){if(G===0){var W=A.slice(5,A.length-2);h.push({originalUrl:W,proxyUrl:W.replace(W,v+"?url="+W)})}});h.forEach(function(A){c=c.replace(A.originalUrl,A.proxyUrl)})}if(f||T){for(var w=r.createTextNode(c),R=0,L=Array.from(a.childNodes);R<L.length;R++){var k=L[R];k.nodeType===a.TEXT_NODE&&a.removeChild(k)}return a.appendChild(w),"continue"}try{if(e.isSVG&&o==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",o,c);else if(o==="onload"||o==="onclick"||o.substring(0,7)==="onmouse")a.setAttribute("_"+o,c);else{if(s==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&o==="content")return a.setAttribute("csp-content",c),"continue";s==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||s==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")||(s==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(o,c))}}catch{}}};for(var u in e.attributes)l(u);if(e.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a;case I.Text:return r.createTextNode(e.isStyle&&i?Oe(e.textContent,n):e.textContent);case I.CDATA:return r.createCDATASection(e.textContent);case I.Comment:return r.createComment(e.textContent);default:return null}}function re(e,t){var r=t.doc,i=t.mirror,n=t.skipChild,s=n===void 0?!1:n,a=t.hackCss,l=a===void 0?!0:a,u=t.afterAppend,o=t.cache,c=Dt(e,{doc:r,hackCss:l,cache:o});if(!c)return null;if(e.rootId&&console.assert(i.getNode(e.rootId)===r,"Target document should have the same root id."),e.type===I.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==I.DocumentType&&(e.childNodes[0].type===I.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),c=r),i.add(c,e),(e.type===I.Document||e.type===I.Element)&&!s)for(var d=0,m=e.childNodes;d<m.length;d++){var f=m[d],T=re(f,{doc:r,mirror:i,skipChild:!1,hackCss:l,afterAppend:u,cache:o});if(!T){console.warn("Failed to rebuild",f);continue}f.isShadow&&vt(c)&&c.shadowRoot?c.shadowRoot.appendChild(T):c.appendChild(T),u&&u(T)}return c}function Mt(e,t){function r(a){t(a)}for(var i=0,n=e.getIds();i<n.length;i++){var s=n[i];e.has(s)&&r(e.getNode(s))}}function xt(e,t){var r=t.getMeta(e);if(r?.type===I.Element){var i=e;for(var n in r.attributes)if(r.attributes.hasOwnProperty(n)&&n.startsWith("rr_")){var s=r.attributes[n];n==="rr_scrollLeft"&&(i.scrollLeft=s),n==="rr_scrollTop"&&(i.scrollTop=s)}}}function Ct(e,t){var r=t.doc,i=t.onVisit,n=t.hackCss,s=n===void 0?!0:n,a=t.afterAppend,l=t.cache,u=t.mirror,o=u===void 0?new Se:u,c=re(e,{doc:r,mirror:o,skipChild:!1,hackCss:s,afterAppend:a,cache:l});return Mt(o,function(d){i&&i(d),xt(d,o)}),c}var N;(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"})(N||(N={}));var St=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var r;if(!t)return-1;var i=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return i??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var r=this,i=this.getId(t);this.idNodeMap.delete(i),t.childNodes&&t.childNodes.forEach(function(n){return r.removeNodeFromMap(n)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,r){var i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)},e.prototype.replace=function(t,r){this.idNodeMap.set(t,r)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Rt(){return new St}function At(e){const t={},r=/;(?![^(]*\))/g,i=/:(.+)/,n=/\/\*.*?\*\//g;return e.replace(n,"").split(r).forEach(function(s){if(s){const a=s.split(i);a.length>1&&(t[he(a[0].trim())]=a[1].trim())}}),t}function _e(e){const t=[];for(const r in e){const i=e[r];if(typeof i!="string")continue;const n=_t(r);t.push(`${n}: ${i};`)}return t.join(" ")}const It=/-([a-z])/g,Ot=/^--[a-zA-Z0-9-]+$/,he=e=>Ot.test(e)?e:e.replace(It,(t,r)=>r?r.toUpperCase():""),kt=/\B([A-Z])/g,_t=e=>e.replace(kt,"-$1").toLowerCase();class F{constructor(...t){this.childNodes=[],this.parentElement=null,this.parentNode=null,this.ELEMENT_NODE=x.ELEMENT_NODE,this.TEXT_NODE=x.TEXT_NODE}get firstChild(){return this.childNodes[0]||null}get lastChild(){return this.childNodes[this.childNodes.length-1]||null}get nextSibling(){const t=this.parentNode;if(!t)return null;const r=t.childNodes,i=r.indexOf(this);return r[i+1]||null}contains(t){if(t===this)return!0;for(const r of this.childNodes)if(r.contains(t))return!0;return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Lt(e){return class yt extends e{constructor(){super(...arguments),this.nodeType=x.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=N.Document,this.textContent=null}get documentElement(){return this.childNodes.find(r=>r.RRNodeType===N.Element&&r.tagName==="HTML")||null}get body(){var r;return((r=this.documentElement)===null||r===void 0?void 0:r.childNodes.find(i=>i.RRNodeType===N.Element&&i.tagName==="BODY"))||null}get head(){var r;return((r=this.documentElement)===null||r===void 0?void 0:r.childNodes.find(i=>i.RRNodeType===N.Element&&i.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(r){const i=r.RRNodeType;if((i===N.Element||i===N.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===i))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${i===N.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);return r.parentElement=null,r.parentNode=this,this.childNodes.push(r),r}insertBefore(r,i){const n=r.RRNodeType;if((n===N.Element||n===N.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===n))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${n===N.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);if(i===null)return this.appendChild(r);const s=this.childNodes.indexOf(i);if(s==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(s,0,r),r.parentElement=null,r.parentNode=this,r}removeChild(r){const i=this.childNodes.indexOf(r);if(i===-1)throw new Error("Failed to execute 'removeChild' on 'RRDocument': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(i,1),r.parentElement=null,r.parentNode=null,r}open(){this.childNodes=[]}close(){}write(r){let i;if(r==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?i="-//W3C//DTD XHTML 1.0 Transitional//EN":r==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(i="-//W3C//DTD HTML 4.0 Transitional//EN"),i){const n=this.createDocumentType("html",i,"");this.open(),this.appendChild(n)}}createDocument(r,i,n){return new yt}createDocumentType(r,i,n){const s=new(Le(F))(r,i,n);return s.ownerDocument=this,s}createElement(r){const i=new(Pe(F))(r);return i.ownerDocument=this,i}createElementNS(r,i){return this.createElement(i)}createTextNode(r){const i=new(Fe(F))(r);return i.ownerDocument=this,i}createComment(r){const i=new(Ue(F))(r);return i.ownerDocument=this,i}createCDATASection(r){const i=new(Be(F))(r);return i.ownerDocument=this,i}toString(){return"RRDocument"}}}function Le(e){return class extends e{constructor(t,r,i){super(),this.nodeType=x.DOCUMENT_TYPE_NODE,this.RRNodeType=N.DocumentType,this.textContent=null,this.name=t,this.publicId=r,this.systemId=i,this.nodeName=t}toString(){return"RRDocumentType"}}}function Pe(e){return class extends e{constructor(t){super(),this.nodeType=x.ELEMENT_NODE,this.RRNodeType=N.Element,this.attributes={},this.shadowRoot=null,this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.childNodes=[this.ownerDocument.createTextNode(t)]}get classList(){return new Ft(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?At(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(i,n,s)=>{if(r.test(i))return;const a=he(i);n?t[a]=n:delete t[a],s==="important"&&(t[a]+=" !important"),this.attributes.style=_e(t)},t.removeProperty=i=>{if(r.test(i))return"";const n=he(i),s=t[n]||"";return delete t[n],this.attributes.style=_e(t),s},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,i){this.setAttribute(r,i)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return this.childNodes.push(t),t.parentNode=this,t.parentElement=this,t}insertBefore(t,r){if(r===null)return this.appendChild(t);const i=this.childNodes.indexOf(r);if(i==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(i,0,t),t.parentElement=this,t.parentNode=this,t}removeChild(t){const r=this.childNodes.indexOf(t);if(r===-1)throw new Error("Failed to execute 'removeChild' on 'RRElement': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(r,1),t.parentElement=null,t.parentNode=null,t}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}}function Pt(e){return class extends e{attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}}function Fe(e){return class extends e{constructor(t){super(),this.nodeType=x.TEXT_NODE,this.nodeName="#text",this.RRNodeType=N.Text,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function Ue(e){return class extends e{constructor(t){super(),this.nodeType=x.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=N.Comment,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function Be(e){return class extends e{constructor(t){super(),this.nodeName="#cdata-section",this.nodeType=x.CDATA_SECTION_NODE,this.RRNodeType=N.CDATA,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}class Ft{constructor(t,r){if(this.classes=[],this.add=(...i)=>{for(const n of i){const s=String(n);this.classes.indexOf(s)>=0||this.classes.push(s)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...i)=>{this.classes=this.classes.filter(n=>i.indexOf(n)===-1),this.onChange&&this.onChange(this.classes.join(" "))},t){const i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=r}}var x;(function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(x||(x={}));const me={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function B(e,t,r,i){const n=e.childNodes,s=t.childNodes;i=i||t.mirror||t.ownerDocument.mirror,(n.length>0||s.length>0)&&$e(Array.from(n),s,e,r,i);let a=null,l=null;switch(t.RRNodeType){case N.Document:{l=t.scrollData;break}case N.Element:{const u=e,o=t;switch(Ut(u,o,i),l=o.scrollData,a=o.inputData,o.tagName){case"AUDIO":case"VIDEO":{const c=e,d=o;d.paused!==void 0&&(d.paused?c.pause():c.play()),d.muted!==void 0&&(c.muted=d.muted),d.volume!==void 0&&(c.volume=d.volume),d.currentTime!==void 0&&(c.currentTime=d.currentTime);break}case"CANVAS":t.canvasMutations.forEach(c=>r.applyCanvas(c.event,c.mutation,e));break;case"STYLE":Bt(u,t.rules);break}if(o.shadowRoot){u.shadowRoot||u.attachShadow({mode:"open"});const c=u.shadowRoot.childNodes,d=o.shadowRoot.childNodes;(c.length>0||d.length>0)&&$e(Array.from(c),d,u.shadowRoot,r,i)}break}case N.Text:case N.Comment:case N.CDATA:e.textContent!==t.data&&(e.textContent=t.data);break}if(l&&r.applyScroll(l,!0),a&&r.applyInput(a),t.nodeName==="IFRAME"){const u=e.contentDocument,o=t;if(u){const c=i.getMeta(o.contentDocument);c&&r.mirror.add(u,Object.assign({},c)),B(u,o.contentDocument,r,i)}}}function Ut(e,t,r){const i=e.attributes,n=t.attributes;for(const s in n){const a=n[s],l=r.getMeta(t);if(l&&"isSVG"in l&&l.isSVG&&me[s])e.setAttributeNS(me[s],s,a);else if(t.tagName==="CANVAS"&&s==="rr_dataURL"){const u=document.createElement("img");u.src=a,u.onload=()=>{const o=e.getContext("2d");o&&o.drawImage(u,0,0,u.width,u.height)}}else e.setAttribute(s,a)}for(const{name:s}of Array.from(i))s in n||e.removeAttribute(s);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function $e(e,t,r,i,n){var s,a;let l=0,u=e.length-1,o=0,c=t.length-1,d=e[l],m=e[u],f=t[o],T=t[c],g,E;for(;l<=u&&o<=c;)if(d===void 0)d=e[++l];else if(m===void 0)m=e[--u];else if(i.mirror.getId(d)===n.getId(f))B(d,f,i,n),d=e[++l],f=t[++o];else if(i.mirror.getId(m)===n.getId(T))B(m,T,i,n),m=e[--u],T=t[--c];else if(i.mirror.getId(d)===n.getId(T))r.insertBefore(d,m.nextSibling),B(d,T,i,n),d=e[++l],T=t[--c];else if(i.mirror.getId(m)===n.getId(f))r.insertBefore(m,d),B(m,f,i,n),m=e[--u],f=t[++o];else{if(!g){g={};for(let h=l;h<=u;h++){const v=e[h];v&&i.mirror.hasNode(v)&&(g[i.mirror.getId(v)]=h)}}if(E=g[n.getId(f)],E){const h=e[E];r.insertBefore(h,d),B(h,f,i,n),e[E]=void 0}else{const h=pe(f,i.mirror,n);((s=i.mirror.getMeta(r))===null||s===void 0?void 0:s.type)===N.Document&&((a=i.mirror.getMeta(h))===null||a===void 0?void 0:a.type)===N.Element&&r.documentElement&&(r.removeChild(r.documentElement),e[l]=void 0,d=void 0),r.insertBefore(h,d||null),B(h,f,i,n)}f=t[++o]}if(l>u){const h=t[c+1];let v=null;for(h&&r.childNodes.forEach(w=>{i.mirror.getId(w)===n.getId(h)&&(v=w)});o<=c;++o){const w=pe(t[o],i.mirror,n);r.insertBefore(w,v),B(w,t[o],i,n)}}else if(o>c)for(;l<=u;l++){const h=e[l];h&&(r.removeChild(h),i.mirror.removeNodeFromMap(h))}}function pe(e,t,r){let i=t.getNode(r.getId(e));const n=r.getMeta(e);if(i!==null)return i;switch(e.RRNodeType){case N.Document:i=new Document;break;case N.DocumentType:i=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case N.Element:{e.tagName.toLowerCase(),n&&"isSVG"in n&&n?.isSVG?i=document.createElementNS(me.svg,e.tagName.toLowerCase()):i=document.createElement(e.tagName);break}case N.Text:i=document.createTextNode(e.data);break;case N.Comment:i=document.createComment(e.data);break;case N.CDATA:i=document.createCDATASection(e.data);break}return n&&t.add(i,Object.assign({},n)),i}function q(e,t){const r=e[t[0]];return t.length===1?r:q(r.cssRules[t[1]].cssRules,t.slice(2))}var U;(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"})(U||(U={}));function Ve(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Bt(e,t){const r=e.sheet;t.forEach(i=>{if(i.type===U.Insert)try{if(Array.isArray(i.index)){const{positions:n,index:s}=Ve(i.index);q(r.cssRules,n).insertRule(i.cssText,s)}else r.insertRule(i.cssText,i.index)}catch{}else if(i.type===U.Remove)try{if(Array.isArray(i.index)){const{positions:n,index:s}=Ve(i.index);q(r.cssRules,n).deleteRule(s||0)}else r.deleteRule(i.index)}catch{}else i.type===U.SetProperty?q(r.cssRules,i.index).style.setProperty(i.property,i.value,i.priority):i.type===U.RemoveProperty&&q(r.cssRules,i.index).style.removeProperty(i.property)})}class H extends Lt(F){constructor(t){super(),this._unserializedId=-1,this.mirror=qt(),this.scrollData=null,t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,i){return new H}createDocumentType(t,r,i){const n=new $t(t,r,i);return n.ownerDocument=this,n}createElement(t){const r=t.toUpperCase();let i;switch(r){case"AUDIO":case"VIDEO":i=new Vt(r);break;case"IFRAME":i=new Gt(r,this.mirror);break;case"CANVAS":i=new Wt(r);break;case"STYLE":i=new jt(r);break;default:i=new J(r);break}return i.ownerDocument=this,i}createComment(t){const r=new Yt(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new zt(t);return r.ownerDocument=this,r}createTextNode(t){const r=new Ht(t);return r.ownerDocument=this,r}destroyTree(){this.childNodes=[],this.mirror.reset()}open(){super.open(),this._unserializedId=-1}}const $t=Le(F);class J extends Pe(F){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}}class Vt extends Pt(J){}class Wt extends J{constructor(){super(...arguments),this.canvasMutations=[]}getContext(){return null}}class jt extends J{constructor(){super(...arguments),this.rules=[]}}class Gt extends J{constructor(t,r){super(t),this.contentDocument=new H,this.contentDocument.mirror=r}}const Ht=Fe(F),Yt=Ue(F),zt=Be(F);function Xt(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function We(e,t,r,i){let n;switch(e.nodeType){case x.DOCUMENT_NODE:i&&i.nodeName==="IFRAME"?n=i.contentDocument:(n=t,n.compatMode=e.compatMode);break;case x.DOCUMENT_TYPE_NODE:const a=e;n=t.createDocumentType(a.name,a.publicId,a.systemId);break;case x.ELEMENT_NODE:const l=e,u=Xt(l);n=t.createElement(u);const o=n;for(const{name:c,value:d}of Array.from(l.attributes))o.attributes[c]=d;l.scrollLeft&&(o.scrollLeft=l.scrollLeft),l.scrollTop&&(o.scrollTop=l.scrollTop);break;case x.TEXT_NODE:n=t.createTextNode(e.textContent||"");break;case x.CDATA_SECTION_NODE:n=t.createCDATASection(e.data);break;case x.COMMENT_NODE:n=t.createComment(e.textContent||"");break;case x.DOCUMENT_FRAGMENT_NODE:n=i.attachShadow({mode:"open"});break;default:return null}let s=r.getMeta(e);return t instanceof H&&(s||(s=je(n,t.unserializedId),r.add(e,s)),t.mirror.add(n,Object.assign({},s))),n}function Qt(e,t=Rt(),r=new H){function i(n,s){const a=We(n,r,t,s);a!==null&&(s?.nodeName!=="IFRAME"&&n.nodeType!==x.DOCUMENT_FRAGMENT_NODE&&(s?.appendChild(a),a.parentNode=s,a.parentElement=s),n.nodeName==="IFRAME"?i(n.contentDocument,a):(n.nodeType===x.DOCUMENT_NODE||n.nodeType===x.ELEMENT_NODE||n.nodeType===x.DOCUMENT_FRAGMENT_NODE)&&(n.nodeType===x.ELEMENT_NODE&&n.shadowRoot&&i(n.shadowRoot,a),n.childNodes.forEach(l=>i(l,a))))}return i(e,null),r}function qt(){return new Jt}class Jt{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var r;if(!t)return-1;const i=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return i??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)}replace(t,r){this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function je(e,t){switch(e.RRNodeType){case N.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case N.DocumentType:const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId};case N.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case N.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case N.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case N.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Ge(e){return e=e||Object.create(null),{on:function(r,i){(e[r]||(e[r]=[])).push(i)},off:function(r,i){e[r]&&e[r].splice(e[r].indexOf(i)>>>0,1)},emit:function(r,i){(e[r]||[]).slice().map(function(n){n(i)}),(e["*"]||[]).slice().map(function(n){n(r,i)})}}}var Zt=Object.freeze({__proto__:null,default:Ge});function Kt(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,i=468,n={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},s=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(h){const v=["MSIE ","Trident/","Edge/"];return new RegExp(v.join("|")).test(h)}const l=a(e.navigator.userAgent)?1:0;function u(h,v){this.scrollLeft=h,this.scrollTop=v}function o(h){return .5*(1-Math.cos(Math.PI*h))}function c(h){if(h===null||typeof h!="object"||h.behavior===void 0||h.behavior==="auto"||h.behavior==="instant")return!0;if(typeof h=="object"&&h.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+h.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(h,v){if(v==="Y")return h.clientHeight+l<h.scrollHeight;if(v==="X")return h.clientWidth+l<h.scrollWidth}function m(h,v){const w=e.getComputedStyle(h,null)["overflow"+v];return w==="auto"||w==="scroll"}function f(h){const v=d(h,"Y")&&m(h,"Y"),w=d(h,"X")&&m(h,"X");return v||w}function T(h){for(;h!==t.body&&f(h)===!1;)h=h.parentNode||h.host;return h}function g(h){const v=s();let w,R,L,k=(v-h.startTime)/i;k=k>1?1:k,w=o(k),R=h.startX+(h.x-h.startX)*w,L=h.startY+(h.y-h.startY)*w,h.method.call(h.scrollable,R,L),(R!==h.x||L!==h.y)&&e.requestAnimationFrame(g.bind(e,h))}function E(h,v,w){let R,L,k,A;const G=s();h===t.body?(R=e,L=e.scrollX||e.pageXOffset,k=e.scrollY||e.pageYOffset,A=n.scroll):(R=h,L=h.scrollLeft,k=h.scrollTop,A=u),g({scrollable:R,method:A,startTime:G,startX:L,startY:k,x:v,y:w})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){n.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}E.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){n.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}E.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(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");n.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const h=arguments[0].left,v=arguments[0].top;E.call(this,this,typeof h>"u"?this.scrollLeft:~~h,typeof v>"u"?this.scrollTop:~~v)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){n.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){n.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const h=T(this),v=h.getBoundingClientRect(),w=this.getBoundingClientRect();h!==t.body?(E.call(this,h,h.scrollLeft+w.left-v.left,h.scrollTop+w.top-v.top),e.getComputedStyle(h).position!=="fixed"&&e.scrollBy({left:v.left,top:v.top,behavior:"smooth"})):e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}var M=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(M||{}),C=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e))(C||{}),_=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(_||{}),ie=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ie||{}),fe=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(fe||{}),D=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e))(D||{});class er{constructor(t=[],r){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=r}addAction(t){const r=this.findActionIndex(t);this.actions.splice(r,0,t)}addActions(t){this.actions=this.actions.concat(t)}replaceActions(t){this.actions.length=0,this.actions.splice(0,0,...t)}start(){this.timeOffset=0;let t=performance.now();const{actions:r}=this,i=this;function n(){const s=performance.now();for(i.timeOffset+=(s-t)*i.speed,t=s;r.length;){const a=r[0];if(i.timeOffset>=a.delay)r.shift(),a.doAction();else break}(r.length>0||i.liveMode)&&(i.raf=requestAnimationFrame(n))}this.raf=requestAnimationFrame(n)}clear(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}toggleLiveMode(t){this.liveMode=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,i=this.actions.length-1;for(;r<=i;){const n=Math.floor((r+i)/2);if(this.actions[n].delay<t.delay)r=n+1;else if(this.actions[n].delay>t.delay)i=n-1;else return n+1}return r}}function ge(e,t){if(e.type===M.IncrementalSnapshot&&e.data.source===C.MouseMove){const r=e.data.positions[0].timeOffset,i=e.timestamp+r;return e.delay=i-t,i-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
2
|
+
`);i=b===-1?i+y.length:y.length-b}function s(){var y={line:r,column:i};return function(p){return p.position=new a(y),T(),p}}var a=function(){function y(p){this.start=p,this.end={line:r,column:i},this.source=t.source}return y}();a.prototype.content=e;var l=[];function u(y){var p=new Error(t.source+":"+r+":"+i+": "+y);if(p.reason=y,p.filename=t.source,p.line=r,p.column=i,p.source=e,t.silent)l.push(p);else throw p}function o(){var y=m();return{type:"stylesheet",stylesheet:{source:t.source,rules:y,parsingErrors:l}}}function c(){return f(/^{\s*/)}function d(){return f(/^}/)}function m(){var y,p=[];for(T(),g(p);e.length&&e.charAt(0)!=="}"&&(y=O()||te());)y!==!1&&(p.push(y),g(p));return p}function f(y){var p=y.exec(e);if(p){var b=p[0];return n(b),e=e.slice(b.length),p}}function T(){f(/^\s*/)}function g(y){y===void 0&&(y=[]);for(var p;p=E();)p!==!1&&y.push(p),p=E();return y}function E(){var y=s();if(!(e.charAt(0)!=="/"||e.charAt(1)!=="*")){for(var p=2;e.charAt(p)!==""&&(e.charAt(p)!=="*"||e.charAt(p+1)!=="/");)++p;if(p+=2,e.charAt(p-1)==="")return u("End of comment missing");var b=e.slice(2,p-2);return i+=2,n(b),e=e.slice(p),i+=2,y({type:"comment",comment:b})}}function h(){var y=f(/^([^{]+)/);if(y)return $(y[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(p){return p.replace(/,/g,"\u200C")}).split(/\s*(?![^(]*\)),\s*/).map(function(p){return p.replace(/\u200C/g,",")})}function v(){var y=s(),p=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(p){var b=$(p[0]);if(!f(/^:\s*/))return u("property missing ':'");var S=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),P=y({type:"declaration",property:b.replace(Re,""),value:S?$(S[0]).replace(Re,""):""});return f(/^[;\s]*/),P}}function w(){var y=[];if(!c())return u("missing '{'");g(y);for(var p;p=v();)p!==!1&&(y.push(p),g(y)),p=v();return d()?y:u("missing '}'")}function R(){for(var y,p=[],b=s();y=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)p.push(y[1]),f(/^,\s*/);if(p.length)return b({type:"keyframe",values:p,declarations:w()})}function L(){var y=s(),p=f(/^@([-\w]+)?keyframes\s*/);if(p){var b=p[1];if(p=f(/^([-\w]+)\s*/),!p)return u("@keyframes missing name");var S=p[1];if(!c())return u("@keyframes missing '{'");for(var P,le=g();P=R();)le.push(P),le=le.concat(g());return d()?y({type:"keyframes",name:S,vendor:b,keyframes:le}):u("@keyframes missing '}'")}}function k(){var y=s(),p=f(/^@supports *([^{]+)/);if(p){var b=$(p[1]);if(!c())return u("@supports missing '{'");var S=g().concat(m());return d()?y({type:"supports",supports:b,rules:S}):u("@supports missing '}'")}}function A(){var y=s(),p=f(/^@host\s*/);if(p){if(!c())return u("@host missing '{'");var b=g().concat(m());return d()?y({type:"host",rules:b}):u("@host missing '}'")}}function G(){var y=s(),p=f(/^@media *([^{]+)/);if(p){var b=$(p[1]);if(!c())return u("@media missing '{'");var S=g().concat(m());return d()?y({type:"media",media:b,rules:S}):u("@media missing '}'")}}function W(){var y=s(),p=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(p)return y({type:"custom-media",name:$(p[1]),media:$(p[2])})}function De(){var y=s(),p=f(/^@page */);if(p){var b=h()||[];if(!c())return u("@page missing '{'");for(var S=g(),P;P=v();)S.push(P),S=S.concat(g());return d()?y({type:"page",selectors:b,declarations:S}):u("@page missing '}'")}}function Me(){var y=s(),p=f(/^@([-\w]+)?document *([^{]+)/);if(p){var b=$(p[1]),S=$(p[2]);if(!c())return u("@document missing '{'");var P=g().concat(m());return d()?y({type:"document",document:S,vendor:b,rules:P}):u("@document missing '}'")}}function ee(){var y=s(),p=f(/^@font-face\s*/);if(p){if(!c())return u("@font-face missing '{'");for(var b=g(),S;S=v();)b.push(S),b=b.concat(g());return d()?y({type:"font-face",declarations:b}):u("@font-face missing '}'")}}var ce=Q("import"),xe=Q("charset"),Ce=Q("namespace");function Q(y){var p=new RegExp("^@"+y+"\\s*([^;]+);");return function(){var b=s(),S=f(p);if(S){var P={type:y};return P[y]=S[1].trim(),b(P)}}}function O(){if(e[0]==="@")return L()||G()||W()||k()||ce()||xe()||Ce()||Me()||De()||A()||ee()}function te(){var y=s(),p=h();return p?(g(),y({type:"rule",selectors:p,declarations:w()})):u("selector missing")}return de(o())}function $(e){return e?e.replace(/^\s+|\s+$/g,""):""}function de(e,t){for(var r=e&&typeof e.type=="string",i=r?e:t,n=0,s=Object.keys(e);n<s.length;n++){var a=s[n],l=e[a];Array.isArray(l)?l.forEach(function(u){de(u,i)}):l&&typeof l=="object"&&de(l,i)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Ae={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Et(e){var t=Ae[e.tagName]?Ae[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function wt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Ie=/([^\\]):hover/,bt=new RegExp(Ie.source,"g");function Oe(e,t){var r;if(!(!((r=window?.HIG_CONFIGURATION)===null||r===void 0)&&r.enableOnHoverClass))return e;var i=t?.stylesWithHoverClass.get(e);if(i)return i;var n=Nt(e,{silent:!0});if(!n.stylesheet)return e;var s=[];if(n.stylesheet.rules.forEach(function(u){"selectors"in u&&(u.selectors||[]).forEach(function(o){Ie.test(o)&&s.push(o)})}),s.length===0)return e;var a=new RegExp(s.filter(function(u,o){return s.indexOf(u)===o}).sort(function(u,o){return o.length-u.length}).map(function(u){return wt(u)}).join("|"),"g"),l=e.replace(a,function(u){var o=u.replace(bt,"$1.\\:hover");return u+", "+o});return t?.stylesWithHoverClass.set(e,l),l}function ke(){var e=new Map;return{stylesWithHoverClass:e}}function Dt(e,t){var r=t.doc,i=t.hackCss,n=t.cache;switch(e.type){case I.Document:return r.implementation.createDocument(null,"",null);case I.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case I.Element:var s=Et(e),a;e.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",s):a=r.createElement(s);var l=function(o){if(!e.attributes.hasOwnProperty(o))return"continue";var c=e.attributes[o];if(s==="option"&&o==="selected"&&c===!1)return"continue";if(c=typeof c=="boolean"||typeof c=="number"?"":c,o.startsWith("rr_")){if(s==="canvas"&&o==="rr_dataURL"){var d=document.createElement("img");d.src=c,d.onload=function(){var A=a.getContext("2d");A&&A.drawImage(d,0,0,d.width,d.height)}}else if(s==="img"&&o==="rr_dataURL"){var m=a;m.currentSrc.startsWith("data:")||(m.setAttribute("rrweb-original-src",e.attributes.src),m.src=c)}if(o==="rr_width")a.style.width=c;else if(o==="rr_height")a.style.height=c;else if(o==="rr_mediaCurrentTime")a.currentTime=e.attributes.rr_mediaCurrentTime;else if(o==="rr_mediaState")switch(c){case"played":a.play().catch(function(A){return console.warn("media playback error",A)});break;case"paused":a.pause();break}}else{var f=s==="textarea"&&o==="value",T=s==="style"&&o==="_cssText";if(T&&i&&(c=Oe(c,n),typeof c=="string")){for(var g=/url\(\"https:\/\/\S*(.eot|.woff2|.ttf|.woff)\S*\"\)/gm,E=void 0,h=[],v="https://replay-cors-proxy.highlightrun.workers.dev";(E=g.exec(c))!==null;)E.index===g.lastIndex&&g.lastIndex++,E.forEach(function(A,G){if(G===0){var W=A.slice(5,A.length-2);h.push({originalUrl:W,proxyUrl:W.replace(W,v+"?url="+W)})}});h.forEach(function(A){c=c.replace(A.originalUrl,A.proxyUrl)})}if(f||T){for(var w=r.createTextNode(c),R=0,L=Array.from(a.childNodes);R<L.length;R++){var k=L[R];k.nodeType===a.TEXT_NODE&&a.removeChild(k)}return a.appendChild(w),"continue"}try{if(e.isSVG&&o==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",o,c);else if(o==="onload"||o==="onclick"||o.substring(0,7)==="onmouse")a.setAttribute("_"+o,c);else{if(s==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&o==="content")return a.setAttribute("csp-content",c),"continue";s==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||s==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")||(s==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(o,c))}}catch{}}};for(var u in e.attributes)l(u);if(e.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a;case I.Text:return r.createTextNode(e.isStyle&&i?Oe(e.textContent,n):e.textContent);case I.CDATA:return r.createCDATASection(e.textContent);case I.Comment:return r.createComment(e.textContent);default:return null}}function re(e,t){var r=t.doc,i=t.mirror,n=t.skipChild,s=n===void 0?!1:n,a=t.hackCss,l=a===void 0?!0:a,u=t.afterAppend,o=t.cache,c=Dt(e,{doc:r,hackCss:l,cache:o});if(!c)return null;if(e.rootId&&console.assert(i.getNode(e.rootId)===r,"Target document should have the same root id."),e.type===I.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==I.DocumentType&&(e.childNodes[0].type===I.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),c=r),i.add(c,e),(e.type===I.Document||e.type===I.Element)&&!s)for(var d=0,m=e.childNodes;d<m.length;d++){var f=m[d],T=re(f,{doc:r,mirror:i,skipChild:!1,hackCss:l,afterAppend:u,cache:o});if(!T){console.warn("Failed to rebuild",f);continue}f.isShadow&&vt(c)&&c.shadowRoot?c.shadowRoot.appendChild(T):c.appendChild(T),u&&u(T)}return c}function Mt(e,t){function r(a){t(a)}for(var i=0,n=e.getIds();i<n.length;i++){var s=n[i];e.has(s)&&r(e.getNode(s))}}function xt(e,t){var r=t.getMeta(e);if(r?.type===I.Element){var i=e;for(var n in r.attributes)if(r.attributes.hasOwnProperty(n)&&n.startsWith("rr_")){var s=r.attributes[n];n==="rr_scrollLeft"&&(i.scrollLeft=s),n==="rr_scrollTop"&&(i.scrollTop=s)}}}function Ct(e,t){var r=t.doc,i=t.onVisit,n=t.hackCss,s=n===void 0?!0:n,a=t.afterAppend,l=t.cache,u=t.mirror,o=u===void 0?new Se:u,c=re(e,{doc:r,mirror:o,skipChild:!1,hackCss:s,afterAppend:a,cache:l});return Mt(o,function(d){i&&i(d),xt(d,o)}),c}var N;(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"})(N||(N={}));var St=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var r;if(!t)return-1;var i=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return i??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var r=this,i=this.getId(t);this.idNodeMap.delete(i),t.childNodes&&t.childNodes.forEach(function(n){return r.removeNodeFromMap(n)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,r){var i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)},e.prototype.replace=function(t,r){this.idNodeMap.set(t,r)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Rt(){return new St}function At(e){const t={},r=/;(?![^(]*\))/g,i=/:(.+)/,n=/\/\*.*?\*\//g;return e.replace(n,"").split(r).forEach(function(s){if(s){const a=s.split(i);a.length>1&&(t[he(a[0].trim())]=a[1].trim())}}),t}function _e(e){const t=[];for(const r in e){const i=e[r];if(typeof i!="string")continue;const n=_t(r);t.push(`${n}: ${i};`)}return t.join(" ")}const It=/-([a-z])/g,Ot=/^--[a-zA-Z0-9-]+$/,he=e=>Ot.test(e)?e:e.replace(It,(t,r)=>r?r.toUpperCase():""),kt=/\B([A-Z])/g,_t=e=>e.replace(kt,"-$1").toLowerCase();class F{constructor(...t){this.childNodes=[],this.parentElement=null,this.parentNode=null,this.ELEMENT_NODE=x.ELEMENT_NODE,this.TEXT_NODE=x.TEXT_NODE}get firstChild(){return this.childNodes[0]||null}get lastChild(){return this.childNodes[this.childNodes.length-1]||null}get nextSibling(){const t=this.parentNode;if(!t)return null;const r=t.childNodes,i=r.indexOf(this);return r[i+1]||null}contains(t){if(t===this)return!0;for(const r of this.childNodes)if(r.contains(t))return!0;return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Lt(e){return class yt extends e{constructor(){super(...arguments),this.nodeType=x.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=N.Document,this.textContent=null}get documentElement(){return this.childNodes.find(r=>r.RRNodeType===N.Element&&r.tagName==="HTML")||null}get body(){var r;return((r=this.documentElement)===null||r===void 0?void 0:r.childNodes.find(i=>i.RRNodeType===N.Element&&i.tagName==="BODY"))||null}get head(){var r;return((r=this.documentElement)===null||r===void 0?void 0:r.childNodes.find(i=>i.RRNodeType===N.Element&&i.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(r){const i=r.RRNodeType;if((i===N.Element||i===N.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===i))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${i===N.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);return r.parentElement=null,r.parentNode=this,this.childNodes.push(r),r}insertBefore(r,i){const n=r.RRNodeType;if((n===N.Element||n===N.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===n))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${n===N.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);if(i===null)return this.appendChild(r);const s=this.childNodes.indexOf(i);if(s==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(s,0,r),r.parentElement=null,r.parentNode=this,r}removeChild(r){const i=this.childNodes.indexOf(r);if(i===-1)throw new Error("Failed to execute 'removeChild' on 'RRDocument': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(i,1),r.parentElement=null,r.parentNode=null,r}open(){this.childNodes=[]}close(){}write(r){let i;if(r==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?i="-//W3C//DTD XHTML 1.0 Transitional//EN":r==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(i="-//W3C//DTD HTML 4.0 Transitional//EN"),i){const n=this.createDocumentType("html",i,"");this.open(),this.appendChild(n)}}createDocument(r,i,n){return new yt}createDocumentType(r,i,n){const s=new(Le(F))(r,i,n);return s.ownerDocument=this,s}createElement(r){const i=new(Pe(F))(r);return i.ownerDocument=this,i}createElementNS(r,i){return this.createElement(i)}createTextNode(r){const i=new(Fe(F))(r);return i.ownerDocument=this,i}createComment(r){const i=new(Ue(F))(r);return i.ownerDocument=this,i}createCDATASection(r){const i=new(Be(F))(r);return i.ownerDocument=this,i}toString(){return"RRDocument"}}}function Le(e){return class extends e{constructor(t,r,i){super(),this.nodeType=x.DOCUMENT_TYPE_NODE,this.RRNodeType=N.DocumentType,this.textContent=null,this.name=t,this.publicId=r,this.systemId=i,this.nodeName=t}toString(){return"RRDocumentType"}}}function Pe(e){return class extends e{constructor(t){super(),this.nodeType=x.ELEMENT_NODE,this.RRNodeType=N.Element,this.attributes={},this.shadowRoot=null,this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.childNodes=[this.ownerDocument.createTextNode(t)]}get classList(){return new Ft(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?At(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(i,n,s)=>{if(r.test(i))return;const a=he(i);n?t[a]=n:delete t[a],s==="important"&&(t[a]+=" !important"),this.attributes.style=_e(t)},t.removeProperty=i=>{if(r.test(i))return"";const n=he(i),s=t[n]||"";return delete t[n],this.attributes.style=_e(t),s},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,i){this.setAttribute(r,i)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return this.childNodes.push(t),t.parentNode=this,t.parentElement=this,t}insertBefore(t,r){if(r===null)return this.appendChild(t);const i=this.childNodes.indexOf(r);if(i==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(i,0,t),t.parentElement=this,t.parentNode=this,t}removeChild(t){const r=this.childNodes.indexOf(t);if(r===-1)throw new Error("Failed to execute 'removeChild' on 'RRElement': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(r,1),t.parentElement=null,t.parentNode=null,t}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}}function Pt(e){return class extends e{attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}}function Fe(e){return class extends e{constructor(t){super(),this.nodeType=x.TEXT_NODE,this.nodeName="#text",this.RRNodeType=N.Text,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function Ue(e){return class extends e{constructor(t){super(),this.nodeType=x.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=N.Comment,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function Be(e){return class extends e{constructor(t){super(),this.nodeName="#cdata-section",this.nodeType=x.CDATA_SECTION_NODE,this.RRNodeType=N.CDATA,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}class Ft{constructor(t,r){if(this.classes=[],this.add=(...i)=>{for(const n of i){const s=String(n);this.classes.indexOf(s)>=0||this.classes.push(s)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...i)=>{this.classes=this.classes.filter(n=>i.indexOf(n)===-1),this.onChange&&this.onChange(this.classes.join(" "))},t){const i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=r}}var x;(function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(x||(x={}));const me={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function B(e,t,r,i){const n=e.childNodes,s=t.childNodes;i=i||t.mirror||t.ownerDocument.mirror,(n.length>0||s.length>0)&&$e(Array.from(n),s,e,r,i);let a=null,l=null;switch(t.RRNodeType){case N.Document:{l=t.scrollData;break}case N.Element:{const u=e,o=t;switch(Ut(u,o,i),l=o.scrollData,a=o.inputData,o.tagName){case"AUDIO":case"VIDEO":{const c=e,d=o;d.paused!==void 0&&(d.paused?c.pause():c.play()),d.muted!==void 0&&(c.muted=d.muted),d.volume!==void 0&&(c.volume=d.volume),d.currentTime!==void 0&&(c.currentTime=d.currentTime);break}case"CANVAS":t.canvasMutations.forEach(c=>r.applyCanvas(c.event,c.mutation,e));break;case"STYLE":Bt(u,t.rules);break}if(o.shadowRoot){u.shadowRoot||u.attachShadow({mode:"open"});const c=u.shadowRoot.childNodes,d=o.shadowRoot.childNodes;(c.length>0||d.length>0)&&$e(Array.from(c),d,u.shadowRoot,r,i)}break}case N.Text:case N.Comment:case N.CDATA:e.textContent!==t.data&&(e.textContent=t.data);break}if(l&&r.applyScroll(l,!0),a&&r.applyInput(a),t.nodeName==="IFRAME"){const u=e.contentDocument,o=t;if(u){const c=i.getMeta(o.contentDocument);c&&r.mirror.add(u,Object.assign({},c)),B(u,o.contentDocument,r,i)}}}function Ut(e,t,r){const i=e.attributes,n=t.attributes;for(const s in n){const a=n[s],l=r.getMeta(t);if(l&&"isSVG"in l&&l.isSVG&&me[s])e.setAttributeNS(me[s],s,a);else if(t.tagName==="CANVAS"&&s==="rr_dataURL"){const u=document.createElement("img");u.src=a,u.onload=()=>{const o=e.getContext("2d");o&&o.drawImage(u,0,0,u.width,u.height)}}else e.setAttribute(s,a)}for(const{name:s}of Array.from(i))s in n||e.removeAttribute(s);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function $e(e,t,r,i,n){var s,a;let l=0,u=e.length-1,o=0,c=t.length-1,d=e[l],m=e[u],f=t[o],T=t[c],g,E;for(;l<=u&&o<=c;)if(d===void 0)d=e[++l];else if(m===void 0)m=e[--u];else if(i.mirror.getId(d)===n.getId(f))B(d,f,i,n),d=e[++l],f=t[++o];else if(i.mirror.getId(m)===n.getId(T))B(m,T,i,n),m=e[--u],T=t[--c];else if(i.mirror.getId(d)===n.getId(T))r.insertBefore(d,m.nextSibling),B(d,T,i,n),d=e[++l],T=t[--c];else if(i.mirror.getId(m)===n.getId(f))r.insertBefore(m,d),B(m,f,i,n),m=e[--u],f=t[++o];else{if(!g){g={};for(let h=l;h<=u;h++){const v=e[h];v&&i.mirror.hasNode(v)&&(g[i.mirror.getId(v)]=h)}}if(E=g[n.getId(f)],E){const h=e[E];r.insertBefore(h,d),B(h,f,i,n),e[E]=void 0}else{const h=pe(f,i.mirror,n);((s=i.mirror.getMeta(r))===null||s===void 0?void 0:s.type)===N.Document&&((a=i.mirror.getMeta(h))===null||a===void 0?void 0:a.type)===N.Element&&r.documentElement&&(r.removeChild(r.documentElement),e[l]=void 0,d=void 0),r.insertBefore(h,d||null),B(h,f,i,n)}f=t[++o]}if(l>u){const h=t[c+1];let v=null;for(h&&r.childNodes.forEach(w=>{i.mirror.getId(w)===n.getId(h)&&(v=w)});o<=c;++o){const w=pe(t[o],i.mirror,n);r.insertBefore(w,v),B(w,t[o],i,n)}}else if(o>c)for(;l<=u;l++){const h=e[l];h&&(r.removeChild(h),i.mirror.removeNodeFromMap(h))}}function pe(e,t,r){let i=t.getNode(r.getId(e));const n=r.getMeta(e);if(i!==null)return i;switch(e.RRNodeType){case N.Document:i=new Document;break;case N.DocumentType:i=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case N.Element:{e.tagName.toLowerCase(),n&&"isSVG"in n&&n?.isSVG?i=document.createElementNS(me.svg,e.tagName.toLowerCase()):i=document.createElement(e.tagName);break}case N.Text:i=document.createTextNode(e.data);break;case N.Comment:i=document.createComment(e.data);break;case N.CDATA:i=document.createCDATASection(e.data);break}return n&&t.add(i,Object.assign({},n)),i}function q(e,t){const r=e[t[0]];return t.length===1?r:q(r.cssRules[t[1]].cssRules,t.slice(2))}var U;(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"})(U||(U={}));function Ve(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Bt(e,t){const r=e.sheet;t.forEach(i=>{if(i.type===U.Insert)try{if(Array.isArray(i.index)){const{positions:n,index:s}=Ve(i.index);q(r.cssRules,n).insertRule(i.cssText,s)}else r.insertRule(i.cssText,i.index)}catch{}else if(i.type===U.Remove)try{if(Array.isArray(i.index)){const{positions:n,index:s}=Ve(i.index);q(r.cssRules,n).deleteRule(s||0)}else r.deleteRule(i.index)}catch{}else i.type===U.SetProperty?q(r.cssRules,i.index).style.setProperty(i.property,i.value,i.priority):i.type===U.RemoveProperty&&q(r.cssRules,i.index).style.removeProperty(i.property)})}class H extends Lt(F){constructor(t){super(),this._unserializedId=-1,this.mirror=qt(),this.scrollData=null,t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,i){return new H}createDocumentType(t,r,i){const n=new $t(t,r,i);return n.ownerDocument=this,n}createElement(t){const r=t.toUpperCase();let i;switch(r){case"AUDIO":case"VIDEO":i=new Vt(r);break;case"IFRAME":i=new Gt(r,this.mirror);break;case"CANVAS":i=new Wt(r);break;case"STYLE":i=new jt(r);break;default:i=new J(r);break}return i.ownerDocument=this,i}createComment(t){const r=new Yt(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new zt(t);return r.ownerDocument=this,r}createTextNode(t){const r=new Ht(t);return r.ownerDocument=this,r}destroyTree(){this.childNodes=[],this.mirror.reset()}open(){super.open(),this._unserializedId=-1}}const $t=Le(F);class J extends Pe(F){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}}class Vt extends Pt(J){}class Wt extends J{constructor(){super(...arguments),this.canvasMutations=[]}getContext(){return null}}class jt extends J{constructor(){super(...arguments),this.rules=[]}}class Gt extends J{constructor(t,r){super(t),this.contentDocument=new H,this.contentDocument.mirror=r}}const Ht=Fe(F),Yt=Ue(F),zt=Be(F);function Xt(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function We(e,t,r,i){let n;switch(e.nodeType){case x.DOCUMENT_NODE:i&&i.nodeName==="IFRAME"?n=i.contentDocument:(n=t,n.compatMode=e.compatMode);break;case x.DOCUMENT_TYPE_NODE:const a=e;n=t.createDocumentType(a.name,a.publicId,a.systemId);break;case x.ELEMENT_NODE:const l=e,u=Xt(l);n=t.createElement(u);const o=n;for(const{name:c,value:d}of Array.from(l.attributes))o.attributes[c]=d;l.scrollLeft&&(o.scrollLeft=l.scrollLeft),l.scrollTop&&(o.scrollTop=l.scrollTop);break;case x.TEXT_NODE:n=t.createTextNode(e.textContent||"");break;case x.CDATA_SECTION_NODE:n=t.createCDATASection(e.data);break;case x.COMMENT_NODE:n=t.createComment(e.textContent||"");break;case x.DOCUMENT_FRAGMENT_NODE:n=i.attachShadow({mode:"open"});break;default:return null}let s=r.getMeta(e);return t instanceof H&&(s||(s=je(n,t.unserializedId),r.add(e,s)),t.mirror.add(n,Object.assign({},s))),n}function Qt(e,t=Rt(),r=new H){function i(n,s){const a=We(n,r,t,s);a!==null&&(s?.nodeName!=="IFRAME"&&n.nodeType!==x.DOCUMENT_FRAGMENT_NODE&&(s?.appendChild(a),a.parentNode=s,a.parentElement=s),n.nodeName==="IFRAME"?i(n.contentDocument,a):(n.nodeType===x.DOCUMENT_NODE||n.nodeType===x.ELEMENT_NODE||n.nodeType===x.DOCUMENT_FRAGMENT_NODE)&&(n.nodeType===x.ELEMENT_NODE&&n.shadowRoot&&i(n.shadowRoot,a),n.childNodes.forEach(l=>i(l,a))))}return i(e,null),r}function qt(){return new Jt}class Jt{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var r;if(!t)return-1;const i=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return i??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r)}replace(t,r){this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function je(e,t){switch(e.RRNodeType){case N.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case N.DocumentType:const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId};case N.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case N.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case N.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case N.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Ge(e){return e=e||Object.create(null),{on:function(r,i){(e[r]||(e[r]=[])).push(i)},off:function(r,i){e[r]&&e[r].splice(e[r].indexOf(i)>>>0,1)},emit:function(r,i){(e[r]||[]).slice().map(function(n){n(i)}),(e["*"]||[]).slice().map(function(n){n(r,i)})}}}var Zt=Object.freeze({__proto__:null,default:Ge});function Kt(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,i=468,n={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},s=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(h){const v=["MSIE ","Trident/","Edge/"];return new RegExp(v.join("|")).test(h)}const l=a(e.navigator.userAgent)?1:0;function u(h,v){this.scrollLeft=h,this.scrollTop=v}function o(h){return .5*(1-Math.cos(Math.PI*h))}function c(h){if(h===null||typeof h!="object"||h.behavior===void 0||h.behavior==="auto"||h.behavior==="instant")return!0;if(typeof h=="object"&&h.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+h.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(h,v){if(v==="Y")return h.clientHeight+l<h.scrollHeight;if(v==="X")return h.clientWidth+l<h.scrollWidth}function m(h,v){const w=e.getComputedStyle(h,null)["overflow"+v];return w==="auto"||w==="scroll"}function f(h){const v=d(h,"Y")&&m(h,"Y"),w=d(h,"X")&&m(h,"X");return v||w}function T(h){for(;h!==t.body&&f(h)===!1;)h=h.parentNode||h.host;return h}function g(h){const v=s();let w,R,L,k=(v-h.startTime)/i;k=k>1?1:k,w=o(k),R=h.startX+(h.x-h.startX)*w,L=h.startY+(h.y-h.startY)*w,h.method.call(h.scrollable,R,L),(R!==h.x||L!==h.y)&&e.requestAnimationFrame(g.bind(e,h))}function E(h,v,w){let R,L,k,A;const G=s();h===t.body?(R=e,L=e.scrollX||e.pageXOffset,k=e.scrollY||e.pageYOffset,A=n.scroll):(R=h,L=h.scrollLeft,k=h.scrollTop,A=u),g({scrollable:R,method:A,startTime:G,startX:L,startY:k,x:v,y:w})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){n.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}E.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){n.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}E.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(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");n.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const h=arguments[0].left,v=arguments[0].top;E.call(this,this,typeof h>"u"?this.scrollLeft:~~h,typeof v>"u"?this.scrollTop:~~v)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){n.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){n.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const h=T(this),v=h.getBoundingClientRect(),w=this.getBoundingClientRect();h!==t.body?(E.call(this,h,h.scrollLeft+w.left-v.left,h.scrollTop+w.top-v.top),e.getComputedStyle(h).position!=="fixed"&&e.scrollBy({left:v.left,top:v.top,behavior:"smooth"})):e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}var M=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(M||{}),C=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e))(C||{}),_=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(_||{}),ie=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ie||{}),fe=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(fe||{}),D=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e))(D||{});class er{constructor(t=[],r){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=r}addAction(t){const r=this.findActionIndex(t);this.actions.splice(r,0,t)}addActions(t){this.actions=this.actions.concat(t)}replaceActions(t){this.actions.length=0,this.actions.splice(0,0,...t)}start(){this.timeOffset=0;let t=performance.now();const{actions:r}=this,i=this;function n(){const s=performance.now();for(i.timeOffset+=(s-t)*i.speed,t=s;r.length;){const a=r[0];if(i.timeOffset>=a.delay)r.shift(),a.doAction();else break}(r.length>0||i.liveMode)&&(i.raf=requestAnimationFrame(n))}this.raf=requestAnimationFrame(n)}clear(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}toggleLiveMode(t){this.liveMode=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,i=this.actions.length-1;for(;r<=i;){const n=Math.floor((r+i)/2);if(this.actions[n].delay<t.delay)r=n+1;else if(this.actions[n].delay>t.delay)i=n-1;else return n+1}return r}}function ge(e,t){if(e.type===M.IncrementalSnapshot&&e.data.source===C.MouseMove){const r=e.data.positions[0].timeOffset,i=e.timestamp+r;return e.delay=i-t,i-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
5
5
|
Permission to use, copy, modify, and/or distribute this software for any
|