@affogatosoftware/recorder 1.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.
- package/README.md +13 -0
- package/dist/browser/recorder.es.js +6136 -0
- package/dist/browser/recorder.iife.js +23 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/logger.d.ts +5 -0
- package/dist/logger.js +11 -0
- package/dist/recorder/eventRecorder.d.ts +48 -0
- package/dist/recorder/eventRecorder.js +399 -0
- package/dist/recorder/recorder.d.ts +49 -0
- package/dist/recorder/recorder.js +112 -0
- package/dist/recorder/sessionRecorder.d.ts +19 -0
- package/dist/recorder/sessionRecorder.js +104 -0
- package/dist/requests.d.ts +7 -0
- package/dist/requests.js +13 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.js +16 -0
- package/package.json +44 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var Recorder=function(xt){"use strict";var q;(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"})(q||(q={}));function _i(e){return e.nodeType===e.ELEMENT_NODE}function ct(e){var t=e?.host;return t?.shadowRoot===e}function ut(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Di(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function lr(e){try{var t=e.rules||e.cssRules;return t?Di(Array.from(t).map(Kr).join("")):null}catch{return null}}function Kr(e){var t=e.cssText;if(Bi(e))try{t=lr(e.styleSheet)||t}catch{}return t}function Bi(e){return"styleSheet"in e}var Jr=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var r;if(!t)return-1;var n=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return n??-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,n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(function(i){return r.removeNodeFromMap(i)})},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 n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)},e.prototype.replace=function(t,r){var n=this.getNode(t);if(n){var i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Ui(){return new Jr}function cr(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,i=e.value,o=e.maskInputFn,s=i||"";return(t[r.toLowerCase()]||t[n])&&(o?s=o(s):s="*".repeat(s.length)),s}var Yr="__rrweb_original__";function Pi(e){var t=e.getContext("2d");if(!t)return!0;for(var r=50,n=0;n<e.width;n+=r)for(var i=0;i<e.height;i+=r){var o=t.getImageData,s=Yr in o?o[Yr]:o,a=new Uint32Array(s.call(t,n,i,Math.min(r,e.width-n),Math.min(r,e.height-i)).data.buffer);if(a.some(function(l){return l!==0}))return!1}return!0}var Wi=1,Hi=new RegExp("[^a-z0-9-_:]"),dt=-2;function Xr(){return Wi++}function Vi(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Hi.test(t)?"div":t}function Gi(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function zi(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var Ze,Qr,Zi=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,qi=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,ji=/^(data:)([^,]*),(.*)/i;function Mt(e,t){return(e||"").replace(Zi,function(r,n,i,o,s,a){var l=i||s||a,c=n||o||"";if(!l)return r;if(!qi.test(l)||ji.test(l))return"url(".concat(c).concat(l).concat(c,")");if(l[0]==="/")return"url(".concat(c).concat(zi(t)+l).concat(c,")");var u=t.split("/"),d=l.split("/");u.pop();for(var m=0,w=d;m<w.length;m++){var f=w[m];f!=="."&&(f===".."?u.pop():u.push(f))}return"url(".concat(c).concat(u.join("/")).concat(c,")")})}var Ki=/^[^ \t\n\r\u000c]+/,Ji=/^[, \t\n\r\u000c]+/;function Yi(e,t){if(t.trim()==="")return t;var r=0;function n(c){var u,d=c.exec(t.substring(r));return d?(u=d[0],r+=u.length,u):""}for(var i=[];n(Ji),!(r>=t.length);){var o=n(Ki);if(o.slice(-1)===",")o=qe(e,o.substring(0,o.length-1)),i.push(o);else{var s="";o=qe(e,o);for(var a=!1;;){var l=t.charAt(r);if(l===""){i.push((o+s).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){r+=1,i.push((o+s).trim());break}else l==="("&&(a=!0);s+=l,r+=1}}}return i.join(", ")}function qe(e,t){if(!t||t.trim()==="")return t;var r=e.createElement("a");return r.href=t,r.href}function Xi(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ur(){var e=document.createElement("a");return e.href="",e.href}function $r(e,t,r,n){return r==="src"||r==="href"&&n&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n&&n[0]!=="#"||r==="background"&&n&&(t==="table"||t==="td"||t==="th")?qe(e,n):r==="srcset"&&n?Yi(e,n):r==="style"&&n?Mt(n,ur()):t==="object"&&r==="data"&&n?qe(e,n):n}function Qi(e,t,r){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return r?e.matches(r):!1}function Nt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Nt(e.parentNode,t,r):!1;for(var n=e.classList.length;n--;){var i=e.classList[n];if(t.test(i))return!0}return r?Nt(e.parentNode,t,r):!1}function en(e,t,r){var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(n===null)return!1;if(typeof t=="string"){if(n.classList.contains(t)||n.closest(".".concat(t)))return!0}else if(Nt(n,t,!0))return!0;return!!(r&&(n.matches(r)||n.closest(r)))}function $i(e,t,r){var n=e.contentWindow;if(n){var i=!1,o;try{o=n.document.readyState}catch{return}if(o!=="complete"){var s=setTimeout(function(){i||(t(),i=!0)},r);e.addEventListener("load",function(){clearTimeout(s),i=!0,t()});return}var a="about:blank";if(n.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function es(e,t,r){var n=!1,i;try{i=e.sheet}catch{return}if(!i){var o=setTimeout(function(){n||(t(),n=!0)},r);e.addEventListener("load",function(){clearTimeout(o),n=!0,t()})}}function ts(e,t){var r=t.doc,n=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,l=t.inlineStylesheet,c=t.maskInputOptions,u=c===void 0?{}:c,d=t.maskTextFn,m=t.maskInputFn,w=t.dataURLOptions,f=w===void 0?{}:w,v=t.inlineImages,C=t.recordCanvas,k=t.keepIframeSrcFn,S=t.newlyAddedElement,A=S===void 0?!1:S,O=rs(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:q.Document,childNodes:[],compatMode:e.compatMode}:{type:q.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:q.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:O};case e.ELEMENT_NODE:return is(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:l,maskInputOptions:u,maskInputFn:m,dataURLOptions:f,inlineImages:v,recordCanvas:C,keepIframeSrcFn:k,newlyAddedElement:A,rootId:O});case e.TEXT_NODE:return ns(e,{maskTextClass:s,maskTextSelector:a,maskTextFn:d,rootId:O});case e.CDATA_SECTION_NODE:return{type:q.CDATA,textContent:"",rootId:O};case e.COMMENT_NODE:return{type:q.Comment,textContent:e.textContent||"",rootId:O};default:return!1}}function rs(e,t){if(t.hasNode(e)){var r=t.getId(e);return r===1?void 0:r}}function ns(e,t){var r,n=t.maskTextClass,i=t.maskTextSelector,o=t.maskTextFn,s=t.rootId,a=e.parentNode&&e.parentNode.tagName,l=e.textContent,c=a==="STYLE"?!0:void 0,u=a==="SCRIPT"?!0:void 0;if(c&&l){try{e.nextSibling||e.previousSibling||!((r=e.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(l=Gi(e.parentNode.sheet))}catch(d){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(d),e)}l=Mt(l,ur())}return u&&(l="SCRIPT_PLACEHOLDER"),!c&&!u&&l&&en(e,n,i)&&(l=o?o(l):l.replace(/[\S]/g,"*")),{type:q.Text,textContent:l||"",isStyle:c,rootId:s}}function is(e,t){for(var r=t.doc,n=t.blockClass,i=t.blockSelector,o=t.inlineStylesheet,s=t.maskInputOptions,a=s===void 0?{}:s,l=t.maskInputFn,c=t.dataURLOptions,u=c===void 0?{}:c,d=t.inlineImages,m=t.recordCanvas,w=t.keepIframeSrcFn,f=t.newlyAddedElement,v=f===void 0?!1:f,C=t.rootId,k=Qi(e,n,i),S=Vi(e),A={},O=e.attributes.length,L=0;L<O;L++){var B=e.attributes[L];A[B.name]=$r(r,S,B.name,B.value)}if(S==="link"&&o){var U=Array.from(r.styleSheets).find(function(ue){return ue.href===e.href}),N=null;U&&(N=lr(U)),N&&(delete A.rel,delete A.href,A._cssText=Mt(N,U.href))}if(S==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var N=lr(e.sheet);N&&(A._cssText=Mt(N,ur()))}if(S==="input"||S==="textarea"||S==="select"){var J=e.value,le=e.checked;A.type!=="radio"&&A.type!=="checkbox"&&A.type!=="submit"&&A.type!=="button"&&J?A.value=cr({type:A.type,tagName:S,value:J,maskInputOptions:a,maskInputFn:l}):le&&(A.checked=le)}if(S==="option"&&(e.selected&&!a.select?A.selected=!0:delete A.selected),S==="canvas"&&m){if(e.__context==="2d")Pi(e)||(A.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){var he=e.toDataURL(u.type,u.quality),pe=document.createElement("canvas");pe.width=e.width,pe.height=e.height;var me=pe.toDataURL(u.type,u.quality);he!==me&&(A.rr_dataURL=he)}}if(S==="img"&&d){Ze||(Ze=r.createElement("canvas"),Qr=Ze.getContext("2d"));var Z=e,ce=Z.crossOrigin;Z.crossOrigin="anonymous";var ye=function(){try{Ze.width=Z.naturalWidth,Ze.height=Z.naturalHeight,Qr.drawImage(Z,0,0),A.rr_dataURL=Ze.toDataURL(u.type,u.quality)}catch(ue){console.warn("Cannot inline img src=".concat(Z.currentSrc,"! Error: ").concat(ue))}ce?A.crossOrigin=ce:Z.removeAttribute("crossorigin")};Z.complete&&Z.naturalWidth!==0?ye():Z.onload=ye}if((S==="audio"||S==="video")&&(A.rr_mediaState=e.paused?"paused":"played",A.rr_mediaCurrentTime=e.currentTime),v||(e.scrollLeft&&(A.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(A.rr_scrollTop=e.scrollTop)),k){var ke=e.getBoundingClientRect(),Ne=ke.width,se=ke.height;A={class:A.class,rr_width:"".concat(Ne,"px"),rr_height:"".concat(se,"px")}}return S==="iframe"&&!w(A.src)&&(e.contentDocument||(A.rr_src=A.src),delete A.src),{type:q.Element,tagName:S,attributes:A,childNodes:[],isSVG:Xi(e)||void 0,needBlock:k,rootId:C}}function D(e){return e===void 0?"":e.toLowerCase()}function ss(e,t){if(t.comment&&e.type===q.Comment)return!0;if(e.type===q.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(D(e.attributes.name).match(/^msapplication-tile(image|color)$/)||D(e.attributes.name)==="application-name"||D(e.attributes.rel)==="icon"||D(e.attributes.rel)==="apple-touch-icon"||D(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&D(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(D(e.attributes.property).match(/^(og|twitter|fb):/)||D(e.attributes.name).match(/^(og|twitter):/)||D(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(D(e.attributes.name)==="robots"||D(e.attributes.name)==="googlebot"||D(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(D(e.attributes.name)==="author"||D(e.attributes.name)==="generator"||D(e.attributes.name)==="framework"||D(e.attributes.name)==="publisher"||D(e.attributes.name)==="progid"||D(e.attributes.property).match(/^article:/)||D(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(D(e.attributes.name)==="google-site-verification"||D(e.attributes.name)==="yandex-verification"||D(e.attributes.name)==="csrf-token"||D(e.attributes.name)==="p:domain_verify"||D(e.attributes.name)==="verify-v1"||D(e.attributes.name)==="verification"||D(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function je(e,t){var r=t.doc,n=t.mirror,i=t.blockClass,o=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,l=t.skipChild,c=l===void 0?!1:l,u=t.inlineStylesheet,d=u===void 0?!0:u,m=t.maskInputOptions,w=m===void 0?{}:m,f=t.maskTextFn,v=t.maskInputFn,C=t.slimDOMOptions,k=t.dataURLOptions,S=k===void 0?{}:k,A=t.inlineImages,O=A===void 0?!1:A,L=t.recordCanvas,B=L===void 0?!1:L,U=t.onSerialize,N=t.onIframeLoad,J=t.iframeLoadTimeout,le=J===void 0?5e3:J,he=t.onStylesheetLoad,pe=t.stylesheetLoadTimeout,me=pe===void 0?5e3:pe,Z=t.keepIframeSrcFn,ce=Z===void 0?function(){return!1}:Z,ye=t.newlyAddedElement,ke=ye===void 0?!1:ye,Ne=t.preserveWhiteSpace,se=Ne===void 0?!0:Ne,ue=ts(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,inlineStylesheet:d,maskInputOptions:w,maskTextFn:f,maskInputFn:v,dataURLOptions:S,inlineImages:O,recordCanvas:B,keepIframeSrcFn:ce,newlyAddedElement:ke});if(!ue)return console.warn(e,"not serialized"),null;var Ue;n.hasNode(e)?Ue=n.getId(e):ss(ue,C)||!se&&ue.type===q.Text&&!ue.isStyle&&!ue.textContent.replace(/^\s+|\s+$/gm,"").length?Ue=dt:Ue=Xr();var G=Object.assign(ue,{id:Ue});if(n.add(e,G),Ue===dt)return null;U&&U(e);var Ie=!c;if(G.type===q.Element){Ie=Ie&&!G.needBlock,delete G.needBlock;var Re=e.shadowRoot;Re&&ut(Re)&&(G.isShadowHost=!0)}if((G.type===q.Document||G.type===q.Element)&&Ie){C.headWhitespace&&G.type===q.Element&&G.tagName==="head"&&(se=!1);for(var lt={doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:d,maskInputOptions:w,maskTextFn:f,maskInputFn:v,slimDOMOptions:C,dataURLOptions:S,inlineImages:O,recordCanvas:B,preserveWhiteSpace:se,onSerialize:U,onIframeLoad:N,iframeLoadTimeout:le,onStylesheetLoad:he,stylesheetLoadTimeout:me,keepIframeSrcFn:ce},T=0,Q=Array.from(e.childNodes);T<Q.length;T++){var oe=Q[T],P=je(oe,lt);P&&G.childNodes.push(P)}if(_i(e)&&e.shadowRoot)for(var de=0,F=Array.from(e.shadowRoot.childNodes);de<F.length;de++){var oe=F[de],P=je(oe,lt);P&&(ut(e.shadowRoot)&&(P.isShadow=!0),G.childNodes.push(P))}}return e.parentNode&&ct(e.parentNode)&&ut(e.parentNode)&&(G.isShadow=!0),G.type===q.Element&&G.tagName==="iframe"&&$i(e,function(){var ae=e.contentDocument;if(ae&&N){var Ot=je(ae,{doc:ae,mirror:n,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:w,maskTextFn:f,maskInputFn:v,slimDOMOptions:C,dataURLOptions:S,inlineImages:O,recordCanvas:B,preserveWhiteSpace:se,onSerialize:U,onIframeLoad:N,iframeLoadTimeout:le,onStylesheetLoad:he,stylesheetLoadTimeout:me,keepIframeSrcFn:ce});Ot&&N(e,Ot)}},le),G.type===q.Element&&G.tagName==="link"&&G.attributes.rel==="stylesheet"&&es(e,function(){if(he){var ae=je(e,{doc:r,mirror:n,blockClass:i,blockSelector:o,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:d,maskInputOptions:w,maskTextFn:f,maskInputFn:v,slimDOMOptions:C,dataURLOptions:S,inlineImages:O,recordCanvas:B,preserveWhiteSpace:se,onSerialize:U,onIframeLoad:N,iframeLoadTimeout:le,onStylesheetLoad:he,stylesheetLoadTimeout:me,keepIframeSrcFn:ce});ae&&he(e,ae)}},me),G}function os(e,t){var r=t||{},n=r.mirror,i=n===void 0?new Jr:n,o=r.blockClass,s=o===void 0?"rr-block":o,a=r.blockSelector,l=a===void 0?null:a,c=r.maskTextClass,u=c===void 0?"rr-mask":c,d=r.maskTextSelector,m=d===void 0?null:d,w=r.inlineStylesheet,f=w===void 0?!0:w,v=r.inlineImages,C=v===void 0?!1:v,k=r.recordCanvas,S=k===void 0?!1:k,A=r.maskAllInputs,O=A===void 0?!1:A,L=r.maskTextFn,B=r.maskInputFn,U=r.slimDOM,N=U===void 0?!1:U,J=r.dataURLOptions,le=r.preserveWhiteSpace,he=r.onSerialize,pe=r.onIframeLoad,me=r.iframeLoadTimeout,Z=r.onStylesheetLoad,ce=r.stylesheetLoadTimeout,ye=r.keepIframeSrcFn,ke=ye===void 0?function(){return!1}:ye,Ne=O===!0?{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}:O===!1?{password:!0}:O,se=N===!0||N==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:N==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:N===!1?{}:N;return je(e,{doc:e,mirror:i,blockClass:s,blockSelector:l,maskTextClass:u,maskTextSelector:m,skipChild:!1,inlineStylesheet:f,maskInputOptions:Ne,maskTextFn:L,maskInputFn:B,slimDOMOptions:se,dataURLOptions:J,inlineImages:C,recordCanvas:S,preserveWhiteSpace:le,onSerialize:he,onIframeLoad:pe,iframeLoadTimeout:me,onStylesheetLoad:Z,stylesheetLoadTimeout:ce,keepIframeSrcFn:ke,newlyAddedElement:!1})}function Y(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const Ke=`Please stop import mirror directly. Instead of that,\r
|
|
2
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
3
|
+
or you can use record.mirror to access the mirror instance during recording.`;let tn={map:{},getId(){return console.error(Ke),-1},getNode(){return console.error(Ke),null},removeNodeFromMap(){console.error(Ke)},has(){return console.error(Ke),!1},reset(){console.error(Ke)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(tn=new Proxy(tn,{get(e,t,r){return t==="map"&&console.error(Ke),Reflect.get(e,t,r)}}));function ft(e,t,r={}){let n=null,i=0;return function(...o){const s=Date.now();!i&&r.leading===!1&&(i=s);const a=t-(s-i),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),i=s,e.apply(l,o)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,e.apply(l,o)},a))}}function Lt(e,t,r,n,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,n?r:{set(s){setTimeout(()=>{r.set.call(this,s)},0),o&&o.set&&o.set.call(this,s)}}),()=>Lt(e,t,o||{},!0)}function Je(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}}function rn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function nn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function X(e,t,r,n){if(!e)return!1;const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!i)return!1;if(typeof t=="string"){if(i.classList.contains(t)||n&&i.closest("."+t)!==null)return!0}else if(Nt(i,t,n))return!0;return!!(r&&(e.matches(r)||n&&i.closest(r)!==null))}function as(e,t){return t.getId(e)!==-1}function dr(e,t){return t.getId(e)===dt}function sn(e,t){if(ct(e))return!1;const r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?sn(e.parentNode,t):!0:!0}function on(e){return!!e.changedTouches}function ls(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=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function an(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function ln(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function cn(e){return!!e?.shadowRoot}class cs{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var r;return(r=this.styleIDMap.get(t))!==null&&r!==void 0?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}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||{}),x=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e))(x||{}),fr=(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))(fr||{}),Ye=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ye||{});function un(e){return"__ln"in e}class us{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=r?.next||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&un(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&un(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next&&(r.next.previous=r.previous)):(this.head=r.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const dn=(e,t)=>`${e}@${t}`;class ds{constructor(){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=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],r=new us,n=a=>{let l=a,c=dt;for(;c===dt;)l=l&&l.nextSibling,c=l&&this.mirror.getId(l);return c},i=a=>{var l,c,u,d;let m=null;((c=(l=a.getRootNode)===null||l===void 0?void 0:l.call(a))===null||c===void 0?void 0:c.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&a.getRootNode().host&&(m=a.getRootNode().host);let w=m;for(;((d=(u=w?.getRootNode)===null||u===void 0?void 0:u.call(w))===null||d===void 0?void 0:d.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&w.getRootNode().host;)w=w.getRootNode().host;const f=!this.doc.contains(a)&&(!w||!this.doc.contains(w));if(!a.parentNode||f)return;const v=ct(a.parentNode)?this.mirror.getId(m):this.mirror.getId(a.parentNode),C=n(a);if(v===-1||C===-1)return r.addNode(a);const k=je(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:S=>{an(S,this.mirror)&&this.iframeManager.addIframe(S),ln(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),cn(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(S,A)=>{this.iframeManager.attachIframe(S,A),this.shadowDomManager.observeAttachShadow(S)},onStylesheetLoad:(S,A)=>{this.stylesheetManager.attachLinkElement(S,A)}});k&&t.push({parentId:v,nextId:C,node:k})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))fn(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||i(a);for(const a of Array.from(this.addedSet.values()))!pn(this.droppedSet,a)&&!fn(this.removes,a,this.mirror)||pn(this.movedSet,a)?i(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const l=this.mirror.getId(o.value.parentNode),c=n(o.value);l!==-1&&c!==-1&&(a=o)}if(!a)for(let l=r.length-1;l>=0;l--){const c=r.get(l);if(c){const u=this.mirror.getId(c.value.parentNode);if(n(c.value)===-1)continue;if(u!==-1){a=c;break}else{const m=c.value;if(m.parentNode&&m.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const w=m.parentNode.host;if(this.mirror.getId(w)!==-1){a=c;break}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),i(a.value)}const s={texts:this.texts.map(a=>({id:this.mirror.getId(a.node),value:a.value})).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:t};!s.texts.length&&!s.attributes.length&&!s.removes.length&&!s.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=t=>{if(!dr(t.target,this.mirror))switch(t.type){case"characterData":{const r=t.target.textContent;!X(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:en(t.target,this.maskTextClass,this.maskTextSelector)&&r?this.maskTextFn?this.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(n=cr({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),X(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;let i=this.attributes.find(o=>o.node===t.target);if(r.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(n))if(!r.contentDocument)t.attributeName="rr_src";else return;if(i||(i={node:t.target,attributes:{}},this.attributes.push(i)),t.attributeName==="style"){const o=this.doc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue),(i.attributes.style===void 0||i.attributes.style===null)&&(i.attributes.style={});const s=i.attributes.style;for(const a of Array.from(r.style)){const l=r.style.getPropertyValue(a),c=r.style.getPropertyPriority(a);(l!==o.style.getPropertyValue(a)||c!==o.style.getPropertyPriority(a))&&(c===""?s[a]=l:s[a]=[l,c])}for(const a of Array.from(o.style))r.style.getPropertyValue(a)===""&&(s[a]=!1)}else i.attributes[t.attributeName]=$r(this.doc,r.tagName,t.attributeName,n);break}case"childList":{if(X(t.target,this.blockClass,this.blockSelector,!0))return;t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),i=ct(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);X(t.target,this.blockClass,this.blockSelector,!1)||dr(r,this.mirror)||!as(r,this.mirror)||(this.addedSet.has(r)?(hr(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||sn(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[dn(n,i)]?hr(this.movedSet,r):this.removes.push({parentId:i,id:n,isShadow:ct(t.target)&&ut(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(this.mirror.hasNode(t)){if(dr(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[dn(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);X(t,this.blockClass,this.blockSelector,!1)||t.childNodes.forEach(n=>this.genAdds(n))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function hr(e,t){e.delete(t),t.childNodes.forEach(r=>hr(e,r))}function fn(e,t,r){return e.length===0?!1:hn(e,t,r)}function hn(e,t,r){const{parentNode:n}=t;if(!n)return!1;const i=r.getId(n);return e.some(o=>o.id===i)?!0:hn(e,n,r)}function pn(e,t){return e.size===0?!1:mn(e,t)}function mn(e,t){const{parentNode:r}=t;return r?e.has(r)?!0:mn(e,r):!1}const Pe=[],gn=typeof CSSGroupingRule<"u",bn=typeof CSSMediaRule<"u",wn=typeof CSSSupportsRule<"u",yn=typeof CSSConditionRule<"u";function ht(e){try{if("composedPath"in e){const 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{return e.target}}function In(e,t){var r,n;const i=new ds;Pe.push(i),i.init(e);let o=window.MutationObserver||window.__rrMutationObserver;const s=(n=(r=window?.Zone)===null||r===void 0?void 0:r.__symbol__)===null||n===void 0?void 0:n.call(r,"MutationObserver");s&&window[s]&&(o=window[s]);const a=new o(i.processMutations.bind(i));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function fs({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let s=[],a;const l=ft(d=>{const m=Date.now()-a;e(s.map(w=>(w.timeOffset-=m,w)),d),s=[],a=null},o),c=ft(d=>{const m=ht(d),{clientX:w,clientY:f}=on(d)?d.changedTouches[0]:d;a||(a=Date.now()),s.push({x:w,y:f,id:n.getId(m),timeOffset:Date.now()-a}),l(typeof DragEvent<"u"&&d instanceof DragEvent?x.Drag:d instanceof MouseEvent?x.MouseMove:x.TouchMove)},i,{trailing:!1}),u=[Y("mousemove",c,r),Y("touchmove",c,r),Y("drag",c,r)];return()=>{u.forEach(d=>d())}}function hs({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],l=c=>u=>{const d=ht(u);if(X(d,n,i,!0))return;const m=on(u)?u.changedTouches[0]:u;if(!m)return;const w=r.getId(d),{clientX:f,clientY:v}=m;e({type:fr[c],id:w,x:f,y:v})};return Object.keys(fr).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&s[c]!==!1).forEach(c=>{const u=c.toLowerCase(),d=l(c);a.push(Y(u,d,t))}),()=>{a.forEach(c=>c())}}function Cn({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:o}){const s=ft(a=>{const l=ht(a);if(!l||X(l,n,i,!0))return;const c=r.getId(l);if(l===t){const u=t.scrollingElement||t.documentElement;e({id:c,x:u.scrollLeft,y:u.scrollTop})}else e({id:c,x:l.scrollLeft,y:l.scrollTop})},o.scroll||100);return Y("scroll",s,t)}function ps({viewportResizeCb:e}){let t=-1,r=-1;const n=ft(()=>{const i=rn(),o=nn();(t!==i||r!==o)&&(e({width:Number(o),height:Number(i)}),t=i,r=o)},200);return Y("resize",n,window)}function Sn(e,t){const r=Object.assign({},e);return t||delete r.userTriggered,r}const ms=["INPUT","TEXTAREA","SELECT"],vn=new WeakMap;function gs({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,ignoreClass:o,maskInputOptions:s,maskInputFn:a,sampling:l,userTriggeredOnInput:c}){function u(k){let S=ht(k);const A=k.isTrusted;if(S&&S.tagName==="OPTION"&&(S=S.parentElement),!S||!S.tagName||ms.indexOf(S.tagName)<0||X(S,n,i,!0))return;const O=S.type;if(S.classList.contains(o))return;let L=S.value,B=!1;O==="radio"||O==="checkbox"?B=S.checked:(s[S.tagName.toLowerCase()]||s[O])&&(L=cr({maskInputOptions:s,tagName:S.tagName,type:O,value:L,maskInputFn:a})),d(S,Sn({text:L,isChecked:B,userTriggered:A},c));const U=S.name;O==="radio"&&U&&B&&t.querySelectorAll(`input[type="radio"][name="${U}"]`).forEach(N=>{N!==S&&d(N,Sn({text:N.value,isChecked:!B,userTriggered:!1},c))})}function d(k,S){const A=vn.get(k);if(!A||A.text!==S.text||A.isChecked!==S.isChecked){vn.set(k,S);const O=r.getId(k);e(Object.assign(Object.assign({},S),{id:O}))}}const w=(l.input==="last"?["change"]:["input","change"]).map(k=>Y(k,u,t)),f=t.defaultView;if(!f)return()=>{w.forEach(k=>k())};const v=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),C=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&w.push(...C.map(k=>Lt(k[0],k[1],{set(){u({target:this})}},!1,f))),()=>{w.forEach(k=>k())}}function Ft(e){const t=[];function r(n,i){if(gn&&n.parentRule instanceof CSSGroupingRule||bn&&n.parentRule instanceof CSSMediaRule||wn&&n.parentRule instanceof CSSSupportsRule||yn&&n.parentRule instanceof CSSConditionRule){const s=Array.from(n.parentRule.cssRules).indexOf(n);i.unshift(s)}else if(n.parentStyleSheet){const s=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(s)}return i}return r(e,t)}function Le(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function bs({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){const i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(u,d){const{id:m,styleId:w}=Le(this,t,r.styleMirror);return(m&&m!==-1||w&&w!==-1)&&e({id:m,styleId:w,adds:[{rule:u,index:d}]}),i.apply(this,[u,d])};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(u){const{id:d,styleId:m}=Le(this,t,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&e({id:d,styleId:m,removes:[{index:u}]}),o.apply(this,[u])};let s;n.CSSStyleSheet.prototype.replace&&(s=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=function(u){const{id:d,styleId:m}=Le(this,t,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&e({id:d,styleId:m,replace:u}),s.apply(this,[u])});let a;n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=function(u){const{id:d,styleId:m}=Le(this,t,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&e({id:d,styleId:m,replaceSync:u}),a.apply(this,[u])});const l={};gn?l.CSSGroupingRule=n.CSSGroupingRule:(bn&&(l.CSSMediaRule=n.CSSMediaRule),yn&&(l.CSSConditionRule=n.CSSConditionRule),wn&&(l.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(l).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=function(m,w){const{id:f,styleId:v}=Le(this.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||v&&v!==-1)&&e({id:f,styleId:v,adds:[{rule:m,index:[...Ft(this),w||0]}]}),c[u].insertRule.apply(this,[m,w])},d.prototype.deleteRule=function(m){const{id:w,styleId:f}=Le(this.parentStyleSheet,t,r.styleMirror);return(w&&w!==-1||f&&f!==-1)&&e({id:w,styleId:f,removes:[{index:[...Ft(this),m]}]}),c[u].deleteRule.apply(this,[m])}}),()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=o,s&&(n.CSSStyleSheet.prototype.replace=s),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})}}function An({mirror:e,stylesheetManager:t},r){var n,i,o;let s=null;r.nodeName==="#document"?s=e.getId(r):s=e.getId(r.host);const a=r.nodeName==="#document"?(n=r.defaultView)===null||n===void 0?void 0:n.Document:(o=(i=r.ownerDocument)===null||i===void 0?void 0:i.defaultView)===null||o===void 0?void 0:o.ShadowRoot,l=Object.getOwnPropertyDescriptor(a?.prototype,"adoptedStyleSheets");return s===null||s===-1||!a||!l?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var c;return(c=l.get)===null||c===void 0?void 0:c.call(this)},set(c){var u;const d=(u=l.set)===null||u===void 0?void 0:u.call(this,c);if(s!==null&&s!==-1)try{t.adoptStyleSheets(c,s)}catch{}return d}}),()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})}function ws({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=function(a,l,c){var u;if(r.has(a))return o.apply(this,[a,l,c]);const{id:d,styleId:m}=Le((u=this.parentRule)===null||u===void 0?void 0:u.parentStyleSheet,t,n.styleMirror);return(d&&d!==-1||m&&m!==-1)&&e({id:d,styleId:m,set:{property:a,value:l,priority:c},index:Ft(this.parentRule)}),o.apply(this,[a,l,c])};const s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=function(a){var l;if(r.has(a))return s.apply(this,[a]);const{id:c,styleId:u}=Le((l=this.parentRule)===null||l===void 0?void 0:l.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||u&&u!==-1)&&e({id:c,styleId:u,remove:{property:a},index:Ft(this.parentRule)}),s.apply(this,[a])},()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=s}}function ys({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:i}){const o=a=>ft(l=>{const c=ht(l);if(!c||X(c,t,r,!0))return;const{currentTime:u,volume:d,muted:m,playbackRate:w}=c;e({type:a,id:n.getId(c),currentTime:u,volume:d,muted:m,playbackRate:w})},i.media||500),s=[Y("play",o(0)),Y("pause",o(1)),Y("seeked",o(2)),Y("volumechange",o(3)),Y("ratechange",o(4))];return()=>{s.forEach(a=>a())}}function Is({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],i=new WeakMap,o=r.FontFace;r.FontFace=function(l,c,u){const d=new o(l,c,u);return i.set(d,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};const s=Je(t.fonts,"add",function(a){return function(l){return setTimeout(()=>{const c=i.get(l);c&&(e(c),i.delete(l))},0),a.apply(this,[l])}});return n.push(()=>{r.FontFace=o}),n.push(s),()=>{n.forEach(a=>a())}}function Cs(e){const{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:o}=e;let s=!0;const a=()=>{const l=t.getSelection();if(!l||s&&l?.isCollapsed)return;s=l.isCollapsed||!1;const c=[],u=l.rangeCount||0;for(let d=0;d<u;d++){const m=l.getRangeAt(d),{startContainer:w,startOffset:f,endContainer:v,endOffset:C}=m;X(w,n,i,!0)||X(v,n,i,!0)||c.push({start:r.getId(w),startOffset:f,end:r.getId(v),endOffset:C})}o({ranges:c})};return a(),Y("selectionchange",a)}function Ss(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:s,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:m,selectionCb:w}=e;e.mutationCb=(...f)=>{t.mutation&&t.mutation(...f),r(...f)},e.mousemoveCb=(...f)=>{t.mousemove&&t.mousemove(...f),n(...f)},e.mouseInteractionCb=(...f)=>{t.mouseInteraction&&t.mouseInteraction(...f),i(...f)},e.scrollCb=(...f)=>{t.scroll&&t.scroll(...f),o(...f)},e.viewportResizeCb=(...f)=>{t.viewportResize&&t.viewportResize(...f),s(...f)},e.inputCb=(...f)=>{t.input&&t.input(...f),a(...f)},e.mediaInteractionCb=(...f)=>{t.mediaInteaction&&t.mediaInteaction(...f),l(...f)},e.styleSheetRuleCb=(...f)=>{t.styleSheetRule&&t.styleSheetRule(...f),c(...f)},e.styleDeclarationCb=(...f)=>{t.styleDeclaration&&t.styleDeclaration(...f),u(...f)},e.canvasMutationCb=(...f)=>{t.canvasMutation&&t.canvasMutation(...f),d(...f)},e.fontCb=(...f)=>{t.font&&t.font(...f),m(...f)},e.selectionCb=(...f)=>{t.selection&&t.selection(...f),w(...f)}}function vs(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Ss(e,t);const n=In(e,e.doc),i=fs(e),o=hs(e),s=Cn(e),a=ps(e),l=gs(e),c=ys(e),u=bs(e,{win:r}),d=An(e,e.doc),m=ws(e,{win:r}),w=e.collectFonts?Is(e):()=>{},f=Cs(e),v=[];for(const C of e.plugins)v.push(C.observer(C.callback,r,C.options));return()=>{Pe.forEach(C=>C.reset()),n.disconnect(),i(),o(),s(),a(),l(),c(),u(),d(),m(),w(),f(),v.forEach(C=>C())}}class kn{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,n,i){const o=n||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t);let a=o.get(r);return a||(a=this.generateIdFn(),o.set(r,a),s.set(a,r)),a}getIds(t,r){const n=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(o=>this.getId(t,o,n,i))}getRemoteId(t,r,n){const i=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const o=i.get(r);return o||-1}getRemoteIds(t,r){const n=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class As{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new kn(Xr),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new kn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(n=this.loadListener)===null||n===void 0||n.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){if(t.data.type==="rrweb"){if(!t.source)return;const n=this.crossOriginIframeMap.get(t.source);if(!n)return;const i=this.transformCrossOriginEvent(n,t.data.event);i&&this.wrappedEmit(i,t.data.isCheckout)}}transformCrossOriginEvent(t,r){var n;switch(r.type){case M.FullSnapshot:return this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t),{timestamp:r.timestamp,type:M.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case M.Meta:case M.Load:case M.DomContentLoaded:return!1;case M.Plugin:return r;case M.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case M.IncrementalSnapshot:switch(r.data.source){case x.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case x.Drag:case x.TouchMove:case x.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(r.data,t,["id"]),r;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case x.Font:return r;case x.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case x.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)===null||n===void 0||n.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}}replace(t,r,n,i){for(const o of i)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=t.getIds(n,r[o]):r[o]=t.getId(n,r[o]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}}class ks{constructor(t){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const r=this;this.restorePatches.push(Je(Element.prototype,"attachShadow",function(n){return function(i){const o=n.call(this,i);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(t,r){ut(t)&&(this.shadowDoms.has(t)||(this.shadowDoms.add(t),In(Object.assign(Object.assign({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Cn(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),An({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)},0)))}observeAttachShadow(t){if(t.contentWindow){const r=this;this.restorePatches.push(Je(t.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(i){const o=n.call(this,i);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,t.contentDocument),o}}))}}reset(){this.restorePatches.forEach(t=>t()),this.shadowDoms=new WeakSet}}/*! *****************************************************************************
|
|
4
|
+
Copyright (c) Microsoft Corporation.
|
|
5
|
+
|
|
6
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
7
|
+
purpose with or without fee is hereby granted.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
***************************************************************************** */function Rs(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Ts(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(u){try{c(n.next(u))}catch(d){s(d)}}function l(u){try{c(n.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):i(u.value).then(a,l)}c((n=n.apply(e,[])).next())})}for(var Xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Es=typeof Uint8Array>"u"?[]:new Uint8Array(256),_t=0;_t<Xe.length;_t++)Es[Xe.charCodeAt(_t)]=_t;var Os=function(e){var t=new Uint8Array(e),r,n=t.length,i="";for(r=0;r<n;r+=3)i+=Xe[t[r]>>2],i+=Xe[(t[r]&3)<<4|t[r+1]>>4],i+=Xe[(t[r+1]&15)<<2|t[r+2]>>6],i+=Xe[t[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Rn=new Map;function xs(e,t){let r=Rn.get(e);return r||(r=new Map,Rn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const Tn=(e,t,r)=>{if(!e||!(On(e,t)||typeof e=="object"))return;const n=e.constructor.name,i=xs(r,n);let o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function Dt(e,t,r){if(e instanceof Array)return e.map(n=>Dt(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const n=e.constructor.name,i=Os(e);return{rr_type:n,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Dt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:i}=e;return{rr_type:n,src:i}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",i=e.toDataURL();return{rr_type:n,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Dt(e.data,t,r),e.width,e.height]};if(On(e,t)||typeof e=="object"){const n=e.constructor.name,i=Tn(e,t,r);return{rr_type:n,index:i}}}}return e}const En=(e,t,r)=>[...e].map(n=>Dt(n,t,r)),On=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function Ms(e,t,r,n){const i=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of o)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!="function")continue;const a=Je(t.CanvasRenderingContext2D.prototype,s,function(l){return function(...c){return X(this.canvas,r,n,!0)||setTimeout(()=>{const u=En([...c],t,this);e(this.canvas,{type:Ye["2D"],property:s,args:u})},0),l.apply(this,c)}});i.push(a)}catch{const l=Lt(t.CanvasRenderingContext2D.prototype,s,{set(c){e(this.canvas,{type:Ye["2D"],property:s,args:[c],setter:!0})}});i.push(l)}return()=>{i.forEach(s=>s())}}function xn(e,t,r){const n=[];try{const i=Je(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...a){return X(this,t,r,!0)||"__context"in this||(this.__context=s),o.apply(this,[s,...a])}});n.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(i=>i())}}function Mn(e,t,r,n,i,o,s){const a=[],l=Object.getOwnPropertyNames(e);for(const c of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof e[c]!="function")continue;const u=Je(e,c,function(d){return function(...m){const w=d.apply(this,m);if(Tn(w,s,this),!X(this.canvas,n,i,!0)){const f=En([...m],s,this),v={type:t,property:c,args:f};r(this.canvas,v)}return w}});a.push(u)}catch{const d=Lt(e,c,{set(m){r(this.canvas,{type:t,property:c,args:[m],setter:!0})}});a.push(d)}return a}function Ns(e,t,r,n,i){const o=[];return o.push(...Mn(t.WebGLRenderingContext.prototype,Ye.WebGL,e,r,n,i,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Mn(t.WebGL2RenderingContext.prototype,Ye.WebGL2,e,r,n,i,t)),()=>{o.forEach(s=>s())}}var Nn=null;try{var Ls=typeof module<"u"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof require=="function"&&require("worker_threads");Nn=Ls.Worker}catch{}function Fs(e,t){return Buffer.from(e,"base64").toString("utf8")}function _s(e,t,r){var n=Fs(e),i=n.indexOf(`
|
|
17
|
+
`,10)+1,o=n.substring(i)+"";return function(a){return new Nn(o,Object.assign({},a,{eval:!0}))}}function Ds(e,t){var r=atob(e);return r}function Bs(e,t,r){var n=Ds(e),i=n.indexOf(`
|
|
18
|
+
`,10)+1,o=n.substring(i)+"",s=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(s)}function Us(e,t,r){var n;return function(o){return n=n||Bs(e),new Worker(n,o)}}var Ps=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";function Ws(){return Ps}function Hs(e,t,r){return Ws()?_s(e):Us(e)}var Vs=Hs("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=");class Gs{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(l,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(c)};const{sampling:r="all",win:n,blockClass:i,blockSelector:o,recordCanvas:s,dataURLOptions:a}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&r==="all"&&this.initCanvasMutationObserver(n,i,o),s&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,i,o,{dataURLOptions:a})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,n,i,o){const s=xn(r,n,i),a=new Map,l=new Vs;l.onmessage=f=>{const{id:v}=f.data;if(a.set(v,!1),!("base64"in f.data))return;const{base64:C,type:k,width:S,height:A}=f.data;this.mutationCb({id:v,type:Ye["2D"],commands:[{property:"clearRect",args:[0,0,S,A]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:C}],type:k}]},0,0]}]})};const c=1e3/t;let u=0,d;const m=()=>{const f=[];return r.document.querySelectorAll("canvas").forEach(v=>{X(v,n,i,!0)||f.push(v)}),f},w=f=>{if(u&&f-u<c){d=requestAnimationFrame(w);return}u=f,m().forEach(v=>Ts(this,void 0,void 0,function*(){var C;const k=this.mirror.getId(v);if(a.get(k))return;if(a.set(k,!0),["webgl","webgl2"].includes(v.__context)){const A=v.getContext(v.__context);((C=A?.getContextAttributes())===null||C===void 0?void 0:C.preserveDrawingBuffer)===!1&&A?.clear(A.COLOR_BUFFER_BIT)}const S=yield createImageBitmap(v);l.postMessage({id:k,bitmap:S,width:v.width,height:v.height,dataURLOptions:o.dataURLOptions},[S])})),d=requestAnimationFrame(w)};d=requestAnimationFrame(w),this.resetObservers=()=>{s(),cancelAnimationFrame(d)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=xn(t,r,n),o=Ms(this.processMutation.bind(this),t,r,n),s=Ns(this.processMutation.bind(this),t,r,n,this.mirror);this.resetObservers=()=>{i(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;const i=n.map(s=>Rs(s,["type"])),{type:o}=n[0];this.mutationCb({id:r,type:o,commands:i}),this.pendingCanvasMutations.delete(t)}}class zs{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new cs,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const n={id:r,styleIds:[]},i=[];for(const o of t){let s;if(this.styleMirror.has(o))s=this.styleMirror.getId(o);else{s=this.styleMirror.add(o);const a=Array.from(o.rules||CSSRule);i.push({styleId:s,rules:a.map((l,c)=>({rule:Kr(l),index:c}))})}n.styleIds.push(s)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}function z(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}let W,Bt,pr,Ut=!1;const ge=Ui();function pt(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:s="rr-ignore",maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:m,maskInputFn:w,maskTextFn:f,hooks:v,packFn:C,sampling:k={},dataURLOptions:S={},mousemoveWait:A,recordCanvas:O=!1,recordCrossOriginIframes:L=!1,userTriggeredOnInput:B=!1,collectFonts:U=!1,inlineImages:N=!1,plugins:J,keepIframeSrcFn:le=()=>!1,ignoreCSSAttributes:he=new Set([])}=e,pe=L?window.parent===window:!0;let me=!1;if(!pe)try{window.parent.document,me=!1}catch{me=!0}if(pe&&!t)throw new Error("emit function is required");A!==void 0&&k.mousemove===void 0&&(k.mousemove=A),ge.reset();const Z=u===!0?{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}:d!==void 0?d:{password:!0},ce=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};ls();let ye,ke=0;const Ne=T=>{for(const Q of J||[])Q.eventProcessor&&(T=Q.eventProcessor(T));return C&&(T=C(T)),T};W=(T,Q)=>{var oe;if(!((oe=Pe[0])===null||oe===void 0)&&oe.isFrozen()&&T.type!==M.FullSnapshot&&!(T.type===M.IncrementalSnapshot&&T.data.source===x.Mutation)&&Pe.forEach(P=>P.unfreeze()),pe)t?.(Ne(T),Q);else if(me){const P={type:"rrweb",event:Ne(T),isCheckout:Q};window.parent.postMessage(P,"*")}if(T.type===M.FullSnapshot)ye=T,ke=0;else if(T.type===M.IncrementalSnapshot){if(T.data.source===x.Mutation&&T.data.isAttachIframe)return;ke++;const P=n&&ke>=n,de=r&&T.timestamp-ye.timestamp>r;(P||de)&&Bt(!0)}};const se=T=>{W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.Mutation},T)}))},ue=T=>W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.Scroll},T)})),Ue=T=>W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.CanvasMutation},T)})),G=T=>W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.AdoptedStyleSheet},T)})),Ie=new zs({mutationCb:se,adoptedStyleSheetCb:G}),Re=new As({mirror:ge,mutationCb:se,stylesheetManager:Ie,recordCrossOriginIframes:L,wrappedEmit:W});for(const T of J||[])T.getMirror&&T.getMirror({nodeMirror:ge,crossOriginIframeMirror:Re.crossOriginIframeMirror,crossOriginIframeStyleMirror:Re.crossOriginIframeStyleMirror});pr=new Gs({recordCanvas:O,mutationCb:Ue,win:window,blockClass:i,blockSelector:o,mirror:ge,sampling:k.canvas,dataURLOptions:S});const lt=new ks({mutationCb:se,scrollCb:ue,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:Z,dataURLOptions:S,maskTextFn:f,maskInputFn:w,recordCanvas:O,inlineImages:N,sampling:k,slimDOMOptions:ce,iframeManager:Re,stylesheetManager:Ie,canvasManager:pr,keepIframeSrcFn:le},mirror:ge});Bt=(T=!1)=>{var Q,oe,P,de,F,ae;W(z({type:M.Meta,data:{href:window.location.href,width:nn(),height:rn()}}),T),Ie.reset(),Pe.forEach($=>$.lock());const Ot=os(document,{mirror:ge,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:Z,maskTextFn:f,slimDOM:ce,dataURLOptions:S,recordCanvas:O,inlineImages:N,onSerialize:$=>{an($,ge)&&Re.addIframe($),ln($,ge)&&Ie.trackLinkElement($),cn($)&<.addShadowRoot($.shadowRoot,document)},onIframeLoad:($,jr)=>{Re.attachIframe($,jr),lt.observeAttachShadow($)},onStylesheetLoad:($,jr)=>{Ie.attachLinkElement($,jr)},keepIframeSrcFn:le});if(!Ot)return console.warn("Failed to snapshot the document");W(z({type:M.FullSnapshot,data:{node:Ot,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((oe=(Q=document?.body)===null||Q===void 0?void 0:Q.parentElement)===null||oe===void 0?void 0:oe.scrollLeft)||((P=document?.body)===null||P===void 0?void 0:P.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((F=(de=document?.body)===null||de===void 0?void 0:de.parentElement)===null||F===void 0?void 0:F.scrollTop)||((ae=document?.body)===null||ae===void 0?void 0:ae.scrollTop)||0}}})),Pe.forEach($=>$.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ie.adoptStyleSheets(document.adoptedStyleSheets,ge.getId(document))};try{const T=[];T.push(Y("DOMContentLoaded",()=>{W(z({type:M.DomContentLoaded,data:{}}))}));const Q=P=>{var de;return vs({mutationCb:se,mousemoveCb:(F,ae)=>W(z({type:M.IncrementalSnapshot,data:{source:ae,positions:F}})),mouseInteractionCb:F=>W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.MouseInteraction},F)})),scrollCb:ue,viewportResizeCb:F=>W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.ViewportResize},F)})),inputCb:F=>W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.Input},F)})),mediaInteractionCb:F=>W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.MediaInteraction},F)})),styleSheetRuleCb:F=>W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.StyleSheetRule},F)})),styleDeclarationCb:F=>W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.StyleDeclaration},F)})),canvasMutationCb:Ue,fontCb:F=>W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.Font},F)})),selectionCb:F=>{W(z({type:M.IncrementalSnapshot,data:Object.assign({source:x.Selection},F)}))},blockClass:i,ignoreClass:s,maskTextClass:a,maskTextSelector:l,maskInputOptions:Z,inlineStylesheet:c,sampling:k,recordCanvas:O,inlineImages:N,userTriggeredOnInput:B,collectFonts:U,doc:P,maskInputFn:w,maskTextFn:f,keepIframeSrcFn:le,blockSelector:o,slimDOMOptions:ce,dataURLOptions:S,mirror:ge,iframeManager:Re,stylesheetManager:Ie,shadowDomManager:lt,canvasManager:pr,ignoreCSSAttributes:he,plugins:((de=J?.filter(F=>F.observer))===null||de===void 0?void 0:de.map(F=>({observer:F.observer,options:F.options,callback:ae=>W(z({type:M.Plugin,data:{plugin:F.name,payload:ae}}))})))||[]},v)};Re.addLoadListener(P=>{T.push(Q(P.contentDocument))});const oe=()=>{Bt(),T.push(Q(document)),Ut=!0};return document.readyState==="interactive"||document.readyState==="complete"?oe():T.push(Y("load",()=>{W(z({type:M.Load,data:{}})),oe()},window)),()=>{T.forEach(P=>P()),Ut=!1}}catch(T){console.warn(T)}}pt.addCustomEvent=(e,t)=>{if(!Ut)throw new Error("please add custom event after start recording");W(z({type:M.Custom,data:{tag:e,payload:t}}))},pt.freezePage=()=>{Pe.forEach(e=>e.freeze())},pt.takeFullSnapshot=e=>{if(!Ut)throw new Error("please take full snapshot after start recording");Bt(e)},pt.mirror=ge;function Ln(e,t){return function(){return e.apply(t,arguments)}}const{toString:Zs}=Object.prototype,{getPrototypeOf:mr}=Object,{iterator:Pt,toStringTag:Fn}=Symbol,Wt=(e=>t=>{const r=Zs.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),be=e=>(e=e.toLowerCase(),t=>Wt(t)===e),Ht=e=>t=>typeof t===e,{isArray:Qe}=Array,mt=Ht("undefined");function qs(e){return e!==null&&!mt(e)&&e.constructor!==null&&!mt(e.constructor)&&ee(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _n=be("ArrayBuffer");function js(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_n(e.buffer),t}const Ks=Ht("string"),ee=Ht("function"),Dn=Ht("number"),Vt=e=>e!==null&&typeof e=="object",Js=e=>e===!0||e===!1,Gt=e=>{if(Wt(e)!=="object")return!1;const t=mr(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Fn in e)&&!(Pt in e)},Ys=be("Date"),Xs=be("File"),Qs=be("Blob"),$s=be("FileList"),eo=e=>Vt(e)&&ee(e.pipe),to=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ee(e.append)&&((t=Wt(e))==="formdata"||t==="object"&&ee(e.toString)&&e.toString()==="[object FormData]"))},ro=be("URLSearchParams"),[no,io,so,oo]=["ReadableStream","Request","Response","Headers"].map(be),ao=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function gt(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Qe(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(n=0;n<s;n++)a=o[n],t.call(null,e[a],a,e)}}function Bn(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const We=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Un=e=>!mt(e)&&e!==We;function gr(){const{caseless:e}=Un(this)&&this||{},t={},r=(n,i)=>{const o=e&&Bn(t,i)||i;Gt(t[o])&&Gt(n)?t[o]=gr(t[o],n):Gt(n)?t[o]=gr({},n):Qe(n)?t[o]=n.slice():t[o]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&>(arguments[n],r);return t}const lo=(e,t,r,{allOwnKeys:n}={})=>(gt(t,(i,o)=>{r&&ee(i)?e[o]=Ln(i,r):e[o]=i},{allOwnKeys:n}),e),co=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),uo=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},fo=(e,t,r,n)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&mr(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},ho=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},po=e=>{if(!e)return null;if(Qe(e))return e;let t=e.length;if(!Dn(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},mo=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&mr(Uint8Array)),go=(e,t)=>{const n=(e&&e[Pt]).call(e);let i;for(;(i=n.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},bo=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},wo=be("HTMLFormElement"),yo=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),Pn=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Io=be("RegExp"),Wn=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};gt(r,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(n[o]=s||i)}),Object.defineProperties(e,n)},Co=e=>{Wn(e,(t,r)=>{if(ee(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ee(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},So=(e,t)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return Qe(e)?n(e):n(String(e).split(t)),r},vo=()=>{},Ao=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ko(e){return!!(e&&ee(e.append)&&e[Fn]==="FormData"&&e[Pt])}const Ro=e=>{const t=new Array(10),r=(n,i)=>{if(Vt(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const o=Qe(n)?[]:{};return gt(n,(s,a)=>{const l=r(s,i+1);!mt(l)&&(o[a]=l)}),t[i]=void 0,o}}return n};return r(e,0)},To=be("AsyncFunction"),Eo=e=>e&&(Vt(e)||ee(e))&&ee(e.then)&&ee(e.catch),Hn=((e,t)=>e?setImmediate:t?((r,n)=>(We.addEventListener("message",({source:i,data:o})=>{i===We&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),We.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",ee(We.postMessage)),Oo=typeof queueMicrotask<"u"?queueMicrotask.bind(We):typeof process<"u"&&process.nextTick||Hn,h={isArray:Qe,isArrayBuffer:_n,isBuffer:qs,isFormData:to,isArrayBufferView:js,isString:Ks,isNumber:Dn,isBoolean:Js,isObject:Vt,isPlainObject:Gt,isReadableStream:no,isRequest:io,isResponse:so,isHeaders:oo,isUndefined:mt,isDate:Ys,isFile:Xs,isBlob:Qs,isRegExp:Io,isFunction:ee,isStream:eo,isURLSearchParams:ro,isTypedArray:mo,isFileList:$s,forEach:gt,merge:gr,extend:lo,trim:ao,stripBOM:co,inherits:uo,toFlatObject:fo,kindOf:Wt,kindOfTest:be,endsWith:ho,toArray:po,forEachEntry:go,matchAll:bo,isHTMLForm:wo,hasOwnProperty:Pn,hasOwnProp:Pn,reduceDescriptors:Wn,freezeMethods:Co,toObjectSet:So,toCamelCase:yo,noop:vo,toFiniteNumber:Ao,findKey:Bn,global:We,isContextDefined:Un,isSpecCompliantForm:ko,toJSONObject:Ro,isAsyncFn:To,isThenable:Eo,setImmediate:Hn,asap:Oo,isIterable:e=>e!=null&&ee(e[Pt])};function E(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}h.inherits(E,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h.toJSONObject(this.config),code:this.code,status:this.status}}});const Vn=E.prototype,Gn={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Gn[e]={value:e}}),Object.defineProperties(E,Gn),Object.defineProperty(Vn,"isAxiosError",{value:!0}),E.from=(e,t,r,n,i,o)=>{const s=Object.create(Vn);return h.toFlatObject(e,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),E.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const xo=null;function br(e){return h.isPlainObject(e)||h.isArray(e)}function zn(e){return h.endsWith(e,"[]")?e.slice(0,-2):e}function Zn(e,t,r){return e?e.concat(t).map(function(i,o){return i=zn(i),!r&&o?"["+i+"]":i}).join(r?".":""):t}function Mo(e){return h.isArray(e)&&!e.some(br)}const No=h.toFlatObject(h,{},null,function(t){return/^is[A-Z]/.test(t)});function zt(e,t,r){if(!h.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=h.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,C){return!h.isUndefined(C[v])});const n=r.metaTokens,i=r.visitor||u,o=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(t);if(!h.isFunction(i))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(h.isDate(f))return f.toISOString();if(h.isBoolean(f))return f.toString();if(!l&&h.isBlob(f))throw new E("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(f)||h.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,v,C){let k=f;if(f&&!C&&typeof f=="object"){if(h.endsWith(v,"{}"))v=n?v:v.slice(0,-2),f=JSON.stringify(f);else if(h.isArray(f)&&Mo(f)||(h.isFileList(f)||h.endsWith(v,"[]"))&&(k=h.toArray(f)))return v=zn(v),k.forEach(function(A,O){!(h.isUndefined(A)||A===null)&&t.append(s===!0?Zn([v],O,o):s===null?v:v+"[]",c(A))}),!1}return br(f)?!0:(t.append(Zn(C,v,o),c(f)),!1)}const d=[],m=Object.assign(No,{defaultVisitor:u,convertValue:c,isVisitable:br});function w(f,v){if(!h.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(f),h.forEach(f,function(k,S){(!(h.isUndefined(k)||k===null)&&i.call(t,k,h.isString(S)?S.trim():S,v,m))===!0&&w(k,v?v.concat(S):[S])}),d.pop()}}if(!h.isObject(e))throw new TypeError("data must be an object");return w(e),t}function qn(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function wr(e,t){this._pairs=[],e&&zt(e,this,t)}const jn=wr.prototype;jn.append=function(t,r){this._pairs.push([t,r])},jn.toString=function(t){const r=t?function(n){return t.call(this,n,qn)}:qn;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function Lo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Kn(e,t,r){if(!t)return e;const n=r&&r.encode||Lo;h.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(i?o=i(t,r):o=h.isURLSearchParams(t)?t.toString():new wr(t,r).toString(n),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Jn{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){h.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Yn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fo={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:wr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},yr=typeof window<"u"&&typeof document<"u",Ir=typeof navigator=="object"&&navigator||void 0,_o=yr&&(!Ir||["ReactNative","NativeScript","NS"].indexOf(Ir.product)<0),Do=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Bo=yr&&window.location.href||"http://localhost",K={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:yr,hasStandardBrowserEnv:_o,hasStandardBrowserWebWorkerEnv:Do,navigator:Ir,origin:Bo},Symbol.toStringTag,{value:"Module"})),...Fo};function Uo(e,t){return zt(e,new K.classes.URLSearchParams,Object.assign({visitor:function(r,n,i,o){return K.isNode&&h.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Po(e){return h.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Wo(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}function Xn(e){function t(r,n,i,o){let s=r[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=o>=r.length;return s=!s&&h.isArray(i)?i.length:s,l?(h.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!a):((!i[s]||!h.isObject(i[s]))&&(i[s]=[]),t(r,n,i[s],o)&&h.isArray(i[s])&&(i[s]=Wo(i[s])),!a)}if(h.isFormData(e)&&h.isFunction(e.entries)){const r={};return h.forEachEntry(e,(n,i)=>{t(Po(n),i,r,0)}),r}return null}function Ho(e,t,r){if(h.isString(e))try{return(t||JSON.parse)(e),h.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const bt={transitional:Yn,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=h.isObject(t);if(o&&h.isHTMLForm(t)&&(t=new FormData(t)),h.isFormData(t))return i?JSON.stringify(Xn(t)):t;if(h.isArrayBuffer(t)||h.isBuffer(t)||h.isStream(t)||h.isFile(t)||h.isBlob(t)||h.isReadableStream(t))return t;if(h.isArrayBufferView(t))return t.buffer;if(h.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Uo(t,this.formSerializer).toString();if((a=h.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return zt(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),Ho(t)):t}],transformResponse:[function(t){const r=this.transitional||bt.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(h.isResponse(t)||h.isReadableStream(t))return t;if(t&&h.isString(t)&&(n&&!this.responseType||i)){const s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?E.from(a,E.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:K.classes.FormData,Blob:K.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],e=>{bt.headers[e]={}});const Vo=h.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Go=e=>{const t={};let r,n,i;return e&&e.split(`
|
|
19
|
+
`).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||t[r]&&Vo[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Qn=Symbol("internals");function wt(e){return e&&String(e).trim().toLowerCase()}function Zt(e){return e===!1||e==null?e:h.isArray(e)?e.map(Zt):String(e)}function zo(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const Zo=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Cr(e,t,r,n,i){if(h.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!h.isString(t)){if(h.isString(n))return t.indexOf(n)!==-1;if(h.isRegExp(n))return n.test(t)}}function qo(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function jo(e,t){const r=h.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,o,s){return this[n].call(this,t,i,o,s)},configurable:!0})})}let te=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function o(a,l,c){const u=wt(l);if(!u)throw new Error("header name must be a non-empty string");const d=h.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Zt(a))}const s=(a,l)=>h.forEach(a,(c,u)=>o(c,u,l));if(h.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(h.isString(t)&&(t=t.trim())&&!Zo(t))s(Go(t),r);else if(h.isObject(t)&&h.isIterable(t)){let a={},l,c;for(const u of t){if(!h.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?h.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}s(a,r)}else t!=null&&o(r,t,n);return this}get(t,r){if(t=wt(t),t){const n=h.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return zo(i);if(h.isFunction(r))return r.call(this,i,n);if(h.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=wt(t),t){const n=h.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Cr(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function o(s){if(s=wt(s),s){const a=h.findKey(n,s);a&&(!r||Cr(n,n[a],a,r))&&(delete n[a],i=!0)}}return h.isArray(t)?t.forEach(o):o(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!t||Cr(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const r=this,n={};return h.forEach(this,(i,o)=>{const s=h.findKey(n,o);if(s){r[s]=Zt(i),delete r[o];return}const a=t?qo(o):String(o).trim();a!==o&&delete r[o],r[a]=Zt(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return h.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&h.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
20
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[Qn]=this[Qn]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=wt(s);n[a]||(jo(i,s),n[a]=!0)}return h.isArray(t)?t.forEach(o):o(t),this}};te.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.reduceDescriptors(te.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),h.freezeMethods(te);function Sr(e,t){const r=this||bt,n=t||r,i=te.from(n.headers);let o=n.data;return h.forEach(e,function(a){o=a.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function $n(e){return!!(e&&e.__CANCEL__)}function $e(e,t,r){E.call(this,e??"canceled",E.ERR_CANCELED,t,r),this.name="CanceledError"}h.inherits($e,E,{__CANCEL__:!0});function ei(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new E("Request failed with status code "+r.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ko(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Jo(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[o];s||(s=c),r[i]=l,n[i]=c;let d=o,m=0;for(;d!==i;)m+=r[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-s<t)return;const w=u&&c-u;return w?Math.round(m*1e3/w):void 0}}function Yo(e,t){let r=0,n=1e3/t,i,o;const s=(c,u=Date.now())=>{r=u,i=null,o&&(clearTimeout(o),o=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?s(c,u):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},n-d)))},()=>i&&s(i)]}const qt=(e,t,r=3)=>{let n=0;const i=Jo(50,250);return Yo(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-n,c=i(l),u=s<=a;n=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},r)},ti=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},ri=e=>(...t)=>h.asap(()=>e(...t)),Xo=K.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,K.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(K.origin),K.navigator&&/(msie|trident)/i.test(K.navigator.userAgent)):()=>!0,Qo=K.hasStandardBrowserEnv?{write(e,t,r,n,i,o){const s=[e+"="+encodeURIComponent(t)];h.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),h.isString(n)&&s.push("path="+n),h.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $o(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ea(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ni(e,t,r){let n=!$o(t);return e&&(n||r==!1)?ea(e,t):t}const ii=e=>e instanceof te?{...e}:e;function He(e,t){t=t||{};const r={};function n(c,u,d,m){return h.isPlainObject(c)&&h.isPlainObject(u)?h.merge.call({caseless:m},c,u):h.isPlainObject(u)?h.merge({},u):h.isArray(u)?u.slice():u}function i(c,u,d,m){if(h.isUndefined(u)){if(!h.isUndefined(c))return n(void 0,c,d,m)}else return n(c,u,d,m)}function o(c,u){if(!h.isUndefined(u))return n(void 0,u)}function s(c,u){if(h.isUndefined(u)){if(!h.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function a(c,u,d){if(d in t)return n(c,u);if(d in e)return n(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u,d)=>i(ii(c),ii(u),d,!0)};return h.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||i,m=d(e[u],t[u],u);h.isUndefined(m)&&d!==a||(r[u]=m)}),r}const si=e=>{const t=He({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;t.headers=s=te.from(s),t.url=Kn(ni(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(h.isFormData(r)){if(K.hasStandardBrowserEnv||K.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((l=s.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([c||"multipart/form-data",...u].join("; "))}}if(K.hasStandardBrowserEnv&&(n&&h.isFunction(n)&&(n=n(t)),n||n!==!1&&Xo(t.url))){const c=i&&o&&Qo.read(o);c&&s.set(i,c)}return t},ta=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const i=si(e);let o=i.data;const s=te.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,d,m,w,f;function v(){w&&w(),f&&f(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let C=new XMLHttpRequest;C.open(i.method.toUpperCase(),i.url,!0),C.timeout=i.timeout;function k(){if(!C)return;const A=te.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),L={data:!a||a==="text"||a==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:A,config:e,request:C};ei(function(U){r(U),v()},function(U){n(U),v()},L),C=null}"onloadend"in C?C.onloadend=k:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(k)},C.onabort=function(){C&&(n(new E("Request aborted",E.ECONNABORTED,e,C)),C=null)},C.onerror=function(){n(new E("Network Error",E.ERR_NETWORK,e,C)),C=null},C.ontimeout=function(){let O=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const L=i.transitional||Yn;i.timeoutErrorMessage&&(O=i.timeoutErrorMessage),n(new E(O,L.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,e,C)),C=null},o===void 0&&s.setContentType(null),"setRequestHeader"in C&&h.forEach(s.toJSON(),function(O,L){C.setRequestHeader(L,O)}),h.isUndefined(i.withCredentials)||(C.withCredentials=!!i.withCredentials),a&&a!=="json"&&(C.responseType=i.responseType),c&&([m,f]=qt(c,!0),C.addEventListener("progress",m)),l&&C.upload&&([d,w]=qt(l),C.upload.addEventListener("progress",d),C.upload.addEventListener("loadend",w)),(i.cancelToken||i.signal)&&(u=A=>{C&&(n(!A||A.type?new $e(null,e,C):A),C.abort(),C=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const S=Ko(i.url);if(S&&K.protocols.indexOf(S)===-1){n(new E("Unsupported protocol "+S+":",E.ERR_BAD_REQUEST,e));return}C.send(o||null)})},ra=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const o=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;n.abort(u instanceof E?u:new $e(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,o(new E(`timeout ${t} of ms exceeded`,E.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:l}=n;return l.unsubscribe=()=>h.asap(a),l}},na=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},ia=async function*(e,t){for await(const r of sa(e))yield*na(r,t)},sa=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},oi=(e,t,r,n)=>{const i=ia(e,t);let o=0,s,a=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let d=u.byteLength;if(r){let m=o+=d;r(m)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},jt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ai=jt&&typeof ReadableStream=="function",oa=jt&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),li=(e,...t)=>{try{return!!e(...t)}catch{return!1}},aa=ai&&li(()=>{let e=!1;const t=new Request(K.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ci=64*1024,vr=ai&&li(()=>h.isReadableStream(new Response("").body)),Kt={stream:vr&&(e=>e.body)};jt&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Kt[t]&&(Kt[t]=h.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new E(`Response type '${t}' is not supported`,E.ERR_NOT_SUPPORT,n)})})})(new Response);const la=async e=>{if(e==null)return 0;if(h.isBlob(e))return e.size;if(h.isSpecCompliantForm(e))return(await new Request(K.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(h.isArrayBufferView(e)||h.isArrayBuffer(e))return e.byteLength;if(h.isURLSearchParams(e)&&(e=e+""),h.isString(e))return(await oa(e)).byteLength},ca=async(e,t)=>{const r=h.toFiniteNumber(e.getContentLength());return r??la(t)},Ar={http:xo,xhr:ta,fetch:jt&&(async e=>{let{url:t,method:r,data:n,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:m}=si(e);c=c?(c+"").toLowerCase():"text";let w=ra([i,o&&o.toAbortSignal()],s),f;const v=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let C;try{if(l&&aa&&r!=="get"&&r!=="head"&&(C=await ca(u,n))!==0){let L=new Request(t,{method:"POST",body:n,duplex:"half"}),B;if(h.isFormData(n)&&(B=L.headers.get("content-type"))&&u.setContentType(B),L.body){const[U,N]=ti(C,qt(ri(l)));n=oi(L.body,ci,U,N)}}h.isString(d)||(d=d?"include":"omit");const k="credentials"in Request.prototype;f=new Request(t,{...m,signal:w,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:k?d:void 0});let S=await fetch(f,m);const A=vr&&(c==="stream"||c==="response");if(vr&&(a||A&&v)){const L={};["status","statusText","headers"].forEach(J=>{L[J]=S[J]});const B=h.toFiniteNumber(S.headers.get("content-length")),[U,N]=a&&ti(B,qt(ri(a),!0))||[];S=new Response(oi(S.body,ci,U,()=>{N&&N(),v&&v()}),L)}c=c||"text";let O=await Kt[h.findKey(Kt,c)||"text"](S,e);return!A&&v&&v(),await new Promise((L,B)=>{ei(L,B,{data:O,headers:te.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:f})})}catch(k){throw v&&v(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,e,f),{cause:k.cause||k}):E.from(k,k&&k.code,e,f)}})};h.forEach(Ar,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ui=e=>`- ${e}`,ua=e=>h.isFunction(e)||e===null||e===!1,di={getAdapter:e=>{e=h.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){r=e[o];let s;if(n=r,!ua(r)&&(n=Ar[(s=String(r)).toLowerCase()],n===void 0))throw new E(`Unknown adapter '${s}'`);if(n)break;i[s||"#"+o]=n}if(!n){const o=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=t?o.length>1?`since :
|
|
21
|
+
`+o.map(ui).join(`
|
|
22
|
+
`):" "+ui(o[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return n},adapters:Ar};function kr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $e(null,e)}function fi(e){return kr(e),e.headers=te.from(e.headers),e.data=Sr.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),di.getAdapter(e.adapter||bt.adapter)(e).then(function(n){return kr(e),n.data=Sr.call(e,e.transformResponse,n),n.headers=te.from(n.headers),n},function(n){return $n(n)||(kr(e),n&&n.response&&(n.response.data=Sr.call(e,e.transformResponse,n.response),n.response.headers=te.from(n.response.headers))),Promise.reject(n)})}const hi="1.10.0",Jt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Jt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const pi={};Jt.transitional=function(t,r,n){function i(o,s){return"[Axios v"+hi+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,a)=>{if(t===!1)throw new E(i(s," has been removed"+(r?" in "+r:"")),E.ERR_DEPRECATED);return r&&!pi[s]&&(pi[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,s,a):!0}},Jt.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function da(e,t,r){if(typeof e!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const a=e[o],l=a===void 0||s(a,o,e);if(l!==!0)throw new E("option "+o+" must be "+l,E.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new E("Unknown option "+o,E.ERR_BAD_OPTION)}}const Yt={assertOptions:da,validators:Jt},Ce=Yt.validators;let Ve=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Jn,response:new Jn}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
23
|
+
`+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=He(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&Yt.assertOptions(n,{silentJSONParsing:Ce.transitional(Ce.boolean),forcedJSONParsing:Ce.transitional(Ce.boolean),clarifyTimeoutError:Ce.transitional(Ce.boolean)},!1),i!=null&&(h.isFunction(i)?r.paramsSerializer={serialize:i}:Yt.assertOptions(i,{encode:Ce.function,serialize:Ce.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Yt.assertOptions(r,{baseUrl:Ce.spelling("baseURL"),withXsrfToken:Ce.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&h.merge(o.common,o[r.method]);o&&h.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),r.headers=te.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(l=l&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,d=0,m;if(!l){const f=[fi.bind(this),void 0];for(f.unshift.apply(f,a),f.push.apply(f,c),m=f.length,u=Promise.resolve(r);d<m;)u=u.then(f[d++],f[d++]);return u}m=a.length;let w=r;for(d=0;d<m;){const f=a[d++],v=a[d++];try{w=f(w)}catch(C){v.call(this,C);break}}try{u=fi.call(this,w)}catch(f){return Promise.reject(f)}for(d=0,m=c.length;d<m;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=He(this.defaults,t);const r=ni(t.baseURL,t.url,t.allowAbsoluteUrls);return Kn(r,t.params,t.paramsSerializer)}};h.forEach(["delete","get","head","options"],function(t){Ve.prototype[t]=function(r,n){return this.request(He(n||{},{method:t,url:r,data:(n||{}).data}))}}),h.forEach(["post","put","patch"],function(t){function r(n){return function(o,s,a){return this.request(He(a||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Ve.prototype[t]=r(),Ve.prototype[t+"Form"]=r(!0)});let fa=class Fi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(i=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{n.subscribe(a),o=a}).then(i);return s.cancel=function(){n.unsubscribe(o)},s},t(function(o,s,a){n.reason||(n.reason=new $e(o,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Fi(function(i){t=i}),cancel:t}}};function ha(e){return function(r){return e.apply(null,r)}}function pa(e){return h.isObject(e)&&e.isAxiosError===!0}const Rr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Rr).forEach(([e,t])=>{Rr[t]=e});function mi(e){const t=new Ve(e),r=Ln(Ve.prototype.request,t);return h.extend(r,Ve.prototype,t,{allOwnKeys:!0}),h.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return mi(He(e,i))},r}const H=mi(bt);H.Axios=Ve,H.CanceledError=$e,H.CancelToken=fa,H.isCancel=$n,H.VERSION=hi,H.toFormData=zt,H.AxiosError=E,H.Cancel=H.CanceledError,H.all=function(t){return Promise.all(t)},H.spread=ha,H.isAxiosError=pa,H.mergeConfig=He,H.AxiosHeaders=te,H.formToJSON=e=>Xn(h.isHTMLForm(e)?new FormData(e):e),H.getAdapter=di.getAdapter,H.HttpStatusCode=Rr,H.default=H;const{Axios:Pa,AxiosError:Wa,CanceledError:Ha,isCancel:Va,CancelToken:Ga,VERSION:za,all:Za,Cancel:qa,isAxiosError:ja,spread:Ka,toFormData:Ja,AxiosHeaders:Ya,HttpStatusCode:Xa,formToJSON:Qa,getAdapter:$a,mergeConfig:el}=H,Tr=H.create({baseURL:window.location.hostname.includes("localhost")?"http://localhost:8080":"",withCredentials:!0}),Er=(e,t,r)=>Tr.post(e,t,r),ma=(e,t,r)=>Tr.put(e,t,r),ga=(e,t,r)=>Tr.patch(e,t,r),Te={info:(...e)=>{console.log("info",...e)},warn:(...e)=>{console.log("warn",...e)},error:(...e)=>{console.log("error",...e)}};function Xt(e){throw new Error("Unexpected object: "+e)}class ba{constructor(t){this.recorderSettings=t,this.buffer={data:[]},this.flushIntervalMs=2e3}capturedSessionId=null;buffer;stopFn;flushIntervalMs;flushTimer;setCapturedSessionId(t){this.capturedSessionId=t}start=()=>{if(Object.assign===void 0)return;this.buffer={data:[]};const t={emit:r=>{this.buffer.data.push(r)},blockClass:"scry-block"};switch(this.recorderSettings.maskingLevel){case j.None:break;case j.All:t.maskTextFn=r=>r.replaceAll(/./g,"*");break;case null:case j.InputAndTextArea:t.maskAllInputs=!0;break;case j.InputPasswordOrEmailAndTextArea:t.maskInputOptions={password:!0,email:!0,textarea:!0};break;default:Xt(this.recorderSettings.maskingLevel)}this.stopFn=pt(t),this.scheduleFlush()};scheduleFlush=()=>{this.flushTimer&&clearTimeout(this.flushTimer),this.flushTimer=setTimeout(this.flush,this.flushIntervalMs)};flush=async()=>{if(this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=void 0),this.capturedSessionId&&this.buffer.data.length>0)try{let t=await ga(`public/captured-sessions/${this.capturedSessionId}/recording`,this.buffer,{withCredentials:!1});t.status>=400?(Te.error(`status ${t.status} when trying to save session recording data.`),Te.error(t.data)):this.clearAllBufferData()}catch(t){Te.error("Error flushing session data:",t)}this.scheduleFlush()};stop=()=>{this.stopFn&&this.stopFn(),this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=void 0)};clearAllBufferData=()=>{this.buffer.data=[]}}class wa{constructor(t,r){this.window=t,this.recorderSettings=r}eventsBuffer=[];isRunning=!1;tagsToCapture=new Set(["button","a","select","textarea","input"]);queryParamsAllowed=new Set(["utm_source","source","ref","utm_medium","medium","utm_campaign","campaign","utm_content","content","utm_term","term"]);flushIntervalMs=2e3;capturedSessionId;flushTimerId=null;start=()=>{if(this.isRunning)return;this.isRunning=!0,this.eventsBuffer=[];const t=this.window.history.pushState.bind(this.window.history);this.window.history.pushState=(r,n,i)=>{let o="";return i instanceof URL?o=i.toString():i?o=i:o="",this.handlePageView(o),t(r,n,i)},this.window.addEventListener("pageshow",r=>{try{this.handlePageView(this.window.location.pathname)}catch(n){Te.error("Failed to capture URL change event",n)}}),this.window.addEventListener("change",this.handler),this.window.addEventListener("click",this.handler),this.window.addEventListener("keydown",this.handler),this.scheduleFlush()};scheduleFlush=()=>{this.flushTimerId&&clearTimeout(this.flushTimerId),this.flushTimerId=setTimeout(this.flush,this.flushIntervalMs)};flush=async()=>{if(this.eventsBuffer.length>0&&this.capturedSessionId)try{const t=await Er(`/public/captured-sessions/${this.capturedSessionId}/ui-events`,this.eventsBuffer,{withCredentials:!1});t.status!==201&&Te.error("Failed to save ui events",t.data),this.eventsBuffer=[]}catch(t){Te.error("Failed to save ui events",t),this.eventsBuffer=[]}this.scheduleFlush()};handlePageView=t=>{if(this.isRunning)try{const r=Date.now();t.charAt(0)==="/"||(t=this.window.location.pathname+"/"+t);const i=new URL(this.window.location.protocol+"//"+this.window.location.host+t+this.window.location.search),o=this.sanitizeUrlParams(i.toString(),this.queryParamsAllowed),s=new URL(o),a=Array.from(s.searchParams),l={eventType:"page_view",timestamp:r,text:t,host:s.hostname,path:t};a.length>0&&(l.queryParams=a),this.eventsBuffer.push(l)}catch(r){Te.error("Failed to capture URL change event",r)}};sanitizeUrlParams=(t,r)=>{try{const n=new URL(t);for(const i of n.searchParams.keys())r.has(i.toLowerCase())||n.searchParams.set(i,"$redacted");return n.toString()}catch(n){return Te.error("Failed to sanitize URL params",n),t}};handler=t=>{if(this.isRunning)try{const r=t.type,n=t.target,i=n?.tagName.toLowerCase();if(!(i&&this.tagsToCapture.has(i)))return;const o=new URL(this.window.location.href),s=o.hostname,a=o.pathname,l=Date.now(),c=this.captureDomContext(n);switch(t.type){case"click":const u=this.handleClick(n,i,l,s,a);this.eventsBuffer.push(u);break;case"keydown":const d=this.handleKeyDown(t,i,n,l,s,a);this.eventsBuffer.push(d);break;case"change":const m=this.handleChange(n,i,l,s,a);this.eventsBuffer.push(m);break;default:this.eventsBuffer.push({eventType:r,tagName:i,timestamp:l,host:s,path:a,text:null,domContext:c})}}catch(r){Te.error("Failed to capture event",r)}};handleChange(t,r,n,i,o){let s=null;switch(t instanceof HTMLSelectElement&&(s=t.options[t.selectedIndex].text),this.recorderSettings.maskingLevel){case j.None:break;case j.All:s=null;break;case null:case j.InputAndTextArea:break;case j.InputPasswordOrEmailAndTextArea:break;default:Xt(this.recorderSettings.maskingLevel)}return{eventType:"change",tagName:r,timestamp:n,text:s===""?null:s,host:i,path:o,domContext:this.captureDomContext(t)}}handleClick(t,r,n,i,o){let s="";if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){const a=this.findInputOrSelectOrTextAreaLabel(t);a?s=a:t.placeholder&&(s=t.placeholder)}else if(t instanceof HTMLSelectElement){const a=this.findInputOrSelectOrTextAreaLabel(t);a?s=a:s=t.value+" ("+t.options[t.selectedIndex].text+")"}else t instanceof HTMLButtonElement?s=t.innerText:t instanceof HTMLAnchorElement?s=t.href:t instanceof HTMLImageElement&&(s=t.src);switch(this.recorderSettings.maskingLevel){case j.None:break;case j.All:s=null;break;case null:case j.InputAndTextArea:(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(s=null);break;case j.InputPasswordOrEmailAndTextArea:(t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement&&(t.type==="password"||t.type==="email"||t.type==="e-mail"))&&(s=null);break;default:Xt(this.recorderSettings.maskingLevel)}return{eventType:"click",tagName:r,timestamp:n,text:s===""?null:s,host:i,path:o,domContext:this.captureDomContext(t)}}handleKeyDown(t,r,n,i,o,s){const l=t.key;let c=null;if(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement){const u=this.findInputOrSelectOrTextAreaLabel(n);u?c=u:n.placeholder&&(c=n.placeholder)}switch(this.recorderSettings.maskingLevel){case j.None:break;case j.All:c=null;break;case null:case j.InputAndTextArea:(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&(c=null);break;case j.InputPasswordOrEmailAndTextArea:(n instanceof HTMLTextAreaElement||n instanceof HTMLInputElement&&(n.type==="password"||n.type==="email"||n.type==="e-mail"))&&(c=null);break;default:Xt(this.recorderSettings.maskingLevel)}return{eventType:"keydown",tagName:r,timestamp:i,text:c,key:l,host:o,path:s,domContext:this.captureDomContext(n)}}findInputOrSelectOrTextAreaLabel=t=>{if(!t||!new Set(["input","select","textarea"]).has(t.tagName.toLowerCase()))return null;const n=t.closest("label");if(n){const a=Array.from(n.childNodes).filter(l=>l.nodeName.toLowerCase()!=="select").map(l=>(l.textContent??"").trim()).filter(Boolean).join(" ").trim();if(a)return a}const i=t.id;if(i){const a=t.ownerDocument.querySelector(`label[for="${CSS.escape(i)}"]`);if(a){const l=Array.from(a.childNodes).filter(c=>c.nodeName.toLowerCase()!=="select").map(c=>(c.textContent??"").trim()).filter(Boolean).join(" ").trim();if(l)return l}}const o=t.getAttribute("aria-label");if(o)return o.trim();const s=t.getAttribute("aria-labelledby");return s&&t.ownerDocument.getElementById(s)?.textContent?.trim()||null};stop=()=>{this.isRunning=!1,this.window.removeEventListener("change",this.handler),this.window.removeEventListener("click",this.handler),this.window.removeEventListener("keydown",this.handler),this.flushTimerId&&(clearTimeout(this.flushTimerId),this.flushTimerId=null)};captureDomContext=t=>{const r=[];r.push(this.toJsonNode(t));let n=t.parentElement;for(;n!=null&&r.length<6;)r.push(this.toJsonNode(n)),n=n.parentElement;return r};toJsonNode=t=>{const r={};return["id","class","name","type","role","aria-label"].forEach(n=>{const i=t.getAttribute(n);i&&(r[n]=i)}),{tag:t.tagName.toLowerCase(),attrs:r}};setCapturedSessionId(t){this.capturedSessionId=t}}var ya="2.0.4",Or=500,gi="user-agent",et="",bi="?",Qt="function",Fe="undefined",tt="object",xr="string",re="browser",Ee="cpu",Se="device",we="engine",fe="os",rt="result",y="name",p="type",b="vendor",I="version",ne="architecture",yt="major",g="model",It="console",R="mobile",_="tablet",V="smarttv",ve="wearable",$t="xr",Ct="embedded",St="inapp",Mr="brands",Ge="formFactors",Nr="fullVersionList",nt="platform",Lr="platformVersion",er="bitness",_e="sec-ch-ua",Ia=_e+"-full-version-list",Ca=_e+"-arch",Sa=_e+"-"+er,va=_e+"-form-factors",Aa=_e+"-"+R,ka=_e+"-"+g,wi=_e+"-"+nt,Ra=wi+"-version",yi=[Mr,Nr,R,g,nt,Lr,ne,Ge,er],tr="Amazon",it="Apple",Ii="ASUS",Ci="BlackBerry",ze="Google",Si="Huawei",Fr="Lenovo",vi="Honor",rr="LG",_r="Microsoft",Dr="Motorola",Br="Nvidia",Ai="OnePlus",Ur="OPPO",vt="Samsung",ki="Sharp",At="Sony",Pr="Xiaomi",Wr="Zebra",Ri="Chrome",Ti="Chromium",De="Chromecast",nr="Edge",kt="Firefox",Rt="Opera",Hr="Facebook",Ei="Sogou",st="Mobile ",Tt=" Browser",Vr="Windows",Ta=typeof window!==Fe,ie=Ta&&window.navigator?window.navigator:void 0,Be=ie&&ie.userAgentData?ie.userAgentData:void 0,Ea=function(e,t){var r={},n=t;if(!sr(t)){n={};for(var i in t)for(var o in t[i])n[o]=t[i][o].concat(n[o]?n[o]:[])}for(var s in e)r[s]=n[s]&&n[s].length%2===0?n[s].concat(e[s]):e[s];return r},ir=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},Gr=function(e,t){if(typeof e===tt&&e.length>0){for(var r in e)if(Oe(t)==Oe(e[r]))return!0;return!1}return ot(e)?Oe(t)==Oe(e):!1},sr=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||(t?sr(e[r]):!1)},ot=function(e){return typeof e===xr},zr=function(e){if(e){for(var t=[],r=at(/\\?\"/g,e).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=or(r[n]).split(";v=");t[n]={brand:i[0],version:i[1]}}else t[n]=or(r[n]);return t}},Oe=function(e){return ot(e)?e.toLowerCase():e},Zr=function(e){return ot(e)?at(/[^\d\.]/g,e).split(".")[0]:void 0},xe=function(e){for(var t in e){var r=e[t];typeof r==tt&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},at=function(e,t){return ot(t)?t.replace(e,et):t},Et=function(e){return at(/\\?\"/g,e)},or=function(e,t){if(ot(e))return e=at(/^\s\s*/,e),typeof t===Fe?e:e.substring(0,Or)},qr=function(e,t){if(!(!e||!t))for(var r=0,n,i,o,s,a,l;r<t.length&&!a;){var c=t[r],u=t[r+1];for(n=i=0;n<c.length&&!a&&c[n];)if(a=c[n++].exec(e),a)for(o=0;o<u.length;o++)l=a[++i],s=u[o],typeof s===tt&&s.length>0?s.length===2?typeof s[1]==Qt?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:s.length>=3&&(typeof s[1]===Qt&&!(s[1].exec&&s[1].test)?s.length>3?this[s[0]]=l?s[1].apply(this,s.slice(2)):void 0:this[s[0]]=l?s[1].call(this,l,s[2]):void 0:s.length==3?this[s[0]]=l?l.replace(s[1],s[2]):void 0:s.length==4?this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):void 0:s.length>4&&(this[s[0]]=l?s[3].apply(this,[l.replace(s[1],s[2])].concat(s.slice(4))):void 0)):this[s]=l||void 0;r+=2}},Ae=function(e,t){for(var r in t)if(typeof t[r]===tt&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(Gr(t[r][n],e))return r===bi?void 0:r}else if(Gr(t[r],e))return r===bi?void 0:r;return t.hasOwnProperty("*")?t["*"]:e},Oi={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},xi={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Oa={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},Mi={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[I,[y,st+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[I,[y,nr+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[I,[y,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[y,I],[/opios[\/ ]+([\w\.]+)/i],[I,[y,Rt+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[I,[y,Rt+" GX"]],[/\bopr\/([\w\.]+)/i],[I,[y,Rt]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[I,[y,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[I,[y,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[y,I],[/quark(?:pc)?\/([-\w\.]+)/i],[I,[y,"Quark"]],[/\bddg\/([\w\.]+)/i],[I,[y,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[I,[y,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[I,[y,"WeChat"]],[/konqueror\/([\w\.]+)/i],[I,[y,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[I,[y,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[I,[y,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[I,[y,"Smart "+Fr+Tt]],[/(avast|avg)\/([\w\.]+)/i],[[y,/(.+)/,"$1 Secure"+Tt],I],[/\bfocus\/([\w\.]+)/i],[I,[y,kt+" Focus"]],[/\bopt\/([\w\.]+)/i],[I,[y,Rt+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[I,[y,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[I,[y,"Dolphin"]],[/coast\/([\w\.]+)/i],[I,[y,Rt+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[I,[y,"MIUI"+Tt]],[/fxios\/([\w\.-]+)/i],[I,[y,st+kt]],[/\bqihoobrowser\/?([\w\.]*)/i],[I,[y,"360"]],[/\b(qq)\/([\w\.]+)/i],[[y,/(.+)/,"$1Browser"],I],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[y,/(.+)/,"$1"+Tt],I],[/samsungbrowser\/([\w\.]+)/i],[I,[y,vt+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[I,[y,Ei+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[y,Ei+" Mobile"],I],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[y,I],[/(lbbrowser|rekonq)/i],[y],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[I,y],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[y,Hr],I,[p,St]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[y,I,[p,St]],[/\bgsa\/([\w\.]+) .*safari\//i],[I,[y,"GSA"],[p,St]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[I,[y,"TikTok"],[p,St]],[/\[(linkedin)app\]/i],[y,[p,St]],[/(chromium)[\/ ]([-\w\.]+)/i],[y,I],[/headlesschrome(?:\/([\w\.]+)| )/i],[I,[y,Ri+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[I,[y,nr+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[y,Ri+" WebView"],I],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[I,[y,"Android"+Tt]],[/chrome\/([\w\.]+) mobile/i],[I,[y,st+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[y,I],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[I,[y,st+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[y,st+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[I,y],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[y,[I,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[y,I],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[y,st+kt],I],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[y,"Netscape"],I],[/(wolvic|librewolf)\/([\w\.]+)/i],[y,I],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[I,[y,kt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[y,[I,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[y,[I,/[^\d\.]+./,et]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[ne,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[ne,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[ne,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[ne,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[ne,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[ne,/ower/,et,Oe]],[/ sun4\w[;\)]/i],[[ne,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[ne,Oe]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[b,vt],[p,_]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[g,[b,vt],[p,R]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[b,it],[p,R]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[b,it],[p,_]],[/(macintosh);/i],[g,[b,it]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[b,ki],[p,R]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[g,[b,vi],[p,_]],[/honor([-\w ]+)[;\)]/i],[g,[b,vi],[p,R]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[g,[b,Si],[p,_]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[b,Si],[p,R]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[g,/_/g," "],[b,Pr],[p,_]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[g,/_/g," "],[b,Pr],[p,R]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[b,Ai],[p,R]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[b,Ur],[p,R]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[g,[b,Ae,{OnePlus:["203","304","403","404","413","415"],"*":Ur}],[p,_]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[g,[b,"BLU"],[p,R]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[b,"Vivo"],[p,R]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[g,[b,"Realme"],[p,R]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[g,[b,Fr],[p,_]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[g,[b,Fr],[p,R]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[g,[b,Dr],[p,R]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[b,Dr],[p,_]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[b,rr],[p,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[b,rr],[p,R]],[/(nokia) (t[12][01])/i],[b,g,[p,_]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[g,/_/g," "],[p,R],[b,"Nokia"]],[/(pixel (c|tablet))\b/i],[g,[b,ze],[p,_]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[g,[b,ze],[p,R]],[/(google) (pixelbook( go)?)/i],[b,g],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[b,At],[p,R]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[b,At],[p,_]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[b,tr],[p,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[b,tr],[p,R]],[/(playbook);[-\w\),; ]+(rim)/i],[g,b,[p,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[b,Ci],[p,R]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[b,Ii],[p,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[b,Ii],[p,R]],[/(nexus 9)/i],[g,[b,"HTC"],[p,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[g,/_/g," "],[p,R]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[p,_]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[p,R]],[/(itel) ((\w+))/i],[[b,Oe],g,[p,Ae,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[b,"Acer"],[p,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[b,"Meizu"],[p,R]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[b,"Ulefone"],[p,R]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[g,[b,"Energizer"],[p,R]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[g,[b,"Cat"],[p,R]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[g,[b,"Smartfren"],[p,R]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[g,[b,"Nothing"],[p,R]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[g,[b,"Archos"],[p,_]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[g,[b,"Archos"],[p,R]],[/; (n159v)/i],[g,[b,"HMD"],[p,R]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[b,g,[p,_]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i],[b,g,[p,R]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[b,g,[p,_]],[/(surface duo)/i],[g,[b,_r],[p,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[b,"Fairphone"],[p,R]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[g,[b,Br],[p,_]],[/(sprint) (\w+)/i],[b,g,[p,R]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[b,_r],[p,R]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[b,Wr],[p,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[b,Wr],[p,R]],[/smart-tv.+(samsung)/i],[b,[p,V]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[b,vt],[p,V]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[b,g,[p,V]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,rr],[p,V]],[/(apple) ?tv/i],[b,[g,it+" TV"],[p,V]],[/crkey.*devicetype\/chromecast/i],[[g,De+" Third Generation"],[b,ze],[p,V]],[/crkey.*devicetype\/([^/]*)/i],[[g,/^/,"Chromecast "],[b,ze],[p,V]],[/fuchsia.*crkey/i],[[g,De+" Nest Hub"],[b,ze],[p,V]],[/crkey/i],[[g,De],[b,ze],[p,V]],[/(portaltv)/i],[g,[b,Hr],[p,V]],[/droid.+aft(\w+)( bui|\))/i],[g,[b,tr],[p,V]],[/(shield \w+ tv)/i],[g,[b,Br],[p,V]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[b,ki],[p,V]],[/(bravia[\w ]+)( bui|\))/i],[g,[b,At],[p,V]],[/(mi(tv|box)-?\w+) bui/i],[g,[b,Pr],[p,V]],[/Hbbtv.*(technisat) (.*);/i],[b,g,[p,V]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,/.+\/(\w+)/,"$1",Ae,{LG:"lge"}],[g,or],[p,V]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[g,[p,V]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:|large screen[\w ]+safari)\b/i],[[p,V]],[/(playstation \w+)/i],[g,[b,At],[p,It]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[b,_r],[p,It]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[b,g,[p,It]],[/droid.+; (shield)( bui|\))/i],[g,[b,Br],[p,It]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[g,[b,vt],[p,ve]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[b,g,[p,ve]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[g,[b,Ur],[p,ve]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[b,it],[p,ve]],[/(opwwe\d{3})/i],[g,[b,Ai],[p,ve]],[/(moto 360)/i],[g,[b,Dr],[p,ve]],[/(smartwatch 3)/i],[g,[b,At],[p,ve]],[/(g watch r)/i],[g,[b,rr],[p,ve]],[/droid.+; (wt63?0{2,3})\)/i],[g,[b,Wr],[p,ve]],[/droid.+; (glass) \d/i],[g,[b,ze],[p,$t]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,g,[p,$t]],[/(quest( \d| pro)?s?).+vr/i],[g,[b,Hr],[p,$t]],[/mobile vr; rv.+firefox/i],[[p,$t]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[p,Ct]],[/(aeobc)\b/i],[g,[b,tr],[p,Ct]],[/(homepod).+mac os/i],[g,[b,it],[p,Ct]],[/windows iot/i],[[p,Ct]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[g,[p,Ae,{mobile:"Mobile",xr:"VR","*":_}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,_]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,R]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[g,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[I,[y,nr+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[y,I],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[I,[y,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[y,I],[/ladybird\//i],[[y,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[I,y]],os:[[/(windows nt) (6\.[23]); arm/i],[[y,/N/,"R"],[I,Ae,Oi]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[y,I],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[I,/(;|\))/g,"",Ae,Oi],[y,Vr]],[/(windows ce)\/?([\d\.]*)/i],[y,I],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[I,/_/g,"."],[y,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[y,"macOS"],[I,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[I,[y,De+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[I,[y,De+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[I,[y,De+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[I,[y,De+" Linux"]],[/crkey\/([\d\.]+)/i],[I,[y,De]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[I,y],[/(ubuntu) ([\w\.]+) like android/i],[[y,/(.+)/,"$1 Touch"],I],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[y,I],[/\(bb(10);/i],[I,[y,Ci]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[I,[y,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[I,[y,kt+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[I,[y,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[I,Ae,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[y,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[I,[y,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[y,"Chrome OS"],I],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[y,I],[/(sunos) ?([\d\.]*)/i],[[y,"Solaris"],I],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[y,I]]},ar=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return xe.call(e.init,[[re,[y,I,yt,p]],[Ee,[ne]],[Se,[p,g,b]],[we,[y,I]],[fe,[y,I]]]),xe.call(e.isIgnore,[[re,[I,yt]],[we,[I]],[fe,[I]]]),xe.call(e.isIgnoreRgx,[[re,/ ?browser$/i],[fe,/ ?os$/i]]),xe.call(e.toString,[[re,[y,I]],[Ee,[ne]],[Se,[b,g]],[we,[y,I]],[fe,[y,I]]]),e}(),xa=function(e,t){var r=ar.init[t],n=ar.isIgnore[t]||0,i=ar.isIgnoreRgx[t]||0,o=ar.toString[t]||0;function s(){xe.call(this,r)}return s.prototype.getItem=function(){return e},s.prototype.withClientHints=function(){return Be?Be.getHighEntropyValues(yi).then(function(a){return e.setCH(new Ni(a,!1)).parseCH().get()}):e.parseCH().get()},s.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=rt&&(s.prototype.is=function(a){var l=!1;for(var c in this)if(this.hasOwnProperty(c)&&!Gr(n,c)&&Oe(i?at(i,this[c]):this[c])==Oe(i?at(i,a):a)){if(l=!0,a!=Fe)break}else if(a==Fe&&l){l=!l;break}return l},s.prototype.toString=function(){var a=et;for(var l in o)typeof this[o[l]]!==Fe&&(a+=(a?" ":et)+this[o[l]]);return a||Fe}),Be||(s.prototype.then=function(a){var l=this,c=function(){for(var d in l)l.hasOwnProperty(d)&&(this[d]=l[d])};c.prototype={is:s.prototype.is,toString:s.prototype.toString};var u=new c;return a(u),u}),new s};function Ni(e,t){if(e=e||{},xe.call(this,yi),t)xe.call(this,[[Mr,zr(e[_e])],[Nr,zr(e[Ia])],[R,/\?1/.test(e[Aa])],[g,Et(e[ka])],[nt,Et(e[wi])],[Lr,Et(e[Ra])],[ne,Et(e[Ca])],[Ge,zr(e[va])],[er,Et(e[Sa])]]);else for(var r in e)this.hasOwnProperty(r)&&typeof e[r]!==Fe&&(this[r]=e[r])}function Li(e,t,r,n){return this.get=function(i){return i?this.data.hasOwnProperty(i)?this.data[i]:void 0:this.data},this.set=function(i,o){return this.data[i]=o,this},this.setCH=function(i){return this.uaCH=i,this},this.detectFeature=function(){if(ie&&ie.userAgent==this.ua)switch(this.itemType){case re:ie.brave&&typeof ie.brave.isBrave==Qt&&this.set(y,"Brave");break;case Se:!this.get(p)&&Be&&Be[R]&&this.set(p,R),this.get(g)=="Macintosh"&&ie&&typeof ie.standalone!==Fe&&ie.maxTouchPoints&&ie.maxTouchPoints>2&&this.set(g,"iPad").set(p,_);break;case fe:!this.get(y)&&Be&&Be[nt]&&this.set(y,Be[nt]);break;case rt:var i=this.data,o=function(s){return i[s].getItem().detectFeature().get()};this.set(re,o(re)).set(Ee,o(Ee)).set(Se,o(Se)).set(we,o(we)).set(fe,o(fe))}return this},this.parseUA=function(){return this.itemType!=rt&&qr.call(this.data,this.ua,this.rgxMap),this.itemType==re&&this.set(yt,Zr(this.get(I))),this},this.parseCH=function(){var i=this.uaCH,o=this.rgxMap;switch(this.itemType){case re:case we:var s=i[Nr]||i[Mr],a;if(s)for(var l in s){var c=s[l].brand||s[l],u=s[l].version;this.itemType==re&&!/not.a.brand/i.test(c)&&(!a||/Chrom/.test(a)&&c!=Ti||a==nr&&/WebView2/.test(c))&&(c=Ae(c,Oa),a=this.get(y),a&&!/Chrom/.test(a)&&/Chrom/.test(c)||this.set(y,c).set(I,u).set(yt,Zr(u)),a=c),this.itemType==we&&c==Ti&&this.set(I,u)}break;case Ee:var d=i[ne];d&&(d&&i[er]=="64"&&(d+="64"),qr.call(this.data,d+";",o));break;case Se:if(i[R]&&this.set(p,R),i[g]&&(this.set(g,i[g]),!this.get(p)||!this.get(b))){var m={};qr.call(m,"droid 9; "+i[g]+")",o),!this.get(p)&&m.type&&this.set(p,m.type),!this.get(b)&&m.vendor&&this.set(b,m.vendor)}if(i[Ge]){var w;if(typeof i[Ge]!="string")for(var f=0;!w&&f<i[Ge].length;)w=Ae(i[Ge][f++],xi);else w=Ae(i[Ge],xi);this.set(p,w)}break;case fe:var v=i[nt];if(v){var C=i[Lr];v==Vr&&(C=parseInt(Zr(C),10)>=13?"11":"10"),this.set(y,v).set(I,C)}this.get(y)==Vr&&i[g]=="Xbox"&&this.set(y,"Xbox").set(I,void 0);break;case rt:var k=this.data,S=function(A){return k[A].getItem().setCH(i).parseCH().get()};this.set(re,S(re)).set(Ee,S(Ee)).set(Se,S(Se)).set(we,S(we)).set(fe,S(fe))}return this},xe.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",xa(this,e)]]),this}function Me(e,t,r){if(typeof e===tt?(sr(e,!0)?(typeof t===tt&&(r=t),t=e):(r=e,t=void 0),e=void 0):typeof e===xr&&!sr(t,!0)&&(r=t,t=void 0),r&&typeof r.append===Qt){var n={};r.forEach(function(l,c){n[c]=l}),r=n}if(!(this instanceof Me))return new Me(e,t,r).getResult();var i=typeof e===xr?e:r&&r[gi]?r[gi]:ie&&ie.userAgent?ie.userAgent:et,o=new Ni(r,!0),s=t?Ea(Mi,t):Mi,a=function(l){return l==rt?function(){return new Li(l,i,s,o).set("ua",i).set(re,this.getBrowser()).set(Ee,this.getCPU()).set(Se,this.getDevice()).set(we,this.getEngine()).set(fe,this.getOS()).get()}:function(){return new Li(l,i,s[l],o).parseUA().get()}};return xe.call(this,[["getBrowser",a(re)],["getCPU",a(Ee)],["getDevice",a(Se)],["getEngine",a(we)],["getOS",a(fe)],["getResult",a(rt)],["getUA",function(){return i}],["setUA",function(l){return ot(l)&&(i=l.length>Or?or(l,Or):l),this}]]).setUA(i),this}Me.VERSION=ya,Me.BROWSER=ir([y,I,yt,p]),Me.CPU=ir([ne]),Me.DEVICE=ir([g,b,p,It,R,V,_,ve,Ct]),Me.ENGINE=Me.OS=ir([y,I]);class Ma{constructor(t,r,n){this.window=t,this.publicToken=r,this.recorderSettings=n,n.maskingLevel==null&&(n.maskingLevel="input-and-textarea"),this.sessionRecorder=new ba(n),this.eventRecorder=new wa(t,n),Er("public/captured-sessions",{publicToken:r},{withCredentials:!1}).then(i=>{const o=i.data;this.capturedSessionId=o,this.sessionRecorder.setCapturedSessionId(o),this.eventRecorder.setCapturedSessionId(o),this.schedulePing();const s=this.collectCapturedUserMetadata();Er(`public/captured-sessions/${this.capturedSessionId}/captured-session/metadata`,s,{withCredentials:!1})}).catch(i=>{console.error(i),this.sessionRecorder.stop(),this.eventRecorder.stop()})}sessionRecorder;eventRecorder;capturedSessionId=null;pingIntervalMs=2e4;pingTimeout=null;schedulePing(){this.pingTimeout&&clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(this.ping,this.pingIntervalMs)}ping=async()=>{await ma(`public/captured-sessions/${this.capturedSessionId}/ping`,{},{withCredentials:!1}),this.schedulePing()};start(){this.sessionRecorder.start(),this.eventRecorder.start()}stop(){this.sessionRecorder.stop(),this.eventRecorder.stop()}collectCapturedUserMetadata=()=>{const t=new Me,r=t.getBrowser().name,n=t.getBrowser().version,i=t.getOS().name,o=t.getOS().version,s=t.getDevice().type??"desktop",a=navigator.language,l=Intl.DateTimeFormat().resolvedOptions().timeZone,c=document.referrer||void 0;let u;try{u=c?new URL(c).hostname:void 0}catch{}const d=window.innerWidth||document.documentElement.clientWidth,m=window.innerHeight||document.documentElement.clientHeight,w=new URL(window.location.href),f=w.searchParams.get("utm_source")||w.searchParams.get("source")||w.searchParams.get("ref")||void 0,v=w.searchParams.get("utm_medium")||w.searchParams.get("medium")||void 0,C=w.searchParams.get("utm_campaign")||w.searchParams.get("campaign")||void 0,k=w.searchParams.get("utm_content")||w.searchParams.get("content")||void 0,S=w.searchParams.get("utm_term")||w.searchParams.get("term")||void 0;return{browserName:r,browserVersion:n,osName:i,osVersion:o,deviceType:s,browserLanguage:a,browserTimeZone:l,referringUrl:c,referringDomain:u,viewportWidth:d,viewportHeight:m,utmSource:f,utmMedium:v,utmCampaign:C,utmContent:k,utmTerm:S}}}var j=(e=>(e.None="none",e.All="all",e.InputAndTextArea="input-and-textarea",e.InputPasswordOrEmailAndTextArea="input-password-or-email-and-textarea",e))(j||{});return xt.MaskingLevel=j,xt.Recorder=Ma,Object.defineProperty(xt,Symbol.toStringTag,{value:"Module"}),xt}({});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Recorder, type RecorderSettings, MaskingLevel } from './recorder/recorder';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Recorder, MaskingLevel } from './recorder/recorder';
|
package/dist/logger.d.ts
ADDED
package/dist/logger.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type RecorderSettings } from "./recorder";
|
|
2
|
+
export interface InteractionEvent {
|
|
3
|
+
eventType: string | "click" | "keydown" | "urlChange" | "change" | "submit";
|
|
4
|
+
tagName?: string | null;
|
|
5
|
+
timestamp: number;
|
|
6
|
+
host: string;
|
|
7
|
+
path: string;
|
|
8
|
+
text: string | null;
|
|
9
|
+
domContext?: JsonNode[];
|
|
10
|
+
queryParams?: [string, string][];
|
|
11
|
+
}
|
|
12
|
+
export interface ClickEvent extends InteractionEvent {
|
|
13
|
+
eventType: "click";
|
|
14
|
+
}
|
|
15
|
+
export interface KeyEvent extends InteractionEvent {
|
|
16
|
+
eventType: "keydown";
|
|
17
|
+
key: string;
|
|
18
|
+
}
|
|
19
|
+
export interface JsonNode {
|
|
20
|
+
tag: string;
|
|
21
|
+
attrs: Record<string, string>;
|
|
22
|
+
}
|
|
23
|
+
export declare class EventRecorder {
|
|
24
|
+
private window;
|
|
25
|
+
private recorderSettings;
|
|
26
|
+
private eventsBuffer;
|
|
27
|
+
private isRunning;
|
|
28
|
+
private tagsToCapture;
|
|
29
|
+
private queryParamsAllowed;
|
|
30
|
+
private readonly flushIntervalMs;
|
|
31
|
+
private capturedSessionId;
|
|
32
|
+
private flushTimerId;
|
|
33
|
+
constructor(window: Window, recorderSettings: RecorderSettings);
|
|
34
|
+
start: () => void;
|
|
35
|
+
private scheduleFlush;
|
|
36
|
+
private flush;
|
|
37
|
+
private handlePageView;
|
|
38
|
+
private sanitizeUrlParams;
|
|
39
|
+
private handler;
|
|
40
|
+
private handleChange;
|
|
41
|
+
private handleClick;
|
|
42
|
+
private handleKeyDown;
|
|
43
|
+
private findInputOrSelectOrTextAreaLabel;
|
|
44
|
+
stop: () => void;
|
|
45
|
+
private captureDomContext;
|
|
46
|
+
private toJsonNode;
|
|
47
|
+
setCapturedSessionId(uuid: string): void;
|
|
48
|
+
}
|